]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c
Added the StatusCode protocol installation for the IPF architecture; removed the...
[mirror_edk2.git] / EdkModulePkg / Core / Dxe / DxeMain / DxeProtocolNotify.c
index 7c22a03f7f1b7f55fa6aa1643883ba553df222cf..0ceb82d2c2fb4d9ea27e85482de27b1dccbe7a9b 100644 (file)
@@ -1,13 +1,13 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
-All rights reserved. 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
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. 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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 Module Name:\r
 \r
@@ -15,8 +15,8 @@ Module Name:
 \r
 Abstract:\r
 \r
-  This file deals with Architecture Protocol (AP) registration in \r
-  the Dxe Core. The mArchProtocols[] array represents a list of \r
+  This file deals with Architecture Protocol (AP) registration in\r
+  the Dxe Core. The mArchProtocols[] array represents a list of\r
   events that represent the Architectural Protocols.\r
 \r
 --*/\r
@@ -43,12 +43,25 @@ ARCHITECTURAL_PROTOCOL_ENTRY  mArchProtocols[] = {
   { &gEfiRuntimeArchProtocolGuid,          (VOID **)&gRuntime,       NULL, NULL, FALSE },\r
   { &gEfiVariableArchProtocolGuid,         (VOID **)NULL,            NULL, NULL, FALSE },\r
   { &gEfiVariableWriteArchProtocolGuid,    (VOID **)NULL,            NULL, NULL, FALSE },\r
-  #if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
+#ifndef MDE_CPU_IPF\r
+  //\r
+  // UEFI 2.0 added support for Capsule services. DXE CIS ??? Added support for this AP\r
+  //\r
   { &gEfiCapsuleArchProtocolGuid,          (VOID **)NULL,            NULL, NULL, FALSE},\r
-  #endif\r
+#endif\r
+#endif\r
   { &gEfiMonotonicCounterArchProtocolGuid, (VOID **)NULL,            NULL, NULL, FALSE },\r
   { &gEfiResetArchProtocolGuid,            (VOID **)NULL,            NULL, NULL, FALSE },\r
-//  { &gEfiStatusCodeRuntimeProtocolGuid,    (VOID **)&gStatusCode,    NULL, NULL, FALSE },\r
+#if ((EDK_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION <  0x00020000))\r
+  //\r
+  // The ReportStatusCode Runtime service is in conflict with the UEFI 2.0 specificaiton\r
+  // Thus gEfiStatusCodeRuntimeProtocolGuid becomes a normal protocol in UEFI 2.0 systems\r
+  // It is only included if the EFI 1.10 with Tiano extensions is enabled for backward\r
+  // compatability\r
+  //\r
+  { &gEfiStatusCodeRuntimeProtocolGuid,    (VOID **)&gStatusCode,    NULL, NULL, FALSE },\r
+#endif\r
   { &gEfiRealTimeClockArchProtocolGuid,    (VOID **)NULL,            NULL, NULL, FALSE },\r
   { NULL,                                  (VOID **)NULL,            NULL, NULL, FALSE }\r
 };\r
@@ -68,7 +81,7 @@ Arguments:
 \r
 Returns:\r
   EFI_SUCCESS   - All AP services are available\r
-  EFI_NOT_FOUND - At least one AP service is not available \r
+  EFI_NOT_FOUND - At least one AP service is not available\r
 \r
 --*/\r
 {\r
@@ -95,14 +108,14 @@ GenericArchProtocolNotify (
 Routine Description:\r
   Notification event handler registered by CoreNotifyOnArchProtocolInstallation ().\r
   This notify function is registered for every architectural protocol. This handler\r
-  updates mArchProtocol[] array entry with protocol instance data and sets it's \r
-  present flag to TRUE. If any constructor is required it is executed. The EFI \r
+  updates mArchProtocol[] array entry with protocol instance data and sets it's\r
+  present flag to TRUE. If any constructor is required it is executed. The EFI\r
   System Table headers are updated.\r
 \r
 Arguments:\r
 \r
   Event   - The Event that is being processed, not used.\r
-  \r
+\r
   Context - Event Context, not used.\r
 \r
 Returns:\r
@@ -115,21 +128,21 @@ Returns:
   ARCHITECTURAL_PROTOCOL_ENTRY    *Entry;\r
   VOID                            *Protocol;\r
   BOOLEAN                         Found;\r
-  \r
+\r
   Found = FALSE;\r
   for (Entry = mArchProtocols; Entry->ProtocolGuid != NULL; Entry++) {\r
\r
+\r
     Status = CoreLocateProtocol (Entry->ProtocolGuid, Entry->Registration, &Protocol);\r
     if (EFI_ERROR (Status)) {\r
       continue;\r
-    } \r
-    \r
+    }\r
+\r
     Found = TRUE;\r
     Entry->Present = TRUE;\r
-    \r
+\r
     //\r
     // Update protocol global variable if one exists. Entry->Protocol points to a global variable\r
-    // if one exists in the DXE core for this Architectural Protocol \r
+    // if one exists in the DXE core for this Architectural Protocol\r
     //\r
     if (Entry->Protocol != NULL) {\r
       *(Entry->Protocol) = Protocol;\r
@@ -184,7 +197,7 @@ Returns:
   ARCHITECTURAL_PROTOCOL_ENTRY    *Entry;\r
 \r
   for (Entry = mArchProtocols; Entry->ProtocolGuid != NULL; Entry++) {\r
-    \r
+\r
     //\r
     // Create the event\r
     //\r
@@ -201,8 +214,8 @@ Returns:
     // Register for protocol notifactions on this event\r
     //\r
     Status = CoreRegisterProtocolNotify (\r
-              Entry->ProtocolGuid, \r
-              Entry->Event, \r
+              Entry->ProtocolGuid,\r
+              Entry->Event,\r
               &Entry->Registration\r
               );\r
     ASSERT_EFI_ERROR(Status);\r
@@ -268,5 +281,5 @@ Returns:
         }\r
       }\r
     }\r
-  } \r
+  }\r
 }\r