diff options
author | Michael Neuling <mikey@neuling.org> | 2016-11-02 18:07:36 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-11-02 18:24:09 +1100 |
commit | e6f180d10a6f09f9dcde28629a691debf2284169 (patch) | |
tree | 32c46f637542c141c36d8e971ceaf46813659b28 | |
parent | 310c04648b3474d9437428e1b65557447f8f86f7 (diff) | |
download | skiboot-e6f180d10a6f09f9dcde28629a691debf2284169.zip skiboot-e6f180d10a6f09f9dcde28629a691debf2284169.tar.gz skiboot-e6f180d10a6f09f9dcde28629a691debf2284169.tar.bz2 |
mambo: Convert sim exit from asm to C
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | asm/misc.S | 6 | ||||
-rw-r--r-- | include/platform.h | 2 | ||||
-rw-r--r-- | platforms/mambo/mambo.c | 5 |
3 files changed, 3 insertions, 10 deletions
@@ -69,12 +69,6 @@ mambo_write: .long 0x000eaeb0 blr -.global mambo_sim_exit -mambo_sim_exit: - li %r3, 31 /* aka. SimExitCode */ - .long 0x000eaeb0 - b . - .global mambo_get_time mambo_get_time: #define SIM_GET_TIME_CODE 70 diff --git a/include/platform.h b/include/platform.h index 334c0a4..ff75adf 100644 --- a/include/platform.h +++ b/include/platform.h @@ -189,6 +189,4 @@ extern int resource_loaded(enum resource_id id, uint32_t idx); extern int wait_for_resource_loaded(enum resource_id id, uint32_t idx); -extern void mambo_sim_exit(void); - #endif /* __PLATFORM_H */ diff --git a/platforms/mambo/mambo.c b/platforms/mambo/mambo.c index 21578c8..5207ecb 100644 --- a/platforms/mambo/mambo.c +++ b/platforms/mambo/mambo.c @@ -96,6 +96,7 @@ static inline unsigned long callthru3(int command, unsigned long arg1, #define BD_SECT_SZ 512 +#define SIM_EXIT_CODE 31 #define BOGUS_DISK_READ 116 #define BOGUS_DISK_WRITE 117 #define BOGUS_DISK_INFO 118 @@ -256,7 +257,7 @@ static void mambo_platform_init(void) static int64_t mambo_cec_power_down(uint64_t request __unused) { if (chip_quirk(QUIRK_MAMBO_CALLOUTS)) - mambo_sim_exit(); + callthru0(SIM_EXIT_CODE); return OPAL_UNSUPPORTED; } @@ -264,7 +265,7 @@ static int64_t mambo_cec_power_down(uint64_t request __unused) static void __attribute__((noreturn)) mambo_terminate(const char *msg __unused) { if (chip_quirk(QUIRK_MAMBO_CALLOUTS)) - mambo_sim_exit(); + callthru0(SIM_EXIT_CODE); for (;;) ; } |