]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/CpuDxe/CpuDxe.c
Use right LBA to get the backed up WorkSpace in spare block.
[mirror_edk2.git] / UefiCpuPkg / CpuDxe / CpuDxe.c
index 89dd2df5be7a87112da436bf8345019d39a1c523..958711ca4ee12413be78dc0a26c55dd1ffa46388 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   CPU DXE Module.\r
 \r
-  Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -17,7 +17,7 @@
 //\r
 // Global Variables\r
 //\r
-IA32_IDT_GATE_DESCRIPTOR  gIdtTable[INTERRUPT_VECTOR_NUMBER] = { 0 };\r
+IA32_IDT_GATE_DESCRIPTOR  gIdtTable[INTERRUPT_VECTOR_NUMBER] = { { { 0 } } };\r
 \r
 EFI_CPU_INTERRUPT_HANDLER ExternalVectorTable[0x100];\r
 BOOLEAN                   InterruptState = FALSE;\r
@@ -969,7 +969,7 @@ RefreshGcdMemoryAttributes (
   // Go for variable MTRRs with the attribute except for WB and UC attributes\r
   //\r
   for (Index = 0; Index < FirmwareVariableMtrrCount; Index++) {\r
-    if (VariableMtrr[Index].Valid &&                          \r
+    if (VariableMtrr[Index].Valid &&\r
         VariableMtrr[Index].Type != MTRR_CACHE_WRITE_BACK &&\r
         VariableMtrr[Index].Type != MTRR_CACHE_UNCACHEABLE) {\r
       Attributes = GetMemorySpaceAttributeFromMtrrType ((UINT8) VariableMtrr[Index].Type);\r
@@ -1161,10 +1161,10 @@ InitInterruptDescriptorTable (
     // preserve it.\r
     //\r
     if (Index < OldIdtSize) {\r
-      IntHandler = \r
+      IntHandler =\r
         (VOID*) (\r
           OldIdt[Index].Bits.OffsetLow +\r
-          (OldIdt[Index].Bits.OffsetHigh << 16)\r
+          (((UINTN) OldIdt[Index].Bits.OffsetHigh) << 16)\r
 #if defined (MDE_CPU_X64)\r
             + (((UINTN) OldIdt[Index].Bits.OffsetUpper) << 32)\r
 #endif\r
@@ -1209,7 +1209,7 @@ InitInterruptDescriptorTable (
 \r
 /**\r
   Callback function for idle events.\r
\r
+\r
   @param  Event                 Event whose notification function is being invoked.\r
   @param  Context               The pointer to the notification function's context,\r
                                 which is implementation-dependent.\r
@@ -1247,6 +1247,8 @@ InitializeCpu (
   EFI_STATUS  Status;\r
   EFI_EVENT   IdleLoopEvent;\r
 \r
+  InitializeFloatingPointUnits ();\r
+\r
   //\r
   // Make sure interrupts are disabled\r
   //\r
@@ -1262,6 +1264,11 @@ InitializeCpu (
   //\r
   InitInterruptDescriptorTable ();\r
 \r
+  //\r
+  // Enable the local APIC for Virtual Wire Mode.\r
+  //\r
+  ProgramVirtualWireMode ();\r
+\r
   //\r
   // Install CPU Architectural Protocol\r
   //\r