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/Capsule/RuntimeDxe/Capsule.c | 68 ---------------------- .../Capsule/RuntimeDxe/CapsuleRuntime.inf | 53 ----------------- .../Universal/Capsule/RuntimeDxe/CapsuleService.c | 65 ++++++++++++++++----- 3 files changed, 49 insertions(+), 137 deletions(-) delete mode 100644 MdeModulePkg/Universal/Capsule/RuntimeDxe/Capsule.c (limited to 'MdeModulePkg/Universal/Capsule/RuntimeDxe') diff --git a/MdeModulePkg/Universal/Capsule/RuntimeDxe/Capsule.c b/MdeModulePkg/Universal/Capsule/RuntimeDxe/Capsule.c deleted file mode 100644 index 15736c6ca9..0000000000 --- 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 bdc91db1d7..61dae1b849 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 7370eb4198..5a923cda34 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; +} -- cgit v1.2.3