Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34569 )
Change subject: drivers/ipmi: Add option to not query BMC ......................................................................
drivers/ipmi: Add option to not query BMC
The BMC on SuperMicro X11SSH takes 34seconds to start the IPMI KCS, bu the default timeout of the IPMI KCS code is just 100msec.
To not wait additional 34seconds on boot, add the possibility to hardcode the IPMI version in devicetree.
Tested on SuperMicro X11SSH. The IPMI driver doesn't fail with an timeout any more.
Change-Id: I22c6885eae6fd7c778ac37b18f95b8775e9064e3 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/ipmi/chip.h M src/drivers/ipmi/ipmi_kcs_ops.c 2 files changed, 25 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/69/34569/1
diff --git a/src/drivers/ipmi/chip.h b/src/drivers/ipmi/chip.h index eb8b4e6..2123c76 100644 --- a/src/drivers/ipmi/chip.h +++ b/src/drivers/ipmi/chip.h @@ -24,6 +24,15 @@ u8 gpe_interrupt; u8 have_apic; u32 apic_interrupt; + /* Do not send IPMI_BMC_GET_DEVICE_ID to BMC, but used hardcoded + * IPMI version instead. + * This can be used if the BMC takes a long time to boot: + * AST2400 on SuperMicro X11SSH: 34seconds + */ + u8 no_detect_ipmi_version; + /* The IPMI version to advertise of 'no_detect_ipmi_version' is set */ + u8 ipmi_revision_major; + u8 ipmi_revision_minor; };
#endif /* _IMPI_CHIP_H_ */ diff --git a/src/drivers/ipmi/ipmi_kcs_ops.c b/src/drivers/ipmi/ipmi_kcs_ops.c index 0cc4e0a..95864e8 100644 --- a/src/drivers/ipmi/ipmi_kcs_ops.c +++ b/src/drivers/ipmi/ipmi_kcs_ops.c @@ -62,12 +62,27 @@ { struct ipmi_devid_rsp rsp; uint32_t man_id = 0, prod_id = 0; + struct drivers_ipmi_config *conf = NULL;
if (!dev->enabled) return;
+ printk(BIOS_DEBUG, "IPMI: PNP KCS 0x%x\n", dev->path.pnp.port); + + if (dev->chip_info) + conf = dev->chip_info; + /* Get IPMI version for ACPI and SMBIOS */ - if (!ipmi_get_device_id(dev, &rsp)) { + if (conf && conf->no_detect_ipmi_version) { + printk(BIOS_INFO, "IPMI: Assuming BMC is installed\n"); + + ipmi_revision_major = conf->ipmi_revision_major; + ipmi_revision_minor = conf->ipmi_revision_minor; + + printk(BIOS_INFO, "IPMI: Version %01x.%01x\n", + ipmi_revision_major, ipmi_revision_minor); + } else if (!ipmi_get_device_id(dev, &rsp)) { + /* Queried the IPMI revision from BMC */ ipmi_revision_minor = IPMI_IPMI_VERSION_MINOR(rsp.ipmi_version); ipmi_revision_major = IPMI_IPMI_VERSION_MAJOR(rsp.ipmi_version);