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
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
\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
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
--- /dev/null
+/** @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
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
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
\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
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
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
#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
# 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
+++ /dev/null
-/*++\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
[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
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
\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
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
--*/\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
// 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
#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
#\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
+++ /dev/null
-/*++\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
+++ /dev/null
-/*++\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
\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
// 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
#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
\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
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
\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
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
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
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
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
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
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
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
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
#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
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
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
#\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
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
\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
\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
gRT->ResetSystem (EfiResetCold, EFI_TIMEOUT, 0, NULL);\r
}\r
\r
+\r
EFI_STATUS\r
EFIAPI\r
WatchdogTimerDriverRegisterHandler (\r
{\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
);\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
#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
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
#\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
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
\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
OUT UINT32 *Attributes,\r
IN OUT UINTN *DataSize,\r
OUT VOID *Data\r
-);\r
+ );\r
\r
\r
/**\r
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
+++ /dev/null
-/** @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
--- /dev/null
+/** @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
--- /dev/null
+/** @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
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
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
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