diff options
-rw-r--r-- | core/init.c | 5 | ||||
-rw-r--r-- | include/ipmi.h | 5 | ||||
-rw-r--r-- | platforms/astbmc/common.c | 3 |
3 files changed, 13 insertions, 0 deletions
diff --git a/core/init.c b/core/init.c index ac61c37..1fd8d2e 100644 --- a/core/init.c +++ b/core/init.c @@ -43,6 +43,7 @@ #include <centaur.h> #include <libfdt/libfdt.h> #include <timer.h> +#include <ipmi.h> #include <ipmi.h> @@ -374,6 +375,8 @@ void __noreturn load_and_boot_kernel(bool is_reboot) load_initramfs(); + ipmi_set_fw_progress_sensor(IPMI_FW_OS_BOOT); + if (!is_reboot) { /* We wait for the nvram read to complete here so we can * grab stuff from there such as the kernel arguments @@ -668,6 +671,8 @@ void __noreturn main_cpu_entry(const void *fdt, u32 master_cpu) /* Add OPAL timer related properties */ late_init_timers(); + ipmi_set_fw_progress_sensor(IPMI_FW_PCI_INIT); + /* * These last few things must be done as late as possible * because they rely on various other things having been setup, diff --git a/include/ipmi.h b/include/ipmi.h index 0b403eb..c078471 100644 --- a/include/ipmi.h +++ b/include/ipmi.h @@ -84,6 +84,11 @@ #define IPMI_MESSAGE_FLAGS_OEM1 (1<<6) #define IPMI_MESSAGE_FLAGS_OEM2 (1<<7) +/* Firmware Progress Sensor states */ +#define IPMI_FW_PCI_INIT 0x07 +#define IPMI_FW_OS_BOOT 0x13 +#define IPMI_FW_MOTHERBOARD_INIT 0x14 + #define IPMI_CODE(netfn, cmd) ((netfn) << 8 | (cmd)) #define IPMI_CMD(code) ((code) & 0xff) #define IPMI_NETFN(code) ((code) >> 8 & 0xff) diff --git a/platforms/astbmc/common.c b/platforms/astbmc/common.c index a9878bf..93090b2 100644 --- a/platforms/astbmc/common.c +++ b/platforms/astbmc/common.c @@ -101,6 +101,7 @@ void astbmc_init(void) ipmi_opal_init(); ipmi_fru_init(0x01); elog_init(); + ipmi_sensor_init(); /* As soon as IPMI is up, inform BMC we are in "S0" */ ipmi_set_power_state(IPMI_PWR_SYS_S0_WORKING, IPMI_PWR_NOCHANGE); @@ -108,6 +109,8 @@ void astbmc_init(void) /* Enable IPMI OEM message interrupts */ astbmc_ipmi_setenables(); + ipmi_set_fw_progress_sensor(IPMI_FW_MOTHERBOARD_INIT); + /* Setup UART console for use by Linux via OPAL API */ if (!dummy_console_enabled()) uart_setup_opal_console(); |