diff options
author | Michael Niewöhner <foss@mniewoehner.de> | 2020-03-03 20:48:30 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-03-11 15:36:31 +0000 |
commit | ccde6be13a64f369da61c70be0221d0bc24f0fe2 (patch) | |
tree | 8ba79724852f034f0c41221e11be7e2b76f493e5 /src/soc/intel/common | |
parent | 5f26d8cb4ad17570a60f449022574d819f39d6c2 (diff) |
soc/intel/common/block/smm: add case intrusion to SMI handler
This adds case intrusion detection to the SMI handler. At this point one
can add the code to be executed when the INTRUDER signal gets asserted
(iow: when the case is opened).
Examples:
- issue a warning
- trigger an NMI
- call poweroff()
- ...
Tested on X11SSM-F.
Change-Id: Ifad675bb09215ada760efebdcd915958febf5778
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39265
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/soc/intel/common')
-rw-r--r-- | src/soc/intel/common/block/smm/smihandler.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/smm/smihandler.c b/src/soc/intel/common/block/smm/smihandler.c index 54f4e41e50..12c538eb96 100644 --- a/src/soc/intel/common/block/smm/smihandler.c +++ b/src/soc/intel/common/block/smm/smihandler.c @@ -28,6 +28,7 @@ #include <intelblocks/fast_spi.h> #include <intelblocks/pmclib.h> #include <intelblocks/smihandler.h> +#include <intelblocks/tco.h> #include <intelblocks/uart.h> #include <smmstore.h> #include <soc/nvs.h> @@ -453,6 +454,14 @@ void smihandler_southbridge_tco( /* Handle TCO timeout */ printk(BIOS_DEBUG, "TCO Timeout.\n"); } + + if (tco_sts & (TCO_INTRD_DET << 16)) { /* INTRUDER# assertion */ + /* + * Handle intrusion event + * If we ever get here, probably the case has been opened. + */ + printk(BIOS_CRIT, "Case intrusion detected.\n"); + } } void smihandler_southbridge_periodic( |