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 --- .../Crc32SectionExtract/Dxe/Crc32SectionExtract.c | 43 +++++++++++++-- .../Crc32SectionExtract/Dxe/Crc32SectionExtract.h | 13 +---- .../Dxe/Crc32SectionExtract.inf | 44 ---------------- .../Crc32SectionExtract/Dxe/GuidedSection.c | 61 ---------------------- .../Crc32SectionExtract/Dxe/GuidedSection.h | 54 ------------------- 5 files changed, 41 insertions(+), 174 deletions(-) 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/FirmwareVolume') diff --git a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c b/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c index de9ba8372f..ca5ee21fe7 100644 --- a/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c +++ b/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c @@ -23,9 +23,44 @@ 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 ( @@ -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 65fb0a27ab..e7bf276a35 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 9bce71f76b..5b0c65dbce 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 87605cc055..0000000000 --- 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 d6613b0f4b..0000000000 --- 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 -- cgit v1.2.3