]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c
1. Introduced CPU Exception Handler Library to provide the CPU exception handlers...
[mirror_edk2.git] / MdeModulePkg / Universal / Acpi / BootScriptExecutorDxe / X64 / SetIdtEntry.c
index f70f2f986f1aa3df27757867d045ce59fe6f4932..975cf3a561757f5c1c8b034ca7b12b329e27d463 100644 (file)
@@ -3,7 +3,7 @@
 \r
   Set a IDT entry for interrupt vector 3 for debug purpose for x64 platform\r
 \r
 \r
   Set a IDT entry for interrupt vector 3 for debug purpose for x64 platform\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -52,6 +52,16 @@ SetIdtEntry (
   // Restore IDT for debug\r
   //\r
   IdtDescriptor = (IA32_DESCRIPTOR *) (UINTN) (AcpiS3Context->IdtrProfile);\r
   // Restore IDT for debug\r
   //\r
   IdtDescriptor = (IA32_DESCRIPTOR *) (UINTN) (AcpiS3Context->IdtrProfile);\r
+  AsmWriteIdtr (IdtDescriptor);\r
+\r
+  //\r
+  // Setup the default CPU exception handlers\r
+  //\r
+  SetupCpuExceptionHandlers ();\r
+\r
+  //\r
+  // Update IDT entry INT3\r
+  //\r
   IdtEntry = (INTERRUPT_GATE_DESCRIPTOR *)(IdtDescriptor->Base + (3 * sizeof (INTERRUPT_GATE_DESCRIPTOR)));\r
   S3DebugBuffer = (UINTN) (AcpiS3Context->S3DebugBufferAddress);\r
 \r
   IdtEntry = (INTERRUPT_GATE_DESCRIPTOR *)(IdtDescriptor->Base + (3 * sizeof (INTERRUPT_GATE_DESCRIPTOR)));\r
   S3DebugBuffer = (UINTN) (AcpiS3Context->S3DebugBufferAddress);\r
 \r
@@ -62,6 +72,5 @@ SetIdtEntry (
   IdtEntry->Offset63To32    = (UINT32)(S3DebugBuffer >> 32);\r
   IdtEntry->Reserved        = 0;\r
 \r
   IdtEntry->Offset63To32    = (UINT32)(S3DebugBuffer >> 32);\r
   IdtEntry->Reserved        = 0;\r
 \r
-  AsmWriteIdtr (IdtDescriptor);\r
 }\r
 \r
 }\r
 \r