From 1e172d6bbfeb75d3a5d9f0066eee97789fc617b7 Mon Sep 17 00:00:00 2001 From: vanjeff Date: Thu, 15 Mar 2012 05:20:41 +0000 Subject: 1. Introduced CPU Exception Handler Library to provide the CPU exception handlers and add one NULL library instance. 2. Updated DXE Core, BootScriptExecutorDxe and CapsuleX64Pei to consume CPU Exception Library to setup the default CPU Exception handlers. Signed-off-by: vanjeff Reviewed-by: jyao1 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13097 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c') diff --git a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c index f70f2f986f..975cf3a561 100644 --- a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c +++ b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c @@ -3,7 +3,7 @@ Set a IDT entry for interrupt vector 3 for debug purpose for x64 platform -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -52,6 +52,16 @@ SetIdtEntry ( // Restore IDT for debug // IdtDescriptor = (IA32_DESCRIPTOR *) (UINTN) (AcpiS3Context->IdtrProfile); + AsmWriteIdtr (IdtDescriptor); + + // + // Setup the default CPU exception handlers + // + SetupCpuExceptionHandlers (); + + // + // Update IDT entry INT3 + // IdtEntry = (INTERRUPT_GATE_DESCRIPTOR *)(IdtDescriptor->Base + (3 * sizeof (INTERRUPT_GATE_DESCRIPTOR))); S3DebugBuffer = (UINTN) (AcpiS3Context->S3DebugBufferAddress); @@ -62,6 +72,5 @@ SetIdtEntry ( IdtEntry->Offset63To32 = (UINT32)(S3DebugBuffer >> 32); IdtEntry->Reserved = 0; - AsmWriteIdtr (IdtDescriptor); } -- cgit v1.2.3