]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
arm: Fix build
authorJan Kiszka <jan.kiszka@siemens.com>
Wed, 29 Jan 2014 15:11:01 +0000 (16:11 +0100)
committerJan Kiszka <jan.kiszka@siemens.com>
Wed, 29 Jan 2014 15:33:02 +0000 (16:33 +0100)
More blunt hacks to keep it building.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/arch/arm/include/asm/cell.h
hypervisor/arch/arm/include/asm/jailhouse_hypercall.h
hypervisor/arch/arm/include/asm/percpu.h
hypervisor/arch/arm/setup.c

index 2ea61b22460cae8f9007b33b841d7bd9fda3800c..f139c54b5dc09fdca8b67eccc4c9ecad8982b33d 100644 (file)
@@ -17,6 +17,7 @@
 #include <asm/paging.h>
 
 #include <jailhouse/cell-config.h>
+#include <jailhouse/hypercall.h>
 
 struct cell {
        unsigned int id;
@@ -29,6 +30,11 @@ struct cell {
        unsigned long page_offset;
 
        struct cell *next;
+
+       union {
+               struct jailhouse_comm_region comm_region;
+               u8 padding[PAGE_SIZE];
+       } __attribute__((aligned(PAGE_SIZE))) comm_page;
 };
 
 extern struct cell linux_cell;
index 7f4ef8815c125a8ba3cab1f1f475c4c75f38dfaa..2a24b98f3d3583803c171f1831ba01613e5d3137 100644 (file)
 #define JAILHOUSE_CALL_ARG3            "r3"
 #define JAILHOUSE_CALL_ARG4            "r4"
 
+#ifndef __asmeq
+#define __asmeq(x, y)  ".ifnc " x "," y " ; .err ; .endif\n\t"
+#endif
+
 static inline __u32 jailhouse_call0(__u32 num)
 {
        register __u32 num_result asm(JAILHOUSE_CALL_NUM_RESULT) = num;
@@ -110,3 +114,23 @@ static inline __u32 jailhouse_call4(__u32 num, __u32 arg1, __u32 arg2,
                : "memory");
        return num_result;
 }
+
+static inline void
+jailhouse_send_msg_to_cell(struct jailhouse_comm_region *comm_region,
+                          __u32 msg)
+{
+       comm_region->reply_from_cell = JAILHOUSE_MSG_NONE;
+       /* ensure reply was cleared before sending new message */
+       asm volatile("dmb ishst" : : : "memory");
+       comm_region->msg_to_cell = msg;
+}
+
+static inline void
+jailhouse_send_reply_from_cell(struct jailhouse_comm_region *comm_region,
+                              __u32 reply)
+{
+       comm_region->msg_to_cell = JAILHOUSE_MSG_NONE;
+       /* ensure message was cleared before sending reply */
+       asm volatile("dmb ishst" : : : "memory");
+       comm_region->reply_from_cell = reply;
+}
index 037bf943b89dccb16d6a591e8731665bf56828e7..f7b9bfdfe30624a0713fde2b5627fe3c844cb2d9 100644 (file)
@@ -48,6 +48,7 @@ struct per_cpu {
        int sipi_vector;
        bool flush_caches;
        bool shutdown_cpu;
+       int shutdown_state;
 } __attribute__((aligned(PAGE_SIZE)));
 
 static inline struct per_cpu *per_cpu(unsigned int cpu)
index 5189f81e739d2379cb38a28cdc0f3505681f46f3..cc724393619eaa3045a2cd4517692220ba8e0f9c 100644 (file)
@@ -41,6 +41,7 @@ void arch_cpu_restore(struct per_cpu *cpu_data)
 #include <jailhouse/processor.h>
 #include <jailhouse/control.h>
 #include <jailhouse/string.h>
+#include <jailhouse/paging.h>
 void arch_dbg_write_init(void) {}
 int phys_processor_id(void) { return 0; }
 void arch_suspend_cpu(unsigned int cpu_id) {}
@@ -59,3 +60,6 @@ void arch_cell_destroy(struct per_cpu *cpu_data, struct cell *new_cell) {}
 void *memcpy(void *dest, const void *src, unsigned long n) { return NULL; }
 void arch_dbg_write(const char *msg) {}
 void arch_shutdown(void) {}
+unsigned long arch_page_map_gphys2phys(struct per_cpu *cpu_data,
+                                      unsigned long gphys)
+{ return INVALID_PHYS_ADDR; }