diff options
author | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-01-30 20:37:50 +0000 |
---|---|---|
committer | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-01-30 20:37:50 +0000 |
commit | e4dbec73c5f31286bb1645465d87a65793cfadce (patch) | |
tree | 28842ef3bc15b99419bdd76ebf295cb31dbdf5b9 /EmbeddedPkg/Library | |
parent | 76a689b57344bb915be03e2b27dc432eec7c03b5 (diff) | |
download | edk2-platforms-e4dbec73c5f31286bb1645465d87a65793cfadce.tar.xz |
Change name to remove Template
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9877 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EmbeddedPkg/Library')
4 files changed, 55 insertions, 5 deletions
diff --git a/EmbeddedPkg/Library/EblAddExternalCommandLib/EblAddExternalCommandLib.c b/EmbeddedPkg/Library/EblAddExternalCommandLib/EblAddExternalCommandLib.c index fcb533c8b7..a95de69190 100644 --- a/EmbeddedPkg/Library/EblAddExternalCommandLib/EblAddExternalCommandLib.c +++ b/EmbeddedPkg/Library/EblAddExternalCommandLib/EblAddExternalCommandLib.c @@ -15,12 +15,11 @@ **/
-#include <PiDxe.h>
-#include <Library/BaseLib.h>
-#include <Library/EblAddExternalCommandLib.h>
-#include <Library/UefiBootServicesTableLib.h>
+#include <Uefi.h>
#include <Library/UefiLib.h>
-
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/EblAddExternalCommandLib.h>
+#include <Protocol/EblAddCommand.h>
STATIC BOOLEAN gInstalledCommand = FALSE;
STATIC EFI_EVENT mEblCommandRegistration = NULL;
diff --git a/EmbeddedPkg/Library/EblAddExternalCommandLib/EblAddExternalCommandLib.inf b/EmbeddedPkg/Library/EblAddExternalCommandLib/EblAddExternalCommandLib.inf index fbb021283e..7cc4556825 100644 --- a/EmbeddedPkg/Library/EblAddExternalCommandLib/EblAddExternalCommandLib.inf +++ b/EmbeddedPkg/Library/EblAddExternalCommandLib/EblAddExternalCommandLib.inf @@ -39,8 +39,10 @@ [LibraryClasses]
UefiBootServicesTableLib
UefiLib
+ EblAddExternalCommandLib
[Protocols]
+ gEfiEblAddCommandProtocolGuid
[Guids]
\ No newline at end of file diff --git a/EmbeddedPkg/Library/PrePiLib/Hob.c b/EmbeddedPkg/Library/PrePiLib/Hob.c index 3c6574282c..04b49bb044 100644 --- a/EmbeddedPkg/Library/PrePiLib/Hob.c +++ b/EmbeddedPkg/Library/PrePiLib/Hob.c @@ -13,7 +13,10 @@ **/ #include <PrePi.h> +#include <Protocol/PeCoffLoader.h> +#include <Guid/ExtractSection.h> #include <Guid/MemoryTypeInformation.h> +#include <Library/PeCoffLib.H> // // Have to use build system to set the original value in case we are running @@ -806,3 +809,48 @@ BuildMemoryAllocationHob ( } + +VOID +EFIAPI +BuildExtractSectionHob ( + IN EFI_GUID *Guid, + IN EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER SectionGetInfo, + IN EXTRACT_GUIDED_SECTION_DECODE_HANDLER SectionExtraction + ) +{ + EXTRACT_SECTION_HOB Hob; + + Hob.SectionGetInfo = SectionGetInfo; + Hob.SectionExtraction = SectionExtraction; + BuildGuidDataHob (Guid, &Hob, sizeof (EXTRACT_SECTION_HOB)); +} + +PE_COFF_LOADER_PROTOCOL gPeCoffProtocol = { + PeCoffLoaderGetImageInfo, + PeCoffLoaderLoadImage, + PeCoffLoaderRelocateImage, + PeCoffLoaderImageReadFromMemory, + PeCoffLoaderRelocateImageForRuntime, + PeCoffLoaderUnloadImage +}; + +typedef struct { + EFI_HOB_GUID_TYPE Hob; + VOID *Interface; +} PROTOCOL_HOB; + + + +VOID +EFIAPI +BuildPeCoffLoaderHob ( + ) +{ + PROTOCOL_HOB Hob; + + Hob.Interface = &gPeCoffProtocol; + BuildGuidDataHob (&gPeCoffLoaderProtocolGuid, &Hob, sizeof (PROTOCOL_HOB)); +} + + + diff --git a/EmbeddedPkg/Library/PrePiLib/PrePiLib.inf b/EmbeddedPkg/Library/PrePiLib/PrePiLib.inf index 8e4f796bb2..72e41c999f 100644 --- a/EmbeddedPkg/Library/PrePiLib/PrePiLib.inf +++ b/EmbeddedPkg/Library/PrePiLib/PrePiLib.inf @@ -65,6 +65,7 @@ [Protocols]
gEfiStatusCodeRuntimeProtocolGuid
+ gPeCoffLoaderProtocolGuid
[FixedPcd.common]
|