diff options
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 5 | ||||
-rw-r--r-- | MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c | 58 | ||||
-rw-r--r-- | MdeModulePkg/MdeModulePkg.dec | 13 | ||||
-rw-r--r-- | MdeModulePkg/MdeModulePkg.dsc | 1 |
4 files changed, 40 insertions, 37 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.
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 33aecd3b43..a9b209607c 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -500,6 +500,15 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdHardwareErrorRecordLevel|1|UINT16|0x40000002
##
+ # This PCD defines the Console output column and the default value is 25 according to UEFI spec
+ ##
+ gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|25|UINT32|0x40000006
+
+ ##
+ # This PCD defines the Console output row and the default value is 80 according to UEFI spec
+ ##
+ gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|80|UINT32|0x40000007
+ ##
# This PCD defines the times to print hello world string.
# This PCD is a sample to explain Patchable UINT32 PCD usage.
##
@@ -508,8 +517,4 @@ [PcdsFeatureFlag.IA32]
## If TRUE, the DXE IPL will load a 64-bit DxeCore.
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE|BOOLEAN|0x0001003b
-
- ## If TRUE, the DXE IPL will create the default IDT table.
- gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplEnableIdt|TRUE|BOOLEAN|0x0001003d
-
diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc index f04da20264..e436386c9c 100644 --- a/MdeModulePkg/MdeModulePkg.dsc +++ b/MdeModulePkg/MdeModulePkg.dsc @@ -175,7 +175,6 @@ [PcdsFeatureFlag.IA32]
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE
- gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplEnableIdt|FALSE
[PcdsFixedAtBuild.common]
gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|1000000
|