Change name to remove Template
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 30 Jan 2010 20:37:50 +0000 (20:37 +0000)
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 30 Jan 2010 20:37:50 +0000 (20:37 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk@9877 6f19259b-4bc3-4df7-8a09-765794883524

edk2/EmbeddedPkg/EmbeddedPkg.dec
edk2/EmbeddedPkg/EmbeddedPkg.dsc
edk2/EmbeddedPkg/Include/Library/PrePiLib.h
edk2/EmbeddedPkg/Library/EblAddExternalCommandLib/EblAddExternalCommandLib.c
edk2/EmbeddedPkg/Library/EblAddExternalCommandLib/EblAddExternalCommandLib.inf
edk2/EmbeddedPkg/Library/PrePiLib/Hob.c
edk2/EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
edk2/EmbeddedPkg/MetronomeDxe/Metronome.c [moved from edk2/EmbeddedPkg/TemplateMetronomeDxe/Metronome.c with 100% similarity]
edk2/EmbeddedPkg/MetronomeDxe/TemplateMetronomeDxe.inf [moved from edk2/EmbeddedPkg/TemplateMetronomeDxe/TemplateMetronomeDxe.inf with 100% similarity]

index a7882ef..4532149 100644 (file)
@@ -55,6 +55,7 @@
   gEmbeddedDeviceGuid =   { 0xbf4b9d10, 0x13ec, 0x43dd, { 0x88, 0x80, 0xe9, 0xb, 0x71, 0x8f, 0x27, 0xde } }\r
   gEmbeddedExternalDeviceProtocolGuid = { 0x735F8C64, 0xD696, 0x44D0, { 0xBD, 0xF2, 0x44, 0x7F, 0xD0, 0x5A, 0x54, 0x06 }}\r
   gEmbeddedGpioProtocolGuid           = { 0x17a0a3d7, 0xc0a5, 0x4635, { 0xbb, 0xd5, 0x07, 0x21, 0x87, 0xdf, 0xe2, 0xee }}\r
+  gPeCoffLoaderProtocolGuid =  { 0xB323179B, 0x97FB, 0x477E, { 0xB0, 0xFE, 0xD8, 0x85, 0x91, 0xFA, 0x11, 0xAB } }\r
   \r
 [PcdsFeatureFlag.common]\r
   gEmbeddedTokenSpaceGuid.PcdEmbeddedMacBoot|FALSE|BOOLEAN|0x00000001\r
index a9ba337..c34b10b 100644 (file)
 [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
   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
   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
index 61c7e4d..3e4e6c0 100644 (file)
@@ -16,6 +16,8 @@
 #ifndef __PRE_PI_LIB_H__
 #define __PRE_PI_LIB_H__
 
+#include <Guid/ExtractSection.h>
+
 /**
   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.
 
index fcb533c..a95de69 100644 (file)
 \r
 **/\r
 \r
-#include <PiDxe.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/EblAddExternalCommandLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
+#include <Uefi.h>\r
 #include <Library/UefiLib.h>\r
-\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/EblAddExternalCommandLib.h>\r
+#include <Protocol/EblAddCommand.h>\r
 \r
 STATIC BOOLEAN   gInstalledCommand = FALSE;\r
 STATIC EFI_EVENT mEblCommandRegistration = NULL;\r
index fbb0212..7cc4556 100644 (file)
 [LibraryClasses]\r
   UefiBootServicesTableLib\r
   UefiLib\r
+  EblAddExternalCommandLib\r
   \r
 [Protocols]\r
+  gEfiEblAddCommandProtocolGuid\r
   \r
 [Guids]\r
  
\ No newline at end of file
index 3c65742..04b49bb 100644 (file)
 **/
 
 #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));  
+}
+
+
+
index 8e4f796..72e41c9 100644 (file)
@@ -65,6 +65,7 @@
 \r
 [Protocols]\r
   gEfiStatusCodeRuntimeProtocolGuid\r
+  gPeCoffLoaderProtocolGuid\r
   \r
 \r
 [FixedPcd.common]\r