coreboot/src/include/cpu
Sean Rhodes deb510afeb cpu/x86/smm: add OPAL S3 CBMEM scratch
Provide an optional, coreboot-managed CBMEM scratch buffer for SMM code.

CBMEM is reserved from the OS via the memory map and persists across S3,
so it is suitable for firmware-owned DMA buffers used during resume.
SMRAM is not device DMA-accessible, so this scratch buffer must live
outside SMRAM.

Pass the base/size to SMM via smm_runtime so SMM code can validate
placement and avoid relying on untrusted pointers.

The CBMEM region size is configurable via SMM_OPAL_S3_SCRATCH_SIZE,
defaulting to 16 KiB as a safe value.

TEST=tested with rest of patch train

Change-Id: I79ae5327f27e574b151b7cf456761fa0d7038f2f
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91042
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2026-03-13 16:44:04 +00:00
..
amd amd/microcode: Add API to obtain address on microcode update block 2026-03-12 20:40:48 +00:00
intel cpu/intel/smm/gen1: Optimize cpu_has_alternative_smrr 2026-02-24 16:19:14 +00:00
power src/cpu/power9: move part of scom.h to scom.c 2023-04-18 13:05:56 +00:00
x86 cpu/x86/smm: add OPAL S3 CBMEM scratch 2026-03-13 16:44:04 +00:00
cpu.h x86: Separate CPU and SoC physical address size 2023-12-22 12:26:59 +00:00