summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/DxeIplPeim/Ia32
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-27 17:04:12 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-27 17:04:12 +0000
commite7af83aece81c891deeda826526fffa194dc0256 (patch)
treee741867a6acbff1344a3971736e82af662ed4a77 /MdeModulePkg/Core/DxeIplPeim/Ia32
parent53f32495953afac85b4c85c52dcf0595a4b1999e (diff)
downloadedk2-platforms-e7af83aece81c891deeda826526fffa194dc0256.tar.xz
1. Refine debug agent library.
2. DxeCore and DxeIpl consume debug agent library. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10119 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/DxeIplPeim/Ia32')
-rw-r--r--MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
index 7e99ac5e02..29ff8416a2 100644
--- a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
+++ b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
@@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "DxeIpl.h"
#include "VirtualMemory.h"
+#define IDT_ENTRY_COUNT 33
+
//
// Global Descriptor Table (GDT)
//
@@ -40,7 +42,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST IA32_DESCRIPTOR gGdt = {
};
GLOBAL_REMOVE_IF_UNREFERENCED IA32_DESCRIPTOR gLidtDescriptor = {
- sizeof (X64_IDT_GATE_DESCRIPTOR) * 32 - 1,
+ sizeof (X64_IDT_GATE_DESCRIPTOR) * IDT_ENTRY_COUNT - 1,
0
};
@@ -118,13 +120,13 @@ HandOffToDxeCore (
Status = PeiServicesAllocatePages (
EfiBootServicesData,
- EFI_SIZE_TO_PAGES((SizeOfTemplate + sizeof (X64_IDT_GATE_DESCRIPTOR)) * 32),
+ EFI_SIZE_TO_PAGES((SizeOfTemplate + sizeof (X64_IDT_GATE_DESCRIPTOR)) * IDT_ENTRY_COUNT),
&VectorAddress
);
ASSERT_EFI_ERROR (Status);
- IdtTable = (X64_IDT_GATE_DESCRIPTOR *) (UINTN) (VectorAddress + SizeOfTemplate * 32);
- for (Index = 0; Index < 32; Index++) {
+ IdtTable = (X64_IDT_GATE_DESCRIPTOR *) (UINTN) (VectorAddress + SizeOfTemplate * IDT_ENTRY_COUNT);
+ for (Index = 0; Index < IDT_ENTRY_COUNT; Index++) {
IdtTable[Index].Ia32IdtEntry.Bits.GateType = 0x8e;
IdtTable[Index].Ia32IdtEntry.Bits.Reserved_0 = 0;
IdtTable[Index].Ia32IdtEntry.Bits.Selector = SYS_CODE64_SEL;
@@ -142,6 +144,11 @@ HandOffToDxeCore (
gLidtDescriptor.Base = (UINTN) IdtTable;
+ //
+ // Disable interrupt of Debug timer, since new IDT table cannot handle it.
+ //
+ SaveAndSetDebugTimerInterrupt (FALSE);
+
AsmWriteIdtr (&gLidtDescriptor);
//