soc/intel/skylake: Enable power button SMI when jumping to payload
Instead of enabling power button SMI unconditionally, add a boot state handler to enable power button SMI just before jumping to payload. This ensures that: 1. We do not respond to power button SMI until we know that coreboot is done. 2. On resume, there is no need to enable power button SMI. This avoids any power button presses during resume path from triggering a shutdown. BUG=b:64811381 Change-Id: Icc52dc0103555602c23e09660bc38bb4bfddbc11 Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://review.coreboot.org/21082 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Subrata Banik <subrata.banik@intel.com>
This commit is contained in:
committed by
Furquan Shaikh
parent
aef8542d81
commit
aeb2d64c85
@ -142,6 +142,22 @@ void enable_pm1(u16 events)
|
||||
outw(events, ACPI_BASE_ADDRESS + PM1_EN);
|
||||
}
|
||||
|
||||
/*
|
||||
* Update supplied events in PM1_EN register. This does not disable any already
|
||||
* set events.
|
||||
*/
|
||||
void update_pm1_enable(u16 events)
|
||||
{
|
||||
u16 pm1_en = read_pm1_enable();
|
||||
pm1_en |= events;
|
||||
enable_pm1(pm1_en);
|
||||
}
|
||||
|
||||
/* Read events set in PM1_EN register. */
|
||||
uint16_t read_pm1_enable(void)
|
||||
{
|
||||
return inw(ACPI_BASE_ADDRESS + PM1_EN);
|
||||
}
|
||||
|
||||
/*
|
||||
* SMI
|
||||
|
Reference in New Issue
Block a user