Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/79757?usp=email )
Change subject: security/intel/txt: Add support for x86_64 ......................................................................
security/intel/txt: Add support for x86_64
Add support for x86_64 by using protected_mode wrapper functions.
UNTESTED.
Change-Id: I9ff12d1cc85931e5a68866223d346bfea9ca7c30 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/security/intel/txt/common.c M src/security/intel/txt/getsec_enteraccs.S M src/security/intel/txt/getsec_sclean.S 3 files changed, 6 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/79757/1
diff --git a/src/security/intel/txt/common.c b/src/security/intel/txt/common.c index b78394a..8d1b9be 100644 --- a/src/security/intel/txt/common.c +++ b/src/security/intel/txt/common.c @@ -8,6 +8,7 @@ #include <cpu/x86/mtrr.h> #include <device/mmio.h> #include <lib.h> +#include <mode_switch.h> #include <smp/node.h> #include <string.h> #include <types.h> @@ -335,7 +336,7 @@ /* * Invoke the BIOS ACM. If successful, the system will reset with memory unlocked. */ - getsec_sclean((uintptr_t)acm_data, acm_len); + protected_mode_call_2arg(getsec_sclean, (uintptr_t)acm_data, acm_len);
/* * However, if this function returns, the BIOS ACM could not be invoked. This is bad. @@ -360,7 +361,8 @@ return -1;
/* Call into assembly which invokes the referenced ACM */ - getsec_enteraccs(input_params, (uintptr_t)acm_data, acm_len); + protected_mode_call_3arg(getsec_enteraccs, input_params, + (uintptr_t)acm_data, acm_len);
cbfs_unmap(acm_data);
diff --git a/src/security/intel/txt/getsec_enteraccs.S b/src/security/intel/txt/getsec_enteraccs.S index ff9db05..a6f21b2 100644 --- a/src/security/intel/txt/getsec_enteraccs.S +++ b/src/security/intel/txt/getsec_enteraccs.S @@ -30,6 +30,7 @@
.align 4 .text +.code32
/* * See "SAFER MODE EXTENSIONS REFERENCE." diff --git a/src/security/intel/txt/getsec_sclean.S b/src/security/intel/txt/getsec_sclean.S index 0944e15..6a5b105 100644 --- a/src/security/intel/txt/getsec_sclean.S +++ b/src/security/intel/txt/getsec_sclean.S @@ -10,6 +10,7 @@
.align 4 .text +.code32
/* * void getsec_sclean(const uint32_t acm_base, const uint32_t acm_size);