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:
@ -23,9 +23,44 @@ Abstract:
|
||||
--*/
|
||||
|
||||
|
||||
#include <GuidedSection.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
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 <PiDxe.h>
|
||||
#include <Common/FrameworkFirmwareVolumeImageFormat.h>
|
||||
//
|
||||
// The protocols, PPI and GUID defintions for this module
|
||||
//
|
||||
#include <Protocol/SecurityPolicy.h>
|
||||
#include <Protocol/GuidedSectionExtaction.h>
|
||||
#include <Protocol/Crc32GuidedSectionExtraction.h>
|
||||
//
|
||||
// The Library classes this module consumes
|
||||
//
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/UefiDriverEntryPoint.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
EFI_GUID_DEFINED_SECTION GuidedSectionHeader;
|
||||
UINT32 CRC32Checksum;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
@ -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
|
Reference in New Issue
Block a user