]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Omap35xxPkg/InterruptDxe: Fix dependency chain with the Arch Cpu Dxe
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 4 Jul 2011 10:09:04 +0000 (10:09 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 4 Jul 2011 10:09:04 +0000 (10:09 +0000)
The CPU Dxe should be loaded before the Interrupt Dxe.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11969 6f19259b-4bc3-4df7-8a09-765794883524

Omap35xxPkg/InterruptDxe/HardwareInterrupt.c
Omap35xxPkg/InterruptDxe/InterruptDxe.inf

index 0ddedb4c79c744fe547dece709cb6fbbd94e4500..5040c4b152c568045180d3dc647d92955df1d758 100644 (file)
@@ -31,8 +31,6 @@
 //\r
 // Notifications\r
 //\r
-VOID      *CpuProtocolNotificationToken = NULL;\r
-EFI_EVENT CpuProtocolNotificationEvent  = (EFI_EVENT)NULL;\r
 EFI_EVENT EfiExitBootServicesEvent      = (EFI_EVENT)NULL;\r
 \r
 \r
@@ -298,37 +296,6 @@ EFI_HARDWARE_INTERRUPT_PROTOCOL gHardwareInterruptProtocol = {
   EndOfInterrupt\r
 };\r
 \r
-//\r
-// Notification routines\r
-//\r
-VOID\r
-CpuProtocolInstalledNotification (\r
-  IN EFI_EVENT   Event,\r
-  IN VOID        *Context\r
-  )\r
-{\r
-  EFI_STATUS              Status;\r
-  EFI_CPU_ARCH_PROTOCOL   *Cpu;\r
-  \r
-  //\r
-  // Get the cpu protocol that this driver requires.\r
-  //\r
-  Status = gBS->LocateProtocol (&gEfiCpuArchProtocolGuid, NULL, (VOID **)&Cpu);\r
-  ASSERT_EFI_ERROR(Status);\r
-\r
-  //\r
-  // Unregister the default exception handler.\r
-  //\r
-  Status = Cpu->RegisterInterruptHandler (Cpu, EXCEPT_ARM_IRQ, NULL);\r
-  ASSERT_EFI_ERROR(Status);\r
-\r
-  //\r
-  // Register to receive interrupts\r
-  //\r
-  Status = Cpu->RegisterInterruptHandler (Cpu, EXCEPT_ARM_IRQ, IrqInterruptHandler);\r
-  ASSERT_EFI_ERROR(Status);\r
-}\r
-\r
 /**\r
   Initialize the state information for the CPU Architectural Protocol\r
 \r
@@ -347,6 +314,7 @@ InterruptDxeInitialize (
   )\r
 {\r
   EFI_STATUS  Status;\r
+  EFI_CPU_ARCH_PROTOCOL   *Cpu;\r
 \r
   // Make sure the Interrupt Controller Protocol is not already installed in the system.\r
   ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gHardwareInterruptProtocolGuid);\r
@@ -362,11 +330,22 @@ InterruptDxeInitialize (
                                                   NULL);\r
   ASSERT_EFI_ERROR(Status);\r
   \r
-  // Set up to be notified when the Cpu protocol is installed.\r
-  Status = gBS->CreateEvent(EVT_NOTIFY_SIGNAL, TPL_CALLBACK, CpuProtocolInstalledNotification, NULL, &CpuProtocolNotificationEvent);    \r
+  //\r
+  // Get the CPU protocol that this driver requires.\r
+  //\r
+  Status = gBS->LocateProtocol(&gEfiCpuArchProtocolGuid, NULL, (VOID **)&Cpu);\r
   ASSERT_EFI_ERROR(Status);\r
 \r
-  Status = gBS->RegisterProtocolNotify(&gEfiCpuArchProtocolGuid, CpuProtocolNotificationEvent, (VOID *)&CpuProtocolNotificationToken);\r
+  //\r
+  // Unregister the default exception handler.\r
+  //\r
+  Status = Cpu->RegisterInterruptHandler(Cpu, EXCEPT_ARM_IRQ, NULL);\r
+  ASSERT_EFI_ERROR(Status);\r
+\r
+  //\r
+  // Register to receive interrupts\r
+  //\r
+  Status = Cpu->RegisterInterruptHandler(Cpu, EXCEPT_ARM_IRQ, IrqInterruptHandler);\r
   ASSERT_EFI_ERROR(Status);\r
 \r
   // Register for an ExitBootServicesEvent\r
index f6142417e5df224319e979b3cb8d834e3931e358..16caa2e4f1b72faac66a0c25e79a89a67eaf6f38 100644 (file)
@@ -53,5 +53,5 @@
 [FixedPcd.common]\r
   gEmbeddedTokenSpaceGuid.PcdInterruptBaseAddress\r
 \r
-[depex]\r
-  TRUE\r
+[Depex]\r
+  gEfiCpuArchProtocolGuid\r