diff options
Diffstat (limited to 'MdeModulePkg/Core')
-rw-r--r-- | MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 5 | ||||
-rw-r--r-- | MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c | 58 |
2 files changed, 31 insertions, 32 deletions
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf index 772890db80..7b8bffcd8c 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf @@ -40,8 +40,8 @@ Ia32/VirtualMemory.c ||||PcdDxeIplSwitchToLongMode
Ia32/DxeLoadFunc.c
Ia32/ImageRead.c
- Ia32/IdtVectorAsm.asm||||PcdDxeIplSwitchToLongMode AND PcdDxeIplEnableIdt
- Ia32/IdtVectorAsm.S ||||PcdDxeIplSwitchToLongMode AND PcdDxeIplEnableIdt
+ Ia32/IdtVectorAsm.asm||||PcdDxeIplSwitchToLongMode
+ Ia32/IdtVectorAsm.S ||||PcdDxeIplSwitchToLongMode
[Sources.X64]
X64/VirtualMemory.h
@@ -89,7 +89,6 @@ gEfiMemoryTypeInformationGuid ## SOMETIMES_PRODUCES ## HOB
[FeaturePcd.IA32]
- gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplEnableIdt||PcdDxeIplSwitchToLongMode
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode
[FixedPcd.common]
diff --git a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c index 22fb1fea2c..83ffc91ba0 100644 --- a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c +++ b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c @@ -114,36 +114,36 @@ HandOffToDxeCore ( //
UpdateStackHob (BaseOfStack, STACK_SIZE);
- if (FeaturePcdGet (PcdDxeIplEnableIdt)) {
- SizeOfTemplate = AsmGetVectorTemplatInfo (&TemplateBase);
-
- Status = PeiServicesAllocatePages (
- EfiBootServicesData,
- EFI_SIZE_TO_PAGES((SizeOfTemplate + sizeof (X64_IDT_GATE_DESCRIPTOR)) * 32),
- &VectorAddress
- );
- ASSERT_EFI_ERROR (Status);
-
- IdtTable = (X64_IDT_GATE_DESCRIPTOR *) (UINTN) (VectorAddress + SizeOfTemplate * 32);
- for (Index = 0; Index < 32; Index++) {
- IdtTable[Index].Ia32IdtEntry.Bits.GateType = 0x8e;
- IdtTable[Index].Ia32IdtEntry.Bits.Reserved_0 = 0;
- IdtTable[Index].Ia32IdtEntry.Bits.Selector = SYS_CODE64_SEL;
-
- IdtTable[Index].Ia32IdtEntry.Bits.OffsetLow = (UINT16) VectorAddress;
- IdtTable[Index].Ia32IdtEntry.Bits.OffsetHigh = (UINT16) (RShiftU64 (VectorAddress, 16));
- IdtTable[Index].Offset32To63 = (UINT32) (RShiftU64 (VectorAddress, 32));
- IdtTable[Index].Reserved = 0;
-
- CopyMem ((VOID *) (UINTN) VectorAddress, TemplateBase, SizeOfTemplate);
- AsmVectorFixup ((VOID *) (UINTN) VectorAddress, (UINT8) Index);
-
- VectorAddress += SizeOfTemplate;
- }
-
- gLidtDescriptor.Base = (UINTN) IdtTable;
- AsmWriteIdtr (&gLidtDescriptor);
+ SizeOfTemplate = AsmGetVectorTemplatInfo (&TemplateBase);
+
+ Status = PeiServicesAllocatePages (
+ EfiBootServicesData,
+ EFI_SIZE_TO_PAGES((SizeOfTemplate + sizeof (X64_IDT_GATE_DESCRIPTOR)) * 32),
+ &VectorAddress
+ );
+ ASSERT_EFI_ERROR (Status);
+
+ IdtTable = (X64_IDT_GATE_DESCRIPTOR *) (UINTN) (VectorAddress + SizeOfTemplate * 32);
+ for (Index = 0; Index < 32; Index++) {
+ IdtTable[Index].Ia32IdtEntry.Bits.GateType = 0x8e;
+ IdtTable[Index].Ia32IdtEntry.Bits.Reserved_0 = 0;
+ IdtTable[Index].Ia32IdtEntry.Bits.Selector = SYS_CODE64_SEL;
+
+ IdtTable[Index].Ia32IdtEntry.Bits.OffsetLow = (UINT16) VectorAddress;
+ IdtTable[Index].Ia32IdtEntry.Bits.OffsetHigh = (UINT16) (RShiftU64 (VectorAddress, 16));
+ IdtTable[Index].Offset32To63 = (UINT32) (RShiftU64 (VectorAddress, 32));
+ IdtTable[Index].Reserved = 0;
+
+ CopyMem ((VOID *) (UINTN) VectorAddress, TemplateBase, SizeOfTemplate);
+ AsmVectorFixup ((VOID *) (UINTN) VectorAddress, (UINT8) Index);
+
+ VectorAddress += SizeOfTemplate;
}
+
+ gLidtDescriptor.Base = (UINTN) IdtTable;
+ AsmWriteIdtr (&gLidtDescriptor);
+
+
//
// Go to Long Mode and transfer control to DxeCore.
// Interrupts will not get turned on until the CPU AP is loaded.
|