From 3904f94643225efff8bbf7fe84532954e88f0142 Mon Sep 17 00:00:00 2001 From: Vasant Hegde Date: Fri, 4 Sep 2015 16:55:13 +0530 Subject: IPMI: Introduce attention call Presently abort() function is not working on BMC based machine. System hangs after abort/assert call. We have to reboot machine from BMC (IPMI command or BMC console). This patch introduces attention functionality for BMC based machine. It logs eSEL event that contains OPAL version, file info and backtrace. And calls cec_reboot... which takes care of rebooting host. Note: - This patch uses ipmi_queue_msg() instead of ipmi_queue_msg_sync() as we are having some issues with sync path. This will resolved once we sort out [1]. - This patch calls cec_reboot to reboot machine after logging eSEL event. It queues IPMI message and bt_poll() should be working until we pass reboot IPMI message to BMC. Hence we have while loop with time_wait_ms(). Alternatively we can use xscom_trigger_xstop().. but it will stop immediately and eSEL logging fails. [1] https://lists.ozlabs.org/pipermail/skiboot/2015-August/001824.html Sample eSEL output after assert call: ------------------------------------ [hegdevasant@hegdevasant bin]$ strings fir01bmc.150820.120511.eSel.binary BB821410 AT8335-GTA000000000000 AT8335-GTA000000000000UD ATDESC OPAL version : skiboot-5.1.1-44-geae3999-hegdevasant-dirty-bb31bfd File info : core/init.c:463:0 CPU 0060 Backtrace: S: 0000000031d83bc0 R: 000000003006086c .ipmi_terminate+0x110 S: 0000000031d83c60 R: 0000000030017f90 ._abort+0x80 S: 0000000031d83ce0 R: 0000000030017fd8 .assert_fail+0x34 S: 0000000031d83d60 R: 0000000030013dcc .load_and_boot_kernel+0x784 S: 0000000031d83e30 R: 000000003001437c .main_cpu_entry+0x57c S: 0000000031d83f00 R: 0000000030002544 boot_entry+0x194 Signed-off-by: Vasant Hegde Signed-off-by: Stewart Smith --- platforms/astbmc/firestone.c | 1 + platforms/astbmc/garrison.c | 1 + platforms/astbmc/habanero.c | 1 + platforms/astbmc/palmetto.c | 1 + 4 files changed, 4 insertions(+) (limited to 'platforms/astbmc') diff --git a/platforms/astbmc/firestone.c b/platforms/astbmc/firestone.c index cda9d06e..445a28bd 100644 --- a/platforms/astbmc/firestone.c +++ b/platforms/astbmc/firestone.c @@ -47,4 +47,5 @@ DECLARE_PLATFORM(firestone) = { .start_preload_resource = flash_start_preload_resource, .resource_loaded = flash_resource_loaded, .exit = ipmi_wdt_final_reset, + .terminate = ipmi_terminate, }; diff --git a/platforms/astbmc/garrison.c b/platforms/astbmc/garrison.c index 5cd8e2ec..edc35224 100644 --- a/platforms/astbmc/garrison.c +++ b/platforms/astbmc/garrison.c @@ -56,4 +56,5 @@ DECLARE_PLATFORM(garrison) = { .start_preload_resource = flash_start_preload_resource, .resource_loaded = flash_resource_loaded, .exit = ipmi_wdt_final_reset, + .terminate = ipmi_terminate, }; diff --git a/platforms/astbmc/habanero.c b/platforms/astbmc/habanero.c index 41e84f77..4ab2cdcb 100644 --- a/platforms/astbmc/habanero.c +++ b/platforms/astbmc/habanero.c @@ -153,4 +153,5 @@ DECLARE_PLATFORM(habanero) = { .start_preload_resource = flash_start_preload_resource, .resource_loaded = flash_resource_loaded, .exit = ipmi_wdt_final_reset, + .terminate = ipmi_terminate, }; diff --git a/platforms/astbmc/palmetto.c b/platforms/astbmc/palmetto.c index 7c2a1578..ca919080 100644 --- a/platforms/astbmc/palmetto.c +++ b/platforms/astbmc/palmetto.c @@ -56,4 +56,5 @@ DECLARE_PLATFORM(palmetto) = { .start_preload_resource = flash_start_preload_resource, .resource_loaded = flash_resource_loaded, .exit = ipmi_wdt_final_reset, + .terminate = ipmi_terminate, }; -- cgit v1.2.1