[Skiboot] [PATCH 1/4] mambo: Add terminate callback

Michael Neuling mikey at neuling.org
Mon Mar 7 13:27:31 AEDT 2016


Add terminate callback to mambo platform so that the simulator exits.

Signed-off-by: Michael Neuling <mikey at neuling.org>
---
 platforms/mambo/mambo.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/platforms/mambo/mambo.c b/platforms/mambo/mambo.c
index ecce2ad..dbed08d 100644
--- a/platforms/mambo/mambo.c
+++ b/platforms/mambo/mambo.c
@@ -73,6 +73,14 @@ static int64_t mambo_cec_power_down(uint64_t request __unused)
 	return OPAL_UNSUPPORTED;
 }
 
+static void __attribute__((noreturn)) mambo_terminate(const char *msg __unused)
+{
+	if (chip_quirk(QUIRK_MAMBO_CALLOUTS))
+		mambo_sim_exit();
+
+	for (;;) ;
+}
+
 static int mambo_nvram_info(uint32_t *total_size)
 {
 	*total_size = 0x100000;
@@ -93,6 +101,7 @@ DECLARE_PLATFORM(mambo) = {
 	.probe			= mambo_probe,
 	.init		= mambo_platform_init,
 	.cec_power_down = mambo_cec_power_down,
+	.terminate	= mambo_terminate,
 	.nvram_info		= mambo_nvram_info,
 	.nvram_start_read	= mambo_nvram_start_read,
 };
-- 
2.5.0



More information about the Skiboot mailing list