Removed IntelframeworkPkg contamination from MdeModulePkg modules.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3019 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
AJFISH 2007-07-03 18:34:24 +00:00
parent c1f23d6336
commit ba23773287
36 changed files with 415 additions and 668 deletions

View File

@ -51,7 +51,7 @@ EFI_FORWARD_DECLARATION (EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL);
typedef typedef
EFI_STATUS EFI_STATUS
(EFIAPI *EFI_EXTRACT_GUIDED_SECTION) ( (EFIAPI *EFI_EXTRACT_GUIDED_SECTION) (
IN EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL * This, IN EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL *This,
IN VOID *InputSection, IN VOID *InputSection,
OUT VOID **OutputBuffer, OUT VOID **OutputBuffer,
OUT UINTN *OutputSize, OUT UINTN *OutputSize,

View File

@ -60,15 +60,6 @@
EntryPoint.c EntryPoint.c
################################################################################
#
# Includes Section - list of Include locations that are required for
# this module.
#
################################################################################
[Includes]
################################################################################ ################################################################################
# #
# Package Dependency Section - list of Package files that are required for # Package Dependency Section - list of Package files that are required for
@ -78,8 +69,8 @@
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
IntelFrameworkPkg/IntelFrameworkPkg.dec
MdeModulePkg/MdeModulePkg.dec MdeModulePkg/MdeModulePkg.dec
IntelFrameworkPkg/IntelFrameworkPkg.dec
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec

View File

@ -48,15 +48,6 @@
BootScriptLib.c BootScriptLib.c
################################################################################
#
# Includes Section - list of Include locations that are required for
# this module.
#
################################################################################
[Includes]
################################################################################ ################################################################################
# #
# Package Dependency Section - list of Package files that are required for # Package Dependency Section - list of Package files that are required for

View File

@ -0,0 +1,42 @@
/** @file
This protocol implements a FV section extraction using a CRC32 encapsulation.
The GUID defins the encapsulation scheme and the data structures come from
the SectionExtraction protocol definition.
Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_H__
#define __CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_H__
//
// Protocol GUID definition. Each GUIDed section extraction protocol has the
// same interface but with different GUID. All the GUIDs is defined here.
// May add multiple GUIDs here.
//
#define EFI_CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL_GUID \
{ 0xFC1BCDB0, 0x7D31, 0x49aa, {0x93, 0x6A, 0xA4, 0x60, 0x0D, 0x9D, 0xD0, 0x83 } }
//
// Forward reference for pure ANSI compatability
//
typedef struct _EFI_CRC32_GUIDED_SECTION_EXTRACTION_PROTOCOL EFI_CRC32_GUID_SECTION_EXTRACTION_PROTOCOL;
//
// The data structures are the same as GuidedSectionExtraction protocol only the GUID's are different
//
#include <Protocol/GuidedSectionExtraction.h>
extern EFI_GUID gEfiCrc32GuidedSectionExtractionProtocolGuid;
#endif

View File

@ -89,6 +89,7 @@
gEfiTianoDecompressProtocolGuid = { 0xE84CF29C, 0x191F, 0x4EAE, { 0x96, 0xE1, 0xF4, 0x6A, 0xEC, 0xEA, 0xEA, 0x0B }} gEfiTianoDecompressProtocolGuid = { 0xE84CF29C, 0x191F, 0x4EAE, { 0x96, 0xE1, 0xF4, 0x6A, 0xEC, 0xEA, 0xEA, 0x0B }}
gEfiCustomizedDecompressProtocolGuid = { 0x9A44198E, 0xA4A2, 0x44E6, { 0x8A, 0x1F, 0x39, 0xBE, 0xFD, 0xAC, 0x89, 0x6F }} gEfiCustomizedDecompressProtocolGuid = { 0x9A44198E, 0xA4A2, 0x44E6, { 0x8A, 0x1F, 0x39, 0xBE, 0xFD, 0xAC, 0x89, 0x6F }}
gEfiCapsuleArchProtocolGuid = { 0x5053697E, 0x2EBC, 0x4819, { 0x90, 0xD9, 0x05, 0x80, 0xDE, 0xEE, 0x57, 0x54 }} gEfiCapsuleArchProtocolGuid = { 0x5053697E, 0x2EBC, 0x4819, { 0x90, 0xD9, 0x05, 0x80, 0xDE, 0xEE, 0x57, 0x54 }}
gEfiCrc32GuidedSectionExtractionProtocolGuid = { 0xFC1BCDB0, 0x7D31, 0x49aa, {0x93, 0x6A, 0xA4, 0x60, 0x0D, 0x9D, 0xD0, 0x83 } }

View File

@ -326,6 +326,10 @@
PcdMaxPeiPerformanceLogEntries|gEfiEdkModulePkgTokenSpaceGuid|28 PcdMaxPeiPerformanceLogEntries|gEfiEdkModulePkgTokenSpaceGuid|28
PcdVpdBaseAddress|gEfiEdkModulePkgTokenSpaceGuid|0x0 PcdVpdBaseAddress|gEfiEdkModulePkgTokenSpaceGuid|0x0
PcdMaxPeiPcdCallBackNumberPerPcdEntry|gEfiEdkModulePkgTokenSpaceGuid|0x08 PcdMaxPeiPcdCallBackNumberPerPcdEntry|gEfiEdkModulePkgTokenSpaceGuid|0x08
PcdStatusCodeValueEfiWatchDogTimerExpired|gEfiMdePkgTokenSpaceGuid|0x00011003 # EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_TIMER_EXPIRED
PcdStatusCodeValueMemoryTestStarted|gEfiMdePkgTokenSpaceGuid|0x00051006 # EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_RS_PC_SET_VIRTUAL_ADDRESS_MAP
PcdStatusCodeValueSetVirtualAddressMap|gEfiMdePkgTokenSpaceGuid|0x03101004 # EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_PC_TEST
PcdStatusCodeValueUncorrectableMemoryError|gEfiMdePkgTokenSpaceGuid|0x0005100 # EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_EC_UNCORRECTABLE3
[PcdsPatchableInModule.common] [PcdsPatchableInModule.common]
PcdDebugPrintErrorLevel|gEfiMdePkgTokenSpaceGuid|0x80000000 PcdDebugPrintErrorLevel|gEfiMdePkgTokenSpaceGuid|0x80000000

View File

@ -19,22 +19,6 @@ Abstract:
--*/ --*/
//
// The package level header files this module uses
//
#include <PiPei.h>
#include <FrameworkPei.h>
//
// The protocols, PPI and GUID defintions for this module
//
#include <Ppi/BaseMemoryTest.h>
//
// The Library classes this module consumes
//
#include <Library/DebugLib.h>
#include <Library/PeimEntryPoint.h>
#include <Library/ReportStatusCodeLib.h>
#include <BaseMemoryTest.h> #include <BaseMemoryTest.h>
static PEI_BASE_MEMORY_TEST_PPI mPeiBaseMemoryTestPpi = { BaseMemoryTest }; static PEI_BASE_MEMORY_TEST_PPI mPeiBaseMemoryTestPpi = { BaseMemoryTest };
@ -109,10 +93,7 @@ Returns:
EFI_PHYSICAL_ADDRESS TempAddress; EFI_PHYSICAL_ADDRESS TempAddress;
UINT32 SpanSize; UINT32 SpanSize;
REPORT_STATUS_CODE ( REPORT_STATUS_CODE (EFI_PROGRESS_CODE, PcdGet32 (PcdStatusCodeValueMemoryTestStarted));
EFI_PROGRESS_CODE,
EFI_COMPUTING_UNIT_MEMORY + EFI_CU_MEMORY_PC_TEST
);
TestPattern = TEST_PATTERN; TestPattern = TEST_PATTERN;
SpanSize = 0; SpanSize = 0;
@ -151,10 +132,7 @@ Returns:
while (TempAddress < BeginAddress + MemoryLength) { while (TempAddress < BeginAddress + MemoryLength) {
if ((*(UINT32 *) (UINTN) TempAddress) != TestPattern) { if ((*(UINT32 *) (UINTN) TempAddress) != TestPattern) {
*ErrorAddress = TempAddress; *ErrorAddress = TempAddress;
REPORT_STATUS_CODE ( REPORT_STATUS_CODE (EFI_ERROR_CODE | EFI_ERROR_UNRECOVERED, PcdGet32 (PcdStatusCodeValueUncorrectableMemoryError));
EFI_ERROR_CODE | EFI_ERROR_UNRECOVERED,
EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_EC_UNCORRECTABLE
);
return EFI_DEVICE_ERROR; return EFI_DEVICE_ERROR;
} }

View File

@ -22,6 +22,14 @@ Abstract:
#ifndef _PEI_BASE_MEMORY_TEST_H_ #ifndef _PEI_BASE_MEMORY_TEST_H_
#define _PEI_BASE_MEMORY_TEST_H_ #define _PEI_BASE_MEMORY_TEST_H_
#include <PiPei.h>
#include <Ppi/BaseMemoryTest.h>
#include <Library/DebugLib.h>
#include <Library/PeimEntryPoint.h>
#include <Library/ReportStatusCodeLib.h>
#include <Library/PcdLib.h>
// //
// Some global define // Some global define
// //

View File

@ -36,56 +36,22 @@
# VALID_ARCHITECTURES = IA32 X64 IPF EBC # VALID_ARCHITECTURES = IA32 X64 IPF EBC
# #
################################################################################
#
# Sources Section - list of files that are required for the build to succeed.
#
################################################################################
[Sources.common] [Sources.common]
BaseMemoryTest.c BaseMemoryTest.c
BaseMemoryTest.h BaseMemoryTest.h
################################################################################
#
# Includes Section - list of Include locations that are required for
# this module.
#
################################################################################
################################################################################
#
# Package Dependency Section - list of Package files that are required for
# this module.
#
################################################################################
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
IntelFrameworkPkg/IntelFrameworkPkg.dec
################################################################################
#
# Library Class Section - list of Library Classes that are required for
# this module.
#
################################################################################
[LibraryClasses] [LibraryClasses]
ReportStatusCodeLib ReportStatusCodeLib
PeimEntryPoint PeimEntryPoint
DebugLib DebugLib
################################################################################
#
# PPI C Name Section - list of PPI and PPI Notify C Names that this module
# uses or produces.
#
################################################################################
[Ppis] [Ppis]
gPeiBaseMemoryTestPpiGuid # PPI ALWAYS_PRODUCED gPeiBaseMemoryTestPpiGuid # PPI ALWAYS_PRODUCED
[PcdsFixedAtBuild.common]
PcdStatusCodeValueMemoryTestStarted|gEfiMdePkgTokenSpaceGuid
PcdStatusCodeValueUncorrectableMemoryError|gEfiMdePkgTokenSpaceGuid

View File

@ -1,68 +0,0 @@
/*++
Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
Capsule.c
Abstract:
Capsule Runtime Service Initialization
--*/
#include "CapsuleService.h"
EFI_STATUS
EFIAPI
CapsuleServiceInitialize (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
/*++
Routine Description:
This code is capsule runtime service initialization.
Arguments:
ImageHandle The image handle
SystemTable The system table.
Returns:
EFI STATUS
--*/
{
EFI_STATUS Status;
EFI_HANDLE NewHandle;
SystemTable->RuntimeServices->UpdateCapsule = UpdateCapsule;
SystemTable->RuntimeServices->QueryCapsuleCapabilities = QueryCapsuleCapabilities;
//
// Now install the Capsule Architectural Protocol on a new handle
//
NewHandle = NULL;
Status = gBS->InstallMultipleProtocolInterfaces (
&NewHandle,
&gEfiCapsuleArchProtocolGuid,
NULL,
NULL
);
ASSERT_EFI_ERROR (Status);
return EFI_SUCCESS;
}

View File

@ -45,26 +45,9 @@
[Sources.common] [Sources.common]
CapsuleService.h CapsuleService.h
CapsuleService.c CapsuleService.c
Capsule.c
################################################################################
#
# Package Dependency Section - list of Package files that are required for
# this module.
#
################################################################################
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
IntelFrameworkPkg/IntelFrameworkPkg.dec
################################################################################
#
# Library Class Section - list of Library Classes that are required for
# this module.
#
################################################################################
[LibraryClasses] [LibraryClasses]
UefiBootServicesTableLib UefiBootServicesTableLib
@ -76,54 +59,18 @@
DxeServicesTableLib DxeServicesTableLib
UefiDriverEntryPoint UefiDriverEntryPoint
################################################################################
#
# Guid C Name Section - list of Guids that this module uses or produces.
#
################################################################################
[Guids] [Guids]
gEfiCapsuleVendorGuid # SOMETIMES_CONSUMED gEfiCapsuleVendorGuid # SOMETIMES_CONSUMED
gEfiCapsuleGuid
################################################################################
#
# Protocol C Name Section - list of Protocol and Protocol Notify C Names
# that this module uses or produces.
#
################################################################################
[Protocols] [Protocols]
gEfiCapsuleArchProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiCapsuleArchProtocolGuid # PROTOCOL ALWAYS_CONSUMED
################################################################################
#
# Pcd FEATURE_FLAG - list of PCDs that this module is coded for.
#
################################################################################
[PcdsFeatureFlag.common] [PcdsFeatureFlag.common]
PcdSupportUpdateCapsuleRest|gEfiEdkModulePkgTokenSpaceGuid PcdSupportUpdateCapsuleRest|gEfiEdkModulePkgTokenSpaceGuid
################################################################################
#
# Pcd FIXED_AT_BUILD - list of PCDs that this module is coded for.
#
################################################################################
[PcdsFixedAtBuild.common] [PcdsFixedAtBuild.common]
PcdMaxSizeNonPopulateCapsule|gEfiEdkModulePkgTokenSpaceGuid PcdMaxSizeNonPopulateCapsule|gEfiEdkModulePkgTokenSpaceGuid
PcdMaxSizePopulateCapsule|gEfiEdkModulePkgTokenSpaceGuid PcdMaxSizePopulateCapsule|gEfiEdkModulePkgTokenSpaceGuid
################################################################################
#
# Dependency Expression Section - list of Dependency expressions that are required for
# this module.
#
################################################################################
[Depex] [Depex]
gEfiVariableArchProtocolGuid gEfiVariableArchProtocolGuid

View File

@ -65,21 +65,15 @@ Returns:
BufferPtr = NULL; BufferPtr = NULL;
CapsuleHeader = NULL; CapsuleHeader = NULL;
//
//Compare GUIDs with EFI_CAPSULE_GUID, if capsule header contains CAPSULE_FLAGS_PERSIST_ACROSS_RESET
//and CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE flags,whatever the GUID is ,the service supports.
//
for (ArrayNumber = 0; ArrayNumber < CapsuleCount; ArrayNumber++) { for (ArrayNumber = 0; ArrayNumber < CapsuleCount; ArrayNumber++) {
CapsuleHeader = CapsuleHeaderArray[ArrayNumber]; CapsuleHeader = CapsuleHeaderArray[ArrayNumber];
if ((CapsuleHeader->Flags & (CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE)) == CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) { if ((CapsuleHeader->Flags & (CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE)) == CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
if (!CompareGuid (&CapsuleHeader->CapsuleGuid, &gEfiCapsuleGuid)) {
if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) { if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) {
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
} }
}
// //
//Assume that capsules have the same flags on reseting or not. //Assume that capsules have the same flags on reseting or not.
@ -193,21 +187,15 @@ Returns:
CapsuleHeader = NULL; CapsuleHeader = NULL;
//
//Compare GUIDs with EFI_CAPSULE_GUID, if capsule header contains CAPSULE_FLAGS_PERSIST_ACROSS_RESET
//and CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE flags,whatever the GUID is ,the service supports.
//
for (ArrayNumber = 0; ArrayNumber < CapsuleCount; ArrayNumber++) { for (ArrayNumber = 0; ArrayNumber < CapsuleCount; ArrayNumber++) {
CapsuleHeader = CapsuleHeaderArray[ArrayNumber]; CapsuleHeader = CapsuleHeaderArray[ArrayNumber];
if ((CapsuleHeader->Flags & (CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE)) == CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) { if ((CapsuleHeader->Flags & (CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE)) == CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
if (!CompareGuid (&CapsuleHeader->CapsuleGuid, &gEfiCapsuleGuid)) {
if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) { if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) {
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
} }
}
// //
//Assume that capsules have the same flags on reseting or not. //Assume that capsules have the same flags on reseting or not.
@ -229,3 +217,48 @@ Returns:
return EFI_SUCCESS; return EFI_SUCCESS;
} }
EFI_STATUS
EFIAPI
CapsuleServiceInitialize (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
/*++
Routine Description:
This code is capsule runtime service initialization.
Arguments:
ImageHandle The image handle
SystemTable The system table.
Returns:
EFI STATUS
--*/
{
EFI_STATUS Status;
EFI_HANDLE NewHandle;
SystemTable->RuntimeServices->UpdateCapsule = UpdateCapsule;
SystemTable->RuntimeServices->QueryCapsuleCapabilities = QueryCapsuleCapabilities;
//
// Now install the Capsule Architectural Protocol on a new handle
//
NewHandle = NULL;
Status = gBS->InstallMultipleProtocolInterfaces (
&NewHandle,
&gEfiCapsuleArchProtocolGuid,
NULL,
NULL
);
ASSERT_EFI_ERROR (Status);
return EFI_SUCCESS;
}

View File

@ -23,9 +23,44 @@ Abstract:
--*/ --*/
#include <GuidedSection.h>
#include <Crc32SectionExtract.h> #include <Crc32SectionExtract.h>
EFI_STATUS
GuidedSectionExtractionProtocolConstructor (
OUT EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL **GuidedSep,
IN EFI_EXTRACT_GUIDED_SECTION ExtractSection
)
/*++
Routine Description:
Constructor for the GUIDed section extraction protocol. Initializes
instance data.
Arguments:
This Instance to construct
Returns:
EFI_SUCCESS: Instance initialized.
--*/
// TODO: GuidedSep - add argument and description to function comment
// TODO: ExtractSection - add argument and description to function comment
// TODO: EFI_OUT_OF_RESOURCES - add return value to function comment
{
*GuidedSep = AllocatePool (sizeof (EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL));
if (*GuidedSep == NULL) {
return EFI_OUT_OF_RESOURCES;
}
(*GuidedSep)->ExtractSection = ExtractSection;
return EFI_SUCCESS;
}
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
InitializeCrc32GuidedSectionExtractionProtocol ( InitializeCrc32GuidedSectionExtractionProtocol (
@ -206,21 +241,21 @@ Crc32ExtractSection (
// Implictly CRC32 GUIDed section should have STATUS_VALID bit set // Implictly CRC32 GUIDed section should have STATUS_VALID bit set
// //
ASSERT (GuidedSectionHeader->Attributes & EFI_GUIDED_SECTION_AUTH_STATUS_VALID); ASSERT (GuidedSectionHeader->Attributes & EFI_GUIDED_SECTION_AUTH_STATUS_VALID);
*AuthenticationStatus = EFI_LOCAL_AUTH_STATUS_IMAGE_SIGNED | EFI_AGGREGATE_AUTH_STATUS_IMAGE_SIGNED; *AuthenticationStatus = EFI_AUTH_STATUS_IMAGE_SIGNED;
// //
// Check whether there exists EFI_SECURITY_POLICY_PROTOCOL_GUID. // Check whether there exists EFI_SECURITY_POLICY_PROTOCOL_GUID.
// //
Status = gBS->LocateProtocol (&gEfiSecurityPolicyProtocolGuid, NULL, &DummyInterface); Status = gBS->LocateProtocol (&gEfiSecurityPolicyProtocolGuid, NULL, &DummyInterface);
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
*AuthenticationStatus |= EFI_LOCAL_AUTH_STATUS_PLATFORM_OVERRIDE | EFI_AGGREGATE_AUTH_STATUS_PLATFORM_OVERRIDE; *AuthenticationStatus |= EFI_AUTH_STATUS_PLATFORM_OVERRIDE;
} else { } else {
// //
// Calculate CRC32 Checksum of Image // Calculate CRC32 Checksum of Image
// //
gBS->CalculateCrc32 (Image, *OutputSize, &Crc32Checksum); gBS->CalculateCrc32 (Image, *OutputSize, &Crc32Checksum);
if (Crc32Checksum != Crc32SectionHeader->CRC32Checksum) { if (Crc32Checksum != Crc32SectionHeader->CRC32Checksum) {
*AuthenticationStatus |= EFI_LOCAL_AUTH_STATUS_TEST_FAILED | EFI_AGGREGATE_AUTH_STATUS_TEST_FAILED; *AuthenticationStatus |= EFI_AUTH_STATUS_TEST_FAILED;
} }
} }

View File

@ -23,26 +23,17 @@ Abstract:
#ifndef _CRC32_GUIDED_SECTION_EXTRACTION_H #ifndef _CRC32_GUIDED_SECTION_EXTRACTION_H
#define _CRC32_GUIDED_SECTION_EXTRACTION_H #define _CRC32_GUIDED_SECTION_EXTRACTION_H
//
// The package level header files this module uses
//
#include <PiDxe.h> #include <PiDxe.h>
#include <Common/FrameworkFirmwareVolumeImageFormat.h>
//
// The protocols, PPI and GUID defintions for this module
//
#include <Protocol/SecurityPolicy.h> #include <Protocol/SecurityPolicy.h>
#include <Protocol/GuidedSectionExtaction.h>
#include <Protocol/Crc32GuidedSectionExtraction.h> #include <Protocol/Crc32GuidedSectionExtraction.h>
//
// The Library classes this module consumes
//
#include <Library/MemoryAllocationLib.h> #include <Library/MemoryAllocationLib.h>
#include <Library/DebugLib.h> #include <Library/DebugLib.h>
#include <Library/UefiDriverEntryPoint.h> #include <Library/UefiDriverEntryPoint.h>
#include <Library/BaseMemoryLib.h> #include <Library/BaseMemoryLib.h>
#include <Library/UefiBootServicesTableLib.h> #include <Library/UefiBootServicesTableLib.h>
typedef struct { typedef struct {
EFI_GUID_DEFINED_SECTION GuidedSectionHeader; EFI_GUID_DEFINED_SECTION GuidedSectionHeader;
UINT32 CRC32Checksum; UINT32 CRC32Checksum;

View File

@ -14,11 +14,6 @@
# #
#**/ #**/
################################################################################
#
# Defines Section - statements that will be processed to create a Makefile.
#
################################################################################
[Defines] [Defines]
INF_VERSION = 0x00010005 INF_VERSION = 0x00010005
BASE_NAME = Crc32SectionExtract BASE_NAME = Crc32SectionExtract
@ -36,36 +31,12 @@
# VALID_ARCHITECTURES = IA32 X64 IPF EBC # VALID_ARCHITECTURES = IA32 X64 IPF EBC
# #
################################################################################
#
# Sources Section - list of files that are required for the build to succeed.
#
################################################################################
[Sources.common] [Sources.common]
GuidedSection.h
GuidedSection.c
Crc32SectionExtract.h Crc32SectionExtract.h
Crc32SectionExtract.c Crc32SectionExtract.c
################################################################################
#
# Package Dependency Section - list of Package files that are required for
# this module.
#
################################################################################
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
IntelFrameworkPkg/IntelFrameworkPkg.dec
################################################################################
#
# Library Class Section - list of Library Classes that are required for
# this module.
#
################################################################################
[LibraryClasses] [LibraryClasses]
MemoryAllocationLib MemoryAllocationLib
@ -74,24 +45,9 @@
UefiDriverEntryPoint UefiDriverEntryPoint
DebugLib DebugLib
################################################################################
#
# Protocol C Name Section - list of Protocol and Protocol Notify C Names
# that this module uses or produces.
#
################################################################################
[Protocols] [Protocols]
gEfiSecurityPolicyProtocolGuid # PROTOCOL SOMETIMES_CONSUMED gEfiSecurityPolicyProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
gEfiCrc32GuidedSectionExtractionProtocolGuid # PROTOCOL ALWAYS_PRODUCED gEfiCrc32GuidedSectionExtractionProtocolGuid # PROTOCOL ALWAYS_PRODUCED
################################################################################
#
# Dependency Expression Section - list of Dependency expressions that are required for
# this module.
#
################################################################################
[Depex] [Depex]
gEfiRuntimeArchProtocolGuid gEfiRuntimeArchProtocolGuid

View File

@ -1,61 +0,0 @@
/*++
Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
GuidedSection.c
Abstract:
GUIDed section extraction protocol implementation.
This contains the common constructor of GUIDed section
extraction protocol. GUID specific implementation of each
GUIDed section extraction protocol can be found in other
files under the same directory.
--*/
#include "GuidedSection.h"
EFI_STATUS
GuidedSectionExtractionProtocolConstructor (
OUT EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL **GuidedSep,
IN EFI_EXTRACT_GUIDED_SECTION ExtractSection
)
/*++
Routine Description:
Constructor for the GUIDed section extraction protocol. Initializes
instance data.
Arguments:
This Instance to construct
Returns:
EFI_SUCCESS: Instance initialized.
--*/
// TODO: GuidedSep - add argument and description to function comment
// TODO: ExtractSection - add argument and description to function comment
// TODO: EFI_OUT_OF_RESOURCES - add return value to function comment
{
*GuidedSep = AllocatePool (sizeof (EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL));
if (*GuidedSep == NULL) {
return EFI_OUT_OF_RESOURCES;
}
(*GuidedSep)->ExtractSection = ExtractSection;
return EFI_SUCCESS;
}

View File

@ -1,54 +0,0 @@
/*++
Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
GuidedSection.h
Abstract:
Header file for GuidedSection.c
Please refer to the Framewokr Firmware Volume Specification 0.9.
--*/
#ifndef _GUIDED_SECTION_EXTRACTION_H
#define _GUIDED_SECTION_EXTRACTION_H
#include "Crc32SectionExtract.h"
//
// Function prototype declarations
//
EFI_STATUS
GuidedSectionExtractionProtocolConstructor (
OUT EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL **GuidedSep,
IN EFI_EXTRACT_GUIDED_SECTION ExtractSection
)
/*++
Routine Description:
TODO: Add function description
Arguments:
GuidedSep - TODO: add argument description
ExtractSection - TODO: add argument description
Returns:
TODO: add return values
--*/
;
#endif

View File

@ -51,31 +51,6 @@ Revision History:
--*/ --*/
//
// The package level header files this module uses
//
#include <PiDxe.h>
#include <FrameworkDxe.h>
//
// The protocols, PPI and GUID defintions for this module
//
#include <Protocol/LoadedImage.h>
#include <Protocol/Runtime.h>
#include <Protocol/UgaIo.h>
//
// The Library classes this module consumes
//
#include <Library/BaseLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/DebugLib.h>
#include <Library/ReportStatusCodeLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/CacheMaintenanceLib.h>
#include <Library/PeCoffLib.h>
#include "Runtime.h" #include "Runtime.h"
// //
@ -333,10 +308,7 @@ Returns:
// check whether in Runtime or not (this is judged by looking at // check whether in Runtime or not (this is judged by looking at
// mEfiAtRuntime global So this ReportStatusCode will work // mEfiAtRuntime global So this ReportStatusCode will work
// //
REPORT_STATUS_CODE ( REPORT_STATUS_CODE (EFI_PROGRESS_CODE, PcdGet32 (PcdStatusCodeValueSetVirtualAddressMap));
EFI_PROGRESS_CODE,
(EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_RS_PC_SET_VIRTUAL_ADDRESS_MAP)
);
// //
// Signal all the EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE events. // Signal all the EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE events.

View File

@ -24,6 +24,22 @@ Abstract:
#ifndef _RUNTIME_H_ #ifndef _RUNTIME_H_
#define _RUNTIME_H_ #define _RUNTIME_H_
#include <PiDxe.h>
#include <Protocol/LoadedImage.h>
#include <Protocol/Runtime.h>
#include <Protocol/UgaIo.h>
#include <Library/BaseLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/DebugLib.h>
#include <Library/ReportStatusCodeLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/CacheMaintenanceLib.h>
#include <Library/PeCoffLib.h>
#include <Library/PcdLib.h>
// //
// Function Prototypes // Function Prototypes
// //

View File

@ -66,7 +66,6 @@
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
IntelFrameworkPkg/IntelFrameworkPkg.dec
################################################################################ ################################################################################
@ -108,3 +107,6 @@
gEfiRuntimeArchProtocolGuid # PROTOCOL ALWAYS_PRODUCED gEfiRuntimeArchProtocolGuid # PROTOCOL ALWAYS_PRODUCED
gEfiLoadedImageProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiLoadedImageProtocolGuid # PROTOCOL ALWAYS_CONSUMED
[PcdsFixedAtBuild.common]
PcdStatusCodeValueSetVirtualAddressMap|gEfiMdePkgTokenSpaceGuid

View File

@ -11,23 +11,6 @@
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
//
// The package level header files this module uses
//
#include <PiPei.h>
//
// The protocols, PPI and GUID defintions for this module
//
#include <Ppi/ReadOnlyVariable.h>
//
// The Library classes this module consumes
//
#include <Library/DebugLib.h>
#include <Library/PeimEntryPoint.h>
#include <Library/HobLib.h>
#include <Library/PcdLib.h>
#include <Library/BaseMemoryLib.h>
#include <Variable.h> #include <Variable.h>

View File

@ -18,38 +18,20 @@ Abstract:
--*/ --*/
//
// The package level header files this module uses
//
#include <PiPei.h>
// #include "Variable.h"
// The protocols, PPI and GUID defintions for this module
//
#include <Ppi/ReadOnlyVariable.h>
//
// The Library classes this module consumes
//
#include <Library/DebugLib.h>
#include <Library/PeimEntryPoint.h>
#include <Library/HobLib.h>
#include <Library/PcdLib.h>
#include <Library/BaseMemoryLib.h>
#include <Variable.h>
// //
// Module globals // Module globals
// //
static EFI_PEI_READ_ONLY_VARIABLE_PPI mVariablePpi = { static EFI_PEI_READ_ONLY_VARIABLE2_PPI mVariablePpi = {
PeiGetVariable, PeiGetVariable,
PeiGetNextVariableName PeiGetNextVariableName
}; };
static EFI_PEI_PPI_DESCRIPTOR mPpiListVariable = { static EFI_PEI_PPI_DESCRIPTOR mPpiListVariable = {
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
&gEfiPeiReadOnlyVariablePpiGuid, &gEfiPeiReadOnlyVariable2PpiGuid,
&mVariablePpi &mVariablePpi
}; };
@ -188,8 +170,8 @@ STATIC
EFI_STATUS EFI_STATUS
CompareWithValidVariable ( CompareWithValidVariable (
IN VARIABLE_HEADER *Variable, IN VARIABLE_HEADER *Variable,
IN CHAR16 *VariableName, IN CONST CHAR16 *VariableName,
IN EFI_GUID *VendorGuid, IN CONST EFI_GUID *VendorGuid,
OUT VARIABLE_POINTER_TRACK *PtrTrack OUT VARIABLE_POINTER_TRACK *PtrTrack
) )
/*++ /*++
@ -242,8 +224,8 @@ EFI_STATUS
EFIAPI EFIAPI
FindVariable ( FindVariable (
IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_SERVICES **PeiServices,
IN CHAR16 *VariableName, IN CONST CHAR16 *VariableName,
IN EFI_GUID *VendorGuid, IN CONST EFI_GUID *VendorGuid,
OUT VARIABLE_POINTER_TRACK *PtrTrack OUT VARIABLE_POINTER_TRACK *PtrTrack
) )
/*++ /*++
@ -380,10 +362,10 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiGetVariable ( PeiGetVariable (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,
IN CHAR16 *VariableName, IN CONST CHAR16 *VariableName,
IN EFI_GUID * VendorGuid, IN CONST EFI_GUID *VariableGuid,
OUT UINT32 *Attributes OPTIONAL, OUT UINT32 *Attributes,
IN OUT UINTN *DataSize, IN OUT UINTN *DataSize,
OUT VOID *Data OUT VOID *Data
) )
@ -420,15 +402,16 @@ Returns:
VARIABLE_POINTER_TRACK Variable; VARIABLE_POINTER_TRACK Variable;
UINTN VarDataSize; UINTN VarDataSize;
EFI_STATUS Status; EFI_STATUS Status;
EFI_PEI_SERVICES **PeiServices;
if (VariableName == NULL || VendorGuid == NULL) { PeiServices = GetPeiServicesTablePointer ();
if (VariableName == NULL || VariableGuid == NULL) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
// //
// Find existing variable // Find existing variable
// //
Status = FindVariable (PeiServices, VariableName, VendorGuid, &Variable); Status = FindVariable (PeiServices, VariableName, VariableGuid, &Variable);
if (Variable.CurrPtr == NULL || Status != EFI_SUCCESS) { if (Variable.CurrPtr == NULL || Status != EFI_SUCCESS) {
return Status; return Status;
} }
@ -454,10 +437,10 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiGetNextVariableName ( PeiGetNextVariableName (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,
IN OUT UINTN *VariableNameSize, IN OUT UINTN *VariableNameSize,
IN OUT CHAR16 *VariableName, IN OUT CHAR16 *VariableName,
IN OUT EFI_GUID *VendorGuid IN OUT EFI_GUID *VariableGuid
) )
/*++ /*++
@ -470,7 +453,7 @@ Arguments:
PeiServices - General purpose services available to every PEIM. PeiServices - General purpose services available to every PEIM.
VariabvleNameSize - The variable name's size. VariabvleNameSize - The variable name's size.
VariableName - A pointer to the variable's name. VariableName - A pointer to the variable's name.
VendorGuid - A pointer to the EFI_GUID structure. VariableGuid - A pointer to the EFI_GUID structure.
VariableNameSize - Size of the variable name VariableNameSize - Size of the variable name
@ -489,13 +472,14 @@ Returns:
VARIABLE_POINTER_TRACK Variable; VARIABLE_POINTER_TRACK Variable;
UINTN VarNameSize; UINTN VarNameSize;
EFI_STATUS Status; EFI_STATUS Status;
EFI_PEI_SERVICES **PeiServices;
PeiServices = GetPeiServicesTablePointer ();
if (VariableName == NULL) { if (VariableName == NULL) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
Status = FindVariable (PeiServices, VariableName, VendorGuid, &Variable); Status = FindVariable (PeiServices, VariableName, VariableGuid, &Variable);
if (Variable.CurrPtr == NULL || Status != EFI_SUCCESS) { if (Variable.CurrPtr == NULL || Status != EFI_SUCCESS) {
return Status; return Status;
} }
@ -514,7 +498,7 @@ Returns:
if (VarNameSize <= *VariableNameSize) { if (VarNameSize <= *VariableNameSize) {
(*PeiServices)->CopyMem (VariableName, GET_VARIABLE_NAME_PTR (Variable.CurrPtr), VarNameSize); (*PeiServices)->CopyMem (VariableName, GET_VARIABLE_NAME_PTR (Variable.CurrPtr), VarNameSize);
(*PeiServices)->CopyMem (VendorGuid, &Variable.CurrPtr->VendorGuid, sizeof (EFI_GUID)); (*PeiServices)->CopyMem (VariableGuid, &Variable.CurrPtr->VendorGuid, sizeof (EFI_GUID));
Status = EFI_SUCCESS; Status = EFI_SUCCESS;
} else { } else {

View File

@ -22,6 +22,16 @@ Abstract:
#ifndef _PEI_VARIABLE_H #ifndef _PEI_VARIABLE_H
#define _PEI_VARIABLE_H #define _PEI_VARIABLE_H
#include <PiPei.h>
#include <Ppi/ReadOnlyVariable2.h>
#include <Library/DebugLib.h>
#include <Library/PeimEntryPoint.h>
#include <Library/HobLib.h>
#include <Library/PcdLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/PeiServicesTablePointerLib.h>
// //
// BugBug: We need relcate the head file. // BugBug: We need relcate the head file.
// //
@ -91,10 +101,10 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiGetVariable ( PeiGetVariable (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,
IN CHAR16 *VariableName, IN CONST CHAR16 *VariableName,
IN EFI_GUID * VendorGuid, IN CONST EFI_GUID *VariableGuid,
OUT UINT32 *Attributes OPTIONAL, OUT UINT32 *Attributes,
IN OUT UINTN *DataSize, IN OUT UINTN *DataSize,
OUT VOID *Data OUT VOID *Data
) )
@ -123,10 +133,10 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiGetNextVariableName ( PeiGetNextVariableName (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,
IN OUT UINTN *VariableNameSize, IN OUT UINTN *VariableNameSize,
IN OUT CHAR16 *VariableName, IN OUT CHAR16 *VariableName,
IN OUT EFI_GUID *VendorGuid IN OUT EFI_GUID *VariableGuid
) )
/*++ /*++

View File

@ -14,11 +14,6 @@
# #
#**/ #**/
################################################################################
#
# Defines Section - statements that will be processed to create a Makefile.
#
################################################################################
[Defines] [Defines]
INF_VERSION = 0x00010005 INF_VERSION = 0x00010005
BASE_NAME = PeiVariable BASE_NAME = PeiVariable
@ -36,12 +31,6 @@
# VALID_ARCHITECTURES = IA32 X64 IPF EBC # VALID_ARCHITECTURES = IA32 X64 IPF EBC
# #
################################################################################
#
# Sources Section - list of files that are required for the build to succeed.
#
################################################################################
[Sources.common] [Sources.common]
Variable.c Variable.c
Variable.h Variable.h
@ -58,26 +47,9 @@
[Sources.EBC] [Sources.EBC]
VariableWorker.c VariableWorker.c
################################################################################
#
# Package Dependency Section - list of Package files that are required for
# this module.
#
################################################################################
[Packages] [Packages]
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec MdeModulePkg/MdeModulePkg.dec
IntelFrameworkPkg/IntelFrameworkPkg.dec
################################################################################
#
# Library Class Section - list of Library Classes that are required for
# this module.
#
################################################################################
[LibraryClasses] [LibraryClasses]
BaseMemoryLib BaseMemoryLib
@ -85,34 +57,13 @@
HobLib HobLib
PeimEntryPoint PeimEntryPoint
DebugLib DebugLib
PeiServiceTablePointerLib
################################################################################
#
# PPI C Name Section - list of PPI and PPI Notify C Names that this module
# uses or produces.
#
################################################################################
[Ppis] [Ppis]
gEfiPeiReadOnlyVariablePpiGuid # PPI ALWAYS_CONSUMED gEfiPeiReadOnlyVariable2PpiGuid # PPI ALWAYS_CONSUMED
################################################################################
#
# Pcd DYNAMIC - list of PCDs that this module is coded for.
#
################################################################################
[PcdsDynamic.common] [PcdsDynamic.common]
PcdFlashNvStorageVariableBase|gEfiGenericPlatformTokenSpaceGuid PcdFlashNvStorageVariableBase|gEfiGenericPlatformTokenSpaceGuid
################################################################################
#
# Dependency Expression Section - list of Dependency expressions that are required for
# this module.
#
################################################################################
[Depex] [Depex]
TRUE TRUE

View File

@ -18,24 +18,6 @@ Abstract:
Framework PEIM to provide the Variable functionality Framework PEIM to provide the Variable functionality
--*/ --*/
//
// The package level header files this module uses
//
#include <PiPei.h>
//
// The protocols, PPI and GUID defintions for this module
//
#include <Ppi/ReadOnlyVariable.h>
//
// The Library classes this module consumes
//
#include <Library/DebugLib.h>
#include <Library/PeimEntryPoint.h>
#include <Library/HobLib.h>
#include <Library/PcdLib.h>
#include <Library/BaseMemoryLib.h>
#include <Variable.h> #include <Variable.h>

View File

@ -21,24 +21,6 @@ Revision History
--*/ --*/
//
// The package level header files this module uses
//
#include <PiDxe.h>
#include <FrameworkDxe.h>
//
// The protocols, PPI and GUID defintions for this module
//
//
// The Library classes this module consumes
//
#include <Library/DebugLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/ReportStatusCodeLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Protocol/WatchDogTimer.h>
#include "WatchDogTimer.h" #include "WatchDogTimer.h"
// //
@ -103,13 +85,7 @@ WatchdogTimerDriverExpires (
--*/ --*/
{ {
// REPORT_STATUS_CODE (EFI_ERROR_CODE | EFI_ERROR_MINOR, PcdGet32 (PcdStatusCodeValueEfiWatchDogTimerExpired));
// Report error code before exiting
//
REPORT_STATUS_CODE (
EFI_ERROR_CODE | EFI_ERROR_MINOR,
(EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_TIMER_EXPIRED)
);
// //
// If a notification function has been registered, then call it // If a notification function has been registered, then call it
@ -123,6 +99,7 @@ WatchdogTimerDriverExpires (
gRT->ResetSystem (EfiResetCold, EFI_TIMEOUT, 0, NULL); gRT->ResetSystem (EfiResetCold, EFI_TIMEOUT, 0, NULL);
} }
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
WatchdogTimerDriverRegisterHandler ( WatchdogTimerDriverRegisterHandler (
@ -288,10 +265,6 @@ Returns:
{ {
EFI_STATUS Status; EFI_STATUS Status;
REPORT_STATUS_CODE (
EFI_PROGRESS_CODE,
(EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_SW_PC_INIT_BEGIN)
);
// //
// Make sure the Watchdog Timer Architectural Protocol is not already installed in the system // Make sure the Watchdog Timer Architectural Protocol is not already installed in the system
// //
@ -320,10 +293,5 @@ Returns:
); );
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
REPORT_STATUS_CODE (
EFI_PROGRESS_CODE,
(EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_SW_PC_INIT_END)
);
return Status; return Status;
} }

View File

@ -24,6 +24,20 @@ Revision History
#ifndef _WATCHDOG_TIMER_H_ #ifndef _WATCHDOG_TIMER_H_
#define _WATCHDOG_TIMER_H_ #define _WATCHDOG_TIMER_H_
//
// The package level header files this module uses
//
#include <PiDxe.h>
#include <Library/DebugLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/ReportStatusCodeLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/PcdLib.h>
#include <Protocol/WatchDogTimer.h>
// //
// Function Prototypes // Function Prototypes
// //
@ -32,31 +46,27 @@ EFIAPI
WatchdogTimerDriverRegisterHandler ( WatchdogTimerDriverRegisterHandler (
IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This, IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This,
IN EFI_WATCHDOG_TIMER_NOTIFY NotifyFunction IN EFI_WATCHDOG_TIMER_NOTIFY NotifyFunction
) );
;
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
WatchdogTimerDriverSetTimerPeriod ( WatchdogTimerDriverSetTimerPeriod (
IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This, IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This,
IN UINT64 TimerPeriod IN UINT64 TimerPeriod
) );
;
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
WatchdogTimerDriverGetTimerPeriod ( WatchdogTimerDriverGetTimerPeriod (
IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This, IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This,
IN UINT64 *TimerPeriod IN UINT64 *TimerPeriod
) );
;
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
WatchdogTimerDriverInitialize ( WatchdogTimerDriverInitialize (
IN EFI_HANDLE ImageHandle, IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable IN EFI_SYSTEM_TABLE *SystemTable
) );
;
#endif #endif

View File

@ -14,11 +14,6 @@
# #
#**/ #**/
################################################################################
#
# Defines Section - statements that will be processed to create a Makefile.
#
################################################################################
[Defines] [Defines]
INF_VERSION = 0x00010005 INF_VERSION = 0x00010005
BASE_NAME = WatchDogTimer BASE_NAME = WatchDogTimer
@ -36,35 +31,13 @@
# VALID_ARCHITECTURES = IA32 X64 IPF EBC # VALID_ARCHITECTURES = IA32 X64 IPF EBC
# #
################################################################################ [Packages]
# MdePkg/MdePkg.dec
# Sources Section - list of files that are required for the build to succeed.
#
################################################################################
[Sources.common] [Sources.common]
WatchDogTimer.h WatchDogTimer.h
WatchDogTimer.c WatchDogTimer.c
################################################################################
#
# Package Dependency Section - list of Package files that are required for
# this module.
#
################################################################################
[Packages]
MdePkg/MdePkg.dec
IntelFrameWorkPkg/IntelFrameworkPkg.dec
################################################################################
#
# Library Class Section - list of Library Classes that are required for
# this module.
#
################################################################################
[LibraryClasses] [LibraryClasses]
UefiRuntimeServicesTableLib UefiRuntimeServicesTableLib
UefiBootServicesTableLib UefiBootServicesTableLib
@ -72,22 +45,13 @@
UefiDriverEntryPoint UefiDriverEntryPoint
DebugLib DebugLib
################################################################################
#
# Protocol C Name Section - list of Protocol and Protocol Notify C Names
# that this module uses or produces.
#
################################################################################
[Protocols] [Protocols]
gEfiWatchdogTimerArchProtocolGuid # PROTOCOL ALWAYS_PRODUCED gEfiWatchdogTimerArchProtocolGuid # PROTOCOL ALWAYS_PRODUCED
################################################################################ [PcdsFixedAtBuild.common]
# PcdStatusCodeValueEfiWatchDogTimerExpired|gEfiMdePkgTokenSpaceGuid
# Dependency Expression Section - list of Dependency expressions that are required for
# this module.
#
################################################################################
[depex] [depex]
gEfiTimerArchProtocolGuid gEfiTimerArchProtocolGuid

View File

@ -86,4 +86,13 @@ typedef struct {
EFI_GUID Type; EFI_GUID Type;
} EFI_STATUS_CODE_DATA; } EFI_STATUS_CODE_DATA;
//
// Bit values for AuthenticationStatus
//
#define EFI_AUTH_STATUS_PLATFORM_OVERRIDE 0x01
#define EFI_AUTH_STATUS_IMAGE_SIGNED 0x02
#define EFI_AUTH_STATUS_NOT_TESTED 0x04
#define EFI_AUTH_STATUS_TEST_FAILED 0x08
#endif #endif

View File

@ -37,13 +37,6 @@
typedef struct _EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI; typedef struct _EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI;
//
// Bit values for AuthenticationStatus
//
#define EFI_AUTH_STATUS_PLATFORM_OVERRIDE 0x01
#define EFI_AUTH_STATUS_IMAGE_SIGNED 0x02
#define EFI_AUTH_STATUS_NOT_TESTED 0x04
#define EFI_AUTH_STATUS_TEST_FAILED 0x08
/** /**
The ExtractSection() function processes the input section and The ExtractSection() function processes the input section and

View File

@ -69,7 +69,7 @@ EFI_STATUS
OUT UINT32 *Attributes, OUT UINT32 *Attributes,
IN OUT UINTN *DataSize, IN OUT UINTN *DataSize,
OUT VOID *Data OUT VOID *Data
); );
/** /**
@ -112,7 +112,7 @@ EFI_STATUS
IN OUT UINTN *VariableNameSize, IN OUT UINTN *VariableNameSize,
IN OUT CHAR16 *VariableName, IN OUT CHAR16 *VariableName,
IN OUT EFI_GUID *VariableGuid IN OUT EFI_GUID *VariableGuid
); );
/** /**
This PPI provides a lightweight, read-only variant of the full EFI This PPI provides a lightweight, read-only variant of the full EFI

View File

@ -0,0 +1,142 @@
/** @file
This file declares Section Extraction protocol.
The section extraction protocol is referenced in the PI 1.0 specification, but
not defined. It will likely be added in an eratta update.
Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __SECTION_EXTRACTION_PROTOCOL_H__
#define __SECTION_EXTRACTION_PROTOCOL_H__
typedef struct _EFI_SECTION_EXTRACTION_PROTOCOL EFI_SECTION_EXTRACTION_PROTOCOL;
//
// Protocol member functions
//
/**
Creates and returns a new section stream handle to represent the new section stream.
@param This Indicates the EFI_SECTION_EXTRACTION_PROTOCOL instance.
@param SectionStreamLength Size in bytes of the section stream.
@param SectionStream Buffer containing the new section stream.
@param SectionStreamHandle A pointer to a caller-allocated UINTN that,
on output, contains the new section stream handle.
@retval EFI_SUCCESS The SectionStream was successfully processed and
the section stream handle was returned.
@retval EFI_OUT_OF_RESOURCES The system has insufficient resources to
process the request.
@retval EFI_INVALID_PARAMETER The section stream may be corrupt or the value
of SectionStreamLength may be incorrect.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_OPEN_SECTION_STREAM) (
IN EFI_SECTION_EXTRACTION_PROTOCOL *This,
IN UINTN SectionStreamLength,
IN VOID *SectionStream,
OUT UINTN *SectionStreamHandle
);
/**
Reads and returns a single section from a section stream.
@param This Indicates the EFI_SECTION_EXTRACTION_PROTOCOL instance.
@param SectionStreamHandle Indicates from which section stream to read.
@param SectionType Pointer to an EFI_SECTION_TYPE.
@param SectionDefinitionGuid Pointer to an EFI_GUID.If SectionType ==
EFI_SECTION_GUID_DEFINED, SectionDefinitionGuid indicates what section GUID
to search for.If SectionType !=EFI_SECTION_GUID_DEFINED, then
SectionDefinitionGuid is unused and is ignored.
@param SectionInstance Indicates which instance of the requested section
type to return when SectionType is not NULL.
@param SectionStreamHandle A pointer to a caller-allocated UINTN that, on output,
contains the new section stream handle.
@param Buffer Pointer to a pointer to a buffer in which the section
contents are returned.
@param BufferSize Pointer to a caller-allocated UINTN.
@param AuthenticationStatus Pointer to a caller-allocated UINT32 in
which any meta-data from encapsulation GUID-defined sections is returned.
@retval EFI_SUCCESS The SectionStream was successfully processed and
the section contents were returned in Buffer.
@retval EFI_PROTOCOL_ERROR A GUID-defined section was encountered in
the section stream with its EFI_GUIDED_SECTION_PROCESSING_REQUIRED bit set,
but there was no corresponding GUIDed Section Extraction Protocol in
the handle database.
@retval EFI_NOT_FOUND An error was encountered when parsing the SectionStream,
which indicates that the SectionStream is not correctly formatted.
Or The requested section does not exist.
@retval EFI_OUT_OF_RESOURCES The system has insufficient resources to process
the request.
@retval EFI_INVALID_PARAMETER The SectionStreamHandle does not exist.
@retval EFI_BUFFER_TOO_SMALL The size of the input buffer is insufficient to
contain the requested section.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_GET_SECTION) (
IN EFI_SECTION_EXTRACTION_PROTOCOL *This,
IN UINTN SectionStreamHandle,
IN EFI_SECTION_TYPE *SectionType,
IN EFI_GUID *SectionDefinitionGuid,
IN UINTN SectionInstance,
IN VOID **Buffer,
IN OUT UINTN *BufferSize,
OUT UINT32 *AuthenticationStatus
);
/**
Deletes a section stream handle and returns all associated resources to the system.
@param This Indicates the EFI_SECTION_EXTRACTION_PROTOCOL instance.
@param SectionStreamHandle Indicates the section stream to close.
@retval EFI_SUCCESS The SectionStream was successfully processed and
the section stream handle was returned.
@retval EFI_INVALID_PARAMETER The SectionStreamHandle does not exist.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_CLOSE_SECTION_STREAM) (
IN EFI_SECTION_EXTRACTION_PROTOCOL *This,
IN UINTN SectionStreamHandle
);
/**
@par Protocol Description:
The Section Extraction Protocol provides a simple method of extracting
sections from arbitrarily complex files.
@param OpenSectionStream
Takes a bounded stream of sections and returns a section stream handle.
@param GetSection
Given a section stream handle, retrieves the requested section and
meta-data from the section stream.
@param CloseSectionStream
Given a section stream handle, closes the section stream.
**/
struct _EFI_SECTION_EXTRACTION_PROTOCOL {
EFI_OPEN_SECTION_STREAM OpenSectionStream;
EFI_GET_SECTION GetSection;
EFI_CLOSE_SECTION_STREAM CloseSectionStream;
};
#endif

View File

@ -61,15 +61,6 @@
MemLibInternals.h MemLibInternals.h
################################################################################
#
# Includes Section - list of Include locations that are required for
# this module.
#
################################################################################
[Includes]
################################################################################ ################################################################################
# #
# Package Dependency Section - list of Package files that are required for # Package Dependency Section - list of Package files that are required for

View File

@ -315,6 +315,10 @@
PcdPciExpressBaseAddress|0x0000000a|gEfiMdePkgTokenSpaceGuid|UINT64|0xE0000000 PcdPciExpressBaseAddress|0x0000000a|gEfiMdePkgTokenSpaceGuid|UINT64|0xE0000000
PcdFSBClock|0x0000000c|gEfiMdePkgTokenSpaceGuid|UINT32|200000000 PcdFSBClock|0x0000000c|gEfiMdePkgTokenSpaceGuid|UINT32|200000000
PcdUefiLibMaxPrintBufferSize|0x101|gEfiMdePkgTokenSpaceGuid|UINT32|320 PcdUefiLibMaxPrintBufferSize|0x101|gEfiMdePkgTokenSpaceGuid|UINT32|320
PcdStatusCodeValueEfiWatchDogTimerExpired|0x0000000d|gEfiMdePkgTokenSpaceGuid|UINT32|0x00011003 # EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_TIMER_EXPIRED
PcdStatusCodeValueSetVirtualAddressMap|0x0000000e|gEfiMdePkgTokenSpaceGuid|UINT32|0x03101004 # EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_RS_PC_SET_VIRTUAL_ADDRESS_MAP
PcdStatusCodeValueMemoryTestStarted|0x0000000f|gEfiMdePkgTokenSpaceGuid|UINT32|0x00051006 # EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_PC_TEST
PcdStatusCodeValueUncorrectableMemoryError|0x00000010|gEfiMdePkgTokenSpaceGuid|UINT32|0x00051003 # EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_EC_UNCORRECTABLE
[PcdsPatchableInModule.common] [PcdsPatchableInModule.common]
PcdDebugPrintErrorLevel|0x00000006|gEfiMdePkgTokenSpaceGuid|UINT32|0x80000000 PcdDebugPrintErrorLevel|0x00000006|gEfiMdePkgTokenSpaceGuid|UINT32|0x80000000

View File

@ -271,6 +271,12 @@
PcdPciIsaEnable|gEfiIntelFrameworkModulePkgTokenSpaceGuid|FALSE PcdPciIsaEnable|gEfiIntelFrameworkModulePkgTokenSpaceGuid|FALSE
PcdPciVgaEnable|gEfiIntelFrameworkModulePkgTokenSpaceGuid|FALSE PcdPciVgaEnable|gEfiIntelFrameworkModulePkgTokenSpaceGuid|FALSE
PcdPciBusHotplugDeviceSupport|gEfiIntelFrameworkModulePkgTokenSpaceGuid|TRUE PcdPciBusHotplugDeviceSupport|gEfiIntelFrameworkModulePkgTokenSpaceGuid|TRUE
PcdStatusCodeValueEfiWatchDogTimerExpired|gEfiMdePkgTokenSpaceGuid|0x00011003
PcdStatusCodeValueMemoryTestStarted|gEfiMdePkgTokenSpaceGuid|0x00051006
PcdStatusCodeValueSetVirtualAddressMap|gEfiMdePkgTokenSpaceGuid|0x03101004
PcdStatusCodeValueUncorrectableMemoryError|gEfiMdePkgTokenSpaceGuid|0x00051003
################################################################################ ################################################################################
# #