@@ -295,3 +295,9 @@ int wait_for_resource_loaded(enum resource_id id, uint32_t idx)
id, idx, waited);
return r;
}
+
+void op_display(enum op_severity sev, enum op_module mod, uint16_t code)
+{
+ if (platform.op_display)
+ platform.op_display(sev, mod, code);
+}
@@ -49,16 +49,14 @@ static void fsp_op_display_fatal(uint32_t w0, uint32_t w1)
fsp_fatal_msg(&op_msg);
}
-void op_display(enum op_severity sev, enum op_module mod, uint16_t code)
+void fsp_op_display(enum op_severity sev, enum op_module mod, uint16_t code)
{
struct fsp_msg *op_msg;
uint32_t w0;
uint32_t w1;
- if (!fsp_present()) {
- op_display_lpc(sev, mod, code);
+ if (!fsp_present())
return;
- }
w0 = sev << 16 | mod;
@@ -853,4 +853,6 @@ extern void fsp_chiptod_init(void);
/* Terminate immediate */
extern void __attribute__((noreturn)) ibm_fsp_terminate(const char *msg);
+void fsp_op_display(enum op_severity sev, enum op_module mod, uint16_t code);
+
#endif /* __FSP_H */
@@ -237,6 +237,14 @@ struct platform {
* SEEPROM update routine
*/
void (*seeprom_update)(void);
+
+ /*
+ * Operator Panel display
+ * Physical FSP op panel or LPC port 80h
+ * or any other "get boot status out to the user" thing.
+ */
+ void (*op_display)(enum op_severity sev, enum op_module mod,
+ uint16_t code);
};
extern struct platform __platforms_start;
@@ -172,4 +172,5 @@ DECLARE_PLATFORM(barreleye) = {
.resource_loaded = flash_resource_loaded,
.exit = ipmi_wdt_final_reset,
.terminate = ipmi_terminate,
+ .op_display = op_display_lpc,
};
@@ -159,4 +159,5 @@ DECLARE_PLATFORM(firestone) = {
.resource_loaded = flash_resource_loaded,
.exit = ipmi_wdt_final_reset,
.terminate = ipmi_terminate,
+ .op_display = op_display_lpc,
};
@@ -306,4 +306,5 @@ DECLARE_PLATFORM(garrison) = {
.exit = ipmi_wdt_final_reset,
.terminate = ipmi_terminate,
.seeprom_update = astbmc_seeprom_update,
+ .op_display = op_display_lpc,
};
@@ -150,4 +150,5 @@ DECLARE_PLATFORM(habanero) = {
.exit = ipmi_wdt_final_reset,
.terminate = ipmi_terminate,
.seeprom_update = astbmc_seeprom_update,
+ .op_display = op_display_lpc,
};
@@ -362,4 +362,5 @@ DECLARE_PLATFORM(p8dnu) = {
.exit = ipmi_wdt_final_reset,
.terminate = ipmi_terminate,
.seeprom_update = astbmc_seeprom_update,
+ .op_display = op_display_lpc,
};
@@ -263,6 +263,7 @@ DECLARE_PLATFORM(p8dtu1u) = {
.exit = ipmi_wdt_final_reset,
.terminate = ipmi_terminate,
.seeprom_update = astbmc_seeprom_update,
+ .op_display = op_display_lpc,
};
DECLARE_PLATFORM(p8dtu2u) = {
@@ -281,5 +282,6 @@ DECLARE_PLATFORM(p8dtu2u) = {
.exit = ipmi_wdt_final_reset,
.terminate = ipmi_terminate,
.seeprom_update = astbmc_seeprom_update,
+ .op_display = op_display_lpc,
};
@@ -732,4 +732,5 @@ DECLARE_PLATFORM(p9dsu1u) = {
.elog_commit = ipmi_elog_commit,
.exit = ipmi_wdt_final_reset,
.terminate = ipmi_terminate,
+ .op_display = op_display_lpc,
};
@@ -133,4 +133,5 @@ DECLARE_PLATFORM(palmetto) = {
.resource_loaded = flash_resource_loaded,
.exit = ipmi_wdt_final_reset,
.terminate = ipmi_terminate,
+ .op_display = op_display_lpc,
};
@@ -82,4 +82,5 @@ DECLARE_PLATFORM(romulus) = {
.elog_commit = ipmi_elog_commit,
.exit = astbmc_exit,
.terminate = ipmi_terminate,
+ .op_display = op_display_lpc,
};
@@ -83,4 +83,5 @@ DECLARE_PLATFORM(talos) = {
.elog_commit = ipmi_elog_commit,
.exit = astbmc_exit,
.terminate = ipmi_terminate,
+ .op_display = op_display_lpc,
};
@@ -352,4 +352,5 @@ DECLARE_PLATFORM(vesnin) = {
.resource_loaded = flash_resource_loaded,
.exit = ipmi_wdt_final_reset,
.terminate = ipmi_terminate,
+ .op_display = op_display_lpc,
};
@@ -512,4 +512,5 @@ DECLARE_PLATFORM(witherspoon) = {
.pci_get_slot_info = dt_slot_get_slot_info,
.ocapi = &witherspoon_ocapi,
.npu2_device_detect = witherspoon_npu2_device_detect,
+ .op_display = op_display_lpc,
};
@@ -269,4 +269,5 @@ DECLARE_PLATFORM(zaius) = {
.terminate = ipmi_terminate,
.ocapi = &zaius_ocapi,
.npu2_device_detect = npu2_i2c_presence_detect,
+ .op_display = op_display_lpc,
};
@@ -226,4 +226,5 @@ DECLARE_PLATFORM(firenze) = {
.resource_loaded = fsp_resource_loaded,
.sensor_read = ibm_fsp_sensor_read,
.terminate = ibm_fsp_terminate,
+ .op_display = fsp_op_display,
};
@@ -90,4 +90,5 @@ DECLARE_PLATFORM(zz) = {
.terminate = ibm_fsp_terminate,
.ocapi = &zz_ocapi,
.npu2_device_detect = npu2_i2c_presence_detect,
+ .op_display = fsp_op_display,
};
We have an implementation for non-FSP systems now, and we shouldn't be calling that from code in an fsp/ directory, so move op_display() to a platform function. Signed-off-by: Stewart Smith <stewart@linux.ibm.com> --- core/platform.c | 6 ++++++ hw/fsp/fsp-op-panel.c | 6 ++---- include/fsp.h | 2 ++ include/platform.h | 8 ++++++++ platforms/astbmc/barreleye.c | 1 + platforms/astbmc/firestone.c | 1 + platforms/astbmc/garrison.c | 1 + platforms/astbmc/habanero.c | 1 + platforms/astbmc/p8dnu.c | 1 + platforms/astbmc/p8dtu.c | 2 ++ platforms/astbmc/p9dsu.c | 1 + platforms/astbmc/palmetto.c | 1 + platforms/astbmc/romulus.c | 1 + platforms/astbmc/talos.c | 1 + platforms/astbmc/vesnin.c | 1 + platforms/astbmc/witherspoon.c | 1 + platforms/astbmc/zaius.c | 1 + platforms/ibm-fsp/firenze.c | 1 + platforms/ibm-fsp/zz.c | 1 + 19 files changed, 34 insertions(+), 4 deletions(-)