From 4941d8817da63dc42d8d2dfcedf35ecc56e07b1f Mon Sep 17 00:00:00 2001 From: lgao4 Date: Tue, 10 Mar 2009 07:57:15 +0000 Subject: [PATCH] Retire TCG platform protocol, which will be replaced by PI Security Architecture protocol. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7848 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Core/Dxe/DxeMain.h | 1 - MdeModulePkg/Core/Dxe/DxeMain.inf | 1 - MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c | 33 --------- MdeModulePkg/Core/Dxe/Image/Image.c | 24 ------- MdeModulePkg/Include/Protocol/TcgPlatform.h | 79 --------------------- MdeModulePkg/MdeModulePkg.dec | 4 -- MdeModulePkg/MdeModulePkg.dsc | 1 - MdeModulePkg/Universal/PCD/Pei/Pcd.inf | 4 +- 8 files changed, 2 insertions(+), 145 deletions(-) delete mode 100644 MdeModulePkg/Include/Protocol/TcgPlatform.h diff --git a/MdeModulePkg/Core/Dxe/DxeMain.h b/MdeModulePkg/Core/Dxe/DxeMain.h index f5e45c753a..1680e7d830 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain.h +++ b/MdeModulePkg/Core/Dxe/DxeMain.h @@ -48,7 +48,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include -#include #include #include #include diff --git a/MdeModulePkg/Core/Dxe/DxeMain.inf b/MdeModulePkg/Core/Dxe/DxeMain.inf index e6a126bd89..b749185e50 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain.inf +++ b/MdeModulePkg/Core/Dxe/DxeMain.inf @@ -130,7 +130,6 @@ gEfiDevicePathProtocolGuid ## CONSUMES gEfiLoadedImageProtocolGuid ## PRODUCES gEfiEbcProtocolGuid ## SOMETIMES_CONSUMES - gEfiTcgPlatformProtocolGuid ## CONSUMES gEfiLoadedImageDevicePathProtocolGuid ## PRODUCES [FixedPcd.common] diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c index 68fcca483d..6ca7eb515b 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c +++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c @@ -621,37 +621,12 @@ CoreExitBootServices ( ) { EFI_STATUS Status; - EFI_STATUS StatusTemp; - EFI_TCG_PLATFORM_PROTOCOL *TcgPlatformProtocol; - - // - // Measure invocation of ExitBootServices, - // which is defined by TCG_EFI_Platform_1_20_Final Specification - // - TcgPlatformProtocol = NULL; - Status = CoreLocateProtocol ( - &gEfiTcgPlatformProtocolGuid, - NULL, - (VOID **) &TcgPlatformProtocol - ); - if (!EFI_ERROR (Status)) { - Status = TcgPlatformProtocol->MeasureAction (EFI_EXIT_BOOT_SERVICES_INVOCATION); - ASSERT_EFI_ERROR (Status); - } // // Terminate memory services if the MapKey matches // Status = CoreTerminateMemoryMap (MapKey); if (EFI_ERROR (Status)) { - // - // Measure failure of ExitBootServices - // - if (TcgPlatformProtocol != NULL) { - StatusTemp = TcgPlatformProtocol->MeasureAction (EFI_EXIT_BOOT_SERVICES_FAILED); - ASSERT_EFI_ERROR (StatusTemp); - } - return Status; } @@ -705,14 +680,6 @@ CoreExitBootServices ( // gRuntime->AtRuntime = TRUE; - // - // Measure success of ExitBootServices - // - if (TcgPlatformProtocol != NULL) { - StatusTemp = TcgPlatformProtocol->MeasureAction (EFI_EXIT_BOOT_SERVICES_SUCCEEDED); - ASSERT_EFI_ERROR (StatusTemp); - } - return Status; } diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c index 15b474aea9..4acc9d8bd4 100644 --- a/MdeModulePkg/Core/Dxe/Image/Image.c +++ b/MdeModulePkg/Core/Dxe/Image/Image.c @@ -191,7 +191,6 @@ CoreLoadPeImage ( BOOLEAN DstBufAlocated; UINTN Size; UINTN LinkTimeBase; - EFI_TCG_PLATFORM_PROTOCOL *TcgPlatformProtocol; IMAGE_FILE_HANDLE *FHandle; FHandle = NULL; @@ -344,29 +343,6 @@ CoreLoadPeImage ( } } - // - // Measure the image before applying fixup - // - Status = CoreLocateProtocol ( - &gEfiTcgPlatformProtocolGuid, - NULL, - (VOID **) &TcgPlatformProtocol - ); - if (!EFI_ERROR (Status)) { - FHandle = (IMAGE_FILE_HANDLE *) Image->ImageContext.Handle; - Status = TcgPlatformProtocol->MeasurePeImage ( - BootPolicy, - (EFI_PHYSICAL_ADDRESS) (UINTN) FHandle->Source, - FHandle->SourceSize, - LinkTimeBase, - Image->ImageContext.ImageType, - Image->Info.DeviceHandle, - Image->Info.FilePath - ); - - ASSERT_EFI_ERROR (Status); - } - // // Relocate the image in memory // diff --git a/MdeModulePkg/Include/Protocol/TcgPlatform.h b/MdeModulePkg/Include/Protocol/TcgPlatform.h deleted file mode 100644 index cf8c5626be..0000000000 --- a/MdeModulePkg/Include/Protocol/TcgPlatform.h +++ /dev/null @@ -1,79 +0,0 @@ -/** @file - - Tcg addtional services to measure PeImage and ActionString - -Copyright (c) 2006 - 2008, 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. - -**/ - -#ifndef _TCG_PLATFORM_PROTOCOL_H_ -#define _TCG_PLATFORM_PROTOCOL_H_ - -#define EFI_TCG_PLATFORM_PROTOCOL_GUID \ - { 0x8c4c9a41, 0xbf56, 0x4627, { 0x9e, 0xa, 0xc8, 0x38, 0x6d, 0x66, 0x11, 0x5c } } - -typedef struct tdEFI_TCG_PLATFORM_PROTOCOL EFI_TCG_PLATFORM_PROTOCOL; - -// -// EFI TCG Platform Protocol -// -/** - - Measure PE/COFF Image File prior to the application of any fix-ups or relocations. - - @param BootPolicy If TRUE, indicates that the request originates from the boot manager, - and that the boot manager is attempting to load FilePath as a boot selection. - @param ImageAddress The memory address to PE/COFF image. - @param ImageSize The size of PE/COFF image. - @param LinkTimeBase The image base address in the original PeImage. - @param ImageType The subsystem type of the PeImage. - @param DeviceHandle The handle to device matched the file path. - @param FilePath The specific file path from which the image is loaded. - - @retval EFI_SUCCESS Measure successfully. - @retval EFI_UNSUPPORTED The loaded PeImage is not supported. - @retval EFI_OUT_OF_RESOURCES The resource of memory is not enough. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TCG_MEASURE_PE_IMAGE)( - IN BOOLEAN BootPolicy, - IN EFI_PHYSICAL_ADDRESS ImageAddress, - IN UINTN ImageSize, - IN UINTN LinkTimeBase, - IN UINT16 ImageType, - IN EFI_HANDLE DeviceHandle, - IN EFI_DEVICE_PATH_PROTOCOL *FilePath - ); - -/** - - Measure efi action string. - - @param ActionString Pointer to action string. - - @retval EFI_SUCCESS Measure action string successfully. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_TCG_MEASURE_ACTION)( - IN CHAR8 *ActionString - ); - -struct tdEFI_TCG_PLATFORM_PROTOCOL { - EFI_TCG_MEASURE_PE_IMAGE MeasurePeImage; - EFI_TCG_MEASURE_ACTION MeasureAction; -}; - -extern EFI_GUID gEfiTcgPlatformProtocolGuid; - -#endif diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index f056046c88..60caad00c2 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -178,10 +178,6 @@ ## Include/Protocol/Dpc.h gEfiDpcProtocolGuid = {0x480f8ae9, 0xc46, 0x4aa9, { 0xbc, 0x89, 0xdb, 0x9f, 0xba, 0x61, 0x98, 0x6 }} - ## Tcg addtional services to measure PeImage and ActionString. - ## Include/Protocol/TcgPlatform.h - gEfiTcgPlatformProtocolGuid = { 0x8c4c9a41, 0xbf56, 0x4627, { 0x9e, 0xa, 0xc8, 0x38, 0x6d, 0x66, 0x11, 0x5c }} - ## Fault Tolerant Write protocol provides boot-time service to do fault tolerant write capability for block devices. # Include/Protocol/FaultTolerantWrite.h gEfiFaultTolerantWriteProtocolGuid = { 0x3EBD9E82, 0x2C78, 0x4DE6, { 0x97, 0x86, 0x8D, 0x4B, 0xFC, 0xB7, 0xC8, 0x81 }} diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc index 896656a312..59c33d6c64 100644 --- a/MdeModulePkg/MdeModulePkg.dsc +++ b/MdeModulePkg/MdeModulePkg.dsc @@ -75,7 +75,6 @@ DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf PlatformDriverOverrideLib|MdeModulePkg/Library/DxePlatDriOverLib/DxePlatDriOverLib.inf - OemHookStatusCodeLib|IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf BaseMemoryTestLib|MdeModulePkg/Library/BaseMemoryTestLibNull/BaseMemoryTestLibNull.inf diff --git a/MdeModulePkg/Universal/PCD/Pei/Pcd.inf b/MdeModulePkg/Universal/PCD/Pei/Pcd.inf index 91c38127fd..e667a6c0c3 100644 --- a/MdeModulePkg/Universal/PCD/Pei/Pcd.inf +++ b/MdeModulePkg/Universal/PCD/Pei/Pcd.inf @@ -54,10 +54,10 @@ gEfiPeiReadOnlyVariable2PpiGuid ## CONSUMES gPcdPpiGuid ## PRODUCES -[FeaturePcd.common] +[FeaturePcd] gEfiMdeModulePkgTokenSpaceGuid.PcdPeiFullPcdDatabaseEnable -[FixedPcd.common] +[FixedPcd] gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPcdCallBackNumberPerPcdEntry || PcdPeiFullPcdDatabaseEnable -- 2.39.2