From ba2377328775b10caa4c2091a8997eb8685c39b8 Mon Sep 17 00:00:00 2001 From: AJFISH Date: Tue, 3 Jul 2007 18:34:24 +0000 Subject: Removed IntelframeworkPkg contamination from MdeModulePkg modules. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3019 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Universal/BaseMemoryTestPei/BaseMemoryTest.c | 26 +------- .../Universal/BaseMemoryTestPei/BaseMemoryTest.h | 8 +++ .../Universal/BaseMemoryTestPei/BaseMemoryTest.inf | 42 ++----------- .../Universal/Capsule/RuntimeDxe/Capsule.c | 68 -------------------- .../Capsule/RuntimeDxe/CapsuleRuntime.inf | 53 ---------------- .../Universal/Capsule/RuntimeDxe/CapsuleService.c | 65 ++++++++++++++----- .../Crc32SectionExtract/Dxe/Crc32SectionExtract.c | 43 +++++++++++-- .../Crc32SectionExtract/Dxe/Crc32SectionExtract.h | 13 +--- .../Dxe/Crc32SectionExtract.inf | 44 ------------- .../Crc32SectionExtract/Dxe/GuidedSection.c | 61 ------------------ .../Crc32SectionExtract/Dxe/GuidedSection.h | 54 ---------------- MdeModulePkg/Universal/RuntimeDxe/Runtime.c | 30 +-------- MdeModulePkg/Universal/RuntimeDxe/Runtime.h | 16 +++++ MdeModulePkg/Universal/RuntimeDxe/Runtime.inf | 4 +- .../Universal/VariablePei/Ipf/VariableWorker.c | 17 ----- MdeModulePkg/Universal/VariablePei/Variable.c | 72 +++++++++------------- MdeModulePkg/Universal/VariablePei/Variable.h | 30 ++++++--- MdeModulePkg/Universal/VariablePei/Variable.inf | 53 +--------------- .../Universal/VariablePei/VariableWorker.c | 18 ------ .../Universal/WatchDogTimerDxe/WatchDogTimer.c | 36 +---------- .../Universal/WatchDogTimerDxe/WatchDogTimer.h | 26 +++++--- .../Universal/WatchDogTimerDxe/WatchDogTimer.inf | 52 +++------------- 22 files changed, 202 insertions(+), 629 deletions(-) delete mode 100644 MdeModulePkg/Universal/Capsule/RuntimeDxe/Capsule.c delete mode 100644 MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.c delete mode 100644 MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.h (limited to 'MdeModulePkg/Universal') diff --git a/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.c b/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.c index 7b207b9..f1ab82d 100644 --- a/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.c +++ b/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.c @@ -19,22 +19,6 @@ Abstract: --*/ -// -// The package level header files this module uses -// -#include -#include -// -// The protocols, PPI and GUID defintions for this module -// -#include -// -// The Library classes this module consumes -// -#include -#include -#include - #include static PEI_BASE_MEMORY_TEST_PPI mPeiBaseMemoryTestPpi = { BaseMemoryTest }; @@ -109,10 +93,7 @@ Returns: EFI_PHYSICAL_ADDRESS TempAddress; UINT32 SpanSize; - REPORT_STATUS_CODE ( - EFI_PROGRESS_CODE, - EFI_COMPUTING_UNIT_MEMORY + EFI_CU_MEMORY_PC_TEST - ); + REPORT_STATUS_CODE (EFI_PROGRESS_CODE, PcdGet32 (PcdStatusCodeValueMemoryTestStarted)); TestPattern = TEST_PATTERN; SpanSize = 0; @@ -151,10 +132,7 @@ Returns: while (TempAddress < BeginAddress + MemoryLength) { if ((*(UINT32 *) (UINTN) TempAddress) != TestPattern) { *ErrorAddress = TempAddress; - REPORT_STATUS_CODE ( - EFI_ERROR_CODE | EFI_ERROR_UNRECOVERED, - EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_EC_UNCORRECTABLE - ); + REPORT_STATUS_CODE (EFI_ERROR_CODE | EFI_ERROR_UNRECOVERED, PcdGet32 (PcdStatusCodeValueUncorrectableMemoryError)); return EFI_DEVICE_ERROR; } diff --git a/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.h b/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.h index 791a66c..ed6081a 100644 --- a/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.h +++ b/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.h @@ -22,6 +22,14 @@ Abstract: #ifndef _PEI_BASE_MEMORY_TEST_H_ #define _PEI_BASE_MEMORY_TEST_H_ +#include +#include +#include +#include +#include +#include + + // // Some global define // diff --git a/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.inf b/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.inf index 6010077..90d71e9 100644 --- a/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.inf +++ b/MdeModulePkg/Universal/BaseMemoryTestPei/BaseMemoryTest.inf @@ -36,56 +36,22 @@ # VALID_ARCHITECTURES = IA32 X64 IPF EBC # -################################################################################ -# -# Sources Section - list of files that are required for the build to succeed. -# -################################################################################ - [Sources.common] BaseMemoryTest.c 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] MdePkg/MdePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - - -################################################################################ -# -# Library Class Section - list of Library Classes that are required for -# this module. -# -################################################################################ [LibraryClasses] ReportStatusCodeLib PeimEntryPoint DebugLib - -################################################################################ -# -# PPI C Name Section - list of PPI and PPI Notify C Names that this module -# uses or produces. -# -################################################################################ - [Ppis] gPeiBaseMemoryTestPpiGuid # PPI ALWAYS_PRODUCED +[PcdsFixedAtBuild.common] + PcdStatusCodeValueMemoryTestStarted|gEfiMdePkgTokenSpaceGuid + PcdStatusCodeValueUncorrectableMemoryError|gEfiMdePkgTokenSpaceGuid + diff --git a/MdeModulePkg/Universal/Capsule/RuntimeDxe/Capsule.c b/MdeModulePkg/Universal/Capsule/RuntimeDxe/Capsule.c deleted file mode 100644 index 15736c6..0000000 --- a/MdeModulePkg/Universal/Capsule/RuntimeDxe/Capsule.c +++ /dev/null @@ -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; -} diff --git a/MdeModulePkg/Universal/Capsule/RuntimeDxe/CapsuleRuntime.inf b/MdeModulePkg/Universal/Capsule/RuntimeDxe/CapsuleRuntime.inf index bdc91db..61dae1b 100644 --- a/MdeModulePkg/Universal/Capsule/RuntimeDxe/CapsuleRuntime.inf +++ b/MdeModulePkg/Universal/Capsule/RuntimeDxe/CapsuleRuntime.inf @@ -45,26 +45,9 @@ [Sources.common] CapsuleService.h CapsuleService.c - Capsule.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] UefiBootServicesTableLib @@ -76,54 +59,18 @@ DxeServicesTableLib UefiDriverEntryPoint - -################################################################################ -# -# Guid C Name Section - list of Guids that this module uses or produces. -# -################################################################################ - [Guids] gEfiCapsuleVendorGuid # SOMETIMES_CONSUMED - gEfiCapsuleGuid - -################################################################################ -# -# Protocol C Name Section - list of Protocol and Protocol Notify C Names -# that this module uses or produces. -# -################################################################################ [Protocols] gEfiCapsuleArchProtocolGuid # PROTOCOL ALWAYS_CONSUMED - -################################################################################ -# -# Pcd FEATURE_FLAG - list of PCDs that this module is coded for. -# -################################################################################ - [PcdsFeatureFlag.common] PcdSupportUpdateCapsuleRest|gEfiEdkModulePkgTokenSpaceGuid - -################################################################################ -# -# Pcd FIXED_AT_BUILD - list of PCDs that this module is coded for. -# -################################################################################ - [PcdsFixedAtBuild.common] PcdMaxSizeNonPopulateCapsule|gEfiEdkModulePkgTokenSpaceGuid PcdMaxSizePopulateCapsule|gEfiEdkModulePkgTokenSpaceGuid -################################################################################ -# -# Dependency Expression Section - list of Dependency expressions that are required for -# this module. -# -################################################################################ - [Depex] gEfiVariableArchProtocolGuid diff --git a/MdeModulePkg/Universal/Capsule/RuntimeDxe/CapsuleService.c b/MdeModulePkg/Universal/Capsule/RuntimeDxe/CapsuleService.c index 7370eb4..5a923cd 100644 --- a/MdeModulePkg/Universal/Capsule/RuntimeDxe/CapsuleService.c +++ b/MdeModulePkg/Universal/Capsule/RuntimeDxe/CapsuleService.c @@ -65,19 +65,13 @@ Returns: BufferPtr = 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++) { CapsuleHeader = CapsuleHeaderArray[ArrayNumber]; if ((CapsuleHeader->Flags & (CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE)) == CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) { return EFI_INVALID_PARAMETER; } - if (!CompareGuid (&CapsuleHeader->CapsuleGuid, &gEfiCapsuleGuid)) { - if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) { - return EFI_UNSUPPORTED; - } + if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) { + return EFI_UNSUPPORTED; } } @@ -193,19 +187,13 @@ Returns: 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++) { CapsuleHeader = CapsuleHeaderArray[ArrayNumber]; if ((CapsuleHeader->Flags & (CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE)) == CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) { return EFI_INVALID_PARAMETER; } - if (!CompareGuid (&CapsuleHeader->CapsuleGuid, &gEfiCapsuleGuid)) { - if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) { - return EFI_UNSUPPORTED; - } + if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) { + return EFI_UNSUPPORTED; } } @@ -229,3 +217,48 @@ Returns: 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; +} diff --git a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c b/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c index de9ba83..ca5ee21 100644 --- a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c +++ b/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c @@ -23,10 +23,45 @@ Abstract: --*/ -#include #include 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 EFIAPI InitializeCrc32GuidedSectionExtractionProtocol ( IN EFI_HANDLE ImageHandle, @@ -206,21 +241,21 @@ Crc32ExtractSection ( // Implictly CRC32 GUIDed section should have STATUS_VALID bit set // 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. // Status = gBS->LocateProtocol (&gEfiSecurityPolicyProtocolGuid, NULL, &DummyInterface); if (!EFI_ERROR (Status)) { - *AuthenticationStatus |= EFI_LOCAL_AUTH_STATUS_PLATFORM_OVERRIDE | EFI_AGGREGATE_AUTH_STATUS_PLATFORM_OVERRIDE; + *AuthenticationStatus |= EFI_AUTH_STATUS_PLATFORM_OVERRIDE; } else { // // Calculate CRC32 Checksum of Image // gBS->CalculateCrc32 (Image, *OutputSize, &Crc32Checksum); if (Crc32Checksum != Crc32SectionHeader->CRC32Checksum) { - *AuthenticationStatus |= EFI_LOCAL_AUTH_STATUS_TEST_FAILED | EFI_AGGREGATE_AUTH_STATUS_TEST_FAILED; + *AuthenticationStatus |= EFI_AUTH_STATUS_TEST_FAILED; } } diff --git a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.h b/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.h index 65fb0a2..e7bf276 100644 --- a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.h +++ b/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.h @@ -23,26 +23,17 @@ Abstract: #ifndef _CRC32_GUIDED_SECTION_EXTRACTION_H #define _CRC32_GUIDED_SECTION_EXTRACTION_H -// -// The package level header files this module uses -// #include -#include -// -// The protocols, PPI and GUID defintions for this module -// #include -#include #include -// -// The Library classes this module consumes -// #include #include #include #include #include + + typedef struct { EFI_GUID_DEFINED_SECTION GuidedSectionHeader; UINT32 CRC32Checksum; diff --git a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.inf b/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.inf index 9bce71f..5b0c65d 100644 --- a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.inf +++ b/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.inf @@ -14,11 +14,6 @@ # #**/ -################################################################################ -# -# Defines Section - statements that will be processed to create a Makefile. -# -################################################################################ [Defines] INF_VERSION = 0x00010005 BASE_NAME = Crc32SectionExtract @@ -36,36 +31,12 @@ # VALID_ARCHITECTURES = IA32 X64 IPF EBC # -################################################################################ -# -# Sources Section - list of files that are required for the build to succeed. -# -################################################################################ - [Sources.common] - GuidedSection.h - GuidedSection.c Crc32SectionExtract.h Crc32SectionExtract.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] MemoryAllocationLib @@ -74,24 +45,9 @@ UefiDriverEntryPoint DebugLib - -################################################################################ -# -# Protocol C Name Section - list of Protocol and Protocol Notify C Names -# that this module uses or produces. -# -################################################################################ - [Protocols] gEfiSecurityPolicyProtocolGuid # PROTOCOL SOMETIMES_CONSUMED gEfiCrc32GuidedSectionExtractionProtocolGuid # PROTOCOL ALWAYS_PRODUCED -################################################################################ -# -# Dependency Expression Section - list of Dependency expressions that are required for -# this module. -# -################################################################################ - [Depex] gEfiRuntimeArchProtocolGuid diff --git a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.c b/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.c deleted file mode 100644 index 87605cc..0000000 --- a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.c +++ /dev/null @@ -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; -} diff --git a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.h b/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.h deleted file mode 100644 index d6613b0..0000000 --- a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.h +++ /dev/null @@ -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 diff --git a/MdeModulePkg/Universal/RuntimeDxe/Runtime.c b/MdeModulePkg/Universal/RuntimeDxe/Runtime.c index 4bf2e40..c2c0242 100644 --- a/MdeModulePkg/Universal/RuntimeDxe/Runtime.c +++ b/MdeModulePkg/Universal/RuntimeDxe/Runtime.c @@ -51,31 +51,6 @@ Revision History: --*/ -// -// The package level header files this module uses -// -#include -#include -// -// The protocols, PPI and GUID defintions for this module -// -#include -#include -#include - -// -// The Library classes this module consumes -// -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "Runtime.h" // @@ -333,10 +308,7 @@ Returns: // check whether in Runtime or not (this is judged by looking at // mEfiAtRuntime global So this ReportStatusCode will work // - REPORT_STATUS_CODE ( - EFI_PROGRESS_CODE, - (EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_RS_PC_SET_VIRTUAL_ADDRESS_MAP) - ); + REPORT_STATUS_CODE (EFI_PROGRESS_CODE, PcdGet32 (PcdStatusCodeValueSetVirtualAddressMap)); // // Signal all the EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE events. diff --git a/MdeModulePkg/Universal/RuntimeDxe/Runtime.h b/MdeModulePkg/Universal/RuntimeDxe/Runtime.h index c2e4b39..7154b53 100644 --- a/MdeModulePkg/Universal/RuntimeDxe/Runtime.h +++ b/MdeModulePkg/Universal/RuntimeDxe/Runtime.h @@ -24,6 +24,22 @@ Abstract: #ifndef _RUNTIME_H_ #define _RUNTIME_H_ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + // // Function Prototypes // diff --git a/MdeModulePkg/Universal/RuntimeDxe/Runtime.inf b/MdeModulePkg/Universal/RuntimeDxe/Runtime.inf index 288e5d0..e535fb1 100644 --- a/MdeModulePkg/Universal/RuntimeDxe/Runtime.inf +++ b/MdeModulePkg/Universal/RuntimeDxe/Runtime.inf @@ -66,7 +66,6 @@ [Packages] MdePkg/MdePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec ################################################################################ @@ -108,3 +107,6 @@ gEfiRuntimeArchProtocolGuid # PROTOCOL ALWAYS_PRODUCED gEfiLoadedImageProtocolGuid # PROTOCOL ALWAYS_CONSUMED +[PcdsFixedAtBuild.common] + PcdStatusCodeValueSetVirtualAddressMap|gEfiMdePkgTokenSpaceGuid + \ No newline at end of file diff --git a/MdeModulePkg/Universal/VariablePei/Ipf/VariableWorker.c b/MdeModulePkg/Universal/VariablePei/Ipf/VariableWorker.c index 912aab1..0a4ee95 100644 --- a/MdeModulePkg/Universal/VariablePei/Ipf/VariableWorker.c +++ b/MdeModulePkg/Universal/VariablePei/Ipf/VariableWorker.c @@ -11,23 +11,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -// -// The package level header files this module uses -// -#include - -// -// The protocols, PPI and GUID defintions for this module -// -#include -// -// The Library classes this module consumes -// -#include -#include -#include -#include -#include #include diff --git a/MdeModulePkg/Universal/VariablePei/Variable.c b/MdeModulePkg/Universal/VariablePei/Variable.c index b56e315..ba8a23d 100644 --- a/MdeModulePkg/Universal/VariablePei/Variable.c +++ b/MdeModulePkg/Universal/VariablePei/Variable.c @@ -18,38 +18,20 @@ Abstract: --*/ -// -// The package level header files this module uses -// -#include -// -// The protocols, PPI and GUID defintions for this module -// -#include -// -// The Library classes this module consumes -// -#include -#include -#include -#include -#include - - -#include +#include "Variable.h" // // Module globals // -static EFI_PEI_READ_ONLY_VARIABLE_PPI mVariablePpi = { +static EFI_PEI_READ_ONLY_VARIABLE2_PPI mVariablePpi = { PeiGetVariable, PeiGetNextVariableName }; static EFI_PEI_PPI_DESCRIPTOR mPpiListVariable = { (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), - &gEfiPeiReadOnlyVariablePpiGuid, + &gEfiPeiReadOnlyVariable2PpiGuid, &mVariablePpi }; @@ -187,10 +169,10 @@ Returns: STATIC EFI_STATUS CompareWithValidVariable ( - IN VARIABLE_HEADER *Variable, - IN CHAR16 *VariableName, - IN EFI_GUID *VendorGuid, - OUT VARIABLE_POINTER_TRACK *PtrTrack + IN VARIABLE_HEADER *Variable, + IN CONST CHAR16 *VariableName, + IN CONST EFI_GUID *VendorGuid, + OUT VARIABLE_POINTER_TRACK *PtrTrack ) /*++ @@ -242,8 +224,8 @@ EFI_STATUS EFIAPI FindVariable ( IN EFI_PEI_SERVICES **PeiServices, - IN CHAR16 *VariableName, - IN EFI_GUID *VendorGuid, + IN CONST CHAR16 *VariableName, + IN CONST EFI_GUID *VendorGuid, OUT VARIABLE_POINTER_TRACK *PtrTrack ) /*++ @@ -380,12 +362,12 @@ Returns: EFI_STATUS EFIAPI PeiGetVariable ( - IN EFI_PEI_SERVICES **PeiServices, - IN CHAR16 *VariableName, - IN EFI_GUID * VendorGuid, - OUT UINT32 *Attributes OPTIONAL, - IN OUT UINTN *DataSize, - OUT VOID *Data + IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This, + IN CONST CHAR16 *VariableName, + IN CONST EFI_GUID *VariableGuid, + OUT UINT32 *Attributes, + IN OUT UINTN *DataSize, + OUT VOID *Data ) /*++ @@ -420,15 +402,16 @@ Returns: VARIABLE_POINTER_TRACK Variable; UINTN VarDataSize; EFI_STATUS Status; + EFI_PEI_SERVICES **PeiServices; - if (VariableName == NULL || VendorGuid == NULL) { + PeiServices = GetPeiServicesTablePointer (); + if (VariableName == NULL || VariableGuid == NULL) { return EFI_INVALID_PARAMETER; } // // Find existing variable // - Status = FindVariable (PeiServices, VariableName, VendorGuid, &Variable); - + Status = FindVariable (PeiServices, VariableName, VariableGuid, &Variable); if (Variable.CurrPtr == NULL || Status != EFI_SUCCESS) { return Status; } @@ -454,10 +437,10 @@ Returns: EFI_STATUS EFIAPI PeiGetNextVariableName ( - IN EFI_PEI_SERVICES **PeiServices, - IN OUT UINTN *VariableNameSize, - IN OUT CHAR16 *VariableName, - IN OUT EFI_GUID *VendorGuid + IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This, + IN OUT UINTN *VariableNameSize, + IN OUT CHAR16 *VariableName, + IN OUT EFI_GUID *VariableGuid ) /*++ @@ -470,7 +453,7 @@ Arguments: PeiServices - General purpose services available to every PEIM. VariabvleNameSize - The variable name's size. 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 @@ -489,13 +472,14 @@ Returns: VARIABLE_POINTER_TRACK Variable; UINTN VarNameSize; EFI_STATUS Status; + EFI_PEI_SERVICES **PeiServices; + PeiServices = GetPeiServicesTablePointer (); if (VariableName == NULL) { return EFI_INVALID_PARAMETER; } - Status = FindVariable (PeiServices, VariableName, VendorGuid, &Variable); - + Status = FindVariable (PeiServices, VariableName, VariableGuid, &Variable); if (Variable.CurrPtr == NULL || Status != EFI_SUCCESS) { return Status; } @@ -514,7 +498,7 @@ Returns: if (VarNameSize <= *VariableNameSize) { (*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; } else { diff --git a/MdeModulePkg/Universal/VariablePei/Variable.h b/MdeModulePkg/Universal/VariablePei/Variable.h index 187edba..9747a8d 100644 --- a/MdeModulePkg/Universal/VariablePei/Variable.h +++ b/MdeModulePkg/Universal/VariablePei/Variable.h @@ -22,6 +22,16 @@ Abstract: #ifndef _PEI_VARIABLE_H #define _PEI_VARIABLE_H +#include +#include +#include +#include +#include +#include +#include +#include + + // // BugBug: We need relcate the head file. // @@ -91,12 +101,12 @@ Returns: EFI_STATUS EFIAPI PeiGetVariable ( - IN EFI_PEI_SERVICES **PeiServices, - IN CHAR16 *VariableName, - IN EFI_GUID * VendorGuid, - OUT UINT32 *Attributes OPTIONAL, - IN OUT UINTN *DataSize, - OUT VOID *Data + IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This, + IN CONST CHAR16 *VariableName, + IN CONST EFI_GUID *VariableGuid, + OUT UINT32 *Attributes, + IN OUT UINTN *DataSize, + OUT VOID *Data ) /*++ @@ -123,10 +133,10 @@ Returns: EFI_STATUS EFIAPI PeiGetNextVariableName ( - IN EFI_PEI_SERVICES **PeiServices, - IN OUT UINTN *VariableNameSize, - IN OUT CHAR16 *VariableName, - IN OUT EFI_GUID *VendorGuid + IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This, + IN OUT UINTN *VariableNameSize, + IN OUT CHAR16 *VariableName, + IN OUT EFI_GUID *VariableGuid ) /*++ diff --git a/MdeModulePkg/Universal/VariablePei/Variable.inf b/MdeModulePkg/Universal/VariablePei/Variable.inf index 5151c4b..434c299 100644 --- a/MdeModulePkg/Universal/VariablePei/Variable.inf +++ b/MdeModulePkg/Universal/VariablePei/Variable.inf @@ -14,11 +14,6 @@ # #**/ -################################################################################ -# -# Defines Section - statements that will be processed to create a Makefile. -# -################################################################################ [Defines] INF_VERSION = 0x00010005 BASE_NAME = PeiVariable @@ -36,12 +31,6 @@ # VALID_ARCHITECTURES = IA32 X64 IPF EBC # -################################################################################ -# -# Sources Section - list of files that are required for the build to succeed. -# -################################################################################ - [Sources.common] Variable.c Variable.h @@ -58,26 +47,9 @@ [Sources.EBC] VariableWorker.c - -################################################################################ -# -# Package Dependency Section - list of Package files that are required for -# this module. -# -################################################################################ - [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec - IntelFrameworkPkg/IntelFrameworkPkg.dec - - -################################################################################ -# -# Library Class Section - list of Library Classes that are required for -# this module. -# -################################################################################ [LibraryClasses] BaseMemoryLib @@ -85,34 +57,13 @@ HobLib PeimEntryPoint DebugLib - - -################################################################################ -# -# PPI C Name Section - list of PPI and PPI Notify C Names that this module -# uses or produces. -# -################################################################################ + PeiServiceTablePointerLib [Ppis] - gEfiPeiReadOnlyVariablePpiGuid # PPI ALWAYS_CONSUMED - - -################################################################################ -# -# Pcd DYNAMIC - list of PCDs that this module is coded for. -# -################################################################################ + gEfiPeiReadOnlyVariable2PpiGuid # PPI ALWAYS_CONSUMED [PcdsDynamic.common] PcdFlashNvStorageVariableBase|gEfiGenericPlatformTokenSpaceGuid -################################################################################ -# -# Dependency Expression Section - list of Dependency expressions that are required for -# this module. -# -################################################################################ - [Depex] TRUE diff --git a/MdeModulePkg/Universal/VariablePei/VariableWorker.c b/MdeModulePkg/Universal/VariablePei/VariableWorker.c index 5cb75d0..1a49ee8 100644 --- a/MdeModulePkg/Universal/VariablePei/VariableWorker.c +++ b/MdeModulePkg/Universal/VariablePei/VariableWorker.c @@ -18,24 +18,6 @@ Abstract: Framework PEIM to provide the Variable functionality --*/ -// -// The package level header files this module uses -// -#include - -// -// The protocols, PPI and GUID defintions for this module -// -#include -// -// The Library classes this module consumes -// -#include -#include -#include -#include -#include - #include diff --git a/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.c b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.c index ec43aec..7628908 100644 --- a/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.c +++ b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.c @@ -21,24 +21,6 @@ Revision History --*/ -// -// The package level header files this module uses -// -#include -#include -// -// The protocols, PPI and GUID defintions for this module -// -// -// The Library classes this module consumes -// -#include -#include -#include -#include -#include -#include - #include "WatchDogTimer.h" // @@ -103,13 +85,7 @@ WatchdogTimerDriverExpires ( --*/ { - // - // 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) - ); + REPORT_STATUS_CODE (EFI_ERROR_CODE | EFI_ERROR_MINOR, PcdGet32 (PcdStatusCodeValueEfiWatchDogTimerExpired)); // // If a notification function has been registered, then call it @@ -123,6 +99,7 @@ WatchdogTimerDriverExpires ( gRT->ResetSystem (EfiResetCold, EFI_TIMEOUT, 0, NULL); } + EFI_STATUS EFIAPI WatchdogTimerDriverRegisterHandler ( @@ -288,10 +265,6 @@ Returns: { 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 // @@ -320,10 +293,5 @@ Returns: ); ASSERT_EFI_ERROR (Status); - REPORT_STATUS_CODE ( - EFI_PROGRESS_CODE, - (EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_SW_PC_INIT_END) - ); - return Status; } diff --git a/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.h b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.h index bb1936b..2c8c33a 100644 --- a/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.h +++ b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.h @@ -24,6 +24,20 @@ Revision History #ifndef _WATCHDOG_TIMER_H_ #define _WATCHDOG_TIMER_H_ + +// +// The package level header files this module uses +// +#include +#include +#include +#include +#include +#include +#include +#include + + // // Function Prototypes // @@ -32,31 +46,27 @@ EFIAPI WatchdogTimerDriverRegisterHandler ( IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This, IN EFI_WATCHDOG_TIMER_NOTIFY NotifyFunction - ) -; + ); EFI_STATUS EFIAPI WatchdogTimerDriverSetTimerPeriod ( IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This, IN UINT64 TimerPeriod - ) -; + ); EFI_STATUS EFIAPI WatchdogTimerDriverGetTimerPeriod ( IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This, IN UINT64 *TimerPeriod - ) -; + ); EFI_STATUS EFIAPI WatchdogTimerDriverInitialize ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable - ) -; + ); #endif diff --git a/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.inf b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.inf index 7c3984d..5c9f3df 100644 --- a/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.inf +++ b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.inf @@ -14,11 +14,6 @@ # #**/ -################################################################################ -# -# Defines Section - statements that will be processed to create a Makefile. -# -################################################################################ [Defines] INF_VERSION = 0x00010005 BASE_NAME = WatchDogTimer @@ -36,35 +31,13 @@ # VALID_ARCHITECTURES = IA32 X64 IPF EBC # -################################################################################ -# -# Sources Section - list of files that are required for the build to succeed. -# -################################################################################ +[Packages] + MdePkg/MdePkg.dec [Sources.common] WatchDogTimer.h 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] UefiRuntimeServicesTableLib UefiBootServicesTableLib @@ -72,22 +45,13 @@ UefiDriverEntryPoint DebugLib - -################################################################################ -# -# Protocol C Name Section - list of Protocol and Protocol Notify C Names -# that this module uses or produces. -# -################################################################################ - [Protocols] gEfiWatchdogTimerArchProtocolGuid # PROTOCOL ALWAYS_PRODUCED -################################################################################ -# -# Dependency Expression Section - list of Dependency expressions that are required for -# this module. -# -################################################################################ +[PcdsFixedAtBuild.common] + PcdStatusCodeValueEfiWatchDogTimerExpired|gEfiMdePkgTokenSpaceGuid + [depex] - gEfiTimerArchProtocolGuid \ No newline at end of file + gEfiTimerArchProtocolGuid + + \ No newline at end of file -- cgit v1.1