cpu/x86/smm: Add PCI resource store functionality
commitac8c378777d861000d82eea1c7439f16dcd45797
authorRobert Zieba <robertzieba@google.com>
Wed, 7 Sep 2022 22:25:15 +0000 (7 16:25 -0600)
committerMartin L Roth <gaumless@gmail.com>
Sun, 5 Mar 2023 15:31:07 +0000 (5 15:31 +0000)
tree58dafb5dd844410cec91e56c6f7ec5c8defd8fd5
parentf1a4cffc88d8a5490c444f41b60eaaf544399998
cpu/x86/smm: Add PCI resource store functionality

In certain cases data within protected memmory areas like SMRAM could
be leaked or modified if an attacker remaps PCI BARs to point within
that area. Add support to the existing SMM runtime to allow storing
PCI resources in SMRAM and then later retrieving them.

BRANCH=guybrush
BUG=b:186792595
TEST=builds

Signed-off-by: Robert Zieba <robertzieba@google.com>
Change-Id: I23fb1e935dd1b89f1cc5c834cc2025f0fe5fda37
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67931
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
src/cpu/x86/Kconfig
src/cpu/x86/smm/Makefile.inc
src/cpu/x86/smm/pci_resource_store.c [new file with mode: 0644]
src/cpu/x86/smm/smm_module_handler.c
src/cpu/x86/smm/smm_module_loader.c
src/include/cpu/x86/smm.h
src/include/device/pci_def.h