google/chromeec: Add ACPI method for EC Panic

Add an ACPI method to handle EC_HOST_EVENT_PANIC (bit 24) events.

EC panic is not covered by the standard (0-F) ACPI notify values.
Arbitrarily choosing B0 notify, which is in the 84-BF device specific
ACPI notify range.

This will be a no-op until the kernel driver is also updated to handle
this event.

BUG=b:258195448
BRANCH=None
TEST=Observe event with modified cros_ec_lpc driver

Signed-off-by: Rob Barnes <robbarnes@google.com>
Change-Id: Iafa642c1c50f9a0083a8e618e1eabec9a7ce39b4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69391
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Rob Barnes 2022-11-08 07:47:14 -07:00 committed by Martin L Roth
parent 2204cee6e9
commit a3148ca504
1 changed files with 9 additions and 0 deletions

View File

@ -12,6 +12,8 @@
#define EC_OEM_VARIABLE_DATA_MASK 0x7 #define EC_OEM_VARIABLE_DATA_MASK 0x7
#define INT3400_ODVP_CHANGED 0x88 #define INT3400_ODVP_CHANGED 0x88
#define ACPI_NOTIFY_CROS_EC_PANIC 0xB0
// Mainboard specific throttle handler // Mainboard specific throttle handler
#ifdef DPTF_ENABLE_CHARGER #ifdef DPTF_ENABLE_CHARGER
External (\_SB.DPTF.TCHG, DeviceObj) External (\_SB.DPTF.TCHG, DeviceObj)
@ -409,6 +411,13 @@ Device (EC0)
\PNOT () \PNOT ()
} }
// EC Panic
Method (_Q18, 0, NotSerialized)
{
Printf ("EC: PANIC")
Notify (CREC, ACPI_NOTIFY_CROS_EC_PANIC)
}
// MKBP interrupt. // MKBP interrupt.
Method (_Q1B, 0, NotSerialized) Method (_Q1B, 0, NotSerialized)
{ {