diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-08-16 04:36:24 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-08-16 04:36:24 +0000 |
commit | f4a25e813f7ffa624b4868eb19fe13a34c4778ce (patch) | |
tree | 2cde91db065fc9402936d13b26510a6d6d2c46ec /IntelFrameworkModulePkg | |
parent | 54e27ada3e63b559e2e18c44d3cb8c69a5f5a561 (diff) | |
download | edk2-platforms-f4a25e813f7ffa624b4868eb19fe13a34c4778ce.tar.xz |
Add validation on ACPI_S3_CONTEXT.S3DebugBufferAddress, moreover only debug tip could override IDT entry for INT3.
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13640 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg')
-rw-r--r-- | IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3Save.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3Save.c b/IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3Save.c index 4e36c8ae64..5a021d2caa 100644 --- a/IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3Save.c +++ b/IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3Save.c @@ -2,7 +2,7 @@ This is an implementation of the ACPI S3 Save protocol. This is defined in
S3 boot path specification 0.9.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
@@ -453,9 +453,10 @@ S3Ready ( ASSERT (AcpiS3Context->BootScriptStackBase != 0);
//
- // Allocate a code buffer < 4G for S3 debug to load external code
+ // Allocate a code buffer < 4G for S3 debug to load external code, set invalid code instructions in it.
//
AcpiS3Context->S3DebugBufferAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateAcpiNvsMemoryBelow4G (EFI_PAGE_SIZE);
+ SetMem ((VOID *)(UINTN)AcpiS3Context->S3DebugBufferAddress, EFI_PAGE_SIZE, 0xff);
DEBUG((EFI_D_INFO, "AcpiS3Context: AcpiFacsTable is 0x%8x\n", AcpiS3Context->AcpiFacsTable));
DEBUG((EFI_D_INFO, "AcpiS3Context: IdtrProfile is 0x%8x\n", AcpiS3Context->IdtrProfile));
|