1. Remove feature flag PcdDxeIplEnableIdt entries

2. Add Patchable type for PcdConOutColumn & PcdConOutRow

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7645 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8 2009-02-24 09:17:58 +00:00
parent a9b896f453
commit 4bfa7dc45f
4 changed files with 40 additions and 37 deletions

View File

@ -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]

View File

@ -114,36 +114,36 @@ HandOffToDxeCore (
//
UpdateStackHob (BaseOfStack, STACK_SIZE);
if (FeaturePcdGet (PcdDxeIplEnableIdt)) {
SizeOfTemplate = AsmGetVectorTemplatInfo (&TemplateBase);
SizeOfTemplate = AsmGetVectorTemplatInfo (&TemplateBase);
Status = PeiServicesAllocatePages (
EfiBootServicesData,
EFI_SIZE_TO_PAGES((SizeOfTemplate + sizeof (X64_IDT_GATE_DESCRIPTOR)) * 32),
&VectorAddress
);
ASSERT_EFI_ERROR (Status);
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 = (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;
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);
CopyMem ((VOID *) (UINTN) VectorAddress, TemplateBase, SizeOfTemplate);
AsmVectorFixup ((VOID *) (UINTN) VectorAddress, (UINT8) Index);
VectorAddress += SizeOfTemplate;
}
gLidtDescriptor.Base = (UINTN) IdtTable;
AsmWriteIdtr (&gLidtDescriptor);
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.

View File

@ -499,6 +499,15 @@
## Error level for hardware recorder.
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.
@ -509,7 +518,3 @@
## 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

View File

@ -175,7 +175,6 @@
[PcdsFeatureFlag.IA32]
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplEnableIdt|FALSE
[PcdsFixedAtBuild.common]
gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|1000000