summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Dxe/Image
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2008-03-04 09:32:41 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2008-03-04 09:32:41 +0000
commit6cd7b51e48b2387444105f60fd0f5c90e973c297 (patch)
tree6a134d940a775de07b5a222b0adac14227fdcd0a /MdeModulePkg/Core/Dxe/Image
parent49c8e7794efb8e81c65c8195088b65397219bbb6 (diff)
downloadedk2-platforms-6cd7b51e48b2387444105f60fd0f5c90e973c297.tar.xz
Correct the PeImage Source file to be measured by TCG.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4787 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Dxe/Image')
-rw-r--r--MdeModulePkg/Core/Dxe/Image/Image.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c
index 125134dea7..3587460990 100644
--- a/MdeModulePkg/Core/Dxe/Image/Image.c
+++ b/MdeModulePkg/Core/Dxe/Image/Image.c
@@ -208,7 +208,9 @@ Returns:
UINTN Size;
UINTN LinkTimeBase;
EFI_TCG_PLATFORM_PROTOCOL *TcgPlatformProtocol;
+ IMAGE_FILE_HANDLE *FHandle;
+ FHandle = NULL;
ZeroMem (&Image->ImageContext, sizeof (Image->ImageContext));
Image->ImageContext.Handle = Pe32Handle;
@@ -362,17 +364,18 @@ Returns:
NULL,
(VOID **) &TcgPlatformProtocol
);
- if (!EFI_ERROR (Status)) {
+ if (!EFI_ERROR (Status)) {
+ FHandle = (IMAGE_FILE_HANDLE *) Image->ImageContext.Handle;
Status = TcgPlatformProtocol->MeasurePeImage (
BootPolicy,
- Image->ImageContext.ImageAddress,
- (UINTN) Image->ImageContext.ImageSize,
+ (EFI_PHYSICAL_ADDRESS) (UINTN) FHandle->Source,
+ FHandle->SourceSize,
LinkTimeBase,
Image->ImageContext.ImageType,
Image->Info.DeviceHandle,
Image->Info.FilePath
);
-
+
ASSERT_EFI_ERROR (Status);
}