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:
@@ -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;
|
||||
}
|
@@ -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
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user