mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +02:00
Updated to support passing PE/COFF and LZMA decompress up via HOBS. Currently turned off.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9887 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
3370d33e8d
commit
ca3ad58bfa
@ -57,7 +57,6 @@
|
|||||||
|
|
||||||
|
|
||||||
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
|
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
|
||||||
PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Uncomment (and comment out the next line) For RealView Debugger. The Standard IO window
|
# Uncomment (and comment out the next line) For RealView Debugger. The Standard IO window
|
||||||
@ -120,6 +119,7 @@
|
|||||||
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
|
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
|
||||||
ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
|
ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
|
||||||
LzmaDecompressLib|IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
|
LzmaDecompressLib|IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
|
||||||
|
PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
|
||||||
|
|
||||||
[LibraryClasses.common.PEI_CORE]
|
[LibraryClasses.common.PEI_CORE]
|
||||||
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
|
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
|
||||||
@ -133,6 +133,8 @@
|
|||||||
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
|
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
|
||||||
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
|
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
|
||||||
DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
|
DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
|
||||||
|
PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
|
||||||
|
# PeCoffLib|EmbeddedPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf
|
||||||
|
|
||||||
[LibraryClasses.common.DXE_DRIVER]
|
[LibraryClasses.common.DXE_DRIVER]
|
||||||
ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
|
ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
|
||||||
@ -154,6 +156,8 @@
|
|||||||
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
|
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
|
||||||
ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
|
ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
|
||||||
CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
|
CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
|
||||||
|
PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
|
||||||
|
# PeCoffLib|EmbeddedPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf
|
||||||
|
|
||||||
|
|
||||||
[LibraryClasses.ARM]
|
[LibraryClasses.ARM]
|
||||||
@ -293,9 +297,7 @@
|
|||||||
gBeagleBoardTokenSpaceGuid.PcdBeagleConsoleUart|3
|
gBeagleBoardTokenSpaceGuid.PcdBeagleConsoleUart|3
|
||||||
|
|
||||||
# Timers
|
# Timers
|
||||||
# gBeagleBoardTokenSpaceGuid.PcdBeagleArchTimer|OMAP3530_GPTIMER3
|
|
||||||
gBeagleBoardTokenSpaceGuid.PcdBeagleArchTimer|3
|
gBeagleBoardTokenSpaceGuid.PcdBeagleArchTimer|3
|
||||||
# gBeagleBoardTokenSpaceGuid.PcdBeagleFreeTimer|OMAP3530_GPTIMER4
|
|
||||||
gBeagleBoardTokenSpaceGuid.PcdBeagleFreeTimer|4
|
gBeagleBoardTokenSpaceGuid.PcdBeagleFreeTimer|4
|
||||||
gEmbeddedTokenSpaceGuid.PcdTimerPeriod|100000
|
gEmbeddedTokenSpaceGuid.PcdTimerPeriod|100000
|
||||||
gEmbeddedTokenSpaceGuid.PcdEmbeddedFdPerformanceCounterPeriodInNanoseconds|77
|
gEmbeddedTokenSpaceGuid.PcdEmbeddedFdPerformanceCounterPeriodInNanoseconds|77
|
||||||
@ -326,6 +328,7 @@
|
|||||||
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
|
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
|
||||||
NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
|
NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
|
||||||
NULL|IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
|
NULL|IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
|
||||||
|
# NULL|EmbeddedPkg/Library/LzmaHobCustomDecompressLib/LzmaHobCustomDecompressLib.inf
|
||||||
}
|
}
|
||||||
|
|
||||||
ArmPkg/Drivers/CpuDxe/CpuDxe.inf
|
ArmPkg/Drivers/CpuDxe/CpuDxe.inf
|
||||||
|
@ -156,9 +156,9 @@ READ_LOCK_STATUS = TRUE
|
|||||||
|
|
||||||
#NOTE: Open source EHCI stack doesn't work on Beagleboard.
|
#NOTE: Open source EHCI stack doesn't work on Beagleboard.
|
||||||
#NOTE: UsbBus and UsbMassStorage don't work using iPhond SDK tool chain.
|
#NOTE: UsbBus and UsbMassStorage don't work using iPhond SDK tool chain.
|
||||||
INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
|
#INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
|
||||||
INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
|
#INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
|
||||||
INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
|
#INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
|
||||||
|
|
||||||
#
|
#
|
||||||
# UEFI application (Shell Embedded Boot Loader)
|
# UEFI application (Shell Embedded Boot Loader)
|
||||||
|
@ -24,9 +24,11 @@
|
|||||||
#include <Library/PeCoffGetEntryPointLib.h>
|
#include <Library/PeCoffGetEntryPointLib.h>
|
||||||
|
|
||||||
#include <Ppi/GuidedSectionExtraction.h>
|
#include <Ppi/GuidedSectionExtraction.h>
|
||||||
|
#include <Guid/LzmaDecompress.h>
|
||||||
#include <Omap3530/Omap3530.h>
|
#include <Omap3530/Omap3530.h>
|
||||||
|
|
||||||
|
#include "LzmaDecompress.h"
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
_ModuleEntryPoint(
|
_ModuleEntryPoint(
|
||||||
@ -260,6 +262,16 @@ CEntryPoint (
|
|||||||
ExtractGuidedSectionLibConstructor();
|
ExtractGuidedSectionLibConstructor();
|
||||||
LzmaDecompressLibConstructor();
|
LzmaDecompressLibConstructor();
|
||||||
|
|
||||||
|
// Build HOBs to pass up our version of stuff the DXE Core needs to save space
|
||||||
|
#if 0
|
||||||
|
BuildPeCoffLoaderHob ();
|
||||||
|
BuildExtractSectionHob (
|
||||||
|
&gLzmaCustomDecompressGuid,
|
||||||
|
LzmaGuidedSectionGetInfo,
|
||||||
|
LzmaGuidedSectionExtraction
|
||||||
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
DecompressFirstFv ();
|
DecompressFirstFv ();
|
||||||
|
|
||||||
// Load the DXE Core and transfer control to it
|
// Load the DXE Core and transfer control to it
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
EmbeddedPkg/EmbeddedPkg.dec
|
EmbeddedPkg/EmbeddedPkg.dec
|
||||||
ArmPkg/ArmPkg.dec
|
ArmPkg/ArmPkg.dec
|
||||||
Omap35xxPkg/Omap35xxPkg.dec
|
Omap35xxPkg/Omap35xxPkg.dec
|
||||||
|
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
BaseLib
|
BaseLib
|
||||||
|
@ -99,7 +99,7 @@ fi
|
|||||||
# Build the edk2 BeagleBoard code
|
# Build the edk2 BeagleBoard code
|
||||||
#
|
#
|
||||||
if [[ $TARGET == RELEASE ]]; then
|
if [[ $TARGET == RELEASE ]]; then
|
||||||
build -p $WORKSPACE/BeagleBoardPkg/BeagleBoardPkg.dsc -a ARM -t $TARGET_TOOLS -b -D DEBUG_TARGET=RELEASE $1 $2 $3 $4 $5 $6 $7 $8
|
build -p $WORKSPACE/BeagleBoardPkg/BeagleBoardPkg.dsc -a ARM -t $TARGET_TOOLS -b $TARGET -D DEBUG_TARGET=RELEASE $2 $3 $4 $5 $6 $7 $8
|
||||||
else
|
else
|
||||||
build -p $WORKSPACE/BeagleBoardPkg/BeagleBoardPkg.dsc -a ARM -t $TARGET_TOOLS -b $TARGET $1 $2 $3 $4 $5 $6 $7 $8
|
build -p $WORKSPACE/BeagleBoardPkg/BeagleBoardPkg.dsc -a ARM -t $TARGET_TOOLS -b $TARGET $1 $2 $3 $4 $5 $6 $7 $8
|
||||||
fi
|
fi
|
||||||
|
@ -22,11 +22,14 @@
|
|||||||
// The GUID for this protocol mathes the Decompression scheme being used
|
// The GUID for this protocol mathes the Decompression scheme being used
|
||||||
// So for example LZMA would be gLzmaCustomDecompressGuid
|
// So for example LZMA would be gLzmaCustomDecompressGuid
|
||||||
//
|
//
|
||||||
|
typedef struct {
|
||||||
|
EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER SectionGetInfo;
|
||||||
|
EXTRACT_GUIDED_SECTION_DECODE_HANDLER SectionExtraction;
|
||||||
|
} EXTRACT_SECTION_DATA;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
EFI_HOB_GUID_TYPE Hob;
|
EFI_HOB_GUID_TYPE Hob;
|
||||||
EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER SectionGetInfo;
|
EXTRACT_SECTION_DATA Data;
|
||||||
EXTRACT_GUIDED_SECTION_DECODE_HANDLER SectionExtraction;
|
|
||||||
} EXTRACT_SECTION_HOB;
|
} EXTRACT_SECTION_HOB;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -678,6 +678,7 @@ BuildExtractSectionHob (
|
|||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
BuildPeCoffLoaderHob (
|
BuildPeCoffLoaderHob (
|
||||||
|
VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
/** @file
|
|
||||||
|
|
||||||
Copyright (c) 2008-2009 Apple Inc. All rights reserved.<BR>
|
|
||||||
|
|
||||||
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 __EXTRACT_SECTION_PROTOCOL_H__
|
|
||||||
#define __EXTRACT_SECTION_PROTOCOL_H__
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// The GUID for this protocol mathes the Decompression scheme being used
|
|
||||||
// So for example LZMA would be gLzmaCustomDecompressGuid
|
|
||||||
//
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
EFI_HOB_GUID_TYPE Hob;
|
|
||||||
EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER SectionGetInfo;
|
|
||||||
EXTRACT_GUIDED_SECTION_DECODE_HANDLER SectionExtraction;
|
|
||||||
} PROTOCOL_HOB;
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
@ -15,6 +15,9 @@
|
|||||||
#ifndef __PE_COFF_LOADER_H__
|
#ifndef __PE_COFF_LOADER_H__
|
||||||
#define __PE_COFF_LOADER_H__
|
#define __PE_COFF_LOADER_H__
|
||||||
|
|
||||||
|
// Needed for PE_COFF_LOADER_IMAGE_CONTEXT
|
||||||
|
#include <Library/PeCoffLib.h>
|
||||||
|
|
||||||
// B323179B-97FB-477E-B0FE-D88591FA11AB
|
// B323179B-97FB-477E-B0FE-D88591FA11AB
|
||||||
#define PE_COFF_LOADER_PROTOCOL_GUID \
|
#define PE_COFF_LOADER_PROTOCOL_GUID \
|
||||||
{ 0xB323179B, 0x97FB, 0x477E, { 0xB0, 0xFE, 0xD8, 0x85, 0x91, 0xFA, 0x11, 0xAB } }
|
{ 0xB323179B, 0x97FB, 0x477E, { 0xB0, 0xFE, 0xD8, 0x85, 0x91, 0xFA, 0x11, 0xAB } }
|
||||||
|
@ -21,6 +21,9 @@
|
|||||||
#include <Protocol/PeCoffLoader.h>
|
#include <Protocol/PeCoffLoader.h>
|
||||||
|
|
||||||
|
|
||||||
|
PE_COFF_LOADER_PROTOCOL *gPeCoffLoader = NULL;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Retrieves information about a PE/COFF image.
|
Retrieves information about a PE/COFF image.
|
||||||
|
|
||||||
@ -167,11 +170,11 @@ PeCoffLoaderImageReadFromMemory (
|
|||||||
OUT VOID *Buffer
|
OUT VOID *Buffer
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return gPeCoffLoader->RelocateImageForRuntime (
|
return gPeCoffLoader->ReadFromMemory (
|
||||||
*FileHandle,
|
FileHandle,
|
||||||
FileOffset,
|
FileOffset,
|
||||||
*ReadSize,
|
ReadSize,
|
||||||
*Buffer
|
Buffer
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -214,7 +217,7 @@ PeCoffLoaderRelocateImageForRuntime (
|
|||||||
ImageBase,
|
ImageBase,
|
||||||
VirtImageBase,
|
VirtImageBase,
|
||||||
ImageSize,
|
ImageSize,
|
||||||
*RelocationData
|
RelocationData
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -244,17 +247,31 @@ PeCoffLoaderUnloadImage (
|
|||||||
return gPeCoffLoader->UnloadImage (ImageContext);
|
return gPeCoffLoader->UnloadImage (ImageContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
EFI_HOB_GUID_TYPE Hob;
|
||||||
|
VOID *Interface;
|
||||||
|
} PROTOCOL_HOB;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Register LzmaDecompress and LzmaDecompressGetInfo handlers with LzmaCustomerDecompressGuid.
|
The constructor function caches the pointer of DXE Services Table.
|
||||||
|
|
||||||
|
The constructor function caches the pointer of DXE Services Table.
|
||||||
|
It will ASSERT() if that operation fails.
|
||||||
|
It will ASSERT() if the pointer of DXE Services Table is NULL.
|
||||||
|
It will always return EFI_SUCCESS.
|
||||||
|
|
||||||
|
@param ImageHandle The firmware allocated handle for the EFI image.
|
||||||
|
@param SystemTable A pointer to the EFI System Table.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
|
||||||
|
|
||||||
@retval RETURN_SUCCESS Register successfully.
|
|
||||||
@retval RETURN_OUT_OF_RESOURCES No enough memory to store this handler.
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
DxeHobPeCoffLibConstructor (
|
DxeHobPeCoffLibConstructor (
|
||||||
|
IN EFI_HANDLE ImageHandle,
|
||||||
|
IN EFI_SYSTEM_TABLE *SystemTable
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
PROTOCOL_HOB *Hob;
|
PROTOCOL_HOB *Hob;
|
||||||
@ -265,6 +282,7 @@ DxeHobPeCoffLibConstructor (
|
|||||||
}
|
}
|
||||||
|
|
||||||
gPeCoffLoader = Hob->Interface;
|
gPeCoffLoader = Hob->Interface;
|
||||||
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
[Defines]
|
[Defines]
|
||||||
INF_VERSION = 0x00010005
|
INF_VERSION = 0x00010005
|
||||||
BASE_NAME = BasePeCoffLib
|
BASE_NAME = DxeHobPeCoffLib
|
||||||
FILE_GUID = 671C6FD7-99FB-4EE3-B640-4B1D463BC3B5
|
FILE_GUID = 671C6FD7-99FB-4EE3-B640-4B1D463BC3B5
|
||||||
MODULE_TYPE = DXE_DRIVER
|
MODULE_TYPE = DXE_DRIVER
|
||||||
VERSION_STRING = 1.0
|
VERSION_STRING = 1.0
|
||||||
@ -34,7 +34,11 @@
|
|||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
|
EmbeddedPkg/EmbeddedPkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
DebugLib
|
DebugLib
|
||||||
|
HobLib
|
||||||
|
|
||||||
|
[Protocols]
|
||||||
|
gPeCoffLoaderProtocolGuid
|
||||||
|
@ -44,7 +44,7 @@ LzmaDecompressLibConstructor (
|
|||||||
|
|
||||||
return ExtractGuidedSectionRegisterHandlers (
|
return ExtractGuidedSectionRegisterHandlers (
|
||||||
&gLzmaCustomDecompressGuid,
|
&gLzmaCustomDecompressGuid,
|
||||||
Hob->SectionGetInfo,
|
Hob->Data.SectionGetInfo,
|
||||||
Hob->SectionExtraction
|
Hob->Data.SectionExtraction
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -818,11 +818,11 @@ BuildExtractSectionHob (
|
|||||||
IN EXTRACT_GUIDED_SECTION_DECODE_HANDLER SectionExtraction
|
IN EXTRACT_GUIDED_SECTION_DECODE_HANDLER SectionExtraction
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EXTRACT_SECTION_HOB Hob;
|
EXTRACT_SECTION_DATA Data;
|
||||||
|
|
||||||
Hob.SectionGetInfo = SectionGetInfo;
|
Data.SectionGetInfo = SectionGetInfo;
|
||||||
Hob.SectionExtraction = SectionExtraction;
|
Data.SectionExtraction = SectionExtraction;
|
||||||
BuildGuidDataHob (Guid, &Hob, sizeof (EXTRACT_SECTION_HOB));
|
BuildGuidDataHob (Guid, &Data, sizeof (Data));
|
||||||
}
|
}
|
||||||
|
|
||||||
PE_COFF_LOADER_PROTOCOL gPeCoffProtocol = {
|
PE_COFF_LOADER_PROTOCOL gPeCoffProtocol = {
|
||||||
@ -834,22 +834,18 @@ PE_COFF_LOADER_PROTOCOL gPeCoffProtocol = {
|
|||||||
PeCoffLoaderUnloadImage
|
PeCoffLoaderUnloadImage
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
EFI_HOB_GUID_TYPE Hob;
|
|
||||||
VOID *Interface;
|
|
||||||
} PROTOCOL_HOB;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
BuildPeCoffLoaderHob (
|
BuildPeCoffLoaderHob (
|
||||||
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
PROTOCOL_HOB Hob;
|
VOID *Ptr;
|
||||||
|
|
||||||
Hob.Interface = &gPeCoffProtocol;
|
Ptr = &gPeCoffProtocol;
|
||||||
BuildGuidDataHob (&gPeCoffLoaderProtocolGuid, &Hob, sizeof (PROTOCOL_HOB));
|
BuildGuidDataHob (&gPeCoffLoaderProtocolGuid, &Ptr, sizeof (VOID *));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user