From e4dbec73c5f31286bb1645465d87a65793cfadce Mon Sep 17 00:00:00 2001 From: andrewfish Date: Sat, 30 Jan 2010 20:37:50 +0000 Subject: [PATCH 1/1] Change name to remove Template git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9877 6f19259b-4bc3-4df7-8a09-765794883524 --- EmbeddedPkg/EmbeddedPkg.dec | 1 + EmbeddedPkg/EmbeddedPkg.dsc | 9 ++-- EmbeddedPkg/Include/Library/PrePiLib.h | 16 +++++++ .../EblAddExternalCommandLib.c | 9 ++-- .../EblAddExternalCommandLib.inf | 2 + EmbeddedPkg/Library/PrePiLib/Hob.c | 48 +++++++++++++++++++ EmbeddedPkg/Library/PrePiLib/PrePiLib.inf | 1 + .../Metronome.c | 0 .../TemplateMetronomeDxe.inf | 0 9 files changed, 77 insertions(+), 9 deletions(-) rename EmbeddedPkg/{TemplateMetronomeDxe => MetronomeDxe}/Metronome.c (100%) rename EmbeddedPkg/{TemplateMetronomeDxe => MetronomeDxe}/TemplateMetronomeDxe.inf (100%) diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec index a7882ef4f3..4532149120 100644 --- a/EmbeddedPkg/EmbeddedPkg.dec +++ b/EmbeddedPkg/EmbeddedPkg.dec @@ -55,6 +55,7 @@ gEmbeddedDeviceGuid = { 0xbf4b9d10, 0x13ec, 0x43dd, { 0x88, 0x80, 0xe9, 0xb, 0x71, 0x8f, 0x27, 0xde } } gEmbeddedExternalDeviceProtocolGuid = { 0x735F8C64, 0xD696, 0x44D0, { 0xBD, 0xF2, 0x44, 0x7F, 0xD0, 0x5A, 0x54, 0x06 }} gEmbeddedGpioProtocolGuid = { 0x17a0a3d7, 0xc0a5, 0x4635, { 0xbb, 0xd5, 0x07, 0x21, 0x87, 0xdf, 0xe2, 0xee }} + gPeCoffLoaderProtocolGuid = { 0xB323179B, 0x97FB, 0x477E, { 0xB0, 0xFE, 0xD8, 0x85, 0x91, 0xFA, 0x11, 0xAB } } [PcdsFeatureFlag.common] gEmbeddedTokenSpaceGuid.PcdEmbeddedMacBoot|FALSE|BOOLEAN|0x00000001 diff --git a/EmbeddedPkg/EmbeddedPkg.dsc b/EmbeddedPkg/EmbeddedPkg.dsc index a9ba337307..c34b10b32b 100644 --- a/EmbeddedPkg/EmbeddedPkg.dsc +++ b/EmbeddedPkg/EmbeddedPkg.dsc @@ -117,6 +117,10 @@ [LibraryClasses.ARM] SemihostLib|ArmPkg/Library/SemihostLib/SemihostLib.inf +[LibraryClasses.ARM] + NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + + ################################################################################ # # Pcd Section - list of all PCD Entries defined by this Platform @@ -242,9 +246,7 @@ EmbeddedPkg/Library/TemplateSerialPortLib/TemplateSerialPortLib.inf EmbeddedPkg/Library/TemplateResetSystemLib/TemplateResetSystemLib.inf EmbeddedPkg/Library/TemplateRealTimeClockLib/TemplateRealTimeClockLib.inf - -####ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.inf ??? - + EmbeddedPkg/Library/LzmaHobCustomDecompressLib/LzmaHobCustomDecompressLib.inf EmbeddedPkg/Ebl/Ebl.inf #### EmbeddedPkg/EblExternCmd/EblExternCmd.inf @@ -255,7 +257,6 @@ EmbeddedPkg/SerialDxe/SerialDxe.inf EmbeddedPkg/SimpleTextInOutSerial/SimpleTextInOutSerial.inf EmbeddedPkg/TemplateBds/TemplateBds.inf - EmbeddedPkg/TemplateCpuDxe/TemplateCpuDxe.inf EmbeddedPkg/TemplateMetronomeDxe/TemplateMetronomeDxe.inf EmbeddedPkg/TemplateSec/TemplateSec.inf EmbeddedPkg/TemplateTimerDxe/TemplateTimerDxe.inf diff --git a/EmbeddedPkg/Include/Library/PrePiLib.h b/EmbeddedPkg/Include/Library/PrePiLib.h index 61c7e4d7ac..3e4e6c023d 100644 --- a/EmbeddedPkg/Include/Library/PrePiLib.h +++ b/EmbeddedPkg/Include/Library/PrePiLib.h @@ -16,6 +16,8 @@ #ifndef __PRE_PI_LIB_H__ #define __PRE_PI_LIB_H__ +#include + /** This service enables discovery of additional firmware volumes. @@ -665,6 +667,20 @@ BuildMemoryAllocationHob ( ); +VOID +EFIAPI +BuildExtractSectionHob ( + IN EFI_GUID *Guid, + IN EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER SectionGetInfo, + IN EXTRACT_GUIDED_SECTION_DECODE_HANDLER SectionExtraction + ); + +VOID +EFIAPI +BuildPeCoffLoaderHob ( + ); + + /** Allocates one or more 4KB pages of type EfiBootServicesData. 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 -#include -#include -#include +#include #include - +#include +#include +#include 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 +#include +#include #include +#include // // 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] diff --git a/EmbeddedPkg/TemplateMetronomeDxe/Metronome.c b/EmbeddedPkg/MetronomeDxe/Metronome.c similarity index 100% rename from EmbeddedPkg/TemplateMetronomeDxe/Metronome.c rename to EmbeddedPkg/MetronomeDxe/Metronome.c diff --git a/EmbeddedPkg/TemplateMetronomeDxe/TemplateMetronomeDxe.inf b/EmbeddedPkg/MetronomeDxe/TemplateMetronomeDxe.inf similarity index 100% rename from EmbeddedPkg/TemplateMetronomeDxe/TemplateMetronomeDxe.inf rename to EmbeddedPkg/MetronomeDxe/TemplateMetronomeDxe.inf -- 2.39.2