diff options
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]
|