]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg: Added code to enable Local APIC.
authorgeekboy15a <geekboy15a@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 18 May 2012 20:29:14 +0000 (20:29 +0000)
committergeekboy15a <geekboy15a@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 18 May 2012 20:29:14 +0000 (20:29 +0000)
This patch enables interrupt delivery via the Local APIC as part of the initialization process.

Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
Reviewed-by: Rosenbaum, Lee G <lee.g.rosenbaum@intel.com>
Reviewed-by: Sun Rui <rui.sun@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13338 6f19259b-4bc3-4df7-8a09-765794883524

UefiCpuPkg/CpuDxe/CpuDxe.c
UefiCpuPkg/CpuDxe/CpuDxe.h
UefiCpuPkg/CpuDxe/CpuDxe.inf

index 89dd2df5be7a87112da436bf8345019d39a1c523..17513e758fc93f159f3c1fefe15d85296aa5ba1a 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
@@ -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,7 +1161,7 @@ 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
@@ -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
@@ -1262,6 +1262,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
index 6d0d83ba0827368f8e2eea64aeef4c5b2d07adcf..9baccb25657092ad1babef104be876cdbef6c5a8 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
@@ -28,6 +28,7 @@
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/MtrrLib.h>\r
+#include <Library/LocalApicLib.h>\r
 #include <Guid/IdleLoopEvent.h>\r
 \r
 //\r
index 0c70b3276d3bfc86a56717b2b138342dc909195e..3373efab16f14b9fcbd85e741086bf11a1f2060d 100644 (file)
@@ -2,7 +2,7 @@
 #\r
 #    Component description file for simple CPU driver\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
@@ -37,6 +37,7 @@
   MtrrLib\r
   UefiBootServicesTableLib\r
   UefiDriverEntryPoint\r
+  LocalApicLib\r
 \r
 [Sources]\r
   CpuDxe.c\r