\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
//\r
// Global stack used to evaluate dependency expressions\r
Size = Size + (mDepexEvaluationStackEnd - mDepexEvaluationStack);\r
}\r
\r
- NewStack = CoreAllocateBootServicesPool (Size * sizeof (BOOLEAN));\r
+ NewStack = AllocatePool (Size * sizeof (BOOLEAN));\r
if (NewStack == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
//\r
// Free The Old Stack\r
//\r
- CoreFreePool (mDepexEvaluationStack);\r
+ FreePool (mDepexEvaluationStack);\r
}\r
\r
//\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
//\r
// The Driver List contains one copy of every driver that has been discovered.\r
{\r
KNOWN_HANDLE *KnownHandle;\r
\r
- KnownHandle = CoreAllocateBootServicesPool (sizeof (KNOWN_HANDLE));\r
+ KnownHandle = AllocatePool (sizeof (KNOWN_HANDLE));\r
ASSERT (KnownHandle != NULL);\r
\r
KnownHandle->Signature = KNOWN_HANDLE_SIGNATURE;\r
mFvDevicePath.End.SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE;\r
SetDevicePathNodeLength (&mFvDevicePath.End, sizeof (EFI_DEVICE_PATH_PROTOCOL));\r
\r
- FileNameDevicePath = CoreAppendDevicePath (\r
+ FileNameDevicePath = AppendDevicePath (\r
FvDevicePath,\r
(EFI_DEVICE_PATH_PROTOCOL *)&mFvDevicePath\r
);\r
// Create the Driver Entry for the list. ZeroPool initializes lots of variables to\r
// NULL or FALSE.\r
//\r
- DriverEntry = CoreAllocateZeroBootServicesPool (sizeof (EFI_CORE_DRIVER_ENTRY));\r
+ DriverEntry = AllocateZeroPool (sizeof (EFI_CORE_DRIVER_ENTRY));\r
ASSERT (DriverEntry != NULL);\r
\r
DriverEntry->Signature = EFI_CORE_DRIVER_ENTRY_SIGNATURE;\r
// ReadSection or Produce FVB failed, Free data buffer\r
//\r
if (Buffer != NULL) {\r
- CoreFreePool (Buffer);\r
+ FreePool (Buffer);\r
}\r
\r
if (AlignedBuffer != NULL) {\r
mFvDevicePath.End.SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE;\r
SetDevicePathNodeLength (&mFvDevicePath.End, sizeof (EFI_DEVICE_PATH_PROTOCOL));\r
\r
- gDxeCoreLoadedImage->FilePath = CoreDuplicateDevicePath (\r
+ gDxeCoreLoadedImage->FilePath = DuplicateDevicePath (\r
(EFI_DEVICE_PATH_PROTOCOL *)&mFvDevicePath\r
);\r
gDxeCoreLoadedImage->DeviceHandle = FvHandle;\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
//\r
// DXE Core Global Variables for Protocols from PEI\r
// Allocate the EFI System Table and EFI Runtime Service Table from EfiRuntimeServicesData\r
// Use the templates to initialize the contents of the EFI System Table and EFI Runtime Services Table\r
//\r
- gDxeCoreST = CoreAllocateRuntimeCopyPool (sizeof (EFI_SYSTEM_TABLE), &mEfiSystemTableTemplate);\r
+ gDxeCoreST = AllocateRuntimeCopyPool (sizeof (EFI_SYSTEM_TABLE), &mEfiSystemTableTemplate);\r
ASSERT (gDxeCoreST != NULL);\r
\r
- gDxeCoreRT = CoreAllocateRuntimeCopyPool (sizeof (EFI_RUNTIME_SERVICES), &mEfiRuntimeServicesTableTemplate);\r
+ gDxeCoreRT = AllocateRuntimeCopyPool (sizeof (EFI_RUNTIME_SERVICES), &mEfiRuntimeServicesTableTemplate);\r
ASSERT (gDxeCoreRT != NULL);\r
\r
gDxeCoreST->RuntimeServices = gDxeCoreRT;\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
\r
//\r
**/\r
\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
//\r
// Enumerate the valid types\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
\r
//\r
**/\r
\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
//\r
// Internal prototypes\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
\r
/**\r
**/\r
\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
\r
/**\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
#define KEYSIZE sizeof (UINTN)\r
\r
//\r
// Allocate a buffer for the caller\r
//\r
- *FwVolHeader = CoreAllocateBootServicesPool (TempFvh.HeaderLength);\r
+ *FwVolHeader = AllocatePool (TempFvh.HeaderLength);\r
if (*FwVolHeader == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
// the header to check to make sure the volume is valid\r
//\r
Size = (UINTN)(FwVolHeader->FvLength - FwVolHeader->HeaderLength);\r
- FvDevice->CachedFv = CoreAllocateBootServicesPool (Size);\r
+ FvDevice->CachedFv = AllocatePool (Size);\r
\r
if (FvDevice->CachedFv == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
//\r
// Create a FFS list entry for each non-deleted file\r
//\r
- FfsFileEntry = CoreAllocateZeroBootServicesPool (sizeof (FFS_FILE_LIST_ENTRY));\r
+ FfsFileEntry = AllocateZeroPool (sizeof (FFS_FILE_LIST_ENTRY));\r
if (FfsFileEntry == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
goto Done;\r
//\r
// No FwVol protocol on the handle so create a new one\r
//\r
- FvDevice = CoreAllocateCopyPool (sizeof (FV_DEVICE), &mFvDevice);\r
+ FvDevice = AllocateCopyPool (sizeof (FV_DEVICE), &mFvDevice);\r
if (FvDevice == NULL) {\r
return;\r
}\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
\r
/**\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
/*++\r
\r
//\r
// Caller passed in a pointer so allocate buffer for them\r
//\r
- *Buffer = CoreAllocateBootServicesPool (FileSize);\r
+ *Buffer = AllocatePool (FileSize);\r
if (*Buffer == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
\r
\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
\r
EFI_FW_VOL_BLOCK_DEVICE mFwVolBlock = {\r
//\r
// Allocate EFI_FW_VOL_BLOCK_DEVICE\r
//\r
- FvbDev = CoreAllocateCopyPool (sizeof (EFI_FW_VOL_BLOCK_DEVICE), &mFwVolBlock);\r
+ FvbDev = AllocateCopyPool (sizeof (EFI_FW_VOL_BLOCK_DEVICE), &mFwVolBlock);\r
if (FvbDev == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
//\r
// Second, allocate the cache\r
//\r
- FvbDev->LbaCache = CoreAllocateBootServicesPool (FvbDev->NumBlocks * sizeof (LBA_CACHE));\r
+ FvbDev->LbaCache = AllocatePool (FvbDev->NumBlocks * sizeof (LBA_CACHE));\r
if (FvbDev->LbaCache == NULL) {\r
CoreFreePool (FvbDev);\r
return EFI_OUT_OF_RESOURCES;\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
#define MINIMUM_INITIAL_MEMORY_SIZE 0x10000\r
\r
IN OUT EFI_GCD_MAP_ENTRY **BottomEntry\r
)\r
{\r
- *TopEntry = CoreAllocateZeroBootServicesPool (sizeof (EFI_GCD_MAP_ENTRY));\r
+ *TopEntry = AllocateZeroPool (sizeof (EFI_GCD_MAP_ENTRY));\r
if (*TopEntry == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
- *BottomEntry = CoreAllocateZeroBootServicesPool (sizeof (EFI_GCD_MAP_ENTRY));\r
+ *BottomEntry = AllocateZeroPool (sizeof (EFI_GCD_MAP_ENTRY));\r
if (*BottomEntry == NULL) {\r
CoreFreePool (*TopEntry);\r
return EFI_OUT_OF_RESOURCES;\r
//\r
// Allocate the MemorySpaceMap\r
//\r
- *MemorySpaceMap = CoreAllocateBootServicesPool (*NumberOfDescriptors * sizeof (EFI_GCD_MEMORY_SPACE_DESCRIPTOR));\r
+ *MemorySpaceMap = AllocatePool (*NumberOfDescriptors * sizeof (EFI_GCD_MEMORY_SPACE_DESCRIPTOR));\r
if (*MemorySpaceMap == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
goto Done;\r
//\r
// Allocate the IoSpaceMap\r
//\r
- *IoSpaceMap = CoreAllocateBootServicesPool (*NumberOfDescriptors * sizeof (EFI_GCD_IO_SPACE_DESCRIPTOR));\r
+ *IoSpaceMap = AllocatePool (*NumberOfDescriptors * sizeof (EFI_GCD_IO_SPACE_DESCRIPTOR));\r
if (*IoSpaceMap == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
goto Done;\r
//\r
// Initialize the GCD Memory Space Map\r
//\r
- Entry = CoreAllocateCopyPool (sizeof (EFI_GCD_MAP_ENTRY), &mGcdMemorySpaceMapEntryTemplate);\r
+ Entry = AllocateCopyPool (sizeof (EFI_GCD_MAP_ENTRY), &mGcdMemorySpaceMapEntryTemplate);\r
ASSERT (Entry != NULL);\r
\r
Entry->EndAddress = LShiftU64 (1, SizeOfMemorySpace) - 1;\r
//\r
// Initialize the GCD I/O Space Map\r
//\r
- Entry = CoreAllocateCopyPool (sizeof (EFI_GCD_MAP_ENTRY), &mGcdIoSpaceMapEntryTemplate);\r
+ Entry = AllocateCopyPool (sizeof (EFI_GCD_MAP_ENTRY), &mGcdIoSpaceMapEntryTemplate);\r
ASSERT (Entry != NULL);\r
\r
Entry->EndAddress = LShiftU64 (1, SizeOfIoSpace) - 1;\r
//\r
// Relocate HOB List to an allocated pool buffer.\r
//\r
- NewHobList = CoreAllocateCopyPool (\r
+ NewHobList = AllocateCopyPool (\r
(UINTN)PhitHob->EfiFreeMemoryBottom - (UINTN)(*HobStart),\r
*HobStart\r
);\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
\r
//\r
//\r
AlignedRemainingDevicePath = NULL;\r
if (RemainingDevicePath != NULL) {\r
- AlignedRemainingDevicePath = CoreDuplicateDevicePath (RemainingDevicePath);\r
+ AlignedRemainingDevicePath = DuplicateDevicePath (RemainingDevicePath);\r
}\r
\r
//\r
//\r
// Allocate a handle buffer for ControllerHandle's children\r
//\r
- ChildHandleBuffer = CoreAllocateBootServicesPool (ChildHandleCount * sizeof(EFI_HANDLE));\r
+ ChildHandleBuffer = AllocatePool (ChildHandleCount * sizeof(EFI_HANDLE));\r
\r
//\r
// Fill in a handle buffer with ControllerHandle's children\r
//\r
// Allocate a duplicate array for the sorted Driver Binding Protocol Instances\r
//\r
- SortedDriverBindingProtocols = CoreAllocateBootServicesPool (sizeof (VOID *) * DriverBindingHandleCount);\r
+ SortedDriverBindingProtocols = AllocatePool (sizeof (VOID *) * DriverBindingHandleCount);\r
if (SortedDriverBindingProtocols == NULL) {\r
CoreFreePool (DriverBindingHandleBuffer);\r
return EFI_OUT_OF_RESOURCES;\r
goto Done;\r
}\r
\r
- DriverImageHandleBuffer = CoreAllocateBootServicesPool (sizeof (EFI_HANDLE) * DriverImageHandleCount);\r
+ DriverImageHandleBuffer = AllocatePool (sizeof (EFI_HANDLE) * DriverImageHandleCount);\r
if (DriverImageHandleBuffer == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
goto Done;\r
ChildHandleValid = FALSE;\r
ChildBuffer = NULL;\r
if (ChildBufferCount != 0) {\r
- ChildBuffer = CoreAllocateBootServicesPool (sizeof (EFI_HANDLE) * ChildBufferCount);\r
+ ChildBuffer = AllocatePool (sizeof (EFI_HANDLE) * ChildBufferCount);\r
if (ChildBuffer == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
goto Done;\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
\r
//\r
// allocate a new entry\r
//\r
if ((ProtEntry == NULL) && Create) {\r
- ProtEntry = CoreAllocateBootServicesPool (sizeof(PROTOCOL_ENTRY));\r
+ ProtEntry = AllocatePool (sizeof(PROTOCOL_ENTRY));\r
\r
if (ProtEntry != NULL) {\r
//\r
//\r
// Allocate a new protocol interface structure\r
//\r
- Prot = CoreAllocateZeroBootServicesPool (sizeof(PROTOCOL_INTERFACE));\r
+ Prot = AllocateZeroPool (sizeof(PROTOCOL_INTERFACE));\r
if (Prot == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
goto Done;\r
//\r
Handle = (IHANDLE *)*UserHandle;\r
if (Handle == NULL) {\r
- Handle = CoreAllocateZeroBootServicesPool (sizeof(IHANDLE));\r
+ Handle = AllocateZeroPool (sizeof(IHANDLE));\r
if (Handle == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
goto Done;\r
//\r
// Create new entry\r
//\r
- OpenData = CoreAllocateBootServicesPool (sizeof(OPEN_PROTOCOL_DATA));\r
+ OpenData = AllocatePool (sizeof(OPEN_PROTOCOL_DATA));\r
if (OpenData == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
} else {\r
Size = Count * sizeof(EFI_OPEN_PROTOCOL_INFORMATION_ENTRY);\r
}\r
\r
- Buffer = CoreAllocateBootServicesPool (Size);\r
+ Buffer = AllocatePool (Size);\r
if (Buffer == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
goto Done;\r
goto Done;\r
}\r
\r
- Buffer = CoreAllocateBootServicesPool (sizeof (EFI_GUID *) * ProtocolCount);\r
+ Buffer = AllocatePool (sizeof (EFI_GUID *) * ProtocolCount);\r
if (Buffer == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
goto Done;\r
}\r
}\r
\r
- HandleBuffer = CoreAllocateBootServicesPool (Count * sizeof (EFI_HANDLE));\r
+ HandleBuffer = AllocatePool (Count * sizeof (EFI_HANDLE));\r
if (HandleBuffer == NULL) {\r
CoreReleaseProtocolLock ();\r
return;\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
//\r
// ProtocolRequest - Last LocateHandle request ID\r
\r
*Device = NULL_HANDLE;\r
SourcePath = *DevicePath;\r
- SourceSize = CoreDevicePathSize (SourcePath) - sizeof(EFI_DEVICE_PATH_PROTOCOL);\r
+ SourceSize = GetDevicePathSize (SourcePath) - sizeof(EFI_DEVICE_PATH_PROTOCOL);\r
\r
//\r
// The source path can only have 1 instance\r
//\r
- if (CoreIsDevicePathMultiInstance (SourcePath)) {\r
+ if (IsDevicePathMultiInstance (SourcePath)) {\r
DEBUG((DEBUG_ERROR, "LocateDevicePath: Device path has too many instances\n"));\r
return EFI_INVALID_PARAMETER;\r
}\r
//\r
// Check if DevicePath is first part of SourcePath\r
//\r
- Size = CoreDevicePathSize (TmpDevicePath) - sizeof(EFI_DEVICE_PATH_PROTOCOL);\r
+ Size = GetDevicePathSize (TmpDevicePath) - sizeof(EFI_DEVICE_PATH_PROTOCOL);\r
if ((Size <= SourceSize) && CompareMem (SourcePath, TmpDevicePath, Size) == 0) {\r
//\r
// If the size is equal to the best match, then we\r
return Status;\r
}\r
\r
- *Buffer = CoreAllocateBootServicesPool (BufferSize);\r
+ *Buffer = AllocatePool (BufferSize);\r
if (*Buffer == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
\r
/**\r
//\r
// Allocate a new notification record\r
//\r
- ProtNotify = CoreAllocateBootServicesPool (sizeof(PROTOCOL_NOTIFY));\r
+ ProtNotify = AllocatePool (sizeof(PROTOCOL_NOTIFY));\r
if (ProtNotify != NULL) {\r
\r
ProtNotify->Signature = PROTOCOL_NOTIFY_SIGNATURE;\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
//\r
// Module Globals\r
//\r
//\r
if ((Attribute & EFI_LOAD_PE_IMAGE_ATTRIBUTE_RUNTIME_REGISTRATION) != 0) {\r
if (Image->ImageContext.ImageType == EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER) {\r
- Image->ImageContext.FixupData = CoreAllocateRuntimePool ((UINTN)(Image->ImageContext.FixupDataSize));\r
+ Image->ImageContext.FixupData = AllocateRuntimePool ((UINTN)(Image->ImageContext.FixupDataSize));\r
if (Image->ImageContext.FixupData == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
goto Done;\r
//\r
// Make a list off all the RT images so we can let the RT AP know about them.\r
//\r
- Image->RuntimeData = CoreAllocateRuntimePool (sizeof(EFI_RUNTIME_IMAGE_ENTRY));\r
+ Image->RuntimeData = AllocateRuntimePool (sizeof(EFI_RUNTIME_IMAGE_ENTRY));\r
if (Image->RuntimeData == NULL) {\r
goto Done;\r
}\r
//\r
// Allocate a new image structure\r
//\r
- Image = CoreAllocateZeroBootServicesPool (sizeof(LOADED_IMAGE_PRIVATE_DATA));\r
+ Image = AllocateZeroPool (sizeof(LOADED_IMAGE_PRIVATE_DATA));\r
if (Image == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
FilePath = OriginalFilePath;\r
Status = CoreHandleProtocol (DeviceHandle, &gEfiDevicePathProtocolGuid, (VOID **)&HandleFilePath);\r
if (!EFI_ERROR (Status)) {\r
- FilePathSize = CoreDevicePathSize (HandleFilePath) - sizeof(EFI_DEVICE_PATH_PROTOCOL);\r
+ FilePathSize = GetDevicePathSize (HandleFilePath) - sizeof(EFI_DEVICE_PATH_PROTOCOL);\r
FilePath = (EFI_DEVICE_PATH_PROTOCOL *) (((UINT8 *)FilePath) + FilePathSize );\r
}\r
\r
Image->Info.SystemTable = gDxeCoreST;\r
Image->Info.DeviceHandle = DeviceHandle;\r
Image->Info.Revision = EFI_LOADED_IMAGE_PROTOCOL_REVISION;\r
- Image->Info.FilePath = CoreDuplicateDevicePath (FilePath);\r
+ Image->Info.FilePath = DuplicateDevicePath (FilePath);\r
Image->Info.ParentHandle = ParentImageHandle;\r
\r
\r
// otherwise Loaded Image Device Path Protocol is installed with a NULL interface pointer.\r
//\r
if (OriginalFilePath != NULL) {\r
- Image->LoadedImageDevicePath = CoreDuplicateDevicePath (OriginalFilePath);\r
+ Image->LoadedImageDevicePath = DuplicateDevicePath (OriginalFilePath);\r
}\r
\r
//\r
// JumpContext must be aligned on a CPU specific boundary.\r
// Overallocate the buffer and force the required alignment\r
//\r
- Image->JumpBuffer = CoreAllocateBootServicesPool (sizeof (BASE_LIBRARY_JUMP_BUFFER) + BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT);\r
+ Image->JumpBuffer = AllocatePool (sizeof (BASE_LIBRARY_JUMP_BUFFER) + BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT);\r
if (Image->JumpBuffer == NULL) {\r
PERF_END (ImageHandle, START_IMAGE_TOK, NULL, 0);\r
return EFI_OUT_OF_RESOURCES;\r
//\r
if (ExitData != NULL) {\r
Image->ExitDataSize = ExitDataSize;\r
- Image->ExitData = CoreAllocateBootServicesPool (Image->ExitDataSize);\r
+ Image->ExitData = AllocatePool (Image->ExitDataSize);\r
if (Image->ExitData == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
goto Done;\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
\r
/**\r
// Because the device path consists of one or more FILE PATH MEDIA DEVICE PATH\r
// nodes, It assures the fields in device path nodes are 2 byte aligned.\r
//\r
- FilePathNode = (FILEPATH_DEVICE_PATH *)CoreDuplicateDevicePath((EFI_DEVICE_PATH_PROTOCOL *)(UINTN)FilePathNode);\r
+ FilePathNode = (FILEPATH_DEVICE_PATH *)DuplicateDevicePath((EFI_DEVICE_PATH_PROTOCOL *)(UINTN)FilePathNode);\r
if (FilePathNode == NULL) {\r
FileHandle->Close (FileHandle);\r
Status = EFI_OUT_OF_RESOURCES;\r
//\r
// Allocate space for the file\r
//\r
- ImageFileHandle->Source = CoreAllocateBootServicesPool ((UINTN)FileInfo->FileSize);\r
+ ImageFileHandle->Source = AllocatePool ((UINTN)FileInfo->FileSize);\r
if (ImageFileHandle->Source != NULL) {\r
//\r
// Read the file into the buffer we allocated\r
CoreFreePool (*Buffer);\r
}\r
\r
- *Buffer = CoreAllocateBootServicesPool (BufferSize);\r
+ *Buffer = AllocatePool (BufferSize);\r
if (*Buffer != NULL) {\r
TryAgain = TRUE;\r
} else {\r
IN EFI_LOCK *Lock\r
);\r
\r
-//\r
-// Device Path functions\r
-//\r
-\r
-\r
-/**\r
- Calculate the size of a whole device path.\r
-\r
- @param DevicePath The pointer to the device path data.\r
-\r
- @return Size of device path data structure..\r
-\r
-**/\r
-UINTN\r
-CoreDevicePathSize (\r
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
- );\r
-\r
-\r
-/**\r
- Return TRUE is this is a multi instance device path.\r
-\r
- @param DevicePath A pointer to a device path data structure.\r
-\r
- @retval TRUE If DevicePath is multi instance. FALSE - If\r
- DevicePath is not multi instance.\r
-\r
-**/\r
-BOOLEAN\r
-CoreIsDevicePathMultiInstance (\r
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
- );\r
-\r
-\r
-\r
-/**\r
- Duplicate a new device path data structure from the old one.\r
-\r
- @param DevicePath A pointer to a device path data structure.\r
-\r
- @return A pointer to the new allocated device path data.\r
- @return Caller must free the memory used by DevicePath if it is no longer needed.\r
-\r
-**/\r
-EFI_DEVICE_PATH_PROTOCOL *\r
-CoreDuplicateDevicePath (\r
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
- );\r
-\r
-\r
-/**\r
- Function is used to append a Src1 and Src2 together.\r
-\r
- @param Src1 A pointer to a device path data structure.\r
- @param Src2 A pointer to a device path data structure.\r
-\r
- @return A pointer to the new device path is returned.\r
- @return NULL is returned if space for the new device path could not be allocated from pool.\r
- @return It is up to the caller to free the memory used by Src1 and Src2 if they are no longer needed.\r
-\r
-**/\r
-EFI_DEVICE_PATH_PROTOCOL *\r
-CoreAppendDevicePath (\r
- IN EFI_DEVICE_PATH_PROTOCOL *Src1,\r
- IN EFI_DEVICE_PATH_PROTOCOL *Src2\r
- );\r
-\r
-\r
-/**\r
- Allocate pool of type EfiBootServicesData, the size is specified with AllocationSize.\r
-\r
- @param AllocationSize Size to allocate.\r
-\r
- @return Pointer of the allocated pool.\r
-\r
-**/\r
-VOID *\r
-CoreAllocateBootServicesPool (\r
- IN UINTN AllocationSize\r
- );\r
-\r
-\r
-/**\r
- Allocate pool of type EfiBootServicesData and zero it, the size is specified with AllocationSize.\r
-\r
- @param AllocationSize Size to allocate.\r
-\r
- @return Pointer of the allocated pool.\r
-\r
-**/\r
-VOID *\r
-CoreAllocateZeroBootServicesPool (\r
- IN UINTN AllocationSize\r
- );\r
-\r
-\r
-/**\r
- Find a config table by name in system table's ConfigurationTable.\r
-\r
- @param Guid The table name to look for\r
- @param Table Pointer of the config table\r
-\r
- @retval EFI_NOT_FOUND Could not find the table in system table's\r
- ConfigurationTable.\r
- @retval EFI_SUCCESS Table successfully found.\r
-\r
-**/\r
-EFI_STATUS\r
-CoreGetConfigTable (\r
- IN EFI_GUID *Guid,\r
- OUT VOID **Table\r
- );\r
-\r
-\r
-/**\r
- Allocate pool of specified size with EfiRuntimeServicesData type, and copy specified buffer to this pool.\r
-\r
- @param AllocationSize Size to allocate.\r
- @param Buffer Specified buffer that will be copy to the allocated\r
- pool\r
-\r
- @return Pointer of the allocated pool.\r
-\r
-**/\r
-VOID *\r
-CoreAllocateRuntimeCopyPool (\r
- IN UINTN AllocationSize,\r
- IN VOID *Buffer\r
- );\r
-\r
-\r
-/**\r
- Allocate pool of type EfiRuntimeServicesData, the size is specified with AllocationSize.\r
-\r
- @param AllocationSize Size to allocate.\r
-\r
- @return Pointer of the allocated pool.\r
-\r
-**/\r
-VOID *\r
-CoreAllocateRuntimePool (\r
- IN UINTN AllocationSize\r
- );\r
-\r
-\r
-/**\r
- Allocate pool of specified size with EfiBootServicesData type, and copy specified buffer to this pool.\r
-\r
- @param AllocationSize Size to allocate.\r
- @param Buffer Specified buffer that will be copy to the allocated\r
- pool\r
-\r
- @return Pointer of the allocated pool.\r
-\r
-**/\r
-VOID *\r
-CoreAllocateCopyPool (\r
- IN UINTN AllocationSize,\r
- IN VOID *Buffer\r
- );\r
-\r
\r
/**\r
Create a protocol notification event and return it.\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
UINTN mErrorLevel = DEBUG_ERROR | DEBUG_LOAD;\r
\r
}\r
\r
\r
-\r
-/**\r
- Allocate pool of type EfiBootServicesData, the size is specified with AllocationSize.\r
-\r
- @param AllocationSize Size to allocate.\r
-\r
- @return Pointer of the allocated pool.\r
-\r
-**/\r
-VOID *\r
-CoreAllocateBootServicesPool (\r
- IN UINTN AllocationSize\r
- )\r
-{\r
- VOID *Memory;\r
-\r
- CoreAllocatePool (EfiBootServicesData, AllocationSize, &Memory);\r
- return Memory;\r
-}\r
-\r
-\r
-\r
-/**\r
- Allocate pool of type EfiBootServicesData and zero it, the size is specified with AllocationSize.\r
-\r
- @param AllocationSize Size to allocate.\r
-\r
- @return Pointer of the allocated pool.\r
-\r
-**/\r
-VOID *\r
-CoreAllocateZeroBootServicesPool (\r
- IN UINTN AllocationSize\r
- )\r
-{\r
- VOID *Memory;\r
-\r
- Memory = CoreAllocateBootServicesPool (AllocationSize);\r
- ZeroMem (Memory, (Memory == NULL) ? 0 : AllocationSize);\r
- return Memory;\r
-}\r
-\r
-\r
-\r
-/**\r
- Allocate pool of specified size with EfiBootServicesData type, and copy specified buffer to this pool.\r
-\r
- @param AllocationSize Size to allocate.\r
- @param Buffer Specified buffer that will be copy to the allocated\r
- pool\r
-\r
- @return Pointer of the allocated pool.\r
-\r
-**/\r
-VOID *\r
-CoreAllocateCopyPool (\r
- IN UINTN AllocationSize,\r
- IN VOID *Buffer\r
- )\r
-{\r
- VOID *Memory;\r
-\r
- Memory = CoreAllocateBootServicesPool (AllocationSize);\r
- CopyMem (Memory, Buffer, (Memory == NULL) ? 0 : AllocationSize);\r
-\r
- return Memory;\r
-}\r
-\r
-\r
-\r
-\r
-/**\r
- Allocate pool of type EfiRuntimeServicesData, the size is specified with AllocationSize.\r
-\r
- @param AllocationSize Size to allocate.\r
-\r
- @return Pointer of the allocated pool.\r
-\r
-**/\r
-VOID *\r
-CoreAllocateRuntimePool (\r
- IN UINTN AllocationSize\r
- )\r
-{\r
- VOID *Memory;\r
-\r
- CoreAllocatePool (EfiRuntimeServicesData, AllocationSize, &Memory);\r
- return Memory;\r
-}\r
-\r
-\r
-/**\r
- Allocate pool of specified size with EfiRuntimeServicesData type, and copy specified buffer to this pool.\r
-\r
- @param AllocationSize Size to allocate.\r
- @param Buffer Specified buffer that will be copy to the allocated\r
- pool\r
-\r
- @return Pointer of the allocated pool.\r
-\r
-**/\r
-VOID *\r
-CoreAllocateRuntimeCopyPool (\r
- IN UINTN AllocationSize,\r
- IN VOID *Buffer\r
- )\r
-{\r
- VOID *Memory;\r
-\r
- Memory = CoreAllocateRuntimePool (AllocationSize);\r
- CopyMem (Memory, Buffer, (Memory == NULL) ? 0 : AllocationSize);\r
-\r
- return Memory;\r
-}\r
-\r
-\r
-\r
//\r
// Lock Stuff\r
//\r
-\r
-\r
/**\r
Initialize a basic mutual exclusion lock. Each lock\r
provides mutual exclusion access at it's task priority\r
}\r
\r
\r
-\r
-/**\r
- Calculate the size of a whole device path.\r
-\r
- @param DevicePath The pointer to the device path data.\r
-\r
- @return Size of device path data structure..\r
-\r
-**/\r
-UINTN\r
-CoreDevicePathSize (\r
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
- )\r
-{\r
- EFI_DEVICE_PATH_PROTOCOL *Start;\r
-\r
- if (DevicePath == NULL) {\r
- return 0;\r
- }\r
-\r
- //\r
- // Search for the end of the device path structure\r
- //\r
- Start = DevicePath;\r
- while (!EfiIsDevicePathEnd (DevicePath)) {\r
- DevicePath = EfiNextDevicePathNode (DevicePath);\r
- }\r
-\r
- //\r
- // Compute the size and add back in the size of the end device path structure\r
- //\r
- return ((UINTN) DevicePath - (UINTN) Start) + sizeof(EFI_DEVICE_PATH_PROTOCOL);\r
-}\r
-\r
-\r
-\r
-/**\r
- Return TRUE is this is a multi instance device path.\r
-\r
- @param DevicePath A pointer to a device path data structure.\r
-\r
- @retval TRUE If DevicePath is multi instance. FALSE - If\r
- DevicePath is not multi instance.\r
-\r
-**/\r
-BOOLEAN\r
-CoreIsDevicePathMultiInstance (\r
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
- )\r
-{\r
- EFI_DEVICE_PATH_PROTOCOL *Node;\r
-\r
- if (DevicePath == NULL) {\r
- return FALSE;\r
- }\r
-\r
- Node = DevicePath;\r
- while (!EfiIsDevicePathEnd (Node)) {\r
- if (EfiIsDevicePathEndInstance (Node)) {\r
- return TRUE;\r
- }\r
- Node = EfiNextDevicePathNode (Node);\r
- }\r
- return FALSE;\r
-}\r
-\r
-\r
-\r
-\r
-/**\r
- Duplicate a new device path data structure from the old one.\r
-\r
- @param DevicePath A pointer to a device path data structure.\r
-\r
- @return A pointer to the new allocated device path data.\r
- @return Caller must free the memory used by DevicePath if it is no longer needed.\r
-\r
-**/\r
-EFI_DEVICE_PATH_PROTOCOL *\r
-CoreDuplicateDevicePath (\r
- IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
- )\r
-{\r
- EFI_DEVICE_PATH_PROTOCOL *NewDevicePath;\r
- UINTN Size;\r
-\r
- if (DevicePath == NULL) {\r
- return NULL;\r
- }\r
-\r
- //\r
- // Compute the size\r
- //\r
- Size = CoreDevicePathSize (DevicePath);\r
-\r
- //\r
- // Allocate space for duplicate device path\r
- //\r
- NewDevicePath = CoreAllocateCopyPool (Size, DevicePath);\r
-\r
- return NewDevicePath;\r
-}\r
-\r
-\r
-/**\r
- Function is used to append a Src1 and Src2 together.\r
-\r
- @param Src1 A pointer to a device path data structure.\r
- @param Src2 A pointer to a device path data structure.\r
-\r
- @return A pointer to the new device path is returned.\r
- @return NULL is returned if space for the new device path could not be allocated from pool.\r
- @return It is up to the caller to free the memory used by Src1 and Src2 if they are no longer needed.\r
-\r
-**/\r
-EFI_DEVICE_PATH_PROTOCOL *\r
-CoreAppendDevicePath (\r
- IN EFI_DEVICE_PATH_PROTOCOL *Src1,\r
- IN EFI_DEVICE_PATH_PROTOCOL *Src2\r
- )\r
-{\r
- UINTN Size;\r
- UINTN Size1;\r
- UINTN Size2;\r
- EFI_DEVICE_PATH_PROTOCOL *NewDevicePath;\r
- EFI_DEVICE_PATH_PROTOCOL *SecondDevicePath;\r
-\r
- if (Src1 == NULL && Src2 == NULL) {\r
- return NULL;\r
- }\r
-\r
- //\r
- // Allocate space for the combined device path. It only has one end node of\r
- // length EFI_DEVICE_PATH_PROTOCOL\r
- //\r
- Size1 = CoreDevicePathSize (Src1);\r
- Size2 = CoreDevicePathSize (Src2);\r
- Size = Size1 + Size2 - sizeof(EFI_DEVICE_PATH_PROTOCOL);\r
-\r
- NewDevicePath = CoreAllocateCopyPool (Size, Src1);\r
- if (NewDevicePath != NULL) {\r
-\r
- //\r
- // Over write Src1 EndNode and do the copy\r
- //\r
- SecondDevicePath = (EFI_DEVICE_PATH_PROTOCOL *)((CHAR8 *)NewDevicePath + (Size1 - sizeof(EFI_DEVICE_PATH_PROTOCOL)));\r
- CopyMem (SecondDevicePath, Src2, Size2);\r
- }\r
-\r
- return NewDevicePath;\r
-}\r
-\r
-\r
/**\r
Create a protocol notification event and return it.\r
\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
\r
//\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
#define EFI_DEFAULT_PAGE_ALLOCATION_ALIGNMENT (EFI_PAGE_SIZE)\r
\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
#define POOL_FREE_SIGNATURE EFI_SIGNATURE_32('p','f','r','0')\r
typedef struct {\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
\r
EFI_DEBUG_IMAGE_INFO_TABLE_HEADER mDebugInfoTableHeader = {\r
// Table is full, so re-allocate another page for a larger table...\r
//\r
TableSize = MaxTableIndex * EFI_DEBUG_TABLE_ENTRY_SIZE;\r
- NewTable = CoreAllocateZeroBootServicesPool (TableSize + EFI_PAGE_SIZE);\r
+ NewTable = AllocateZeroPool (TableSize + EFI_PAGE_SIZE);\r
if (NewTable == NULL) {\r
mDebugInfoTableHeader.UpdateStatus &= ~EFI_DEBUG_IMAGE_INFO_UPDATE_IN_PROGRESS;\r
return;\r
//\r
// Allocate data for new entry\r
//\r
- Table[Index].NormalImage = CoreAllocateZeroBootServicesPool (sizeof (EFI_DEBUG_IMAGE_INFO_NORMAL));\r
+ Table[Index].NormalImage = AllocateZeroPool (sizeof (EFI_DEBUG_IMAGE_INFO_NORMAL));\r
if (Table[Index].NormalImage != NULL) {\r
//\r
// Update the entry\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
#define CONFIG_TABLE_SIZE_INCREASED 0x10\r
\r
UINTN mSystemTableAllocateSize = 0;\r
\r
-\r
-\r
-/**\r
- Find a config table by name in system table's ConfigurationTable.\r
-\r
- @param Guid The table name to look for\r
- @param Table Pointer of the config table\r
-\r
- @retval EFI_NOT_FOUND Could not find the table in system table's\r
- ConfigurationTable.\r
- @retval EFI_SUCCESS Table successfully found.\r
-\r
-**/\r
-EFI_STATUS\r
-CoreGetConfigTable (\r
- IN EFI_GUID *Guid,\r
- OUT VOID **Table\r
- )\r
-{\r
- UINTN Index;\r
-\r
- for (Index = 0; Index < gDxeCoreST->NumberOfTableEntries; Index++) {\r
- if (CompareGuid (Guid, &(gDxeCoreST->ConfigurationTable[Index].VendorGuid))) {\r
- *Table = gDxeCoreST->ConfigurationTable[Index].VendorTable;\r
- return EFI_SUCCESS;\r
- }\r
- }\r
-\r
- return EFI_NOT_FOUND;\r
-}\r
-\r
-\r
-\r
-\r
/**\r
Boot Service called to add, modify, or remove a system configuration table from\r
the EFI System Table.\r
// Allocate a table with one additional entry.\r
//\r
mSystemTableAllocateSize += (CONFIG_TABLE_SIZE_INCREASED * sizeof (EFI_CONFIGURATION_TABLE));\r
- EfiConfigurationTable = CoreAllocateRuntimePool (mSystemTableAllocateSize);\r
+ EfiConfigurationTable = AllocateRuntimePool (mSystemTableAllocateSize);\r
if (EfiConfigurationTable == NULL) {\r
//\r
// If a new table could not be allocated, then return an error.\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
#define WATCHDOG_TIMER_CALIBRATE_PER_SECOND 10000000\r
\r
// Include statements\r
//\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
\r
\r
\r
**/\r
\r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
\r
//\r
// Local defines and typedefs\r
//\r
// Callee allocated buffer. Allocate buffer and return size.\r
//\r
- *Buffer = CoreAllocateBootServicesPool (CopySize);\r
+ *Buffer = AllocatePool (CopySize);\r
if (*Buffer == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
goto GetSection_Done;\r
//\r
// Allocate a new node\r
//\r
- *ChildNode = CoreAllocateBootServicesPool (sizeof (CORE_SECTION_CHILD_NODE));\r
+ *ChildNode = AllocatePool (sizeof (CORE_SECTION_CHILD_NODE));\r
Node = *ChildNode;\r
if (Node == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
//\r
if (CompressionHeader->UncompressedLength > 0) {\r
NewStreamBufferSize = CompressionHeader->UncompressedLength;\r
- NewStreamBuffer = CoreAllocateBootServicesPool (NewStreamBufferSize);\r
+ NewStreamBuffer = AllocatePool (NewStreamBufferSize);\r
if (NewStreamBuffer == NULL) {\r
CoreFreePool (Node);\r
return EFI_OUT_OF_RESOURCES;\r
ASSERT_EFI_ERROR (Status);\r
ASSERT (NewStreamBufferSize == CompressionHeader->UncompressedLength);\r
\r
- ScratchBuffer = CoreAllocateBootServicesPool (ScratchSize);\r
+ ScratchBuffer = AllocatePool (ScratchSize);\r
if (ScratchBuffer == NULL) {\r
CoreFreePool (Node);\r
CoreFreePool (NewStreamBuffer);\r
//\r
// Allocate a new stream\r
//\r
- NewStream = CoreAllocateBootServicesPool (sizeof (CORE_SECTION_STREAM_NODE));\r
+ NewStream = AllocatePool (sizeof (CORE_SECTION_STREAM_NODE));\r
if (NewStream == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
// data in\r
//\r
if (SectionStreamLength > 0) {\r
- NewStream->StreamBuffer = CoreAllocateBootServicesPool (SectionStreamLength);\r
+ NewStream->StreamBuffer = AllocatePool (SectionStreamLength);\r
if (NewStream->StreamBuffer == NULL) {\r
CoreFreePool (NewStream);\r
return EFI_OUT_OF_RESOURCES;\r
//\r
// Allocate scratch buffer\r
//\r
- ScratchBuffer = CoreAllocateBootServicesPool (ScratchBufferSize);\r
+ ScratchBuffer = AllocatePool (ScratchBufferSize);\r
if (ScratchBuffer == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
//\r
// Allocate output buffer\r
//\r
- AllocatedOutputBuffer = CoreAllocateBootServicesPool (OutputBufferSize);\r
+ AllocatedOutputBuffer = AllocatePool (OutputBufferSize);\r
if (AllocatedOutputBuffer == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r