/*++\r
\r
-Copyright (c) 2006, Intel Corporation\r
+Copyright (c) 2006 - 2007, 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
{ &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
-#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
{ &gEfiMonotonicCounterArchProtocolGuid, (VOID **)NULL, NULL, NULL, FALSE },\r
{ &gEfiResetArchProtocolGuid, (VOID **)NULL, 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
return EFI_SUCCESS;\r
}\r
\r
-\r
+STATIC\r
VOID\r
EFIAPI\r
GenericArchProtocolNotify (\r
ARCHITECTURAL_PROTOCOL_ENTRY *Entry;\r
VOID *Protocol;\r
BOOLEAN Found;\r
+ LIST_ENTRY *Link;\r
+ LIST_ENTRY TempLinkNode;\r
\r
Found = FALSE;\r
for (Entry = mArchProtocols; Entry->ProtocolGuid != NULL; Entry++) {\r
// When runtime architectural protocol is available, updates CRC32 in the Debug Table\r
//\r
CoreUpdateDebugTableCrc32 ();\r
+\r
+ //\r
+ // Update the Runtime Architectural protocol with the template that the core was\r
+ // using so there would not need to be a dependency on the Runtime AP\r
+ //\r
+\r
+ //\r
+ // Copy all the registered Image to new gRuntime protocol\r
+ //\r
+ for (Link = gRuntimeTemplate.ImageHead.ForwardLink; Link != &gRuntimeTemplate.ImageHead; Link = TempLinkNode.ForwardLink) {\r
+ CopyMem (&TempLinkNode, Link, sizeof(LIST_ENTRY));\r
+ InsertTailList (&gRuntime->ImageHead, Link);\r
+ }\r
+ //\r
+ // Copy all the registered Event to new gRuntime protocol\r
+ //\r
+ for (Link = gRuntimeTemplate.EventHead.ForwardLink; Link != &gRuntimeTemplate.EventHead; Link = TempLinkNode.ForwardLink) {\r
+ CopyMem (&TempLinkNode, Link, sizeof(LIST_ENTRY));\r
+ InsertTailList (&gRuntime->EventHead, Link);\r
+ }\r
+\r
+ //\r
+ // Clean up gRuntimeTemplate\r
+ //\r
+ gRuntimeTemplate.ImageHead.ForwardLink = &gRuntimeTemplate.ImageHead;\r
+ gRuntimeTemplate.ImageHead.BackLink = &gRuntimeTemplate.ImageHead;\r
+ gRuntimeTemplate.EventHead.ForwardLink = &gRuntimeTemplate.EventHead;\r
+ gRuntimeTemplate.EventHead.BackLink = &gRuntimeTemplate.EventHead;\r
}\r
}\r
\r
{ &gEfiRuntimeArchProtocolGuid, (CHAR16 *)L"Runtime" },\r
{ &gEfiVariableArchProtocolGuid, (CHAR16 *)L"Variable" },\r
{ &gEfiVariableWriteArchProtocolGuid, (CHAR16 *)L"Variable Write" },\r
- #if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
{ &gEfiCapsuleArchProtocolGuid, (CHAR16 *)L"Capsule" },\r
- #endif\r
{ &gEfiMonotonicCounterArchProtocolGuid, (CHAR16 *)L"Monotonic Counter" },\r
{ &gEfiResetArchProtocolGuid, (CHAR16 *)L"Reset" },\r
// { &gEfiStatusCodeRuntimeProtocolGuid, (CHAR16 *)L"Status Code" },\r