soc/intel/{adl,tgl,jsl}: Add smihandler_soc_disable_busmaster
If a power button SMI is triggered between where it is currently enabled and before FSP-S exits, when the SMI handler disables bus mastering for all devices, it inadvertently also disables the PMC's I/O decoding, so the register write to actually go into S5 does not succeed, and the system hangs. This can be solved by skipping the PMC when disabling bus mastering in the SMI handler, for which a callback, smihandler_soc_disable_busmaster is provided. BUG=b:186194102, b:186815114 TEST=Power on the system and pressing power button repeatedly doesn't cause the system hang during shutdown. Change-Id: I1cf5cf91ebad4a49df6679e01fc88ff60c81526c Signed-off-by: Kane Chen <kane.chen@intel.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/52873 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
parent
4f27dde72a
commit
7b7b33e3a6
|
@ -24,6 +24,14 @@ void smihandler_soc_at_finalize(void)
|
|||
heci_disable();
|
||||
}
|
||||
|
||||
int smihandler_soc_disable_busmaster(pci_devfn_t dev)
|
||||
{
|
||||
/* Skip disabling PMC bus master to keep IO decode enabled */
|
||||
if (dev == PCH_DEV_PMC)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
const smi_handler_t southbridge_smi[SMI_STS_BITS] = {
|
||||
[SMI_ON_SLP_EN_STS_BIT] = smihandler_southbridge_sleep,
|
||||
[APM_STS_BIT] = smihandler_southbridge_apmc,
|
||||
|
|
|
@ -24,6 +24,14 @@ void smihandler_soc_at_finalize(void)
|
|||
heci_disable();
|
||||
}
|
||||
|
||||
int smihandler_soc_disable_busmaster(pci_devfn_t dev)
|
||||
{
|
||||
/* Skip disabling PMC bus master to keep IO decode enabled */
|
||||
if (dev == PCH_DEV_PMC)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
const smi_handler_t southbridge_smi[SMI_STS_BITS] = {
|
||||
[SMI_ON_SLP_EN_STS_BIT] = smihandler_southbridge_sleep,
|
||||
[APM_STS_BIT] = smihandler_southbridge_apmc,
|
||||
|
|
|
@ -24,6 +24,14 @@ void smihandler_soc_at_finalize(void)
|
|||
heci_disable();
|
||||
}
|
||||
|
||||
int smihandler_soc_disable_busmaster(pci_devfn_t dev)
|
||||
{
|
||||
/* Skip disabling PMC bus master to keep IO decode enabled */
|
||||
if (dev == PCH_DEV_PMC)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
const smi_handler_t southbridge_smi[SMI_STS_BITS] = {
|
||||
[SMI_ON_SLP_EN_STS_BIT] = smihandler_southbridge_sleep,
|
||||
[APM_STS_BIT] = smihandler_southbridge_apmc,
|
||||
|
|
Loading…
Reference in New Issue