vc/tcg/opal: add OPAL packet builder for S3 unlock

Add the OPAL packet builder and unlock logic used by the SMM resume
path. Uses the TCG storage encoder and NVMe Security Send/Receive
helpers to perform the Admin1/User1 Set Global Range unlock sequence.

TEST=tested with rest of patch train

Change-Id: I4cdb16e13c1aeb89648db49672b77598a8b42fac
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91658
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Sean Rhodes 2026-03-11 16:06:19 -05:00 committed by Matt DeVillier
commit 8ff1a9a08c
3 changed files with 478 additions and 0 deletions

View file

@ -2,6 +2,10 @@
CPPFLAGS_common-$(CONFIG_TCG_OPAL_S3_UNLOCK) += -I$(src)/vendorcode/intel/tcg_storage_core
ramstage-$(CONFIG_TCG_OPAL_S3_UNLOCK) += opal_s3_resume.c
smm-$(CONFIG_TCG_OPAL_S3_UNLOCK) += opal_s3_smm.c
smm-$(CONFIG_TCG_OPAL_S3_UNLOCK) += opal_nvme.c
smm-$(CONFIG_TCG_OPAL_S3_UNLOCK) += ../../../vendorcode/tcg/opal/opal_unlock.c
smm-$(CONFIG_TCG_OPAL_S3_UNLOCK) += ../../../vendorcode/intel/tcg_storage_core/tcg_storage_core.c
smm-$(CONFIG_TCG_OPAL_S3_UNLOCK) += ../../../vendorcode/intel/tcg_storage_core/tcg_storage_util.c