aboutsummaryrefslogtreecommitdiff
path: root/include/ipmi.h
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2015-09-04 16:55:13 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-09-09 15:48:34 +1000
commit3904f94643225efff8bbf7fe84532954e88f0142 (patch)
treec804681c44f426a66bf519b92dbc76b6773cc229 /include/ipmi.h
parenta770f3385aed10db07dc78698423b5cdcb48a651 (diff)
downloadskiboot-3904f94643225efff8bbf7fe84532954e88f0142.zip
skiboot-3904f94643225efff8bbf7fe84532954e88f0142.tar.gz
skiboot-3904f94643225efff8bbf7fe84532954e88f0142.tar.bz2
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 <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/ipmi.h')
-rw-r--r--include/ipmi.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/ipmi.h b/include/ipmi.h
index b33041b..99a9094 100644
--- a/include/ipmi.h
+++ b/include/ipmi.h
@@ -276,4 +276,7 @@ uint8_t ipmi_get_sensor_number(uint8_t sensor_type);
/* Set the boot count once the OS is up and running */
int ipmi_set_boot_count(void);
+/* Terminate immediate */
+void __attribute__((noreturn)) ipmi_terminate(const char *msg);
+
#endif