From: Antonios Motakis <[email protected]> Moving the heartbeat function to a header file, so we can reuse the uart-demo just by reimplementing the heartbeat on AArch64.
Signed-off-by: Antonios Motakis <[email protected]> --- inmates/demos/arm/uart-demo.c | 13 ------------- inmates/lib/arm/include/inmate.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/inmates/demos/arm/uart-demo.c b/inmates/demos/arm/uart-demo.c index 46be1ce..4748d40 100644 --- a/inmates/demos/arm/uart-demo.c +++ b/inmates/demos/arm/uart-demo.c @@ -12,19 +12,6 @@ #include <inmate.h> -/* - * To ease the debugging, we can send a spurious hypercall, which should return - * -ENOSYS, but appear in the hypervisor stats for this cell. - */ -static void heartbeat(void) -{ - asm volatile ( - ".arch_extension virt\n" - "mov r0, %0\n" - "hvc #0\n" - : : "r" (0xbea7) : "r0"); -} - void inmate_main(void) { unsigned int i = 0, j; diff --git a/inmates/lib/arm/include/inmate.h b/inmates/lib/arm/include/inmate.h index cf42983..f6f62a4 100644 --- a/inmates/lib/arm/include/inmate.h +++ b/inmates/lib/arm/include/inmate.h @@ -36,6 +36,19 @@ static inline void mmio_write32(void *address, u32 value) *(volatile u32 *)address = value; } +/* + * To ease the debugging, we can send a spurious hypercall, which should return + * -ENOSYS, but appear in the hypervisor stats for this cell. + */ +static inline void heartbeat(void) +{ + asm volatile ( + ".arch_extension virt\n" + "mov r0, %0\n" + "hvc #0\n" + : : "r" (0xbea7) : "r0"); +} + void __attribute__((interrupt("IRQ"))) __attribute__((used)) vector_irq(void); typedef void (*irq_handler_t)(unsigned int); -- 2.8.0.rc3 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
