mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
49c8e7794e
commit
6cd7b51e48
|
@ -208,7 +208,9 @@ Returns:
|
||||||
UINTN Size;
|
UINTN Size;
|
||||||
UINTN LinkTimeBase;
|
UINTN LinkTimeBase;
|
||||||
EFI_TCG_PLATFORM_PROTOCOL *TcgPlatformProtocol;
|
EFI_TCG_PLATFORM_PROTOCOL *TcgPlatformProtocol;
|
||||||
|
IMAGE_FILE_HANDLE *FHandle;
|
||||||
|
|
||||||
|
FHandle = NULL;
|
||||||
ZeroMem (&Image->ImageContext, sizeof (Image->ImageContext));
|
ZeroMem (&Image->ImageContext, sizeof (Image->ImageContext));
|
||||||
|
|
||||||
Image->ImageContext.Handle = Pe32Handle;
|
Image->ImageContext.Handle = Pe32Handle;
|
||||||
|
@ -363,10 +365,11 @@ Returns:
|
||||||
(VOID **) &TcgPlatformProtocol
|
(VOID **) &TcgPlatformProtocol
|
||||||
);
|
);
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
|
FHandle = (IMAGE_FILE_HANDLE *) Image->ImageContext.Handle;
|
||||||
Status = TcgPlatformProtocol->MeasurePeImage (
|
Status = TcgPlatformProtocol->MeasurePeImage (
|
||||||
BootPolicy,
|
BootPolicy,
|
||||||
Image->ImageContext.ImageAddress,
|
(EFI_PHYSICAL_ADDRESS) (UINTN) FHandle->Source,
|
||||||
(UINTN) Image->ImageContext.ImageSize,
|
FHandle->SourceSize,
|
||||||
LinkTimeBase,
|
LinkTimeBase,
|
||||||
Image->ImageContext.ImageType,
|
Image->ImageContext.ImageType,
|
||||||
Image->Info.DeviceHandle,
|
Image->Info.DeviceHandle,
|
||||||
|
|
Loading…
Reference in New Issue