]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Removed IntelframeworkPkg contamination from MdeModulePkg modules.
authorAJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 3 Jul 2007 18:34:24 +0000 (18:34 +0000)
committerAJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 3 Jul 2007 18:34:24 +0000 (18:34 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3019 6f19259b-4bc3-4df7-8a09-765794883524

37 files changed:
EdkCompatibilityPkg/Foundation/Protocol/GuidedSectionExtraction/GuidedSectionExtraction.h
IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBus.inf
IntelFrameworkPkg/Library/DxeBootScriptLibNull/DxeBootScriptLibNull.inf
MdeModulePkg/Include/Protocol/Crc32GuidedSectionExtraction.h [new file with mode: 0644]
MdeModulePkg/MdeModulePkg.dec
MdeModulePkg/MdeModulePkg.dsc
MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.c
MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.h
MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.inf
MdeModulePkg/Universal/Capsule/RuntimeDxe/Capsule.c [deleted file]
MdeModulePkg/Universal/Capsule/RuntimeDxe/CapsuleRuntime.inf
MdeModulePkg/Universal/Capsule/RuntimeDxe/CapsuleService.c
MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c
MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.h
MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.inf
MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.c [deleted file]
MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.h [deleted file]
MdeModulePkg/Universal/RuntimeDxe/Runtime.c
MdeModulePkg/Universal/RuntimeDxe/Runtime.h
MdeModulePkg/Universal/RuntimeDxe/Runtime.inf
MdeModulePkg/Universal/VariablePei/Ipf/VariableWorker.c
MdeModulePkg/Universal/VariablePei/Variable.c
MdeModulePkg/Universal/VariablePei/Variable.h
MdeModulePkg/Universal/VariablePei/Variable.inf
MdeModulePkg/Universal/VariablePei/VariableWorker.c
MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.c
MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.h
MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.inf
MdePkg/Include/Pi/PiMultiPhase.h
MdePkg/Include/Ppi/GuidedSectionExtraction.h
MdePkg/Include/Ppi/ReadOnlyVariable2.h
MdePkg/Include/Protocol/GuidedSectionExtaction.h [deleted file]
MdePkg/Include/Protocol/GuidedSectionExtraction.h [new file with mode: 0644]
MdePkg/Include/Protocol/SectionExtraction.h [new file with mode: 0644]
MdePkg/Library/DxeMemoryLib/DxeMemoryLib.inf
MdePkg/MdePkg.dec
Nt32Pkg/Nt32Pkg.dsc

index 9deb5c89beecb80ab5773a58b86f0651732e8c86..83708b00dfe222a1dbb99bbdbcc124a32054c19b 100644 (file)
@@ -51,7 +51,7 @@ EFI_FORWARD_DECLARATION (EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL);
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_EXTRACT_GUIDED_SECTION) (\r
-  IN  EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL          * This,\r
+  IN  EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL          *This,\r
   IN  VOID                                            *InputSection,\r
   OUT VOID                                            **OutputBuffer,\r
   OUT UINTN                                           *OutputSize,\r
index c4d5177d15dce47466d852cdabed3cce18befce2..704586180e6fd8ff635b08e7c14fec0f771bf1e9 100644 (file)
   EntryPoint.c\r
 \r
 \r
-################################################################################\r
-#\r
-# Includes Section - list of Include locations that are required for\r
-#                    this module.\r
-#\r
-################################################################################\r
-\r
-[Includes]\r
-\r
 ################################################################################\r
 #\r
 # Package Dependency Section - list of Package files that are required for\r
@@ -78,8 +69,8 @@
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r
-  IntelFrameworkPkg/IntelFrameworkPkg.dec\r
   MdeModulePkg/MdeModulePkg.dec\r
+  IntelFrameworkPkg/IntelFrameworkPkg.dec\r
   IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec\r
 \r
 \r
index 7c540333679657e5755c9427946919750e81da0e..5d7fdb5b69390a1fe4f7605521c76a5d41fc9091 100644 (file)
   BootScriptLib.c\r
 \r
 \r
-################################################################################\r
-#\r
-# Includes Section - list of Include locations that are required for\r
-#                    this module.\r
-#\r
-################################################################################\r
-\r
-[Includes]\r
-\r
 ################################################################################\r
 #\r
 # Package Dependency Section - list of Package files that are required for\r
diff --git a/MdeModulePkg/Include/Protocol/Crc32GuidedSectionExtraction.h b/MdeModulePkg/Include/Protocol/Crc32GuidedSectionExtraction.h
new file mode 100644 (file)
index 0000000..6ef3b22
--- /dev/null
@@ -0,0 +1,42 @@
+/** @file\r
+  This protocol implements a FV section extraction using a CRC32 encapsulation.\r
+\r
+  The GUID defins the encapsulation scheme and the data structures come from\r
+  the SectionExtraction protocol definition.\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
+\r
+**/\r
+\r
+#ifndef __CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_H__\r
+#define __CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_H__\r
+\r
+\r
+//\r
+// Protocol GUID definition. Each GUIDed section extraction protocol has the\r
+// same interface but with different GUID. All the GUIDs is defined here.\r
+// May add multiple GUIDs here.\r
+//\r
+#define EFI_CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_GUID \\r
+  { 0xFC1BCDB0, 0x7D31, 0x49aa, {0x93, 0x6A, 0xA4, 0x60, 0x0D, 0x9D, 0xD0, 0x83 } }\r
+\r
+//\r
+// Forward reference for pure ANSI compatability\r
+//\r
+typedef struct _EFI_CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL  EFI_CRC32_GUID_SECTION_EXTRACTION_PROTOCOL;\r
+\r
+//\r
+// The data structures are the same as GuidedSectionExtraction protocol only the GUID's are different\r
+//\r
+#include <Protocol/GuidedSectionExtraction.h>\r
+\r
+extern EFI_GUID gEfiCrc32GuidedSectionExtractionProtocolGuid;\r
+\r
+#endif\r
index ac6e2cfe90eb41cf4b477c0e0973cec0e1c8c7ed..6d4690507d55b2d0405c33539896a92c20f522c3 100644 (file)
@@ -89,7 +89,8 @@
   gEfiTianoDecompressProtocolGuid = { 0xE84CF29C, 0x191F, 0x4EAE, { 0x96, 0xE1, 0xF4, 0x6A, 0xEC, 0xEA, 0xEA, 0x0B }}\r
   gEfiCustomizedDecompressProtocolGuid = { 0x9A44198E, 0xA4A2, 0x44E6, { 0x8A, 0x1F, 0x39, 0xBE, 0xFD, 0xAC, 0x89, 0x6F }}\r
   gEfiCapsuleArchProtocolGuid    = { 0x5053697E, 0x2EBC, 0x4819, { 0x90, 0xD9, 0x05, 0x80, 0xDE, 0xEE, 0x57, 0x54 }}\r
-\r
+  gEfiCrc32GuidedSectionExtractionProtocolGuid = { 0xFC1BCDB0, 0x7D31, 0x49aa, {0x93, 0x6A, 0xA4, 0x60, 0x0D, 0x9D, 0xD0, 0x83 } }\r
\r
 \r
 \r
 \r
index 77290bc3ea3be78568b433ff66cf068c9c130faf..7379728bca2231a384e292a511ccbc19f8482773 100644 (file)
   PcdMaxPeiPerformanceLogEntries|gEfiEdkModulePkgTokenSpaceGuid|28\r
   PcdVpdBaseAddress|gEfiEdkModulePkgTokenSpaceGuid|0x0\r
   PcdMaxPeiPcdCallBackNumberPerPcdEntry|gEfiEdkModulePkgTokenSpaceGuid|0x08\r
+  PcdStatusCodeValueEfiWatchDogTimerExpired|gEfiMdePkgTokenSpaceGuid|0x00011003   # EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_TIMER_EXPIRED\r
+  PcdStatusCodeValueMemoryTestStarted|gEfiMdePkgTokenSpaceGuid|0x00051006         # EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_RS_PC_SET_VIRTUAL_ADDRESS_MAP\r
+  PcdStatusCodeValueSetVirtualAddressMap|gEfiMdePkgTokenSpaceGuid|0x03101004      # EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_PC_TEST\r
+  PcdStatusCodeValueUncorrectableMemoryError|gEfiMdePkgTokenSpaceGuid|0x0005100   # EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_EC_UNCORRECTABLE3\r
 \r
 [PcdsPatchableInModule.common]\r
   PcdDebugPrintErrorLevel|gEfiMdePkgTokenSpaceGuid|0x80000000\r
index 7b207b919d5c832cbb04cc1c872677e114e956cc..f1ab82d87abb29eb3fc5d040b563f95557070491 100644 (file)
@@ -19,22 +19,6 @@ Abstract:
 \r
 --*/\r
 \r
-//\r
-// The package level header files this module uses\r
-//\r
-#include <PiPei.h>\r
-#include <FrameworkPei.h>\r
-//\r
-// The protocols, PPI and GUID defintions for this module\r
-//\r
-#include <Ppi/BaseMemoryTest.h>\r
-//\r
-// The Library classes this module consumes\r
-//\r
-#include <Library/DebugLib.h>\r
-#include <Library/PeimEntryPoint.h>\r
-#include <Library/ReportStatusCodeLib.h>\r
-\r
 #include <BaseMemoryTest.h>\r
 \r
 static PEI_BASE_MEMORY_TEST_PPI mPeiBaseMemoryTestPpi = { BaseMemoryTest };\r
@@ -109,10 +93,7 @@ Returns:
   EFI_PHYSICAL_ADDRESS  TempAddress;\r
   UINT32                SpanSize;\r
 \r
-  REPORT_STATUS_CODE (\r
-    EFI_PROGRESS_CODE,\r
-    EFI_COMPUTING_UNIT_MEMORY + EFI_CU_MEMORY_PC_TEST\r
-    );\r
+  REPORT_STATUS_CODE (EFI_PROGRESS_CODE,  PcdGet32 (PcdStatusCodeValueMemoryTestStarted));\r
 \r
   TestPattern = TEST_PATTERN;\r
   SpanSize    = 0;\r
@@ -151,10 +132,7 @@ Returns:
   while (TempAddress < BeginAddress + MemoryLength) {\r
     if ((*(UINT32 *) (UINTN) TempAddress) != TestPattern) {\r
       *ErrorAddress = TempAddress;\r
-      REPORT_STATUS_CODE (\r
-        EFI_ERROR_CODE | EFI_ERROR_UNRECOVERED,\r
-        EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_EC_UNCORRECTABLE\r
-        );\r
+      REPORT_STATUS_CODE (EFI_ERROR_CODE | EFI_ERROR_UNRECOVERED, PcdGet32 (PcdStatusCodeValueUncorrectableMemoryError));\r
 \r
       return EFI_DEVICE_ERROR;\r
     }\r
index 791a66c54cf27c11dba3ee62748d97e649b0eea8..ed6081af11390c20c366e30f138f46e463043b44 100644 (file)
@@ -22,6 +22,14 @@ Abstract:
 #ifndef _PEI_BASE_MEMORY_TEST_H_\r
 #define _PEI_BASE_MEMORY_TEST_H_\r
 \r
+#include <PiPei.h>\r
+#include <Ppi/BaseMemoryTest.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/PeimEntryPoint.h>\r
+#include <Library/ReportStatusCodeLib.h>\r
+#include <Library/PcdLib.h>\r
+\r
+\r
 //\r
 // Some global define\r
 //\r
index 6010077de8fe13c5b6d6e1f3193f5fbdb07546a7..90d71e94ef3208916c6848a7f0be6042e273309d 100644 (file)
 #  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
 #\r
 \r
-################################################################################\r
-#\r
-# Sources Section - list of files that are required for the build to succeed.\r
-#\r
-################################################################################\r
-\r
 [Sources.common]\r
   BaseMemoryTest.c\r
   BaseMemoryTest.h\r
 \r
-\r
-################################################################################\r
-#\r
-# Includes Section - list of Include locations that are required for\r
-#                    this module.\r
-#\r
-################################################################################\r
-\r
-################################################################################\r
-#\r
-# Package Dependency Section - list of Package files that are required for\r
-#                              this module.\r
-#\r
-################################################################################\r
-\r
 [Packages]\r
   MdePkg/MdePkg.dec\r
-  IntelFrameworkPkg/IntelFrameworkPkg.dec\r
-\r
-\r
-################################################################################\r
-#\r
-# Library Class Section - list of Library Classes that are required for\r
-#                         this module.\r
-#\r
-################################################################################\r
 \r
 [LibraryClasses]\r
   ReportStatusCodeLib\r
   PeimEntryPoint\r
   DebugLib\r
 \r
-\r
-################################################################################\r
-#\r
-# PPI C Name Section - list of PPI and PPI Notify C Names that this module\r
-#                      uses or produces.\r
-#\r
-################################################################################\r
-\r
 [Ppis]\r
   gPeiBaseMemoryTestPpiGuid                     # PPI ALWAYS_PRODUCED\r
 \r
+[PcdsFixedAtBuild.common]\r
+  PcdStatusCodeValueMemoryTestStarted|gEfiMdePkgTokenSpaceGuid\r
+  PcdStatusCodeValueUncorrectableMemoryError|gEfiMdePkgTokenSpaceGuid\r
+\r
diff --git a/MdeModulePkg/Universal/Capsule/RuntimeDxe/Capsule.c b/MdeModulePkg/Universal/Capsule/RuntimeDxe/Capsule.c
deleted file mode 100644 (file)
index 15736c6..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*++\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
-\r
-Module Name:\r
-\r
-  Capsule.c\r
-\r
-Abstract:\r
-\r
-  Capsule Runtime Service Initialization\r
-\r
---*/\r
-\r
-#include "CapsuleService.h"\r
-\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-CapsuleServiceInitialize (\r
-  IN EFI_HANDLE         ImageHandle,\r
-  IN EFI_SYSTEM_TABLE   *SystemTable\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This code is capsule runtime service initialization.\r
-\r
-Arguments:\r
-\r
-  ImageHandle          The image handle\r
-  SystemTable          The system table.\r
-\r
-Returns:\r
-\r
-  EFI STATUS\r
-\r
---*/\r
-{\r
-  EFI_STATUS  Status;\r
-  EFI_HANDLE  NewHandle;\r
-\r
-  SystemTable->RuntimeServices->UpdateCapsule                    = UpdateCapsule;\r
-  SystemTable->RuntimeServices->QueryCapsuleCapabilities         = QueryCapsuleCapabilities;\r
-\r
-  //\r
-  // Now install the Capsule Architectural Protocol on a new handle\r
-  //\r
-  NewHandle = NULL;\r
-\r
-  Status = gBS->InstallMultipleProtocolInterfaces (\r
-                  &NewHandle,\r
-                  &gEfiCapsuleArchProtocolGuid,\r
-                  NULL,\r
-                  NULL\r
-                  );\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  return EFI_SUCCESS;\r
-}\r
index bdc91db1d787bb860821c76b6fdb4c4012f4309a..61dae1b849134697e1c0a7fbaaaf92ecdedc4956 100644 (file)
 [Sources.common]\r
   CapsuleService.h\r
   CapsuleService.c\r
-  Capsule.c\r
-\r
-\r
-################################################################################\r
-#\r
-# Package Dependency Section - list of Package files that are required for\r
-#                              this module.\r
-#\r
-################################################################################\r
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r
-  IntelFrameworkPkg/IntelFrameworkPkg.dec\r
-\r
-################################################################################\r
-#\r
-# Library Class Section - list of Library Classes that are required for\r
-#                         this module.\r
-#\r
-################################################################################\r
 \r
 [LibraryClasses]\r
   UefiBootServicesTableLib\r
   DxeServicesTableLib\r
   UefiDriverEntryPoint\r
 \r
-\r
-################################################################################\r
-#\r
-# Guid C Name Section - list of Guids that this module uses or produces.\r
-#\r
-################################################################################\r
-\r
 [Guids]\r
   gEfiCapsuleVendorGuid                         # SOMETIMES_CONSUMED\r
-  gEfiCapsuleGuid\r
-\r
-################################################################################\r
-#\r
-# Protocol C Name Section - list of Protocol and Protocol Notify C Names\r
-#                           that this module uses or produces.\r
-#\r
-################################################################################\r
 \r
 [Protocols]\r
   gEfiCapsuleArchProtocolGuid                   # PROTOCOL ALWAYS_CONSUMED\r
 \r
-\r
-################################################################################\r
-#\r
-# Pcd FEATURE_FLAG - list of PCDs that this module is coded for.\r
-#\r
-################################################################################\r
-\r
 [PcdsFeatureFlag.common]\r
   PcdSupportUpdateCapsuleRest|gEfiEdkModulePkgTokenSpaceGuid\r
 \r
-\r
-################################################################################\r
-#\r
-# Pcd FIXED_AT_BUILD - list of PCDs that this module is coded for.\r
-#\r
-################################################################################\r
-\r
 [PcdsFixedAtBuild.common]\r
   PcdMaxSizeNonPopulateCapsule|gEfiEdkModulePkgTokenSpaceGuid\r
   PcdMaxSizePopulateCapsule|gEfiEdkModulePkgTokenSpaceGuid\r
 \r
-################################################################################\r
-#\r
-# Dependency Expression Section - list of Dependency expressions that are required for\r
-#                              this module.\r
-#\r
-################################################################################\r
-\r
 [Depex]\r
   gEfiVariableArchProtocolGuid\r
index 7370eb41987b6e2e0bd67c6a709348d93648b3eb..5a923cda3499c48eedf5093f9022d2d864fd9ce0 100644 (file)
@@ -65,19 +65,13 @@ Returns:
   BufferPtr       = NULL;\r
   CapsuleHeader   = NULL;\r
 \r
-  //\r
-  //Compare GUIDs with EFI_CAPSULE_GUID, if capsule header contains CAPSULE_FLAGS_PERSIST_ACROSS_RESET\r
-  //and CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE flags,whatever the GUID is ,the service supports.\r
-  //\r
   for (ArrayNumber = 0; ArrayNumber < CapsuleCount; ArrayNumber++) {\r
     CapsuleHeader = CapsuleHeaderArray[ArrayNumber];\r
     if ((CapsuleHeader->Flags & (CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE)) == CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) {\r
       return EFI_INVALID_PARAMETER;\r
     }\r
-    if (!CompareGuid (&CapsuleHeader->CapsuleGuid, &gEfiCapsuleGuid)) {\r
-      if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) {\r
-        return EFI_UNSUPPORTED;\r
-      }\r
+    if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) {\r
+      return EFI_UNSUPPORTED;\r
     }\r
   }\r
 \r
@@ -193,19 +187,13 @@ Returns:
 \r
   CapsuleHeader = NULL;\r
 \r
-  //\r
-  //Compare GUIDs with EFI_CAPSULE_GUID, if capsule header contains CAPSULE_FLAGS_PERSIST_ACROSS_RESET\r
-  //and CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE flags,whatever the GUID is ,the service supports.\r
-  //\r
   for (ArrayNumber = 0; ArrayNumber < CapsuleCount; ArrayNumber++) {\r
     CapsuleHeader = CapsuleHeaderArray[ArrayNumber];\r
     if ((CapsuleHeader->Flags & (CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE)) == CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) {\r
       return EFI_INVALID_PARAMETER;\r
     }\r
-    if (!CompareGuid (&CapsuleHeader->CapsuleGuid, &gEfiCapsuleGuid)) {\r
-      if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) {\r
-        return EFI_UNSUPPORTED;\r
-      }\r
+    if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) {\r
+      return EFI_UNSUPPORTED;\r
     }\r
   }\r
 \r
@@ -229,3 +217,48 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+\r
+EFI_STATUS\r
+EFIAPI\r
+CapsuleServiceInitialize (\r
+  IN EFI_HANDLE         ImageHandle,\r
+  IN EFI_SYSTEM_TABLE   *SystemTable\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  This code is capsule runtime service initialization.\r
+\r
+Arguments:\r
+\r
+  ImageHandle          The image handle\r
+  SystemTable          The system table.\r
+\r
+Returns:\r
+\r
+  EFI STATUS\r
+\r
+--*/\r
+{\r
+  EFI_STATUS  Status;\r
+  EFI_HANDLE  NewHandle;\r
+\r
+  SystemTable->RuntimeServices->UpdateCapsule                    = UpdateCapsule;\r
+  SystemTable->RuntimeServices->QueryCapsuleCapabilities         = QueryCapsuleCapabilities;\r
+\r
+  //\r
+  // Now install the Capsule Architectural Protocol on a new handle\r
+  //\r
+  NewHandle = NULL;\r
+\r
+  Status = gBS->InstallMultipleProtocolInterfaces (\r
+                  &NewHandle,\r
+                  &gEfiCapsuleArchProtocolGuid,\r
+                  NULL,\r
+                  NULL\r
+                  );\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  return EFI_SUCCESS;\r
+}\r
index de9ba8372f38c37149a48d9dc797b33e8010ec02..ca5ee21fe708e51a54f60ecd30f4a06ecf6a5cc3 100644 (file)
@@ -23,9 +23,44 @@ Abstract:
 --*/\r
 \r
 \r
-#include <GuidedSection.h>\r
 #include <Crc32SectionExtract.h>\r
 \r
+EFI_STATUS\r
+GuidedSectionExtractionProtocolConstructor (\r
+  OUT EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL      **GuidedSep,\r
+  IN  EFI_EXTRACT_GUIDED_SECTION                  ExtractSection\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  Constructor for the GUIDed section extraction protocol.  Initializes\r
+  instance data.\r
+\r
+Arguments:\r
+\r
+  This      Instance to construct\r
+\r
+Returns:\r
+\r
+  EFI_SUCCESS:  Instance initialized.\r
+\r
+--*/\r
+// TODO:    GuidedSep - add argument and description to function comment\r
+// TODO:    ExtractSection - add argument and description to function comment\r
+// TODO:    EFI_OUT_OF_RESOURCES - add return value to function comment\r
+{\r
+  *GuidedSep = AllocatePool (sizeof (EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL));\r
+  if (*GuidedSep == NULL) {\r
+    return EFI_OUT_OF_RESOURCES;\r
+  }\r
+\r
+  (*GuidedSep)->ExtractSection = ExtractSection;\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+\r
 EFI_STATUS\r
 EFIAPI\r
 InitializeCrc32GuidedSectionExtractionProtocol (\r
@@ -206,21 +241,21 @@ Crc32ExtractSection (
   // Implictly CRC32 GUIDed section should have STATUS_VALID bit set\r
   //\r
   ASSERT (GuidedSectionHeader->Attributes & EFI_GUIDED_SECTION_AUTH_STATUS_VALID);\r
-  *AuthenticationStatus = EFI_LOCAL_AUTH_STATUS_IMAGE_SIGNED | EFI_AGGREGATE_AUTH_STATUS_IMAGE_SIGNED;\r
+  *AuthenticationStatus = EFI_AUTH_STATUS_IMAGE_SIGNED;\r
 \r
   //\r
   // Check whether there exists EFI_SECURITY_POLICY_PROTOCOL_GUID.\r
   //\r
   Status = gBS->LocateProtocol (&gEfiSecurityPolicyProtocolGuid, NULL, &DummyInterface);\r
   if (!EFI_ERROR (Status)) {\r
-    *AuthenticationStatus |= EFI_LOCAL_AUTH_STATUS_PLATFORM_OVERRIDE | EFI_AGGREGATE_AUTH_STATUS_PLATFORM_OVERRIDE;\r
+    *AuthenticationStatus |= EFI_AUTH_STATUS_PLATFORM_OVERRIDE;\r
   } else {\r
     //\r
     // Calculate CRC32 Checksum of Image\r
     //\r
     gBS->CalculateCrc32 (Image, *OutputSize, &Crc32Checksum);\r
     if (Crc32Checksum != Crc32SectionHeader->CRC32Checksum) {\r
-      *AuthenticationStatus |= EFI_LOCAL_AUTH_STATUS_TEST_FAILED | EFI_AGGREGATE_AUTH_STATUS_TEST_FAILED;\r
+      *AuthenticationStatus |= EFI_AUTH_STATUS_TEST_FAILED;\r
     }\r
   }\r
 \r
index 65fb0a27abf77dc16dcfc5ea059472c6bab0d1a3..e7bf276a35747daa3e7c819544c6ebaffbb84c17 100644 (file)
@@ -23,26 +23,17 @@ Abstract:
 #ifndef _CRC32_GUIDED_SECTION_EXTRACTION_H\r
 #define _CRC32_GUIDED_SECTION_EXTRACTION_H\r
 \r
-//\r
-// The package level header files this module uses\r
-//\r
 #include <PiDxe.h>\r
-#include <Common/FrameworkFirmwareVolumeImageFormat.h>\r
-//\r
-// The protocols, PPI and GUID defintions for this module\r
-//\r
 #include <Protocol/SecurityPolicy.h>\r
-#include <Protocol/GuidedSectionExtaction.h>\r
 #include <Protocol/Crc32GuidedSectionExtraction.h>\r
-//\r
-// The Library classes this module consumes\r
-//\r
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/UefiDriverEntryPoint.h>\r
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
 \r
+\r
+\r
 typedef struct {\r
   EFI_GUID_DEFINED_SECTION  GuidedSectionHeader;\r
   UINT32                    CRC32Checksum;\r
index 9bce71f76ba4de147deeec16d0a7f012ea192d23..5b0c65dbcea17eb04c8b912a9a103b8b65c94307 100644 (file)
 #\r
 #**/\r
 \r
-################################################################################\r
-#\r
-# Defines Section - statements that will be processed to create a Makefile.\r
-#\r
-################################################################################\r
 [Defines]\r
   INF_VERSION                    = 0x00010005\r
   BASE_NAME                      = Crc32SectionExtract\r
 #  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
 #\r
 \r
-################################################################################\r
-#\r
-# Sources Section - list of files that are required for the build to succeed.\r
-#\r
-################################################################################\r
-\r
 [Sources.common]\r
-  GuidedSection.h\r
-  GuidedSection.c\r
   Crc32SectionExtract.h\r
   Crc32SectionExtract.c\r
 \r
-\r
-################################################################################\r
-#\r
-# Package Dependency Section - list of Package files that are required for\r
-#                              this module.\r
-#\r
-################################################################################\r
-\r
 [Packages]\r
   MdePkg/MdePkg.dec\r
-  IntelFrameworkPkg/IntelFrameworkPkg.dec\r
-\r
-################################################################################\r
-#\r
-# Library Class Section - list of Library Classes that are required for\r
-#                         this module.\r
-#\r
-################################################################################\r
 \r
 [LibraryClasses]\r
   MemoryAllocationLib\r
   UefiDriverEntryPoint\r
   DebugLib\r
 \r
-\r
-################################################################################\r
-#\r
-# Protocol C Name Section - list of Protocol and Protocol Notify C Names\r
-#                           that this module uses or produces.\r
-#\r
-################################################################################\r
-\r
 [Protocols]\r
   gEfiSecurityPolicyProtocolGuid                # PROTOCOL SOMETIMES_CONSUMED\r
   gEfiCrc32GuidedSectionExtractionProtocolGuid  # PROTOCOL ALWAYS_PRODUCED\r
 \r
-################################################################################\r
-#\r
-# Dependency Expression Section - list of Dependency expressions that are required for\r
-#                              this module.\r
-#\r
-################################################################################\r
-\r
 [Depex]\r
   gEfiRuntimeArchProtocolGuid\r
diff --git a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.c b/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.c
deleted file mode 100644 (file)
index 87605cc..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*++\r
-\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
-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
-  GuidedSection.c\r
-  \r
-Abstract:\r
-\r
-  GUIDed section extraction protocol implementation.  \r
-  This contains the common constructor of GUIDed section\r
-  extraction protocol. GUID specific implementation of each\r
-  GUIDed section extraction protocol can be found in other\r
-  files under the same directory.\r
-    \r
---*/\r
-\r
-#include "GuidedSection.h"\r
-\r
-EFI_STATUS\r
-GuidedSectionExtractionProtocolConstructor (\r
-  OUT EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL      **GuidedSep,\r
-  IN  EFI_EXTRACT_GUIDED_SECTION                  ExtractSection\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Constructor for the GUIDed section extraction protocol.  Initializes\r
-  instance data.\r
-\r
-Arguments:\r
-\r
-  This      Instance to construct\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS:  Instance initialized.\r
-\r
---*/\r
-// TODO:    GuidedSep - add argument and description to function comment\r
-// TODO:    ExtractSection - add argument and description to function comment\r
-// TODO:    EFI_OUT_OF_RESOURCES - add return value to function comment\r
-{\r
-  *GuidedSep = AllocatePool (sizeof (EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL));\r
-  if (*GuidedSep == NULL) {\r
-    return EFI_OUT_OF_RESOURCES;\r
-  }\r
-\r
-  (*GuidedSep)->ExtractSection = ExtractSection;\r
-\r
-  return EFI_SUCCESS;\r
-}\r
diff --git a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.h b/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.h
deleted file mode 100644 (file)
index d6613b0..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*++\r
-\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
-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
-  GuidedSection.h\r
-  \r
-Abstract:\r
-\r
-  Header file for GuidedSection.c\r
-  Please refer to the Framewokr Firmware Volume Specification 0.9.\r
-  \r
---*/\r
-\r
-#ifndef _GUIDED_SECTION_EXTRACTION_H\r
-#define _GUIDED_SECTION_EXTRACTION_H\r
-\r
-#include "Crc32SectionExtract.h"\r
-\r
-//\r
-// Function prototype declarations\r
-//\r
-EFI_STATUS\r
-GuidedSectionExtractionProtocolConstructor (\r
-  OUT EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL      **GuidedSep,\r
-  IN  EFI_EXTRACT_GUIDED_SECTION                  ExtractSection\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  GuidedSep       - TODO: add argument description\r
-  ExtractSection  - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
-;\r
-\r
-#endif\r
index 4bf2e402a3785e7aaf9b93e2244d6395550b700b..c2c024296216292fd0256ac92a8ab5d6d0e48416 100644 (file)
@@ -51,31 +51,6 @@ Revision History:
 \r
 --*/\r
 \r
-//\r
-// The package level header files this module uses\r
-//\r
-#include <PiDxe.h>\r
-#include <FrameworkDxe.h>\r
-//\r
-// The protocols, PPI and GUID defintions for this module\r
-//\r
-#include <Protocol/LoadedImage.h>\r
-#include <Protocol/Runtime.h>\r
-#include <Protocol/UgaIo.h>\r
-\r
-//\r
-// The Library classes this module consumes\r
-//\r
-#include <Library/BaseLib.h>\r
-#include <Library/UefiDriverEntryPoint.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/ReportStatusCodeLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/UefiRuntimeServicesTableLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/CacheMaintenanceLib.h>\r
-#include <Library/PeCoffLib.h>\r
-\r
 #include "Runtime.h"\r
 \r
 //\r
@@ -333,10 +308,7 @@ Returns:
   // check whether in Runtime or not (this is judged by looking at\r
   // mEfiAtRuntime global So this ReportStatusCode will work\r
   //\r
-  REPORT_STATUS_CODE (\r
-          EFI_PROGRESS_CODE,\r
-          (EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_RS_PC_SET_VIRTUAL_ADDRESS_MAP)\r
-          );\r
+  REPORT_STATUS_CODE (EFI_PROGRESS_CODE, PcdGet32 (PcdStatusCodeValueSetVirtualAddressMap));\r
 \r
   //\r
   // Signal all the EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE events.\r
index c2e4b39666df16744c9def2d282f5944b682245a..7154b53cdf93aa125cd6fbb838fddb6112427b0b 100644 (file)
@@ -24,6 +24,22 @@ Abstract:
 #ifndef _RUNTIME_H_\r
 #define _RUNTIME_H_\r
 \r
+#include <PiDxe.h>\r
+#include <Protocol/LoadedImage.h>\r
+#include <Protocol/Runtime.h>\r
+#include <Protocol/UgaIo.h>\r
+#include <Library/BaseLib.h>\r
+#include <Library/UefiDriverEntryPoint.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/ReportStatusCodeLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
+#include <Library/UefiRuntimeServicesTableLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/CacheMaintenanceLib.h>\r
+#include <Library/PeCoffLib.h>\r
+#include <Library/PcdLib.h>\r
+\r
+\r
 //\r
 // Function Prototypes\r
 //\r
index 288e5d07664f2eaf3092497a6c9151fca1bfa550..e535fb1c8d3257575df4249dc6618e727360eb58 100644 (file)
@@ -66,7 +66,6 @@
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r
-  IntelFrameworkPkg/IntelFrameworkPkg.dec\r
 \r
 \r
 ################################################################################\r
   gEfiRuntimeArchProtocolGuid                   # PROTOCOL ALWAYS_PRODUCED\r
   gEfiLoadedImageProtocolGuid                   # PROTOCOL ALWAYS_CONSUMED\r
 \r
+[PcdsFixedAtBuild.common]\r
+  PcdStatusCodeValueSetVirtualAddressMap|gEfiMdePkgTokenSpaceGuid\r
+  
\ No newline at end of file
index 912aab11824f77c88155aee5637894f3429c8366..0a4ee9577472dc6c7d3219041510cdfb577d1481 100644 (file)
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
-//\r
-// The package level header files this module uses\r
-//\r
-#include <PiPei.h>\r
-\r
-//\r
-// The protocols, PPI and GUID defintions for this module\r
-//\r
-#include <Ppi/ReadOnlyVariable.h>\r
-//\r
-// The Library classes this module consumes\r
-//\r
-#include <Library/DebugLib.h>\r
-#include <Library/PeimEntryPoint.h>\r
-#include <Library/HobLib.h>\r
-#include <Library/PcdLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
 \r
 #include <Variable.h>\r
 \r
index b56e315e691933359b3d4533d451351a855cf1d6..ba8a23d67a509197b801266cb59ca6322bcc0b2e 100644 (file)
@@ -18,38 +18,20 @@ Abstract:
 \r
 --*/\r
 \r
-//\r
-// The package level header files this module uses\r
-//\r
-#include <PiPei.h>\r
 \r
-//\r
-// The protocols, PPI and GUID defintions for this module\r
-//\r
-#include <Ppi/ReadOnlyVariable.h>\r
-//\r
-// The Library classes this module consumes\r
-//\r
-#include <Library/DebugLib.h>\r
-#include <Library/PeimEntryPoint.h>\r
-#include <Library/HobLib.h>\r
-#include <Library/PcdLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-\r
-\r
-#include <Variable.h>\r
+#include "Variable.h"\r
 \r
 //\r
 // Module globals\r
 //\r
-static EFI_PEI_READ_ONLY_VARIABLE_PPI mVariablePpi = {\r
+static EFI_PEI_READ_ONLY_VARIABLE2_PPI mVariablePpi = {\r
   PeiGetVariable,\r
   PeiGetNextVariableName\r
 };\r
 \r
 static EFI_PEI_PPI_DESCRIPTOR     mPpiListVariable = {\r
   (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
-  &gEfiPeiReadOnlyVariablePpiGuid,\r
+  &gEfiPeiReadOnlyVariable2PpiGuid,\r
   &mVariablePpi\r
 };\r
 \r
@@ -187,10 +169,10 @@ Returns:
 STATIC\r
 EFI_STATUS\r
 CompareWithValidVariable (\r
-  IN  VARIABLE_HEADER         *Variable,\r
-  IN  CHAR16                  *VariableName,\r
-  IN  EFI_GUID                *VendorGuid,\r
-  OUT VARIABLE_POINTER_TRACK  *PtrTrack\r
+  IN  VARIABLE_HEADER               *Variable,\r
+  IN  CONST CHAR16                  *VariableName,\r
+  IN  CONST EFI_GUID                *VendorGuid,\r
+  OUT VARIABLE_POINTER_TRACK        *PtrTrack\r
   )\r
 /*++\r
 \r
@@ -242,8 +224,8 @@ EFI_STATUS
 EFIAPI\r
 FindVariable (\r
   IN EFI_PEI_SERVICES         **PeiServices,\r
-  IN  CHAR16                  *VariableName,\r
-  IN  EFI_GUID                *VendorGuid,\r
+  IN CONST  CHAR16            *VariableName,\r
+  IN CONST  EFI_GUID          *VendorGuid,\r
   OUT VARIABLE_POINTER_TRACK  *PtrTrack\r
   )\r
 /*++\r
@@ -380,12 +362,12 @@ Returns:
 EFI_STATUS\r
 EFIAPI\r
 PeiGetVariable (\r
-  IN EFI_PEI_SERVICES             **PeiServices,\r
-  IN CHAR16                       *VariableName,\r
-  IN EFI_GUID                     * VendorGuid,\r
-  OUT UINT32                      *Attributes OPTIONAL,\r
-  IN OUT UINTN                    *DataSize,\r
-  OUT VOID                        *Data\r
+  IN CONST  EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,\r
+  IN CONST  CHAR16                          *VariableName,\r
+  IN CONST  EFI_GUID                        *VariableGuid,\r
+  OUT       UINT32                          *Attributes,\r
+  IN OUT    UINTN                           *DataSize,\r
+  OUT       VOID                            *Data\r
   )\r
 /*++\r
 \r
@@ -420,15 +402,16 @@ Returns:
   VARIABLE_POINTER_TRACK  Variable;\r
   UINTN                   VarDataSize;\r
   EFI_STATUS              Status;\r
+  EFI_PEI_SERVICES        **PeiServices;\r
 \r
-  if (VariableName == NULL || VendorGuid == NULL) {\r
+  PeiServices = GetPeiServicesTablePointer ();\r
+  if (VariableName == NULL || VariableGuid == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
   //\r
   // Find existing variable\r
   //\r
-  Status = FindVariable (PeiServices, VariableName, VendorGuid, &Variable);\r
-\r
+  Status = FindVariable (PeiServices, VariableName, VariableGuid, &Variable);\r
   if (Variable.CurrPtr == NULL || Status != EFI_SUCCESS) {\r
     return Status;\r
   }\r
@@ -454,10 +437,10 @@ Returns:
 EFI_STATUS\r
 EFIAPI\r
 PeiGetNextVariableName (\r
-  IN EFI_PEI_SERVICES             **PeiServices,\r
-  IN OUT UINTN                    *VariableNameSize,\r
-  IN OUT CHAR16                   *VariableName,\r
-  IN OUT EFI_GUID                 *VendorGuid\r
+  IN CONST  EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,\r
+  IN OUT UINTN                              *VariableNameSize,\r
+  IN OUT CHAR16                             *VariableName,\r
+  IN OUT EFI_GUID                           *VariableGuid\r
   )\r
 /*++\r
 \r
@@ -470,7 +453,7 @@ Arguments:
   PeiServices        - General purpose services available to every PEIM.\r
   VariabvleNameSize  - The variable name's size.\r
   VariableName       - A pointer to the variable's name.\r
-  VendorGuid         - A pointer to the EFI_GUID structure.\r
+  VariableGuid       - A pointer to the EFI_GUID structure.\r
 \r
   VariableNameSize - Size of the variable name\r
 \r
@@ -489,13 +472,14 @@ Returns:
   VARIABLE_POINTER_TRACK  Variable;\r
   UINTN                   VarNameSize;\r
   EFI_STATUS              Status;\r
+  EFI_PEI_SERVICES        **PeiServices;\r
 \r
+  PeiServices = GetPeiServicesTablePointer ();\r
   if (VariableName == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  Status = FindVariable (PeiServices, VariableName, VendorGuid, &Variable);\r
-\r
+  Status = FindVariable (PeiServices, VariableName, VariableGuid, &Variable);\r
   if (Variable.CurrPtr == NULL || Status != EFI_SUCCESS) {\r
     return Status;\r
   }\r
@@ -514,7 +498,7 @@ Returns:
         if (VarNameSize <= *VariableNameSize) {\r
           (*PeiServices)->CopyMem (VariableName, GET_VARIABLE_NAME_PTR (Variable.CurrPtr), VarNameSize);\r
 \r
-          (*PeiServices)->CopyMem (VendorGuid, &Variable.CurrPtr->VendorGuid, sizeof (EFI_GUID));\r
+          (*PeiServices)->CopyMem (VariableGuid, &Variable.CurrPtr->VendorGuid, sizeof (EFI_GUID));\r
 \r
           Status = EFI_SUCCESS;\r
         } else {\r
index 187edbaf7d755e1b7f5ce40288455866afb1b7a8..9747a8d4264a492cbcf92452b75a8ce06d22282c 100644 (file)
@@ -22,6 +22,16 @@ Abstract:
 #ifndef _PEI_VARIABLE_H\r
 #define _PEI_VARIABLE_H\r
 \r
+#include <PiPei.h>\r
+#include <Ppi/ReadOnlyVariable2.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/PeimEntryPoint.h>\r
+#include <Library/HobLib.h>\r
+#include <Library/PcdLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
+#include <Library/PeiServicesTablePointerLib.h>\r
+\r
+\r
 //\r
 // BugBug: We need relcate the head file.\r
 //\r
@@ -91,12 +101,12 @@ Returns:
 EFI_STATUS\r
 EFIAPI\r
 PeiGetVariable (\r
-  IN EFI_PEI_SERVICES             **PeiServices,\r
-  IN CHAR16                       *VariableName,\r
-  IN EFI_GUID                     * VendorGuid,\r
-  OUT UINT32                      *Attributes OPTIONAL,\r
-  IN OUT UINTN                    *DataSize,\r
-  OUT VOID                        *Data\r
+  IN CONST  EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,\r
+  IN CONST  CHAR16                          *VariableName,\r
+  IN CONST  EFI_GUID                        *VariableGuid,\r
+  OUT       UINT32                          *Attributes,\r
+  IN OUT    UINTN                           *DataSize,\r
+  OUT       VOID                            *Data\r
   )\r
 /*++\r
 \r
@@ -123,10 +133,10 @@ Returns:
 EFI_STATUS\r
 EFIAPI\r
 PeiGetNextVariableName (\r
-  IN EFI_PEI_SERVICES             **PeiServices,\r
-  IN OUT UINTN                    *VariableNameSize,\r
-  IN OUT CHAR16                   *VariableName,\r
-  IN OUT EFI_GUID                 *VendorGuid\r
+  IN CONST  EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,\r
+  IN OUT UINTN                              *VariableNameSize,\r
+  IN OUT CHAR16                             *VariableName,\r
+  IN OUT EFI_GUID                           *VariableGuid\r
   )\r
 /*++\r
 \r
index 5151c4bf4b5753ee12a54fac518756b8b7d9a6e8..434c2991c81af9b8ba366a0e57ac367c2ebfca68 100644 (file)
 #\r
 #**/\r
 \r
-################################################################################\r
-#\r
-# Defines Section - statements that will be processed to create a Makefile.\r
-#\r
-################################################################################\r
 [Defines]\r
   INF_VERSION                    = 0x00010005\r
   BASE_NAME                      = PeiVariable\r
 #  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
 #\r
 \r
-################################################################################\r
-#\r
-# Sources Section - list of files that are required for the build to succeed.\r
-#\r
-################################################################################\r
-\r
 [Sources.common]\r
   Variable.c\r
   Variable.h\r
 [Sources.EBC]\r
   VariableWorker.c\r
 \r
-  \r
-################################################################################\r
-#\r
-# Package Dependency Section - list of Package files that are required for\r
-#                              this module.\r
-#\r
-################################################################################\r
-\r
 [Packages]\r
   MdePkg/MdePkg.dec\r
   MdeModulePkg/MdeModulePkg.dec\r
-  IntelFrameworkPkg/IntelFrameworkPkg.dec\r
-\r
-\r
-################################################################################\r
-#\r
-# Library Class Section - list of Library Classes that are required for\r
-#                         this module.\r
-#\r
-################################################################################\r
 \r
 [LibraryClasses]\r
   BaseMemoryLib\r
   HobLib\r
   PeimEntryPoint\r
   DebugLib\r
-\r
-\r
-################################################################################\r
-#\r
-# PPI C Name Section - list of PPI and PPI Notify C Names that this module\r
-#                      uses or produces.\r
-#\r
-################################################################################\r
+  PeiServiceTablePointerLib\r
 \r
 [Ppis]\r
-  gEfiPeiReadOnlyVariablePpiGuid                # PPI ALWAYS_CONSUMED\r
-\r
-\r
-################################################################################\r
-#\r
-# Pcd DYNAMIC - list of PCDs that this module is coded for.\r
-#\r
-################################################################################\r
+  gEfiPeiReadOnlyVariable2PpiGuid                # PPI ALWAYS_CONSUMED\r
 \r
 [PcdsDynamic.common]\r
   PcdFlashNvStorageVariableBase|gEfiGenericPlatformTokenSpaceGuid\r
 \r
-################################################################################\r
-#\r
-# Dependency Expression Section - list of Dependency expressions that are required for\r
-#                              this module.\r
-#\r
-################################################################################\r
-\r
 [Depex]\r
   TRUE\r
index 5cb75d03ef2da4de362d1f8cac90a02147f902d7..1a49ee8c984cec0d0a8934904e8dcf58a9ab0d49 100644 (file)
@@ -18,24 +18,6 @@ Abstract:
   Framework PEIM to provide the Variable functionality\r
 \r
 --*/\r
-//\r
-// The package level header files this module uses\r
-//\r
-#include <PiPei.h>\r
-\r
-//\r
-// The protocols, PPI and GUID defintions for this module\r
-//\r
-#include <Ppi/ReadOnlyVariable.h>\r
-//\r
-// The Library classes this module consumes\r
-//\r
-#include <Library/DebugLib.h>\r
-#include <Library/PeimEntryPoint.h>\r
-#include <Library/HobLib.h>\r
-#include <Library/PcdLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-\r
 \r
 #include <Variable.h>\r
 \r
index ec43aec283aed9546e4b91e8669c6beaf1cde521..76289087bc2c5f403e186be26fc45aefe6d7c5a2 100644 (file)
@@ -21,24 +21,6 @@ Revision History
 \r
 --*/\r
 \r
-//\r
-// The package level header files this module uses\r
-//\r
-#include <PiDxe.h>\r
-#include <FrameworkDxe.h>\r
-//\r
-// The protocols, PPI and GUID defintions for this module\r
-//\r
-//\r
-// The Library classes this module consumes\r
-//\r
-#include <Library/DebugLib.h>\r
-#include <Library/UefiDriverEntryPoint.h>\r
-#include <Library/ReportStatusCodeLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/UefiRuntimeServicesTableLib.h>\r
-#include <Protocol/WatchDogTimer.h>\r
-\r
 #include "WatchDogTimer.h"\r
 \r
 //\r
@@ -103,13 +85,7 @@ WatchdogTimerDriverExpires (
 \r
 --*/\r
 {\r
-  //\r
-  // Report error code before exiting\r
-  //\r
-  REPORT_STATUS_CODE (\r
-        EFI_ERROR_CODE | EFI_ERROR_MINOR,\r
-        (EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_TIMER_EXPIRED)\r
-        );\r
+  REPORT_STATUS_CODE (EFI_ERROR_CODE | EFI_ERROR_MINOR, PcdGet32 (PcdStatusCodeValueEfiWatchDogTimerExpired));\r
 \r
   //\r
   // If a notification function has been registered, then call it\r
@@ -123,6 +99,7 @@ WatchdogTimerDriverExpires (
   gRT->ResetSystem (EfiResetCold, EFI_TIMEOUT, 0, NULL);\r
 }\r
 \r
+\r
 EFI_STATUS\r
 EFIAPI\r
 WatchdogTimerDriverRegisterHandler (\r
@@ -288,10 +265,6 @@ Returns:
 {\r
   EFI_STATUS  Status;\r
 \r
-  REPORT_STATUS_CODE (\r
-        EFI_PROGRESS_CODE,\r
-        (EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_SW_PC_INIT_BEGIN)\r
-        );\r
   //\r
   // Make sure the Watchdog Timer Architectural Protocol is not already installed in the system\r
   //\r
@@ -320,10 +293,5 @@ Returns:
                   );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
-  REPORT_STATUS_CODE (\r
-        EFI_PROGRESS_CODE,\r
-        (EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_SW_PC_INIT_END)\r
-        );\r
-\r
   return Status;\r
 }\r
index bb1936b90e6e1645aae1c4f7affdb46b8848f34b..2c8c33a8cb99e18a82898dd1624c23999bdc18b0 100644 (file)
@@ -24,6 +24,20 @@ Revision History
 #ifndef _WATCHDOG_TIMER_H_\r
 #define _WATCHDOG_TIMER_H_\r
 \r
+\r
+//\r
+// The package level header files this module uses\r
+//\r
+#include <PiDxe.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/UefiDriverEntryPoint.h>\r
+#include <Library/ReportStatusCodeLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/UefiRuntimeServicesTableLib.h>\r
+#include <Library/PcdLib.h>\r
+#include <Protocol/WatchDogTimer.h>\r
+\r
+\r
 //\r
 // Function Prototypes\r
 //\r
@@ -32,31 +46,27 @@ EFIAPI
 WatchdogTimerDriverRegisterHandler (\r
   IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL  *This,\r
   IN EFI_WATCHDOG_TIMER_NOTIFY         NotifyFunction\r
-  )\r
-;\r
+  );\r
 \r
 EFI_STATUS\r
 EFIAPI\r
 WatchdogTimerDriverSetTimerPeriod (\r
   IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL  *This,\r
   IN UINT64                            TimerPeriod\r
-  )\r
-;\r
+  );\r
 \r
 EFI_STATUS\r
 EFIAPI\r
 WatchdogTimerDriverGetTimerPeriod (\r
   IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL  *This,\r
   IN UINT64                            *TimerPeriod\r
-  )\r
-;\r
+  );\r
 \r
 EFI_STATUS\r
 EFIAPI\r
 WatchdogTimerDriverInitialize (\r
   IN EFI_HANDLE        ImageHandle,\r
   IN EFI_SYSTEM_TABLE  *SystemTable\r
-  )\r
-;\r
+  );\r
 \r
 #endif\r
index 7c3984d488096781580a539310aad824d7916a43..5c9f3dfa4bf54f518a30b8c937287ac559c39f2b 100644 (file)
 #\r
 #**/\r
 \r
-################################################################################\r
-#\r
-# Defines Section - statements that will be processed to create a Makefile.\r
-#\r
-################################################################################\r
 [Defines]\r
   INF_VERSION                    = 0x00010005\r
   BASE_NAME                      = WatchDogTimer\r
 #  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
 #\r
 \r
-################################################################################\r
-#\r
-# Sources Section - list of files that are required for the build to succeed.\r
-#\r
-################################################################################\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
 \r
 [Sources.common]\r
   WatchDogTimer.h\r
   WatchDogTimer.c\r
 \r
-\r
-################################################################################\r
-#\r
-# Package Dependency Section - list of Package files that are required for\r
-#                              this module.\r
-#\r
-################################################################################\r
-\r
-[Packages]\r
-  MdePkg/MdePkg.dec\r
-  IntelFrameWorkPkg/IntelFrameworkPkg.dec\r
-\r
-################################################################################\r
-#\r
-# Library Class Section - list of Library Classes that are required for\r
-#                         this module.\r
-#\r
-################################################################################\r
-\r
 [LibraryClasses]\r
   UefiRuntimeServicesTableLib\r
   UefiBootServicesTableLib\r
   UefiDriverEntryPoint\r
   DebugLib\r
 \r
-\r
-################################################################################\r
-#\r
-# Protocol C Name Section - list of Protocol and Protocol Notify C Names\r
-#                           that this module uses or produces.\r
-#\r
-################################################################################\r
-\r
 [Protocols]\r
   gEfiWatchdogTimerArchProtocolGuid             # PROTOCOL ALWAYS_PRODUCED\r
 \r
-################################################################################\r
-#\r
-# Dependency Expression Section - list of Dependency expressions that are required for\r
-#                              this module.\r
-#\r
-################################################################################\r
+[PcdsFixedAtBuild.common]\r
+  PcdStatusCodeValueEfiWatchDogTimerExpired|gEfiMdePkgTokenSpaceGuid\r
+\r
 [depex]\r
-  gEfiTimerArchProtocolGuid
\ No newline at end of file
+  gEfiTimerArchProtocolGuid\r
+  \r
+  
\ No newline at end of file
index 6c956374b8f9998eeebf1370fcd6128d5b609d38..d9bb3e303c30efc004e258185949c11f476e1d9e 100644 (file)
@@ -86,4 +86,13 @@ typedef struct {
   EFI_GUID  Type;\r
 } EFI_STATUS_CODE_DATA;\r
 \r
+\r
+//\r
+// Bit values for AuthenticationStatus\r
+//\r
+#define EFI_AUTH_STATUS_PLATFORM_OVERRIDE   0x01\r
+#define EFI_AUTH_STATUS_IMAGE_SIGNED        0x02\r
+#define EFI_AUTH_STATUS_NOT_TESTED          0x04\r
+#define EFI_AUTH_STATUS_TEST_FAILED         0x08\r
+\r
 #endif\r
index a5be7740c2858cbb9668c7a5cc48a0cc085c98bc..80b1ee1210ede4189b8d373e692f36702f90d01f 100644 (file)
 \r
 typedef struct _EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI   EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI;\r
 \r
-//\r
-// Bit values for AuthenticationStatus\r
-//\r
-#define EFI_AUTH_STATUS_PLATFORM_OVERRIDE   0x01\r
-#define EFI_AUTH_STATUS_IMAGE_SIGNED        0x02\r
-#define EFI_AUTH_STATUS_NOT_TESTED          0x04\r
-#define EFI_AUTH_STATUS_TEST_FAILED         0x08\r
 \r
 /**\r
   The ExtractSection() function processes the input section and\r
index 03e779618816731d03296271d8038fd1f21c93f4..f4f85086ca480211e592ca2bba14da1bfcbc5b60 100644 (file)
@@ -69,7 +69,7 @@ EFI_STATUS
   OUT       UINT32                          *Attributes,\r
   IN OUT    UINTN                           *DataSize,\r
   OUT       VOID                            *Data\r
-);\r
+  );\r
 \r
 \r
 /**\r
@@ -112,7 +112,7 @@ EFI_STATUS
   IN OUT    UINTN                           *VariableNameSize,\r
   IN OUT    CHAR16                          *VariableName,\r
   IN OUT    EFI_GUID                        *VariableGuid\r
-);\r
+  );\r
 \r
 /**\r
   This PPI provides a lightweight, read-only variant of the full EFI \r
diff --git a/MdePkg/Include/Protocol/GuidedSectionExtaction.h b/MdePkg/Include/Protocol/GuidedSectionExtaction.h
deleted file mode 100644 (file)
index 55692e8..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/** @file\r
-  If a GUID-defined section is encountered when doing section\r
-  extraction, the section extraction driver calls the appropriate\r
-  instance of the GUIDed Section Extraction Protocol to extract\r
-  the section stream contained therein.\r
-\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
-  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
-  @par Revision Reference: PI\r
-  Version 1.00.\r
-\r
-**/\r
-\r
-#ifndef __GUID_SECTION_EXTRACTION_PROTOCOL_H__\r
-#define __GUID_SECTION_EXTRACTION_PROTOCOL_H__\r
-\r
-//\r
-// The protocol interface structures are identified by associating \r
-// them with a GUID. Each instance of a protocol with a given \r
-// GUID must have the same interface structure. While all instances \r
-// of the GUIDed Section Extraction Protocol must have the same \r
-// interface structure, they do not all have the same GUID. The \r
-// GUID that is associated with an instance of the GUIDed Section \r
-// Extraction Protocol is used to correlate it with the GUIDed \r
-// section type that it is intended to process. \r
-//\r
-\r
-typedef struct _EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL;\r
-\r
-\r
-/**\r
-  The ExtractSection() function processes the input section and\r
-  allocates a buffer from the pool in which it returns the section\r
-  contents. If the section being extracted contains\r
-  authentication information (the section's\r
-  GuidedSectionHeader.Attributes field has the\r
-  EFI_GUIDED_SECTION_AUTH_STATUS_VALID bit set), the values\r
-  returned in AuthenticationStatus must reflect the results of\r
-  the authentication operation. Depending on the algorithm and\r
-  size of the encapsulated data, the time that is required to do\r
-  a full authentication may be prohibitively long for some\r
-  classes of systems. To indicate this, use\r
-  EFI_SECURITY_POLICY_PROTOCOL_GUID, which may be published by\r
-  the security policy driver (see the Platform Initialization\r
-  Driver Execution Environment Core Interface Specification for\r
-  more details and the GUID definition). If the\r
-  EFI_SECURITY_POLICY_PROTOCOL_GUID exists in the handle\r
-  database, then, if possible, full authentication should be\r
-  skipped and the section contents simply returned in the\r
-  OutputBuffer. In this case, the\r
-  EFI_AUTH_STATUS_PLATFORM_OVERRIDE bit AuthenticationStatus\r
-  must be set on return. ExtractSection() is callable only from\r
-  TPL_NOTIFY and below. Behavior of ExtractSection() at any\r
-  EFI_TPL above TPL_NOTIFY is undefined. Type EFI_TPL is\r
-  defined in RaiseTPL() in the UEFI 2.0 specification.\r
-\r
-  \r
-  @param This   Indicates the\r
-                EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL instance.\r
-  \r
-  @param InputSection Buffer containing the input GUIDed section\r
-                      to be processed. OutputBuffer OutputBuffer\r
-                      is allocated from boot services pool\r
-                      memory and contains the new section\r
-                      stream. The caller is responsible for\r
-                      freeing this buffer.\r
-\r
-  @param OutputSize   A pointer to a caller-allocated UINTN in\r
-                      which the size of OutputBuffer allocation\r
-                      is stored. If the function returns\r
-                      anything other than EFI_SUCCESS, the value\r
-                      of OutputSize is undefined.\r
-\r
-  @param AuthenticationStatus A pointer to a caller-allocated\r
-                              UINT32 that indicates the\r
-                              authentication status of the\r
-                              output buffer. If the input\r
-                              section's\r
-                              GuidedSectionHeader.Attributes\r
-                              field has the\r
-                              EFI_GUIDED_SECTION_AUTH_STATUS_VAL\r
-                              bit as clear, AuthenticationStatus\r
-                              must return zero. Both local bits\r
-                              (19:16) and aggregate bits (3:0)\r
-                              in AuthenticationStatus are\r
-                              returned by ExtractSection().\r
-                              These bits reflect the status of\r
-                              the extraction operation. The bit\r
-                              pattern in both regions must be\r
-                              the same, as the local and\r
-                              aggregate authentication statuses\r
-                              have equivalent meaning at this\r
-                              level. If the function returns\r
-                              anything other than EFI_SUCCESS,\r
-                              the value of AuthenticationStatus\r
-                              is undefined.\r
-\r
-\r
-  @retval EFI_SUCCESS The InputSection was successfully\r
-                      processed and the section contents were\r
-                      returned.\r
-\r
-  @retval EFI_OUT_OF_RESOURCES  The system has insufficient\r
-                                resources to process the\r
-                                request.\r
-\r
-  @retval EFI_INVALID_PARAMETER The GUID in InputSection does\r
-                                not match this instance of the\r
-                                GUIDed Section Extraction\r
-                                Protocol.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_EXTRACT_GUIDED_SECTION)(\r
-  IN CONST  EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL  *This,\r
-  IN CONST  VOID                                    *InputSection,\r
-  OUT       VOID                                    **OutputBuffer,\r
-  OUT       UINTN                                   *OutputSize,\r
-  OUT       UINT32                                  *AuthenticationStatus\r
-);\r
-\r
-\r
-/**\r
-  \r
-  Takes the GUIDed section as input and produces the section\r
-  stream data. See the ExtractSection() function description.\r
-\r
-**/\r
-struct _EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL {\r
-  EFI_EXTRACT_GUIDED_SECTION  ExtractSection;\r
-};\r
-\r
-\r
-#endif\r
diff --git a/MdePkg/Include/Protocol/GuidedSectionExtraction.h b/MdePkg/Include/Protocol/GuidedSectionExtraction.h
new file mode 100644 (file)
index 0000000..55692e8
--- /dev/null
@@ -0,0 +1,142 @@
+/** @file\r
+  If a GUID-defined section is encountered when doing section\r
+  extraction, the section extraction driver calls the appropriate\r
+  instance of the GUIDed Section Extraction Protocol to extract\r
+  the section stream contained therein.\r
+\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
+  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
+  @par Revision Reference: PI\r
+  Version 1.00.\r
+\r
+**/\r
+\r
+#ifndef __GUID_SECTION_EXTRACTION_PROTOCOL_H__\r
+#define __GUID_SECTION_EXTRACTION_PROTOCOL_H__\r
+\r
+//\r
+// The protocol interface structures are identified by associating \r
+// them with a GUID. Each instance of a protocol with a given \r
+// GUID must have the same interface structure. While all instances \r
+// of the GUIDed Section Extraction Protocol must have the same \r
+// interface structure, they do not all have the same GUID. The \r
+// GUID that is associated with an instance of the GUIDed Section \r
+// Extraction Protocol is used to correlate it with the GUIDed \r
+// section type that it is intended to process. \r
+//\r
+\r
+typedef struct _EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL;\r
+\r
+\r
+/**\r
+  The ExtractSection() function processes the input section and\r
+  allocates a buffer from the pool in which it returns the section\r
+  contents. If the section being extracted contains\r
+  authentication information (the section's\r
+  GuidedSectionHeader.Attributes field has the\r
+  EFI_GUIDED_SECTION_AUTH_STATUS_VALID bit set), the values\r
+  returned in AuthenticationStatus must reflect the results of\r
+  the authentication operation. Depending on the algorithm and\r
+  size of the encapsulated data, the time that is required to do\r
+  a full authentication may be prohibitively long for some\r
+  classes of systems. To indicate this, use\r
+  EFI_SECURITY_POLICY_PROTOCOL_GUID, which may be published by\r
+  the security policy driver (see the Platform Initialization\r
+  Driver Execution Environment Core Interface Specification for\r
+  more details and the GUID definition). If the\r
+  EFI_SECURITY_POLICY_PROTOCOL_GUID exists in the handle\r
+  database, then, if possible, full authentication should be\r
+  skipped and the section contents simply returned in the\r
+  OutputBuffer. In this case, the\r
+  EFI_AUTH_STATUS_PLATFORM_OVERRIDE bit AuthenticationStatus\r
+  must be set on return. ExtractSection() is callable only from\r
+  TPL_NOTIFY and below. Behavior of ExtractSection() at any\r
+  EFI_TPL above TPL_NOTIFY is undefined. Type EFI_TPL is\r
+  defined in RaiseTPL() in the UEFI 2.0 specification.\r
+\r
+  \r
+  @param This   Indicates the\r
+                EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL instance.\r
+  \r
+  @param InputSection Buffer containing the input GUIDed section\r
+                      to be processed. OutputBuffer OutputBuffer\r
+                      is allocated from boot services pool\r
+                      memory and contains the new section\r
+                      stream. The caller is responsible for\r
+                      freeing this buffer.\r
+\r
+  @param OutputSize   A pointer to a caller-allocated UINTN in\r
+                      which the size of OutputBuffer allocation\r
+                      is stored. If the function returns\r
+                      anything other than EFI_SUCCESS, the value\r
+                      of OutputSize is undefined.\r
+\r
+  @param AuthenticationStatus A pointer to a caller-allocated\r
+                              UINT32 that indicates the\r
+                              authentication status of the\r
+                              output buffer. If the input\r
+                              section's\r
+                              GuidedSectionHeader.Attributes\r
+                              field has the\r
+                              EFI_GUIDED_SECTION_AUTH_STATUS_VAL\r
+                              bit as clear, AuthenticationStatus\r
+                              must return zero. Both local bits\r
+                              (19:16) and aggregate bits (3:0)\r
+                              in AuthenticationStatus are\r
+                              returned by ExtractSection().\r
+                              These bits reflect the status of\r
+                              the extraction operation. The bit\r
+                              pattern in both regions must be\r
+                              the same, as the local and\r
+                              aggregate authentication statuses\r
+                              have equivalent meaning at this\r
+                              level. If the function returns\r
+                              anything other than EFI_SUCCESS,\r
+                              the value of AuthenticationStatus\r
+                              is undefined.\r
+\r
+\r
+  @retval EFI_SUCCESS The InputSection was successfully\r
+                      processed and the section contents were\r
+                      returned.\r
+\r
+  @retval EFI_OUT_OF_RESOURCES  The system has insufficient\r
+                                resources to process the\r
+                                request.\r
+\r
+  @retval EFI_INVALID_PARAMETER The GUID in InputSection does\r
+                                not match this instance of the\r
+                                GUIDed Section Extraction\r
+                                Protocol.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_EXTRACT_GUIDED_SECTION)(\r
+  IN CONST  EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL  *This,\r
+  IN CONST  VOID                                    *InputSection,\r
+  OUT       VOID                                    **OutputBuffer,\r
+  OUT       UINTN                                   *OutputSize,\r
+  OUT       UINT32                                  *AuthenticationStatus\r
+);\r
+\r
+\r
+/**\r
+  \r
+  Takes the GUIDed section as input and produces the section\r
+  stream data. See the ExtractSection() function description.\r
+\r
+**/\r
+struct _EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL {\r
+  EFI_EXTRACT_GUIDED_SECTION  ExtractSection;\r
+};\r
+\r
+\r
+#endif\r
diff --git a/MdePkg/Include/Protocol/SectionExtraction.h b/MdePkg/Include/Protocol/SectionExtraction.h
new file mode 100644 (file)
index 0000000..2210887
--- /dev/null
@@ -0,0 +1,142 @@
+/** @file\r
+  This file declares Section Extraction protocol.\r
+\r
+  The section extraction protocol is referenced in the PI 1.0 specification, but\r
+  not defined. It will likely be added in an eratta update.\r
+\r
+  Copyright (c) 2006, Intel Corporation                                                         \r
+  All rights reserved. This program and the 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
+**/\r
+\r
+#ifndef __SECTION_EXTRACTION_PROTOCOL_H__\r
+#define __SECTION_EXTRACTION_PROTOCOL_H__\r
+\r
+\r
+\r
+typedef struct _EFI_SECTION_EXTRACTION_PROTOCOL EFI_SECTION_EXTRACTION_PROTOCOL;\r
+\r
+//\r
+// Protocol member functions\r
+//\r
+/**\r
+  Creates and returns a new section stream handle to represent the new section stream.\r
+\r
+  @param  This                  Indicates the EFI_SECTION_EXTRACTION_PROTOCOL instance.\r
+  @param  SectionStreamLength   Size in bytes of the section stream.\r
+  @param  SectionStream         Buffer containing the new section stream.\r
+  @param  SectionStreamHandle   A pointer to a caller-allocated UINTN that,\r
+                                on output, contains the new section stream handle.\r
+\r
+  @retval EFI_SUCCESS           The SectionStream was successfully processed and\r
+                                the section stream handle was returned.\r
+  @retval EFI_OUT_OF_RESOURCES  The system has insufficient resources to\r
+                                process the request.\r
+  @retval EFI_INVALID_PARAMETER The section stream may be corrupt or the value\r
+                                of SectionStreamLength may be incorrect.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_OPEN_SECTION_STREAM) (\r
+  IN  EFI_SECTION_EXTRACTION_PROTOCOL                   *This,\r
+  IN  UINTN                                             SectionStreamLength,\r
+  IN  VOID                                              *SectionStream,\r
+  OUT UINTN                                             *SectionStreamHandle\r
+  );\r
+\r
+/**\r
+  Reads and returns a single section from a section stream.\r
+\r
+  @param  This                  Indicates the EFI_SECTION_EXTRACTION_PROTOCOL instance.\r
+  @param  SectionStreamHandle   Indicates from which section stream to read.\r
+  @param  SectionType           Pointer to an EFI_SECTION_TYPE.\r
+  @param  SectionDefinitionGuid Pointer to an EFI_GUID.If SectionType ==\r
+                                EFI_SECTION_GUID_DEFINED, SectionDefinitionGuid indicates what section GUID\r
+                                to search for.If SectionType !=EFI_SECTION_GUID_DEFINED, then\r
+                                SectionDefinitionGuid is unused and is ignored.\r
+  @param  SectionInstance       Indicates which instance of the requested section\r
+                                type to return when SectionType is not NULL.\r
+  @param  SectionStreamHandle   A pointer to a caller-allocated UINTN that, on output,\r
+                                contains the new section stream handle.\r
+  @param  Buffer                Pointer to a pointer to a buffer in which the section\r
+                                contents are returned.\r
+  @param  BufferSize            Pointer to a caller-allocated UINTN.\r
+  @param  AuthenticationStatus  Pointer to a caller-allocated UINT32 in\r
+                                which any meta-data from encapsulation GUID-defined sections is returned.\r
+\r
+  @retval EFI_SUCCESS           The SectionStream was successfully processed and\r
+                                the section contents were returned in Buffer.\r
+  @retval EFI_PROTOCOL_ERROR    A GUID-defined section was encountered in\r
+                                the section stream with its EFI_GUIDED_SECTION_PROCESSING_REQUIRED bit set,\r
+                                but there was no corresponding GUIDed Section Extraction Protocol in\r
+                                the handle database.\r
+  @retval EFI_NOT_FOUND         An error was encountered when parsing the SectionStream,\r
+                                which indicates that the SectionStream is not correctly formatted.\r
+                                Or The requested section does not exist.\r
+  @retval EFI_OUT_OF_RESOURCES  The system has insufficient resources to process\r
+                                the request.\r
+  @retval EFI_INVALID_PARAMETER The SectionStreamHandle does not exist.\r
+  @retval EFI_BUFFER_TOO_SMALL  The size of the input buffer is insufficient to\r
+                                contain the requested section.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_GET_SECTION) (\r
+  IN EFI_SECTION_EXTRACTION_PROTOCOL                    *This,\r
+  IN UINTN                                              SectionStreamHandle,\r
+  IN EFI_SECTION_TYPE                                   *SectionType,\r
+  IN EFI_GUID                                           *SectionDefinitionGuid,\r
+  IN UINTN                                              SectionInstance,\r
+  IN VOID                                               **Buffer,\r
+  IN OUT UINTN                                          *BufferSize,\r
+  OUT UINT32                                            *AuthenticationStatus\r
+  );\r
+\r
+/**\r
+  Deletes a section stream handle and returns all associated resources to the system.\r
+\r
+  @param  This                  Indicates the EFI_SECTION_EXTRACTION_PROTOCOL instance.\r
+  @param  SectionStreamHandle   Indicates the section stream to close.\r
+  @retval EFI_SUCCESS           The SectionStream was successfully processed and\r
+                                the section stream handle was returned.\r
+  @retval EFI_INVALID_PARAMETER The SectionStreamHandle does not exist.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_CLOSE_SECTION_STREAM) (\r
+  IN EFI_SECTION_EXTRACTION_PROTOCOL                    *This,\r
+  IN UINTN                                              SectionStreamHandle\r
+  );\r
+\r
+/**\r
+  @par Protocol Description:\r
+  The Section Extraction Protocol provides a simple method of extracting \r
+  sections from arbitrarily complex files.\r
+\r
+  @param OpenSectionStream\r
+  Takes a bounded stream of sections and returns a section stream handle. \r
+\r
+  @param GetSection\r
+  Given a section stream handle, retrieves the requested section and \r
+  meta-data from the section stream. \r
+\r
+  @param CloseSectionStream\r
+  Given a section stream handle, closes the section stream.\r
+\r
+**/\r
+struct _EFI_SECTION_EXTRACTION_PROTOCOL {\r
+  EFI_OPEN_SECTION_STREAM   OpenSectionStream;\r
+  EFI_GET_SECTION           GetSection;\r
+  EFI_CLOSE_SECTION_STREAM  CloseSectionStream;\r
+};\r
+\r
+#endif\r
index 3cc3f59819d0a06d7c932b9d34ecbe9b1b11976c..11d4a0c2c783d0c29a90ab5f024064ae3253abab 100644 (file)
   MemLibInternals.h\r
 \r
 \r
-################################################################################\r
-#\r
-# Includes Section - list of Include locations that are required for\r
-#                    this module.\r
-#\r
-################################################################################\r
-\r
-[Includes]\r
-\r
 ################################################################################\r
 #\r
 # Package Dependency Section - list of Package files that are required for\r
index 9669aa678048100f4cddbeeba744f5e269b5addd..5c2f7a7048687992bce8a57332428fd0abd86207 100644 (file)
   PcdPciExpressBaseAddress|0x0000000a|gEfiMdePkgTokenSpaceGuid|UINT64|0xE0000000\r
   PcdFSBClock|0x0000000c|gEfiMdePkgTokenSpaceGuid|UINT32|200000000\r
   PcdUefiLibMaxPrintBufferSize|0x101|gEfiMdePkgTokenSpaceGuid|UINT32|320\r
+  PcdStatusCodeValueEfiWatchDogTimerExpired|0x0000000d|gEfiMdePkgTokenSpaceGuid|UINT32|0x00011003   # EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_TIMER_EXPIRED\r
+  PcdStatusCodeValueSetVirtualAddressMap|0x0000000e|gEfiMdePkgTokenSpaceGuid|UINT32|0x03101004      # EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_RS_PC_SET_VIRTUAL_ADDRESS_MAP\r
+  PcdStatusCodeValueMemoryTestStarted|0x0000000f|gEfiMdePkgTokenSpaceGuid|UINT32|0x00051006         # EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_PC_TEST\r
+  PcdStatusCodeValueUncorrectableMemoryError|0x00000010|gEfiMdePkgTokenSpaceGuid|UINT32|0x00051003  # EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_EC_UNCORRECTABLE\r
 \r
 [PcdsPatchableInModule.common]\r
   PcdDebugPrintErrorLevel|0x00000006|gEfiMdePkgTokenSpaceGuid|UINT32|0x80000000\r
index bb6487953f47b9e7160a9c42058ad4f4fb9a1972..d4a9dddd8063c1e5b70dfbca6ca71c931f2cdfca 100644 (file)
   PcdPciIsaEnable|gEfiIntelFrameworkModulePkgTokenSpaceGuid|FALSE\r
   PcdPciVgaEnable|gEfiIntelFrameworkModulePkgTokenSpaceGuid|FALSE\r
   PcdPciBusHotplugDeviceSupport|gEfiIntelFrameworkModulePkgTokenSpaceGuid|TRUE\r
+  PcdStatusCodeValueEfiWatchDogTimerExpired|gEfiMdePkgTokenSpaceGuid|0x00011003\r
+  PcdStatusCodeValueMemoryTestStarted|gEfiMdePkgTokenSpaceGuid|0x00051006\r
+  PcdStatusCodeValueSetVirtualAddressMap|gEfiMdePkgTokenSpaceGuid|0x03101004\r
+  PcdStatusCodeValueUncorrectableMemoryError|gEfiMdePkgTokenSpaceGuid|0x00051003\r
+\r
+\r
 \r
 ################################################################################\r
 #\r