]> git.proxmox.com Git - mirror_edk2.git/commitdiff
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/edk2@9877 6f19259b-4bc3-4df7-8a09-765794883524

EmbeddedPkg/EmbeddedPkg.dec
EmbeddedPkg/EmbeddedPkg.dsc
EmbeddedPkg/Include/Library/PrePiLib.h
EmbeddedPkg/Library/EblAddExternalCommandLib/EblAddExternalCommandLib.c
EmbeddedPkg/Library/EblAddExternalCommandLib/EblAddExternalCommandLib.inf
EmbeddedPkg/Library/PrePiLib/Hob.c
EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
EmbeddedPkg/MetronomeDxe/Metronome.c [new file with mode: 0644]
EmbeddedPkg/MetronomeDxe/TemplateMetronomeDxe.inf [new file with mode: 0644]
EmbeddedPkg/TemplateMetronomeDxe/Metronome.c [deleted file]
EmbeddedPkg/TemplateMetronomeDxe/TemplateMetronomeDxe.inf [deleted file]

index a7882ef4f308fd1355632f15387f912e4197fb01..45321491201e579d188e00b1911e16486a63f110 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 a9ba337307281c952085ac8e1d4f28e5e34a7cfd..c34b10b32b229ca4a853bb797fdcd80e3c76c1eb 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 61c7e4d7acb48d851e85e3aff892528f45ca918d..3e4e6c023d4f7cfaaba1467cd998759b4fbdd7a2 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 fcb533c8b7b7a49b4ea477dfedc353d037b1cb18..a95de6919042f014aa40339729c57c0d9a7e938d 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 fbb021283e39a451e9aad9d171d253237a657655..7cc4556825b5d115361b12d7cb6b85f19569f8fd 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 3c6574282cf31027dc0e57ca1f054aad42b2e2e1..04b49bb044be1623c1b4dc0d9e409d18a5ee6241 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 8e4f796bb203efc4ed09ead171069416966adf8c..72e41c999ff34e4bee4df08f41e97da06797714e 100644 (file)
@@ -65,6 +65,7 @@
 \r
 [Protocols]\r
   gEfiStatusCodeRuntimeProtocolGuid\r
+  gPeCoffLoaderProtocolGuid\r
   \r
 \r
 [FixedPcd.common]\r
diff --git a/EmbeddedPkg/MetronomeDxe/Metronome.c b/EmbeddedPkg/MetronomeDxe/Metronome.c
new file mode 100644 (file)
index 0000000..861bf24
--- /dev/null
@@ -0,0 +1,132 @@
+/** @file\r
+\r
+  Copyright (c) 2008-2009, Apple Inc. All rights reserved.\r
+  \r
+  All rights reserved. This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#include <PiDxe.h>\r
+\r
+#include <Library/BaseLib.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/UefiLib.h>\r
+#include <Library/PcdLib.h>\r
+#include <Library/TimerLib.h>\r
+\r
+#include <Protocol/Metronome.h>\r
+\r
+\r
+\r
+/**\r
+  The WaitForTick() function waits for the number of ticks specified by \r
+  TickNumber from a known time source in the platform.  If TickNumber of \r
+  ticks are detected, then EFI_SUCCESS is returned.  The actual time passed \r
+  between entry of this function and the first tick is between 0 and \r
+  TickPeriod 100 nS units.  If you want to guarantee that at least TickPeriod \r
+  time has elapsed, wait for two ticks.  This function waits for a hardware \r
+  event to determine when a tick occurs.  It is possible for interrupt \r
+  processing, or exception processing to interrupt the execution of the \r
+  WaitForTick() function.  Depending on the hardware source for the ticks, it \r
+  is possible for a tick to be missed.  This function cannot guarantee that \r
+  ticks will not be missed.  If a timeout occurs waiting for the specified \r
+  number of ticks, then EFI_TIMEOUT is returned.\r
+\r
+  @param  This             The EFI_METRONOME_ARCH_PROTOCOL instance.\r
+  @param  TickNumber       Number of ticks to wait.\r
+\r
+  @retval EFI_SUCCESS           The wait for the number of ticks specified by TickNumber\r
+                                succeeded.\r
+  @retval EFI_TIMEOUT           A timeout occurred waiting for the specified number of ticks.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+WaitForTick (\r
+  IN EFI_METRONOME_ARCH_PROTOCOL  *This,\r
+  IN UINT32                       TickNumber\r
+  )\r
+{\r
+  //\r
+  // Fill me in\r
+  //\r
+  MicroSecondDelay (10 * TickNumber);\r
+  return EFI_UNSUPPORTED;\r
+}\r
+\r
+\r
+\r
+/**\r
+  Interface stucture for the Metronome Architectural Protocol.\r
+\r
+  @par Protocol Description:\r
+  This protocol provides access to a known time source in the platform to the\r
+  core.  The core uses this known time source to produce core services that \r
+  require calibrated delays.  \r
+\r
+  @param WaitForTick\r
+  Waits for a specified number of ticks from a known time source \r
+  in the platform.  The actual time passed between entry of this \r
+  function and the first tick is between 0 and TickPeriod 100 nS \r
+  units.  If you want to guarantee that at least TickPeriod time \r
+  has elapsed, wait for two ticks.\r
+\r
+  @param TickPeriod\r
+  The period of platform's known time source in 100 nS units.  \r
+  This value on any platform must be at least 10 uS, and must not \r
+  exceed 200 uS.  The value in this field is a constant that must \r
+  not be modified after the Metronome architectural protocol is \r
+  installed.  All consumers must treat this as a read-only field.\r
+\r
+**/\r
+EFI_METRONOME_ARCH_PROTOCOL gMetronome = {\r
+  WaitForTick,\r
+  100              \r
+};\r
+\r
+\r
+EFI_HANDLE  gMetronomeHandle = NULL;\r
+\r
+\r
+\r
+/**\r
+  Initialize the state information for the CPU Architectural Protocol\r
+\r
+  @param  ImageHandle   of the loaded driver\r
+  @param  SystemTable   Pointer to the System Table\r
+\r
+  @retval EFI_SUCCESS           Protocol registered\r
+  @retval EFI_OUT_OF_RESOURCES  Cannot allocate protocol data structure\r
+  @retval EFI_DEVICE_ERROR      Hardware problems\r
+\r
+**/\r
+EFI_STATUS\r
+MetronomeInitialize (\r
+  IN EFI_HANDLE         ImageHandle,\r
+  IN EFI_SYSTEM_TABLE   *SystemTable\r
+  )\r
+{\r
+  EFI_STATUS  Status;\r
+  \r
+  //\r
+  // Do any hardware init required to make WaitForTick () to work here.\r
+  //\r
+\r
+  Status = gBS->InstallMultipleProtocolInterfaces (\r
+                  &gMetronomeHandle,\r
+                  &gEfiMetronomeArchProtocolGuid,   &gMetronome,\r
+                  NULL\r
+                  );\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  return Status;\r
+}\r
+\r
diff --git a/EmbeddedPkg/MetronomeDxe/TemplateMetronomeDxe.inf b/EmbeddedPkg/MetronomeDxe/TemplateMetronomeDxe.inf
new file mode 100644 (file)
index 0000000..698b17c
--- /dev/null
@@ -0,0 +1,49 @@
+#/** @file\r
+#  \r
+#    Component discription file for Bds module\r
+#\r
+#  Copyright (c) 2008, Apple, Inc <BR>\r
+#  All rights reserved. This program and the accompanying materials\r
+#  are licensed and made available under the terms and conditions of the BSD License\r
+#  which accompanies this distribution.  The full text of the license may be found at\r
+#  http://opensource.org/licenses/bsd-license.php\r
+#  \r
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#  \r
+#**/\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = TemplateMetronomeDxe\r
+  FILE_GUID                      = 4C6E0267-C77D-410D-8100-1495911A989D\r
+  MODULE_TYPE                    = DXE_DRIVER\r
+  VERSION_STRING                 = 1.0\r
+\r
+  ENTRY_POINT                    = MetronomeInitialize\r
+\r
+\r
+[Sources.common]\r
+  Metronome.c\r
+\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+\r
+[LibraryClasses]\r
+  BaseLib\r
+  UefiLib\r
+  UefiBootServicesTableLib\r
+  DebugLib\r
+  PrintLib\r
+  UefiDriverEntryPoint\r
+  TimerLib\r
+\r
+[Guids]\r
+  \r
+\r
+[Protocols]\r
+  gEfiMetronomeArchProtocolGuid                       \r
+\r
+[depex]\r
+  TRUE\r
diff --git a/EmbeddedPkg/TemplateMetronomeDxe/Metronome.c b/EmbeddedPkg/TemplateMetronomeDxe/Metronome.c
deleted file mode 100644 (file)
index 861bf24..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/** @file\r
-\r
-  Copyright (c) 2008-2009, Apple Inc. All rights reserved.\r
-  \r
-  All rights reserved. This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <PiDxe.h>\r
-\r
-#include <Library/BaseLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/UefiLib.h>\r
-#include <Library/PcdLib.h>\r
-#include <Library/TimerLib.h>\r
-\r
-#include <Protocol/Metronome.h>\r
-\r
-\r
-\r
-/**\r
-  The WaitForTick() function waits for the number of ticks specified by \r
-  TickNumber from a known time source in the platform.  If TickNumber of \r
-  ticks are detected, then EFI_SUCCESS is returned.  The actual time passed \r
-  between entry of this function and the first tick is between 0 and \r
-  TickPeriod 100 nS units.  If you want to guarantee that at least TickPeriod \r
-  time has elapsed, wait for two ticks.  This function waits for a hardware \r
-  event to determine when a tick occurs.  It is possible for interrupt \r
-  processing, or exception processing to interrupt the execution of the \r
-  WaitForTick() function.  Depending on the hardware source for the ticks, it \r
-  is possible for a tick to be missed.  This function cannot guarantee that \r
-  ticks will not be missed.  If a timeout occurs waiting for the specified \r
-  number of ticks, then EFI_TIMEOUT is returned.\r
-\r
-  @param  This             The EFI_METRONOME_ARCH_PROTOCOL instance.\r
-  @param  TickNumber       Number of ticks to wait.\r
-\r
-  @retval EFI_SUCCESS           The wait for the number of ticks specified by TickNumber\r
-                                succeeded.\r
-  @retval EFI_TIMEOUT           A timeout occurred waiting for the specified number of ticks.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-WaitForTick (\r
-  IN EFI_METRONOME_ARCH_PROTOCOL  *This,\r
-  IN UINT32                       TickNumber\r
-  )\r
-{\r
-  //\r
-  // Fill me in\r
-  //\r
-  MicroSecondDelay (10 * TickNumber);\r
-  return EFI_UNSUPPORTED;\r
-}\r
-\r
-\r
-\r
-/**\r
-  Interface stucture for the Metronome Architectural Protocol.\r
-\r
-  @par Protocol Description:\r
-  This protocol provides access to a known time source in the platform to the\r
-  core.  The core uses this known time source to produce core services that \r
-  require calibrated delays.  \r
-\r
-  @param WaitForTick\r
-  Waits for a specified number of ticks from a known time source \r
-  in the platform.  The actual time passed between entry of this \r
-  function and the first tick is between 0 and TickPeriod 100 nS \r
-  units.  If you want to guarantee that at least TickPeriod time \r
-  has elapsed, wait for two ticks.\r
-\r
-  @param TickPeriod\r
-  The period of platform's known time source in 100 nS units.  \r
-  This value on any platform must be at least 10 uS, and must not \r
-  exceed 200 uS.  The value in this field is a constant that must \r
-  not be modified after the Metronome architectural protocol is \r
-  installed.  All consumers must treat this as a read-only field.\r
-\r
-**/\r
-EFI_METRONOME_ARCH_PROTOCOL gMetronome = {\r
-  WaitForTick,\r
-  100              \r
-};\r
-\r
-\r
-EFI_HANDLE  gMetronomeHandle = NULL;\r
-\r
-\r
-\r
-/**\r
-  Initialize the state information for the CPU Architectural Protocol\r
-\r
-  @param  ImageHandle   of the loaded driver\r
-  @param  SystemTable   Pointer to the System Table\r
-\r
-  @retval EFI_SUCCESS           Protocol registered\r
-  @retval EFI_OUT_OF_RESOURCES  Cannot allocate protocol data structure\r
-  @retval EFI_DEVICE_ERROR      Hardware problems\r
-\r
-**/\r
-EFI_STATUS\r
-MetronomeInitialize (\r
-  IN EFI_HANDLE         ImageHandle,\r
-  IN EFI_SYSTEM_TABLE   *SystemTable\r
-  )\r
-{\r
-  EFI_STATUS  Status;\r
-  \r
-  //\r
-  // Do any hardware init required to make WaitForTick () to work here.\r
-  //\r
-\r
-  Status = gBS->InstallMultipleProtocolInterfaces (\r
-                  &gMetronomeHandle,\r
-                  &gEfiMetronomeArchProtocolGuid,   &gMetronome,\r
-                  NULL\r
-                  );\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  return Status;\r
-}\r
-\r
diff --git a/EmbeddedPkg/TemplateMetronomeDxe/TemplateMetronomeDxe.inf b/EmbeddedPkg/TemplateMetronomeDxe/TemplateMetronomeDxe.inf
deleted file mode 100644 (file)
index 698b17c..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#/** @file\r
-#  \r
-#    Component discription file for Bds module\r
-#\r
-#  Copyright (c) 2008, Apple, Inc <BR>\r
-#  All rights reserved. This program and the accompanying materials\r
-#  are licensed and made available under the terms and conditions of the BSD License\r
-#  which accompanies this distribution.  The full text of the license may be found at\r
-#  http://opensource.org/licenses/bsd-license.php\r
-#  \r
-#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#  \r
-#**/\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = TemplateMetronomeDxe\r
-  FILE_GUID                      = 4C6E0267-C77D-410D-8100-1495911A989D\r
-  MODULE_TYPE                    = DXE_DRIVER\r
-  VERSION_STRING                 = 1.0\r
-\r
-  ENTRY_POINT                    = MetronomeInitialize\r
-\r
-\r
-[Sources.common]\r
-  Metronome.c\r
-\r
-\r
-[Packages]\r
-  MdePkg/MdePkg.dec\r
-\r
-[LibraryClasses]\r
-  BaseLib\r
-  UefiLib\r
-  UefiBootServicesTableLib\r
-  DebugLib\r
-  PrintLib\r
-  UefiDriverEntryPoint\r
-  TimerLib\r
-\r
-[Guids]\r
-  \r
-\r
-[Protocols]\r
-  gEfiMetronomeArchProtocolGuid                       \r
-\r
-[depex]\r
-  TRUE\r