Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14062
6f19259b-4bc3-4df7-8a09-
765794883524
This is an implementation of the ACPI S3 Save protocol. This is defined in\r
S3 boot path specification 0.9.\r
\r
This is an implementation of the ACPI S3 Save protocol. This is defined in\r
S3 boot path specification 0.9.\r
\r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
**/\r
VOID*\r
AllocateMemoryBelow4G (\r
**/\r
VOID*\r
AllocateMemoryBelow4G (\r
- IN UINTN MemoryType,\r
- IN UINTN Size\r
+ IN EFI_MEMORY_TYPE MemoryType,\r
+ IN UINTN Size\r
/** @file\r
This is an implementation of the AcpiVariable platform field for ECP platform.\r
\r
/** @file\r
This is an implementation of the AcpiVariable platform field for ECP platform.\r
\r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
**/\r
VOID*\r
AllocateMemoryBelow4G (\r
**/\r
VOID*\r
AllocateMemoryBelow4G (\r
- IN UINTN MemoryType,\r
- IN UINTN Size\r
+ IN EFI_MEMORY_TYPE MemoryType,\r
+ IN UINTN Size\r
\r
Set a IDT entry for interrupt vector 3 for debug purpose for x64 platform\r
\r
\r
Set a IDT entry for interrupt vector 3 for debug purpose for x64 platform\r
\r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
{\r
UINT32 RegEax;\r
UINT32 RegEdx;\r
{\r
UINT32 RegEax;\r
UINT32 RegEdx;\r
+ UINTN PageFaultHandlerHookAddress;\r
\r
AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL);\r
mPhyMask = LShiftU64 (1, (UINT8)RegEax) - 1;\r
\r
AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL);\r
mPhyMask = LShiftU64 (1, (UINT8)RegEax) - 1;\r
//\r
// Set Page Fault entry to catch >4G access\r
//\r
//\r
// Set Page Fault entry to catch >4G access\r
//\r
+ PageFaultHandlerHookAddress = (UINTN)PageFaultHandlerHook;\r
mOriginalHandler = (VOID *)(UINTN)(LShiftU64 (IdtEntry->Bits.OffsetUpper, 32) + IdtEntry->Bits.OffsetLow + (IdtEntry->Bits.OffsetHigh << 16));\r
mOriginalHandler = (VOID *)(UINTN)(LShiftU64 (IdtEntry->Bits.OffsetUpper, 32) + IdtEntry->Bits.OffsetLow + (IdtEntry->Bits.OffsetHigh << 16));\r
- IdtEntry->Bits.OffsetLow = (UINT16)((UINTN)PageFaultHandlerHook);\r
+ IdtEntry->Bits.OffsetLow = (UINT16)PageFaultHandlerHookAddress;\r
IdtEntry->Bits.Selector = (UINT16)AsmReadCs ();\r
IdtEntry->Bits.Reserved_0 = 0;\r
IdtEntry->Bits.GateType = IA32_IDT_GATE_TYPE_INTERRUPT_32;\r
IdtEntry->Bits.Selector = (UINT16)AsmReadCs ();\r
IdtEntry->Bits.Reserved_0 = 0;\r
IdtEntry->Bits.GateType = IA32_IDT_GATE_TYPE_INTERRUPT_32;\r
- IdtEntry->Bits.OffsetHigh = (UINT16)((UINTN)PageFaultHandlerHook >> 16);\r
- IdtEntry->Bits.OffsetUpper = (UINT32)((UINTN)PageFaultHandlerHook >> 32);\r
+ IdtEntry->Bits.OffsetHigh = (UINT16)(PageFaultHandlerHookAddress >> 16);\r
+ IdtEntry->Bits.OffsetUpper = (UINT32)(PageFaultHandlerHookAddress >> 32);\r
IdtEntry->Bits.Reserved_1 = 0;\r
\r
if (mPage1GSupport) {\r
IdtEntry->Bits.Reserved_1 = 0;\r
\r
if (mPage1GSupport) {\r