[Skiboot] [PATCH] core/init: set firmware progress sensor only on bmc systems.

ppaidipe at linux.vnet.ibm.com ppaidipe at linux.vnet.ibm.com
Thu Nov 3 18:06:42 AEDT 2016


From: Pridhiviraj Paidipeddi <ppaidipe at linux.vnet.ibm.com>

Currently Hostboot populates /bmc/sensors dt node and corresponding sensors
only for BMC platforms, And for FSP platforms hostboot is not populating any
fsp sensors(Management sensors) and also there is no firmware progress
sensor exist in fsp platforms. due to which OPAL incorrectly setting firmware
status on a sensor id "00" which is not at all exist.

On a FSP system:
 cat /sys/firmware/opal/msglog | grep -i setting
[   21.189204883,6] IPMI: setting fw progress sensor 00 to 07
[   21.189559121,6] IPMI: setting fw progress sensor 00 to 13
cat /sys/firmware/opal/msglog | grep -i skiboot
[   84.127416495,5] SkiBoot skiboot-5.4.0-rc3 starting...

On a BMC system:
cat /sys/firmware/opal/msglog | grep -i setting
[    3.166286901,6] IPMI: setting fw progress sensor 05 to 14
[   14.259153338,6] IPMI: setting fw progress sensor 05 to 07
[   14.469070593,5] IPMI: Resetting boot count on successful boot
[   15.001210324,6] IPMI: setting fw progress sensor 05 to 13

So this patch fixes this incorrect setting on a fsp system, and sets only for BMC
platforms.

After patch:
On a FSP system:
cat /sys/firmware/opal/msglog | grep -i setting

On a BMC system:
cat /sys/firmware/opal/msglog | grep -i setting
[    3.167498705,6] IPMI: setting fw progress sensor 05 to 14
[   15.395841913,6] IPMI: setting fw progress sensor 05 to 07
[   16.117858189,5] IPMI: Resetting boot count on successful boot
[   16.163131535,6] IPMI: setting fw progress sensor 05 to 13

Need to enable this for FSP platforms once OPAL recieves sensors dt node
and fsp implements corresponding firmware progress sensor type(0x0f).
And also ipmi_sensor_init is only doing for ast bmc platforms(astbmc_init), and hence
there are sensors array created for FSP platforms.

Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe at linux.vnet.ibm.com>
---
 core/init.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/core/init.c b/core/init.c
index 9d4ab60..4e9dcb8 100644
--- a/core/init.c
+++ b/core/init.c
@@ -481,7 +481,14 @@ void __noreturn load_and_boot_kernel(bool is_reboot)
 
 	load_initramfs();
 
-	ipmi_set_fw_progress_sensor(IPMI_FW_OS_BOOT);
+	/* Currently hostboot populates only BMC IPMI sensors dt node
+	 * and corresponding sensors, it is not populating fsp sensors.
+	 * And also there is no firmware progress sensor available for fsp
+	 * platforms. Enable this for fsp platforms once OPAL has corresponding
+	 * dt node and corresponding sensor exist.
+	 */
+        if (!fsp_present())
+                ipmi_set_fw_progress_sensor(IPMI_FW_OS_BOOT);
 
 	if (!is_reboot) {
 		/* We wait for the nvram read to complete here so we can
@@ -930,7 +937,11 @@ void __noreturn __nomcount main_cpu_entry(const void *fdt)
 	/* Add OPAL timer related properties */
 	late_init_timers();
 
-	ipmi_set_fw_progress_sensor(IPMI_FW_PCI_INIT);
+	/* Enable this for fsp platforms once OPAL has corresponding
+         * sensors dt node and corresponding firmware progress sensor exist.
+         */
+        if (!fsp_present())
+                ipmi_set_fw_progress_sensor(IPMI_FW_PCI_INIT);
 
 	/*
 	 * These last few things must be done as late as possible
-- 
2.7.4



More information about the Skiboot mailing list