diff --git a/bindings/muen/muen-platform_lifecycle.c b/bindings/muen/muen-platform_lifecycle.c index 98c06ce7..ba603d23 100644 --- a/bindings/muen/muen-platform_lifecycle.c +++ b/bindings/muen/muen-platform_lifecycle.c @@ -19,11 +19,24 @@ */ #include "bindings.h" +#include "sinfo.h" const struct mft *muen_manifest = NULL; extern const struct mft1_note __solo5_mft1_note; +void trigger_exit_event() +{ + const struct muen_resource_type *const + event = muen_get_resource("solo5_exit", MUEN_RES_EVENT); + + if (!event) { + return; + } + + __asm__ __volatile__("vmcall": : "a"(event->data.number) : "memory"); +} + void platform_init(const void *arg) { process_bootinfo(arg); @@ -47,6 +60,7 @@ void platform_exit(int status __attribute__((unused)), { const char msg[] = "Solo5: Halted\n"; platform_puts(msg, strlen(msg)); + trigger_exit_event(); __asm__ __volatile__("cli; hlt"); for (;;); } diff --git a/bindings/muen/start.c b/bindings/muen/start.c index 8e368027..69a8c6ea 100644 --- a/bindings/muen/start.c +++ b/bindings/muen/start.c @@ -63,7 +63,7 @@ DECLARE_ELF_INTERP ABI1_NOTE_DECLARE_BEGIN { .abi_target = MUEN_ABI_TARGET, - .abi_version = 2 + .abi_version = 3 } ABI1_NOTE_DECLARE_END diff --git a/bindings/solo5_muen.lds b/bindings/solo5_muen.lds index c3da16c2..0b7fc40e 100644 --- a/bindings/solo5_muen.lds +++ b/bindings/solo5_muen.lds @@ -25,7 +25,7 @@ * are unexpected input sections not named here, the result will probably not be * correct. */ -TEXT_START = 0x100000; +TEXT_START = 0x200000; ENTRY(_start) diff --git a/tests/test_fpu/test_fpu.c b/tests/test_fpu/test_fpu.c index f9cec2fd..621dee7b 100644 --- a/tests/test_fpu/test_fpu.c +++ b/tests/test_fpu/test_fpu.c @@ -30,7 +30,7 @@ int solo5_app_main(const struct solo5_start_info *si __attribute__((unused))) { puts("\n**** Solo5 standalone test_fpu ****\n\n"); - float a, b, c[4]; + float a, b, c[4] __attribute__((aligned(64))); c[0] = 2.0; c[1] = 5.0;