#include <Library/PeCoffLib.h>\r
#include <Library/PcdLib.h>\r
#include <Library/MemoryAllocationLib.h>\r
+#include <Library/DevicePathLib.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/ReportStatusCodeLib.h>\r
\r
#include "DebugImageInfo.h"\r
#include "Library.h"\r
#include "Gcd.h"\r
#include "Imem.h"\r
#include "Image.h"\r
-#include "Exec.h"\r
-#include "Hand.h"\r
-\r
-\r
-//\r
-// Modifier for EFI DXE Services\r
-//\r
-#define EFI_DXESERVICE\r
+#include "Event.h"\r
+#include "Handle.h"\r
\r
//\r
// attributes for reserved memory before it is promoted to system memory\r
///\r
/// EFI_DEP_REPLACE_TRUE - Used to dynamically patch the dependecy expression\r
/// to save time. A EFI_DEP_PUSH is evauated one an\r
-/// replaced with EFI_DEP_REPLACE_TRUE\r
+/// replaced with EFI_DEP_REPLACE_TRUE. If PI spec's Vol 2\r
+/// Driver Execution Environment Core Interface use 0xff\r
+/// as new DEPEX opcode. EFI_DEP_REPLACE_TRUE should be\r
+/// defined to a new value that is not conflicting with PI spec.\r
///\r
#define EFI_DEP_REPLACE_TRUE 0xff\r
\r
BOOLEAN Present;\r
} ARCHITECTURAL_PROTOCOL_ENTRY;\r
\r
-typedef struct {\r
- EFI_STATUS_CODE_DATA DataHeader;\r
- EFI_HANDLE Handle;\r
-} EFI_DXE_DEVICE_HANDLE_EXTENDED_DATA;\r
-\r
-#define EFI_STATUS_CODE_DXE_CORE_GUID \\r
- { 0x335984bd, 0xe805, 0x409a, { 0xb8, 0xf8, 0xd2, 0x7e, 0xce, 0x5f, 0xf7, 0xa6 } }\r
-\r
//\r
// DXE Dispatcher Data structures\r
//\r
extern EFI_TIMER_ARCH_PROTOCOL *gTimer;\r
extern EFI_SECURITY_ARCH_PROTOCOL *gSecurity;\r
extern EFI_BDS_ARCH_PROTOCOL *gBds;\r
-extern EFI_STATUS_CODE_PROTOCOL *gStatusCode;\r
\r
extern EFI_TPL gEfiCurrentTpl;\r
\r
\r
\r
/**\r
- External function. Initializes the GCD and memory services based on the memory\r
- descriptor HOBs. This function is responsible for priming the GCD map and the\r
- memory map, so memory allocations and resource allocations can be made. The first\r
- part of this function can not depend on any memory services until at least one\r
- memory descriptor is provided to the memory services. Then the memory services\r
- can be used to intialize the GCD map.\r
+ External function. Initializes memory services based on the memory\r
+ descriptor HOBs. This function is responsible for priming the memory\r
+ map, so memory allocations and resource allocations can be made.\r
+ The first part of this function can not depend on any memory services\r
+ until at least one memory descriptor is provided to the memory services.\r
\r
@param HobStart The start address of the HOB.\r
@param MemoryBaseAddress Start address of memory region found to init DXE\r
/**\r
External function. Initializes the GCD and memory services based on the memory\r
descriptor HOBs. This function is responsible for priming the GCD map and the\r
- memory map, so memory allocations and resource allocations can be made. The first\r
- part of this function can not depend on any memory services until at least one\r
- memory descriptor is provided to the memory services. Then the memory services\r
- can be used to intialize the GCD map. The HobStart will be relocated to a pool\r
- buffer.\r
+ memory map, so memory allocations and resource allocations can be made. The\r
+ HobStart will be relocated to a pool buffer.\r
\r
@param HobStart The start address of the HOB\r
@param MemoryBaseAddress Start address of memory region found to init DXE\r
\r
\r
/**\r
- Initializes "event" support and populates parts of the System and Runtime Table.\r
+ Initializes "event" support.\r
\r
@retval EFI_SUCCESS Always return success\r
\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
CoreAddMemorySpace (\r
IN EFI_GCD_MEMORY_TYPE GcdMemoryType,\r
IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
CoreAllocateMemorySpace (\r
IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,\r
IN EFI_GCD_MEMORY_TYPE GcdMemoryType,\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
CoreFreeMemorySpace (\r
IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
IN UINT64 Length\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
CoreRemoveMemorySpace (\r
IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
IN UINT64 Length\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
CoreGetMemorySpaceDescriptor (\r
IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR *Descriptor\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
CoreSetMemorySpaceAttributes (\r
IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
IN UINT64 Length,\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
CoreGetMemorySpaceMap (\r
OUT UINTN *NumberOfDescriptors,\r
OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR **MemorySpaceMap\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
CoreAddIoSpace (\r
IN EFI_GCD_IO_TYPE GcdIoType,\r
IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
CoreAllocateIoSpace (\r
IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,\r
IN EFI_GCD_IO_TYPE GcdIoType,\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
CoreFreeIoSpace (\r
IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
IN UINT64 Length\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
CoreRemoveIoSpace (\r
IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
IN UINT64 Length\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
CoreGetIoSpaceDescriptor (\r
IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
OUT EFI_GCD_IO_SPACE_DESCRIPTOR *Descriptor\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
CoreGetIoSpaceMap (\r
OUT UINTN *NumberOfDescriptors,\r
OUT EFI_GCD_IO_SPACE_DESCRIPTOR **IoSpaceMap\r
\r
**/\r
EFI_STATUS\r
+EFIAPI\r
CoreProcessFirmwareVolume (\r
IN VOID *FvHeader,\r
IN UINTN Size,\r
);\r
\r
\r
-/**\r
- Searches for a Protocol Interface passed from PEI through a HOB.\r
-\r
- @param ProtocolGuid The Protocol GUID to search for in the HOB List\r
- @param Interface A pointer to the interface for the Protocol GUID\r
-\r
- @retval EFI_SUCCESS The Protocol GUID was found and its interface is\r
- returned in Interface\r
- @retval EFI_NOT_FOUND The Protocol GUID was not found in the HOB List\r
-\r
-**/\r
-EFI_STATUS\r
-CoreGetPeiProtocol (\r
- IN EFI_GUID *ProtocolGuid,\r
- IN VOID **Interface\r
- );\r
-\r
-\r
/**\r
Given a compressed source buffer, this function retrieves the size of the\r
uncompressed buffer and the size of the scratch buffer required to decompress\r