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>
This commit is contained in:
Michael Niewöhner 2020-03-03 20:48:30 +01:00 committed by Patrick Georgi
parent 5f26d8cb4a
commit ccde6be13a

View file

@ -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(