mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-10 09:40:53 +01:00
Merge branch 'master' of https://github.com/CloverHackyColor/CloverBootloader
This commit is contained in:
commit
06647fcee7
@ -399,7 +399,7 @@ GraphicsConsoleControllerDriverStart (
|
||||
//
|
||||
// Initialize the Graphics Console device instance
|
||||
//
|
||||
Private = AllocateCopyPool (
|
||||
Private = AllocateCopyPool(
|
||||
sizeof (GRAPHICS_CONSOLE_DEV),
|
||||
&mGraphicsConsoleDevTemplate
|
||||
);
|
||||
@ -1791,7 +1791,7 @@ DrawUnicodeWeightAtCursorN (
|
||||
Blt->Width = (UINT16) (Private->ModeData[This->Mode->Mode].GopWidth);
|
||||
Blt->Height = (UINT16) (Private->ModeData[This->Mode->Mode].GopHeight);
|
||||
|
||||
String = AllocateCopyPool ((Count + 1) * sizeof (CHAR16), UnicodeWeight);
|
||||
String = AllocateCopyPool((Count + 1) * sizeof (CHAR16), UnicodeWeight);
|
||||
if (String == NULL) {
|
||||
FreePool(Blt);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
|
@ -351,7 +351,7 @@ InstallAcpiTable (
|
||||
//
|
||||
// Install the ACPI table
|
||||
//
|
||||
AcpiTableBufferConst = AllocateCopyPool (AcpiTableBufferSize,AcpiTableBuffer);
|
||||
AcpiTableBufferConst = AllocateCopyPool(AcpiTableBufferSize,AcpiTableBuffer);
|
||||
*TableKey = 0;
|
||||
Status = SetAcpiTable (
|
||||
AcpiTableInstance,
|
||||
|
@ -784,7 +784,7 @@ BOpt_GetLegacyOptions (
|
||||
sizeof (DescString),
|
||||
DescString
|
||||
);
|
||||
NewLegacyDevContext->Description = AllocateCopyPool (StrSize (DescString), DescString);
|
||||
NewLegacyDevContext->Description = AllocateCopyPool(StrSize (DescString), DescString);
|
||||
if (NULL == NewLegacyDevContext->Description) {
|
||||
break;
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ BootThisFile (
|
||||
|
||||
Option = (BDS_COMMON_OPTION *) AllocatePool (sizeof (BDS_COMMON_OPTION));
|
||||
ASSERT (Option != NULL);
|
||||
Option->Description = (CHAR16 *) AllocateCopyPool (StrSize (FileContext->FileName), FileContext->FileName);
|
||||
Option->Description = (CHAR16 *) AllocateCopyPool(StrSize (FileContext->FileName), FileContext->FileName);
|
||||
Option->DevicePath = FileContext->DevicePath;
|
||||
Option->LoadOptionsSize = 0;
|
||||
Option->LoadOptions = NULL;
|
||||
|
@ -318,7 +318,7 @@ ExtractDisplayedHiiFormFromHiiHandle (
|
||||
if (CompareGuid (SetupClassGuid, ClassGuid)) {
|
||||
CopyMem (FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, sizeof (EFI_STRING_ID));
|
||||
CopyMem (FormSetHelp, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));
|
||||
*FormSetGuid = AllocateCopyPool (sizeof (EFI_GUID), &((EFI_IFR_FORM_SET *) OpCodeData)->Guid);
|
||||
*FormSetGuid = AllocateCopyPool(sizeof (EFI_GUID), &((EFI_IFR_FORM_SET *) OpCodeData)->Guid);
|
||||
ASSERT (*FormSetGuid != NULL);
|
||||
FreePool(HiiPackageList);
|
||||
return TRUE;
|
||||
@ -328,7 +328,7 @@ ExtractDisplayedHiiFormFromHiiHandle (
|
||||
} else {
|
||||
CopyMem (FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, sizeof (EFI_STRING_ID));
|
||||
CopyMem (FormSetHelp, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));
|
||||
*FormSetGuid = AllocateCopyPool (sizeof (EFI_GUID), &((EFI_IFR_FORM_SET *) OpCodeData)->Guid);
|
||||
*FormSetGuid = AllocateCopyPool(sizeof (EFI_GUID), &((EFI_IFR_FORM_SET *) OpCodeData)->Guid);
|
||||
ASSERT (*FormSetGuid != NULL);
|
||||
FreePool(HiiPackageList);
|
||||
return TRUE;
|
||||
@ -479,7 +479,7 @@ AddIdToMacDeviceList (
|
||||
} else {
|
||||
mMacDeviceList.MaxListLen += MAX_MAC_ADDRESS_NODE_LIST_LEN;
|
||||
if (mMacDeviceList.CurListLen != 0) {
|
||||
TempDeviceList = (MENU_INFO_ITEM *)AllocateCopyPool (sizeof (MENU_INFO_ITEM) * mMacDeviceList.MaxListLen, (VOID *)mMacDeviceList.NodeList);
|
||||
TempDeviceList = (MENU_INFO_ITEM *)AllocateCopyPool(sizeof (MENU_INFO_ITEM) * mMacDeviceList.MaxListLen, (VOID *)mMacDeviceList.NodeList);
|
||||
} else {
|
||||
TempDeviceList = (MENU_INFO_ITEM *)AllocatePool (sizeof (MENU_INFO_ITEM) * mMacDeviceList.MaxListLen);
|
||||
}
|
||||
|
@ -414,7 +414,7 @@ InitializeFrontPage (
|
||||
if (mLanguageString == NULL){
|
||||
mLanguageString = GetEfiGlobalVariable (L"PlatformLangCodes");
|
||||
if (mLanguageString == NULL) {
|
||||
mLanguageString = AllocateCopyPool (
|
||||
mLanguageString = AllocateCopyPool(
|
||||
AsciiStrSize ((CHAR8 *) PcdGetPtr (PcdUefiVariableDefaultPlatformLangCodes)),
|
||||
(CHAR8 *) PcdGetPtr (PcdUefiVariableDefaultPlatformLangCodes)
|
||||
);
|
||||
|
@ -630,7 +630,7 @@ HotkeyInsertList (
|
||||
//
|
||||
// Need an extra hotkey for shift key on right
|
||||
//
|
||||
HotkeyRight = AllocateCopyPool (sizeof (BDS_HOTKEY_OPTION), HotkeyLeft);
|
||||
HotkeyRight = AllocateCopyPool(sizeof (BDS_HOTKEY_OPTION), HotkeyLeft);
|
||||
if (HotkeyRight == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
@ -423,7 +423,7 @@ DxeMain (
|
||||
VectorInfo ++;
|
||||
Index ++;
|
||||
}
|
||||
VectorInfo = AllocateCopyPool (sizeof (EFI_VECTOR_HANDOFF_INFO) * Index, (VOID *) VectorInfoList);
|
||||
VectorInfo = AllocateCopyPool(sizeof (EFI_VECTOR_HANDOFF_INFO) * Index, (VOID *) VectorInfoList);
|
||||
// ASSERT (VectorInfo != NULL);
|
||||
if (!VectorInfo) return;
|
||||
Status = CoreInstallConfigurationTable (&gEfiVectorHandoffTableGuid, (VOID *) VectorInfo);
|
||||
|
@ -642,7 +642,7 @@ NotifyFwVolBlock (
|
||||
//
|
||||
// No FwVol protocol on the handle so create a new one
|
||||
//
|
||||
FvDevice = AllocateCopyPool (sizeof (FV_DEVICE), &mFvDevice);
|
||||
FvDevice = AllocateCopyPool(sizeof (FV_DEVICE), &mFvDevice);
|
||||
if (FvDevice == NULL) {
|
||||
return;
|
||||
}
|
||||
|
@ -502,7 +502,7 @@ ProduceFVBProtocolOnBuffer (
|
||||
//
|
||||
// Allocate EFI_FW_VOL_BLOCK_DEVICE
|
||||
//
|
||||
FvbDev = AllocateCopyPool (sizeof (EFI_FW_VOL_BLOCK_DEVICE), &mFwVolBlock);
|
||||
FvbDev = AllocateCopyPool(sizeof (EFI_FW_VOL_BLOCK_DEVICE), &mFwVolBlock);
|
||||
if (FvbDev == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
@ -555,7 +555,7 @@ ProduceFVBProtocolOnBuffer (
|
||||
//
|
||||
// FV does not contains extension header, then produce MEMMAP_DEVICE_PATH
|
||||
//
|
||||
FvbDev->DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) AllocateCopyPool (sizeof (FV_MEMMAP_DEVICE_PATH), &mFvMemmapDevicePathTemplate);
|
||||
FvbDev->DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) AllocateCopyPool(sizeof (FV_MEMMAP_DEVICE_PATH), &mFvMemmapDevicePathTemplate);
|
||||
if (FvbDev->DevicePath == NULL) {
|
||||
FreePool(FvbDev);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
@ -566,7 +566,7 @@ ProduceFVBProtocolOnBuffer (
|
||||
//
|
||||
// FV contains extension header, then produce MEDIA_FW_VOL_DEVICE_PATH
|
||||
//
|
||||
FvbDev->DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) AllocateCopyPool (sizeof (FV_PIWG_DEVICE_PATH), &mFvPIWGDevicePathTemplate);
|
||||
FvbDev->DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) AllocateCopyPool(sizeof (FV_PIWG_DEVICE_PATH), &mFvPIWGDevicePathTemplate);
|
||||
if (FvbDev->DevicePath == NULL) {
|
||||
FreePool(FvbDev);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
|
@ -2306,7 +2306,7 @@ CoreInitializeGcdServices (
|
||||
//
|
||||
// Initialize the GCD Memory Space Map
|
||||
//
|
||||
Entry = AllocateCopyPool (sizeof (EFI_GCD_MAP_ENTRY), &mGcdMemorySpaceMapEntryTemplate);
|
||||
Entry = AllocateCopyPool(sizeof (EFI_GCD_MAP_ENTRY), &mGcdMemorySpaceMapEntryTemplate);
|
||||
// ASSERT (Entry != NULL);
|
||||
if (!Entry) {
|
||||
return EFI_NOT_AVAILABLE_YET;
|
||||
@ -2321,7 +2321,7 @@ CoreInitializeGcdServices (
|
||||
//
|
||||
// Initialize the GCD I/O Space Map
|
||||
//
|
||||
Entry = AllocateCopyPool (sizeof (EFI_GCD_MAP_ENTRY), &mGcdIoSpaceMapEntryTemplate);
|
||||
Entry = AllocateCopyPool(sizeof (EFI_GCD_MAP_ENTRY), &mGcdIoSpaceMapEntryTemplate);
|
||||
// ASSERT (Entry != NULL);
|
||||
if (!Entry) {
|
||||
return EFI_NOT_AVAILABLE_YET;
|
||||
@ -2466,7 +2466,7 @@ CoreInitializeGcdServices (
|
||||
//
|
||||
// Relocate HOB List to an allocated pool buffer.
|
||||
//
|
||||
NewHobList = AllocateCopyPool (
|
||||
NewHobList = AllocateCopyPool(
|
||||
(UINTN)PhitHob->EfiFreeMemoryBottom - (UINTN)(*HobStart),
|
||||
*HobStart
|
||||
);
|
||||
|
@ -1162,7 +1162,7 @@ InitInterruptDescriptorTable (
|
||||
//
|
||||
// Save original IDT entry and IDT entry count.
|
||||
//
|
||||
mOrigIdtEntry = AllocateCopyPool (OldIdtPtr.Limit + 1, (VOID *) OldIdtPtr.Base);
|
||||
mOrigIdtEntry = AllocateCopyPool(OldIdtPtr.Limit + 1, (VOID *) OldIdtPtr.Base);
|
||||
// ASSERT (mOrigIdtEntry != NULL);
|
||||
mOrigIdtEntryCount = (UINT16) OldIdtSize;
|
||||
} else {
|
||||
|
@ -453,7 +453,7 @@
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>Lapci panic patch example</string>
|
||||
<string>Lapic panic patch example</string>
|
||||
<key>MatchOS</key>
|
||||
<string>All</string>
|
||||
<key>Disabled</key>
|
||||
@ -473,6 +473,26 @@
|
||||
<key>RangeFind</key>
|
||||
<integer>200</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>Symbolic patch example got lapic panic</string>
|
||||
<key>MatchOS</key>
|
||||
<string>All</string>
|
||||
<key>Disabled</key>
|
||||
<true/>
|
||||
<key>Procedure</key>
|
||||
<string>_lapic_interrupt</string>
|
||||
<key>Find</key>
|
||||
<data>6AAA//+DAAAAAAAA</data>
|
||||
<key>MaskFind</key>
|
||||
<data>/wAA////AAAAAP//</data>
|
||||
<key>Replace</key>
|
||||
<data>6AAA//8xwJCQkJCQ</data>
|
||||
<key>MaskReplace</key>
|
||||
<data>/wAA////////////</data>
|
||||
<key>RangeFind</key>
|
||||
<integer>200</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>#ForceKextsToLoad</key>
|
||||
<array>
|
||||
|
@ -57,7 +57,7 @@ export -f GetNVRamKey
|
||||
# ---------------------------------------------
|
||||
echo "" > "$install_log"
|
||||
echo "Clover EFI installer log - $( date )" >> "$install_log"
|
||||
echo "Installer version: r%CLOVERREVISION% EFI bootloader" >> "$install_log"
|
||||
echo "Installer version: r%CLOVERREVISION% (commit: %CLOVERSHA1%) EFI bootloader" >> "$install_log"
|
||||
echo "======================================================" >> "$install_log"
|
||||
diskutil list >> "$install_log"
|
||||
|
||||
|
@ -751,7 +751,7 @@ AtaAtapiPassThruStart (
|
||||
//
|
||||
// Allocate a buffer to store the ATA_ATAPI_PASS_THRU_INSTANCE data structure
|
||||
//
|
||||
Instance = AllocateCopyPool (sizeof (ATA_ATAPI_PASS_THRU_INSTANCE), &gAtaAtapiPassThruInstanceTemplate);
|
||||
Instance = AllocateCopyPool(sizeof (ATA_ATAPI_PASS_THRU_INSTANCE), &gAtaAtapiPassThruInstanceTemplate);
|
||||
if (Instance == NULL) {
|
||||
goto ErrorExit;
|
||||
}
|
||||
@ -1076,7 +1076,7 @@ CreateNewDeviceInfo (
|
||||
// DBG(L"Creating DeviceInfo for Chan=%d dev=%d type=%a\n", Port, PortMultiplier, DeviceType == EfiIdeCdrom ? "cdrom " : "harddisk");
|
||||
if (IdentifyData != NULL) {
|
||||
// DBG(L" IdentifyData copied\n");
|
||||
DeviceInfo->IdentifyData = AllocateCopyPool (sizeof (EFI_IDENTIFY_DATA), IdentifyData);
|
||||
DeviceInfo->IdentifyData = AllocateCopyPool(sizeof (EFI_IDENTIFY_DATA), IdentifyData);
|
||||
if (DeviceInfo->IdentifyData == NULL) {
|
||||
FreePool(DeviceInfo);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
@ -1672,7 +1672,7 @@ AtaPassThruBuildDevicePath (
|
||||
}
|
||||
|
||||
if (Instance->Mode == EfiAtaIdeMode) {
|
||||
DevicePathNode = AllocateCopyPool (sizeof (ATAPI_DEVICE_PATH), &mAtapiDevicePathTemplate);
|
||||
DevicePathNode = AllocateCopyPool(sizeof (ATAPI_DEVICE_PATH), &mAtapiDevicePathTemplate);
|
||||
if (DevicePathNode == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
@ -1680,7 +1680,7 @@ AtaPassThruBuildDevicePath (
|
||||
DevicePathNode->Atapi.SlaveMaster = (UINT8) PortMultiplierPort;
|
||||
DevicePathNode->Atapi.Lun = 0;
|
||||
} else {
|
||||
DevicePathNode = AllocateCopyPool (sizeof (SATA_DEVICE_PATH), &mSataDevicePathTemplate);
|
||||
DevicePathNode = AllocateCopyPool(sizeof (SATA_DEVICE_PATH), &mSataDevicePathTemplate);
|
||||
if (DevicePathNode == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
@ -2338,7 +2338,7 @@ ExtScsiPassThruBuildDevicePath (
|
||||
}
|
||||
|
||||
if (Instance->Mode == EfiAtaIdeMode) {
|
||||
DevicePathNode = AllocateCopyPool (sizeof (ATAPI_DEVICE_PATH), &mAtapiDevicePathTemplate);
|
||||
DevicePathNode = AllocateCopyPool(sizeof (ATAPI_DEVICE_PATH), &mAtapiDevicePathTemplate);
|
||||
if (DevicePathNode == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
@ -2347,7 +2347,7 @@ ExtScsiPassThruBuildDevicePath (
|
||||
DevicePathNode->Atapi.SlaveMaster = PortMultiplier;
|
||||
DevicePathNode->Atapi.Lun = (UINT16) Lun;
|
||||
} else {
|
||||
DevicePathNode = AllocateCopyPool (sizeof (SATA_DEVICE_PATH), &mSataDevicePathTemplate);
|
||||
DevicePathNode = AllocateCopyPool(sizeof (SATA_DEVICE_PATH), &mSataDevicePathTemplate);
|
||||
if (DevicePathNode == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
@ -380,7 +380,7 @@ RegisterAtaDevice (
|
||||
//
|
||||
// Allocate ATA device from the template.
|
||||
//
|
||||
AtaDevice = AllocateCopyPool (sizeof (ATA_DEVICE), &gAtaDeviceTemplate);
|
||||
AtaDevice = AllocateCopyPool(sizeof (ATA_DEVICE), &gAtaDeviceTemplate);
|
||||
if (AtaDevice == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
|
@ -152,7 +152,7 @@ AtaDevicePassThru (
|
||||
}
|
||||
|
||||
CopyMem (Packet->Asb, AtaDevice->Asb, sizeof (EFI_ATA_STATUS_BLOCK));
|
||||
Packet->Acb = AllocateCopyPool (sizeof (EFI_ATA_COMMAND_BLOCK), &AtaDevice->Acb);
|
||||
Packet->Acb = AllocateCopyPool(sizeof (EFI_ATA_COMMAND_BLOCK), &AtaDevice->Acb);
|
||||
} else {
|
||||
Packet = &AtaDevice->Packet;
|
||||
Packet->Asb = AtaDevice->Asb;
|
||||
|
@ -537,7 +537,7 @@ SerialControllerDriverStart (
|
||||
//
|
||||
// Initialize the serial device instance
|
||||
//
|
||||
SerialDevice = AllocateCopyPool (sizeof (SERIAL_DEV), &gSerialDevTempate);
|
||||
SerialDevice = AllocateCopyPool(sizeof (SERIAL_DEV), &gSerialDevTempate);
|
||||
if (SerialDevice == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Error;
|
||||
|
@ -668,7 +668,7 @@ SetKeyboardLayoutEvent (
|
||||
|
||||
UsbNsKey->Signature = USB_NS_KEY_SIGNATURE;
|
||||
UsbNsKey->KeyCount = KeyCount;
|
||||
UsbNsKey->NsKey = AllocateCopyPool (
|
||||
UsbNsKey->NsKey = AllocateCopyPool(
|
||||
(KeyCount + 1) * sizeof (EFI_KEY_DESCRIPTOR),
|
||||
KeyDescriptor
|
||||
);
|
||||
|
@ -360,7 +360,7 @@ Returns:
|
||||
);
|
||||
}
|
||||
|
||||
DirEnt->FileString = AllocateCopyPool (StrSize (LfnBuffer), LfnBuffer);
|
||||
DirEnt->FileString = AllocateCopyPool(StrSize (LfnBuffer), LfnBuffer);
|
||||
}
|
||||
|
||||
STATIC
|
||||
@ -1203,7 +1203,7 @@ Returns:
|
||||
}
|
||||
|
||||
DirEnt->Signature = FAT_DIRENT_SIGNATURE;
|
||||
DirEnt->FileString = AllocateCopyPool (StrSize (FileName), FileName);
|
||||
DirEnt->FileString = AllocateCopyPool(StrSize (FileName), FileName);
|
||||
if (DirEnt->FileString == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
|
@ -1630,7 +1630,7 @@ BiosVideoCheckForVbe (
|
||||
// Set EDID Discovered Data
|
||||
//
|
||||
BiosVideoPrivate->EdidDiscovered.SizeOfEdid = VESA_BIOS_EXTENSIONS_EDID_BLOCK_SIZE;
|
||||
BiosVideoPrivate->EdidDiscovered.Edid = (UINT8 *) AllocateCopyPool (
|
||||
BiosVideoPrivate->EdidDiscovered.Edid = (UINT8 *) AllocateCopyPool(
|
||||
VESA_BIOS_EXTENSIONS_EDID_BLOCK_SIZE,
|
||||
BiosVideoPrivate->VbeEdidDataBlock
|
||||
);
|
||||
@ -1662,7 +1662,7 @@ BiosVideoCheckForVbe (
|
||||
// Copy EDID Override Data to EDID Active Data
|
||||
//
|
||||
BiosVideoPrivate->EdidActive.SizeOfEdid = (UINT32) EdidActiveDataSize;
|
||||
BiosVideoPrivate->EdidActive.Edid = (UINT8 *) AllocateCopyPool (
|
||||
BiosVideoPrivate->EdidActive.Edid = (UINT8 *) AllocateCopyPool(
|
||||
EdidActiveDataSize,
|
||||
EdidActiveDataBlock
|
||||
);
|
||||
|
@ -1635,7 +1635,7 @@ BiosVideoCheckForVbe (
|
||||
// Set EDID Discovered Data
|
||||
//
|
||||
BiosVideoPrivate->EdidDiscovered.SizeOfEdid = VESA_BIOS_EXTENSIONS_EDID_BLOCK_SIZE;
|
||||
BiosVideoPrivate->EdidDiscovered.Edid = (UINT8 *) AllocateCopyPool (
|
||||
BiosVideoPrivate->EdidDiscovered.Edid = (UINT8 *) AllocateCopyPool(
|
||||
VESA_BIOS_EXTENSIONS_EDID_BLOCK_SIZE,
|
||||
BiosVideoPrivate->VbeEdidDataBlock
|
||||
);
|
||||
@ -1667,7 +1667,7 @@ BiosVideoCheckForVbe (
|
||||
// Copy EDID Override Data to EDID Active Data
|
||||
//
|
||||
BiosVideoPrivate->EdidActive.SizeOfEdid = (UINT32) EdidActiveDataSize;
|
||||
BiosVideoPrivate->EdidActive.Edid = (UINT8 *) AllocateCopyPool (
|
||||
BiosVideoPrivate->EdidActive.Edid = (UINT8 *) AllocateCopyPool(
|
||||
EdidActiveDataSize,
|
||||
EdidActiveDataBlock
|
||||
);
|
||||
|
@ -700,7 +700,7 @@ BdsLibVariableToOption (
|
||||
}
|
||||
|
||||
Option->Signature = BDS_LOAD_OPTION_SIGNATURE;
|
||||
Option->DevicePath = AllocateCopyPool (GetDevicePathSize (DevicePath), DevicePath);
|
||||
Option->DevicePath = AllocateCopyPool(GetDevicePathSize (DevicePath), DevicePath);
|
||||
// ASSERT(Option->DevicePath != NULL);
|
||||
if (!Option->DevicePath) {
|
||||
FreePool(Option);
|
||||
@ -709,7 +709,7 @@ BdsLibVariableToOption (
|
||||
// CopyMem (Option->DevicePath, DevicePath, GetDevicePathSize (DevicePath));
|
||||
|
||||
Option->Attribute = Attribute;
|
||||
Option->Description = AllocateCopyPool (StrSize (Description), Description);
|
||||
Option->Description = AllocateCopyPool(StrSize (Description), Description);
|
||||
// ASSERT(Option->Description != NULL);
|
||||
if (!Option->Description) {
|
||||
FreePool(Option);
|
||||
@ -717,7 +717,7 @@ BdsLibVariableToOption (
|
||||
}
|
||||
// CopyMem (Option->Description, Description, StrSize (Description));
|
||||
|
||||
Option->LoadOptions = AllocateCopyPool (LoadOptionsSize, LoadOptions);
|
||||
Option->LoadOptions = AllocateCopyPool(LoadOptionsSize, LoadOptions);
|
||||
// ASSERT(Option->LoadOptions != NULL);
|
||||
if (!Option->LoadOptions) {
|
||||
FreePool(Option);
|
||||
|
@ -264,7 +264,7 @@ UINT8* VideoBiosPatchGetEdid (VOID)
|
||||
if (!EFI_ERROR(Status)) {
|
||||
DBG(" size=%d", EdidProtocol->SizeOfEdid);
|
||||
if (EdidProtocol->SizeOfEdid > 0) {
|
||||
Edid = AllocateCopyPool (EdidProtocol->SizeOfEdid, EdidProtocol->Edid);
|
||||
Edid = AllocateCopyPool(EdidProtocol->SizeOfEdid, EdidProtocol->Edid);
|
||||
}
|
||||
}
|
||||
DBG(" %a\n", Edid != NULL ? "found" : "not found");
|
||||
|
@ -762,7 +762,7 @@ DumpCapsuleFromDisk (
|
||||
}
|
||||
|
||||
if ((FileInfo->Attribute & (EFI_FILE_SYSTEM | EFI_FILE_ARCHIVE)) != 0) {
|
||||
FileInfoBuffer[Index++] = AllocateCopyPool ((UINTN)FileInfo->Size, FileInfo);
|
||||
FileInfoBuffer[Index++] = AllocateCopyPool((UINTN)FileInfo->Size, FileInfo);
|
||||
}
|
||||
|
||||
Status = FileHandleFindNextFile (DirHandle, FileInfo, &NoFile);
|
||||
|
@ -279,7 +279,7 @@ UiCreateLanguageMenu (
|
||||
//
|
||||
GetEfiGlobalVariable2 (L"PlatformLangCodes", (VOID**)&gLanguageString, NULL);
|
||||
if (gLanguageString == NULL) {
|
||||
gLanguageString = AllocateCopyPool (
|
||||
gLanguageString = AllocateCopyPool(
|
||||
AsciiStrSize ((CHAR8 *) PcdGetPtr (PcdUefiVariableDefaultPlatformLangCodes)),
|
||||
(CHAR8 *) PcdGetPtr (PcdUefiVariableDefaultPlatformLangCodes)
|
||||
);
|
||||
|
@ -1600,7 +1600,7 @@ CreateNewDevice (
|
||||
}
|
||||
|
||||
if (IdentifyData != NULL) {
|
||||
DeviceData->IdentifyData = AllocateCopyPool (sizeof (ATA_IDENTIFY_DATA), IdentifyData);
|
||||
DeviceData->IdentifyData = AllocateCopyPool(sizeof (ATA_IDENTIFY_DATA), IdentifyData);
|
||||
if (DeviceData->IdentifyData == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
@ -504,7 +504,7 @@ AhciAtaPassThruGetDevicePath (
|
||||
Private = GET_AHCI_PEIM_HC_PRIVATE_DATA_FROM_THIS_PASS_THRU (This);
|
||||
|
||||
*DevicePathLength = Private->DevicePathLength;
|
||||
*DevicePath = AllocateCopyPool (Private->DevicePathLength, Private->DevicePath);
|
||||
*DevicePath = AllocateCopyPool(Private->DevicePathLength, Private->DevicePath);
|
||||
if (*DevicePath == NULL) {
|
||||
*DevicePathLength = 0;
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
|
@ -753,7 +753,7 @@ AtaAtapiPassThruStart (
|
||||
//
|
||||
// Allocate a buffer to store the ATA_ATAPI_PASS_THRU_INSTANCE data structure
|
||||
//
|
||||
Instance = AllocateCopyPool (sizeof (ATA_ATAPI_PASS_THRU_INSTANCE), &gAtaAtapiPassThruInstanceTemplate);
|
||||
Instance = AllocateCopyPool(sizeof (ATA_ATAPI_PASS_THRU_INSTANCE), &gAtaAtapiPassThruInstanceTemplate);
|
||||
if (Instance == NULL) {
|
||||
goto ErrorExit;
|
||||
}
|
||||
@ -1077,7 +1077,7 @@ CreateNewDeviceInfo (
|
||||
DeviceInfo->Type = DeviceType;
|
||||
|
||||
if (IdentifyData != NULL) {
|
||||
DeviceInfo->IdentifyData = AllocateCopyPool (sizeof (EFI_IDENTIFY_DATA), IdentifyData);
|
||||
DeviceInfo->IdentifyData = AllocateCopyPool(sizeof (EFI_IDENTIFY_DATA), IdentifyData);
|
||||
if (DeviceInfo->IdentifyData == NULL) {
|
||||
FreePool(DeviceInfo);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
@ -1675,7 +1675,7 @@ AtaPassThruBuildDevicePath (
|
||||
}
|
||||
|
||||
if (Instance->Mode == EfiAtaIdeMode) {
|
||||
DevicePathNode = AllocateCopyPool (sizeof (ATAPI_DEVICE_PATH), &mAtapiDevicePathTemplate);
|
||||
DevicePathNode = AllocateCopyPool(sizeof (ATAPI_DEVICE_PATH), &mAtapiDevicePathTemplate);
|
||||
if (DevicePathNode == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
@ -1683,7 +1683,7 @@ AtaPassThruBuildDevicePath (
|
||||
DevicePathNode->Atapi.SlaveMaster = (UINT8) PortMultiplierPort;
|
||||
DevicePathNode->Atapi.Lun = 0;
|
||||
} else {
|
||||
DevicePathNode = AllocateCopyPool (sizeof (SATA_DEVICE_PATH), &mSataDevicePathTemplate);
|
||||
DevicePathNode = AllocateCopyPool(sizeof (SATA_DEVICE_PATH), &mSataDevicePathTemplate);
|
||||
if (DevicePathNode == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
@ -2332,7 +2332,7 @@ ExtScsiPassThruBuildDevicePath (
|
||||
}
|
||||
|
||||
if (Instance->Mode == EfiAtaIdeMode) {
|
||||
DevicePathNode = AllocateCopyPool (sizeof (ATAPI_DEVICE_PATH), &mAtapiDevicePathTemplate);
|
||||
DevicePathNode = AllocateCopyPool(sizeof (ATAPI_DEVICE_PATH), &mAtapiDevicePathTemplate);
|
||||
if (DevicePathNode == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
@ -2341,7 +2341,7 @@ ExtScsiPassThruBuildDevicePath (
|
||||
DevicePathNode->Atapi.SlaveMaster = PortMultiplier;
|
||||
DevicePathNode->Atapi.Lun = (UINT16) Lun;
|
||||
} else {
|
||||
DevicePathNode = AllocateCopyPool (sizeof (SATA_DEVICE_PATH), &mSataDevicePathTemplate);
|
||||
DevicePathNode = AllocateCopyPool(sizeof (SATA_DEVICE_PATH), &mSataDevicePathTemplate);
|
||||
if (DevicePathNode == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
@ -255,7 +255,7 @@ RegisterAtaDevice (
|
||||
//
|
||||
// Allocate ATA device from the template.
|
||||
//
|
||||
AtaDevice = AllocateCopyPool (sizeof (ATA_DEVICE), &gAtaDeviceTemplate);
|
||||
AtaDevice = AllocateCopyPool(sizeof (ATA_DEVICE), &gAtaDeviceTemplate);
|
||||
if (AtaDevice == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
|
@ -133,7 +133,7 @@ AtaDevicePassThru (
|
||||
}
|
||||
|
||||
CopyMem (Packet->Asb, AtaDevice->Asb, sizeof (EFI_ATA_STATUS_BLOCK));
|
||||
Packet->Acb = AllocateCopyPool (sizeof (EFI_ATA_COMMAND_BLOCK), &AtaDevice->Acb);
|
||||
Packet->Acb = AllocateCopyPool(sizeof (EFI_ATA_COMMAND_BLOCK), &AtaDevice->Acb);
|
||||
} else {
|
||||
Packet = &AtaDevice->Packet;
|
||||
Packet->Asb = AtaDevice->Asb;
|
||||
|
@ -967,7 +967,7 @@ RegisterI2cDevice (
|
||||
// Build the device context for current I2C device.
|
||||
//
|
||||
I2cDeviceContext = NULL;
|
||||
I2cDeviceContext = AllocateCopyPool (sizeof (I2C_DEVICE_CONTEXT), &gI2cDeviceContextTemplate);
|
||||
I2cDeviceContext = AllocateCopyPool(sizeof (I2C_DEVICE_CONTEXT), &gI2cDeviceContextTemplate);
|
||||
ASSERT (I2cDeviceContext != NULL);
|
||||
if (I2cDeviceContext == NULL) {
|
||||
continue;
|
||||
|
@ -130,7 +130,7 @@ IsaBusCreateChild (
|
||||
|
||||
Private = ISA_BUS_PRIVATE_DATA_FROM_THIS (This);
|
||||
|
||||
Child = AllocateCopyPool (sizeof (mIsaBusChildPrivateTemplate), &mIsaBusChildPrivateTemplate);
|
||||
Child = AllocateCopyPool(sizeof (mIsaBusChildPrivateTemplate), &mIsaBusChildPrivateTemplate);
|
||||
if (Child == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
@ -317,7 +317,7 @@ IsaBusDriverBindingStart (
|
||||
return Status;
|
||||
}
|
||||
|
||||
Private = AllocateCopyPool (sizeof (mIsaBusPrivateTemplate), &mIsaBusPrivateTemplate);
|
||||
Private = AllocateCopyPool(sizeof (mIsaBusPrivateTemplate), &mIsaBusPrivateTemplate);
|
||||
ASSERT (Private != NULL);
|
||||
|
||||
Private->IsaHcHandle = Controller;
|
||||
|
@ -657,7 +657,7 @@ NvmePassThruGetDevicePath (
|
||||
Private = GET_NVME_PEIM_HC_PRIVATE_DATA_FROM_THIS_NVME_PASSTHRU (This);
|
||||
|
||||
*DevicePathLength = Private->DevicePathLength;
|
||||
*DevicePath = AllocateCopyPool (Private->DevicePathLength, Private->DevicePath);
|
||||
*DevicePath = AllocateCopyPool(Private->DevicePathLength, Private->DevicePath);
|
||||
if (*DevicePath == NULL) {
|
||||
*DevicePathLength = 0;
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
|
@ -445,7 +445,7 @@ CreateSerialDevice (
|
||||
//
|
||||
// Initialize the serial device instance
|
||||
//
|
||||
SerialDevice = AllocateCopyPool (sizeof (SERIAL_DEV), &gSerialDevTemplate);
|
||||
SerialDevice = AllocateCopyPool(sizeof (SERIAL_DEV), &gSerialDevTemplate);
|
||||
ASSERT (SerialDevice != NULL);
|
||||
|
||||
SerialDevice->SerialIo.Mode = &(SerialDevice->SerialMode);
|
||||
|
@ -593,7 +593,7 @@ SdMmcPciHcDriverBindingStart (
|
||||
goto Done;
|
||||
}
|
||||
|
||||
Private = AllocateCopyPool (sizeof (SD_MMC_HC_PRIVATE_DATA), &gSdMmcPciHcTemplate);
|
||||
Private = AllocateCopyPool(sizeof (SD_MMC_HC_PRIVATE_DATA), &gSdMmcPciHcTemplate);
|
||||
if (Private == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
@ -1224,7 +1224,7 @@ SdMmcPassThruBuildDevicePath (
|
||||
}
|
||||
|
||||
if (Private->Slot[Slot].CardType == SdCardType) {
|
||||
SdNode = AllocateCopyPool (sizeof (SD_DEVICE_PATH), &mSdDpTemplate);
|
||||
SdNode = AllocateCopyPool(sizeof (SD_DEVICE_PATH), &mSdDpTemplate);
|
||||
if (SdNode == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
@ -1232,7 +1232,7 @@ SdMmcPassThruBuildDevicePath (
|
||||
|
||||
*DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) SdNode;
|
||||
} else if (Private->Slot[Slot].CardType == EmmcCardType) {
|
||||
EmmcNode = AllocateCopyPool (sizeof (EMMC_DEVICE_PATH), &mEmmcDpTemplate);
|
||||
EmmcNode = AllocateCopyPool(sizeof (EMMC_DEVICE_PATH), &mEmmcDpTemplate);
|
||||
if (EmmcNode == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
@ -589,7 +589,7 @@ UfsHcDriverBindingStart (
|
||||
return Status;
|
||||
}
|
||||
|
||||
Private = AllocateCopyPool (sizeof (UFS_HOST_CONTROLLER_PRIVATE_DATA), &gUfsHcTemplate);
|
||||
Private = AllocateCopyPool(sizeof (UFS_HOST_CONTROLLER_PRIVATE_DATA), &gUfsHcTemplate);
|
||||
if (Private == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
|
@ -719,7 +719,7 @@ InitializeEmmcBlockIoPeim (
|
||||
continue;
|
||||
}
|
||||
|
||||
Private = AllocateCopyPool (sizeof (EMMC_PEIM_HC_PRIVATE_DATA), &gEmmcHcPrivateTemplate);
|
||||
Private = AllocateCopyPool(sizeof (EMMC_PEIM_HC_PRIVATE_DATA), &gEmmcHcPrivateTemplate);
|
||||
if (Private == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
break;
|
||||
|
@ -566,7 +566,7 @@ InitializeSdBlockIoPeim (
|
||||
continue;
|
||||
}
|
||||
|
||||
Private = AllocateCopyPool (sizeof (SD_PEIM_HC_PRIVATE_DATA), &gSdHcPrivateTemplate);
|
||||
Private = AllocateCopyPool(sizeof (SD_PEIM_HC_PRIVATE_DATA), &gSdHcPrivateTemplate);
|
||||
if (Private == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
break;
|
||||
|
@ -338,7 +338,7 @@ DiscoverSdDevice (
|
||||
//
|
||||
// Allocate buffer to store SD_DEVICE private data.
|
||||
//
|
||||
Device = AllocateCopyPool (sizeof (SD_DEVICE), &mSdDeviceTemplate);
|
||||
Device = AllocateCopyPool(sizeof (SD_DEVICE), &mSdDeviceTemplate);
|
||||
if (Device == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Error;
|
||||
|
@ -1073,7 +1073,7 @@ InitializeUfsBlockIoPeim (
|
||||
break;
|
||||
}
|
||||
|
||||
Private = AllocateCopyPool (sizeof (UFS_PEIM_HC_PRIVATE_DATA), &gUfsHcPeimTemplate);
|
||||
Private = AllocateCopyPool(sizeof (UFS_PEIM_HC_PRIVATE_DATA), &gUfsHcPeimTemplate);
|
||||
if (Private == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
break;
|
||||
|
@ -420,7 +420,7 @@ UfsPassThruBuildDevicePath (
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
DevicePathNode = AllocateCopyPool (sizeof (UFS_DEVICE_PATH), &mUfsDevicePathTemplate);
|
||||
DevicePathNode = AllocateCopyPool(sizeof (UFS_DEVICE_PATH), &mUfsDevicePathTemplate);
|
||||
if (DevicePathNode == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
@ -857,7 +857,7 @@ UfsPassThruDriverBindingStart (
|
||||
//
|
||||
// Initialize Ufs Pass Thru private data for managed UFS Host Controller.
|
||||
//
|
||||
Private = AllocateCopyPool (sizeof (UFS_PASS_THRU_PRIVATE_DATA), &gUfsPassThruTemplate);
|
||||
Private = AllocateCopyPool(sizeof (UFS_PASS_THRU_PRIVATE_DATA), &gUfsPassThruTemplate);
|
||||
if (Private == NULL) {
|
||||
DEBUG ((DEBUG_ERROR, "Unable to allocate Ufs Pass Thru private data\n"));
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
|
@ -660,7 +660,7 @@ SetKeyboardLayoutEvent (
|
||||
|
||||
UsbNsKey->Signature = USB_NS_KEY_SIGNATURE;
|
||||
UsbNsKey->KeyCount = KeyCount;
|
||||
UsbNsKey->NsKey = AllocateCopyPool (
|
||||
UsbNsKey->NsKey = AllocateCopyPool(
|
||||
(KeyCount + 1) * sizeof (EFI_KEY_DESCRIPTOR),
|
||||
KeyDescriptor
|
||||
);
|
||||
|
@ -440,7 +440,7 @@ DxeMain (
|
||||
VectorInfo ++;
|
||||
Index ++;
|
||||
}
|
||||
VectorInfo = AllocateCopyPool (sizeof (EFI_VECTOR_HANDOFF_INFO) * Index, (VOID *) VectorInfoList);
|
||||
VectorInfo = AllocateCopyPool(sizeof (EFI_VECTOR_HANDOFF_INFO) * Index, (VOID *) VectorInfoList);
|
||||
ASSERT (VectorInfo != NULL);
|
||||
Status = CoreInstallConfigurationTable (&gEfiVectorHandoffTableGuid, (VOID *) VectorInfo);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
@ -488,7 +488,7 @@ FvCheck (
|
||||
// And then, the cached file buffer can be also used for FvReadFile.
|
||||
//
|
||||
WholeFileSize = IS_FFS_FILE2 (CacheFfsHeader) ? FFS_FILE2_SIZE (CacheFfsHeader): FFS_FILE_SIZE (CacheFfsHeader);
|
||||
CacheFfsHeader = AllocateCopyPool (WholeFileSize, CacheFfsHeader);
|
||||
CacheFfsHeader = AllocateCopyPool(WholeFileSize, CacheFfsHeader);
|
||||
if (CacheFfsHeader == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
@ -658,7 +658,7 @@ NotifyFwVolBlock (
|
||||
//
|
||||
// No FwVol protocol on the handle so create a new one
|
||||
//
|
||||
FvDevice = AllocateCopyPool (sizeof (FV_DEVICE), &mFvDevice);
|
||||
FvDevice = AllocateCopyPool(sizeof (FV_DEVICE), &mFvDevice);
|
||||
if (FvDevice == NULL) {
|
||||
return;
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ FvReadFile (
|
||||
// Cache FFS file to memory buffer.
|
||||
//
|
||||
WholeFileSize = IS_FFS_FILE2 (FfsHeader) ? FFS_FILE2_SIZE (FfsHeader): FFS_FILE_SIZE (FfsHeader);
|
||||
FfsHeader = AllocateCopyPool (WholeFileSize, FfsHeader);
|
||||
FfsHeader = AllocateCopyPool(WholeFileSize, FfsHeader);
|
||||
if (FfsHeader == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
@ -503,7 +503,7 @@ ProduceFVBProtocolOnBuffer (
|
||||
//
|
||||
// Allocate EFI_FW_VOL_BLOCK_DEVICE
|
||||
//
|
||||
FvbDev = AllocateCopyPool (sizeof (EFI_FW_VOL_BLOCK_DEVICE), &mFwVolBlock);
|
||||
FvbDev = AllocateCopyPool(sizeof (EFI_FW_VOL_BLOCK_DEVICE), &mFwVolBlock);
|
||||
if (FvbDev == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
@ -559,7 +559,7 @@ ProduceFVBProtocolOnBuffer (
|
||||
//
|
||||
// FV does not contains extension header, then produce MEMMAP_DEVICE_PATH
|
||||
//
|
||||
FvbDev->DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) AllocateCopyPool (sizeof (FV_MEMMAP_DEVICE_PATH), &mFvMemmapDevicePathTemplate);
|
||||
FvbDev->DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) AllocateCopyPool(sizeof (FV_MEMMAP_DEVICE_PATH), &mFvMemmapDevicePathTemplate);
|
||||
if (FvbDev->DevicePath == NULL) {
|
||||
FreePool(FvbDev);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
@ -570,7 +570,7 @@ ProduceFVBProtocolOnBuffer (
|
||||
//
|
||||
// FV contains extension header, then produce MEDIA_FW_VOL_DEVICE_PATH
|
||||
//
|
||||
FvbDev->DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) AllocateCopyPool (sizeof (FV_PIWG_DEVICE_PATH), &mFvPIWGDevicePathTemplate);
|
||||
FvbDev->DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) AllocateCopyPool(sizeof (FV_PIWG_DEVICE_PATH), &mFvPIWGDevicePathTemplate);
|
||||
if (FvbDev->DevicePath == NULL) {
|
||||
FreePool(FvbDev);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
|
@ -2426,7 +2426,7 @@ CoreInitializeGcdServices (
|
||||
//
|
||||
// Initialize the GCD Memory Space Map
|
||||
//
|
||||
Entry = AllocateCopyPool (sizeof (EFI_GCD_MAP_ENTRY), &mGcdMemorySpaceMapEntryTemplate);
|
||||
Entry = AllocateCopyPool(sizeof (EFI_GCD_MAP_ENTRY), &mGcdMemorySpaceMapEntryTemplate);
|
||||
ASSERT (Entry != NULL);
|
||||
|
||||
Entry->EndAddress = LShiftU64 (1, SizeOfMemorySpace) - 1;
|
||||
@ -2438,7 +2438,7 @@ CoreInitializeGcdServices (
|
||||
//
|
||||
// Initialize the GCD I/O Space Map
|
||||
//
|
||||
Entry = AllocateCopyPool (sizeof (EFI_GCD_MAP_ENTRY), &mGcdIoSpaceMapEntryTemplate);
|
||||
Entry = AllocateCopyPool(sizeof (EFI_GCD_MAP_ENTRY), &mGcdIoSpaceMapEntryTemplate);
|
||||
ASSERT (Entry != NULL);
|
||||
|
||||
Entry->EndAddress = LShiftU64 (1, SizeOfIoSpace) - 1;
|
||||
@ -2643,7 +2643,7 @@ CoreInitializeGcdServices (
|
||||
// because the memory resource found in CoreInitializeMemoryServices()
|
||||
// may have not enough remaining resource for HOB List.
|
||||
//
|
||||
NewHobList = AllocateCopyPool (
|
||||
NewHobList = AllocateCopyPool(
|
||||
(UINTN) PhitHob->EfiFreeMemoryBottom - (UINTN) (*HobStart),
|
||||
*HobStart
|
||||
);
|
||||
|
@ -606,7 +606,7 @@ MemoryProfileInit (
|
||||
mMemoryProfileRecordingEnable = MEMORY_PROFILE_RECORDING_ENABLE;
|
||||
}
|
||||
mMemoryProfileDriverPathSize = PcdGetSize (PcdMemoryProfileDriverPath);
|
||||
mMemoryProfileDriverPath = AllocateCopyPool (mMemoryProfileDriverPathSize, PcdGetPtr (PcdMemoryProfileDriverPath));
|
||||
mMemoryProfileDriverPath = AllocateCopyPool(mMemoryProfileDriverPathSize, PcdGetPtr (PcdMemoryProfileDriverPath));
|
||||
mMemoryProfileContextPtr = &mMemoryProfileContext;
|
||||
|
||||
RegisterDxeCore (HobStart, &mMemoryProfileContext);
|
||||
|
@ -179,7 +179,7 @@ AddImageStruct(
|
||||
mImageStruct[mImageStructCount].EntryPoint = EntryPoint;
|
||||
if (PdbString != NULL) {
|
||||
PdbStringSize = AsciiStrSize(PdbString);
|
||||
mImageStruct[mImageStructCount].PdbString = AllocateCopyPool (PdbStringSize, PdbString);
|
||||
mImageStruct[mImageStructCount].PdbString = AllocateCopyPool(PdbStringSize, PdbString);
|
||||
if (mImageStruct[mImageStructCount].PdbString != NULL) {
|
||||
mImageStruct[mImageStructCount].PdbStringSize = (UINT16) PdbStringSize;
|
||||
}
|
||||
@ -1215,7 +1215,7 @@ SmiHandlerProfileRegisterHandler (
|
||||
} else if (CompareGuid (HandlerGuid, &gEfiSmmSwDispatch2ProtocolGuid)) {
|
||||
SmiHandler->Context = ConvertSmiHandlerSwContext (Context, ContextSize, &SmiHandler->ContextSize);
|
||||
} else {
|
||||
SmiHandler->Context = AllocateCopyPool (ContextSize, Context);
|
||||
SmiHandler->Context = AllocateCopyPool(ContextSize, Context);
|
||||
}
|
||||
}
|
||||
if (SmiHandler->Context == NULL) {
|
||||
|
@ -671,7 +671,7 @@ SmramProfileInit (
|
||||
mSmramProfileRecordingEnable = MEMORY_PROFILE_RECORDING_ENABLE;
|
||||
}
|
||||
mSmramProfileDriverPathSize = PcdGetSize (PcdMemoryProfileDriverPath);
|
||||
mSmramProfileDriverPath = AllocateCopyPool (mSmramProfileDriverPathSize, PcdGetPtr (PcdMemoryProfileDriverPath));
|
||||
mSmramProfileDriverPath = AllocateCopyPool(mSmramProfileDriverPathSize, PcdGetPtr (PcdMemoryProfileDriverPath));
|
||||
mSmramProfileContextPtr = &mSmramProfileContext;
|
||||
|
||||
RegisterSmmCore (&mSmramProfileContext);
|
||||
|
@ -381,7 +381,7 @@ AllocateReservedZeroPool (
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
AllocateCopyPool (
|
||||
AllocateCopyPool(
|
||||
IN UINTN AllocationSize,
|
||||
IN CONST VOID *Buffer
|
||||
)
|
||||
|
@ -392,7 +392,7 @@ ExtractFileNameFromDevicePath (
|
||||
}
|
||||
|
||||
Length = StrLen(LastMatch);
|
||||
FileName = AllocateCopyPool ((Length + 1) * sizeof(CHAR16), LastMatch);
|
||||
FileName = AllocateCopyPool((Length + 1) * sizeof(CHAR16), LastMatch);
|
||||
if (FileName != NULL) {
|
||||
*(FileName + Length) = 0;
|
||||
}
|
||||
|
@ -461,7 +461,7 @@ LibGetToken (
|
||||
|
||||
String = HiiGetString (HiiHandle, Token, NULL);
|
||||
if (String == NULL) {
|
||||
String = AllocateCopyPool (StrSize (mLibUnknownString), mLibUnknownString);
|
||||
String = AllocateCopyPool(StrSize (mLibUnknownString), mLibUnknownString);
|
||||
ASSERT (String != NULL);
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ ValidateCapsuleNameCapsuleIntegrity (
|
||||
// If strings are not aligned on a 16-bit boundary, reallocate memory for it.
|
||||
//
|
||||
if (((UINTN) CapsuleNameBufStart & BIT0) != 0) {
|
||||
CapsuleNameBufStart = AllocateCopyPool (CapsuleHeader->CapsuleImageSize - CapsuleHeader->HeaderSize, CapsuleNameBufStart);
|
||||
CapsuleNameBufStart = AllocateCopyPool(CapsuleHeader->CapsuleImageSize - CapsuleHeader->HeaderSize, CapsuleNameBufStart);
|
||||
if (CapsuleNameBufStart == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
@ -574,7 +574,7 @@ GetEfiSysPartitionFromActiveBootOption(
|
||||
// Return the OptionNumber of the boot option where EFI system partition is got from
|
||||
//
|
||||
if (*LoadOptionNumber == NULL) {
|
||||
*LoadOptionNumber = AllocateCopyPool (sizeof(UINT16), (UINT16 *) &BootOptionBuf[Index].OptionNumber);
|
||||
*LoadOptionNumber = AllocateCopyPool(sizeof(UINT16), (UINT16 *) &BootOptionBuf[Index].OptionNumber);
|
||||
if (*LoadOptionNumber == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
@ -717,7 +717,7 @@ AllocateReservedZeroPool (
|
||||
|
||||
**/
|
||||
VOID *
|
||||
InternalAllocateCopyPool (
|
||||
InternalAllocateCopyPool(
|
||||
IN EFI_MEMORY_TYPE PoolType,
|
||||
IN UINTN AllocationSize,
|
||||
IN CONST VOID *Buffer
|
||||
@ -754,14 +754,14 @@ InternalAllocateCopyPool (
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
AllocateCopyPool (
|
||||
AllocateCopyPool(
|
||||
IN UINTN AllocationSize,
|
||||
IN CONST VOID *Buffer
|
||||
)
|
||||
{
|
||||
VOID *NewBuffer;
|
||||
|
||||
NewBuffer = InternalAllocateCopyPool (EfiBootServicesData, AllocationSize, Buffer);
|
||||
NewBuffer = InternalAllocateCopyPool(EfiBootServicesData, AllocationSize, Buffer);
|
||||
if (NewBuffer != NULL) {
|
||||
MemoryProfileLibRecord (
|
||||
(PHYSICAL_ADDRESS) (UINTN) RETURN_ADDRESS(0),
|
||||
@ -801,7 +801,7 @@ AllocateRuntimeCopyPool (
|
||||
{
|
||||
VOID *NewBuffer;
|
||||
|
||||
NewBuffer = InternalAllocateCopyPool (EfiRuntimeServicesData, AllocationSize, Buffer);
|
||||
NewBuffer = InternalAllocateCopyPool(EfiRuntimeServicesData, AllocationSize, Buffer);
|
||||
if (NewBuffer != NULL) {
|
||||
MemoryProfileLibRecord (
|
||||
(PHYSICAL_ADDRESS) (UINTN) RETURN_ADDRESS(0),
|
||||
@ -841,7 +841,7 @@ AllocateReservedCopyPool (
|
||||
{
|
||||
VOID *NewBuffer;
|
||||
|
||||
NewBuffer = InternalAllocateCopyPool (EfiReservedMemoryType, AllocationSize, Buffer);
|
||||
NewBuffer = InternalAllocateCopyPool(EfiReservedMemoryType, AllocationSize, Buffer);
|
||||
if (NewBuffer != NULL) {
|
||||
MemoryProfileLibRecord (
|
||||
(PHYSICAL_ADDRESS) (UINTN) RETURN_ADDRESS(0),
|
||||
|
@ -2468,7 +2468,7 @@ NetLibDetectMedia (
|
||||
ResetMCastFilters = TRUE;
|
||||
MCastFilterCount = Snp->Mode->MCastFilterCount;
|
||||
if (MCastFilterCount != 0) {
|
||||
MCastFilter = AllocateCopyPool (
|
||||
MCastFilter = AllocateCopyPool(
|
||||
MCastFilterCount * sizeof (EFI_MAC_ADDRESS),
|
||||
Snp->Mode->MCastFilter
|
||||
);
|
||||
|
@ -648,7 +648,7 @@ LibIsSupportedFileType (
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
TmpStr = AllocateCopyPool (StrSize (InputFileType), InputFileType);
|
||||
TmpStr = AllocateCopyPool(StrSize (InputFileType), InputFileType);
|
||||
ASSERT(TmpStr != NULL);
|
||||
LibToLowerString(TmpStr);
|
||||
|
||||
@ -964,7 +964,7 @@ LibGetFileHandleFromDevicePath (
|
||||
*DeviceHandle = Handle;
|
||||
|
||||
if (IsDevicePathEnd(DevicePathNode)) {
|
||||
*ParentFileName = AllocateCopyPool (StrSize (L"\\"), L"\\");
|
||||
*ParentFileName = AllocateCopyPool(StrSize (L"\\"), L"\\");
|
||||
*RetFileHandle = FileHandle;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@ -1009,7 +1009,7 @@ LibGetFileHandleFromDevicePath (
|
||||
0
|
||||
);
|
||||
if (*ParentFileName == NULL) {
|
||||
*ParentFileName = AllocateCopyPool (StrSize (((FILEPATH_DEVICE_PATH *) DevicePathNode)->PathName), ((FILEPATH_DEVICE_PATH *) DevicePathNode)->PathName);
|
||||
*ParentFileName = AllocateCopyPool(StrSize (((FILEPATH_DEVICE_PATH *) DevicePathNode)->PathName), ((FILEPATH_DEVICE_PATH *) DevicePathNode)->PathName);
|
||||
} else {
|
||||
TempPath = LibAppendFileName (*ParentFileName, ((FILEPATH_DEVICE_PATH *) DevicePathNode)->PathName);
|
||||
if (TempPath == NULL) {
|
||||
@ -1495,7 +1495,7 @@ ChooseFile (
|
||||
gFileExplorerPrivate.RetDevicePath = NULL;
|
||||
gFileExplorerPrivate.ChooseHandler = ChooseHandler;
|
||||
if (FileType != NULL) {
|
||||
gFileExplorerPrivate.FileType = AllocateCopyPool (StrSize (FileType), FileType);
|
||||
gFileExplorerPrivate.FileType = AllocateCopyPool(StrSize (FileType), FileType);
|
||||
ASSERT(gFileExplorerPrivate.FileType != NULL);
|
||||
LibToLowerString(gFileExplorerPrivate.FileType);
|
||||
} else {
|
||||
|
@ -721,7 +721,7 @@ AllocateReservedZeroPool (
|
||||
|
||||
**/
|
||||
VOID *
|
||||
InternalAllocateCopyPool (
|
||||
InternalAllocateCopyPool(
|
||||
IN EFI_MEMORY_TYPE PoolType,
|
||||
IN UINTN AllocationSize,
|
||||
IN CONST VOID *Buffer
|
||||
@ -758,14 +758,14 @@ InternalAllocateCopyPool (
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
AllocateCopyPool (
|
||||
AllocateCopyPool(
|
||||
IN UINTN AllocationSize,
|
||||
IN CONST VOID *Buffer
|
||||
)
|
||||
{
|
||||
VOID *NewBuffer;
|
||||
|
||||
NewBuffer = InternalAllocateCopyPool (EfiRuntimeServicesData, AllocationSize, Buffer);
|
||||
NewBuffer = InternalAllocateCopyPool(EfiRuntimeServicesData, AllocationSize, Buffer);
|
||||
if (NewBuffer != NULL) {
|
||||
MemoryProfileLibRecord (
|
||||
(PHYSICAL_ADDRESS) (UINTN) RETURN_ADDRESS(0),
|
||||
@ -805,7 +805,7 @@ AllocateRuntimeCopyPool (
|
||||
{
|
||||
VOID *NewBuffer;
|
||||
|
||||
NewBuffer = InternalAllocateCopyPool (EfiRuntimeServicesData, AllocationSize, Buffer);
|
||||
NewBuffer = InternalAllocateCopyPool(EfiRuntimeServicesData, AllocationSize, Buffer);
|
||||
if (NewBuffer != NULL) {
|
||||
MemoryProfileLibRecord (
|
||||
(PHYSICAL_ADDRESS) (UINTN) RETURN_ADDRESS(0),
|
||||
@ -1092,7 +1092,7 @@ PiSmmCoreMemoryAllocationLibConstructor (
|
||||
// Move the SmramRanges data from BootServicesData to SMRAM.
|
||||
//
|
||||
BootServicesData = mSmmCoreMemoryAllocLibSmramRanges;
|
||||
mSmmCoreMemoryAllocLibSmramRanges = (EFI_SMRAM_DESCRIPTOR *) AllocateCopyPool (Size, (VOID *) BootServicesData);
|
||||
mSmmCoreMemoryAllocLibSmramRanges = (EFI_SMRAM_DESCRIPTOR *) AllocateCopyPool(Size, (VOID *) BootServicesData);
|
||||
ASSERT (mSmmCoreMemoryAllocLibSmramRanges != NULL);
|
||||
|
||||
//
|
||||
|
@ -247,7 +247,7 @@ CreateUserVariableNode (
|
||||
UserVariableNameNode = AllocateZeroPool (sizeof (*UserVariableNameNode));
|
||||
ASSERT (UserVariableNameNode != NULL);
|
||||
UserVariableNameNode->Signature = USER_VARIABLE_NAME_NODE_SIGNATURE;
|
||||
UserVariableNameNode->Name = AllocateCopyPool (VarNameSize, VarName);
|
||||
UserVariableNameNode->Name = AllocateCopyPool(VarNameSize, VarName);
|
||||
UserVariableNameNode->Attributes = Attributes;
|
||||
UserVariableNameNode->DataSize = DataSize;
|
||||
UserVariableNameNode->Index = Index;
|
||||
|
@ -804,7 +804,7 @@ AllocateReservedZeroPool (
|
||||
|
||||
**/
|
||||
VOID *
|
||||
InternalAllocateCopyPool (
|
||||
InternalAllocateCopyPool(
|
||||
IN EFI_MEMORY_TYPE PoolType,
|
||||
IN UINTN AllocationSize,
|
||||
IN CONST VOID *Buffer
|
||||
@ -842,14 +842,14 @@ InternalAllocateCopyPool (
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
AllocateCopyPool (
|
||||
AllocateCopyPool(
|
||||
IN UINTN AllocationSize,
|
||||
IN CONST VOID *Buffer
|
||||
)
|
||||
{
|
||||
VOID *NewBuffer;
|
||||
|
||||
NewBuffer = InternalAllocateCopyPool (EfiRuntimeServicesData, AllocationSize, Buffer);
|
||||
NewBuffer = InternalAllocateCopyPool(EfiRuntimeServicesData, AllocationSize, Buffer);
|
||||
if (NewBuffer != NULL) {
|
||||
MemoryProfileLibRecord (
|
||||
(PHYSICAL_ADDRESS) (UINTN) RETURN_ADDRESS(0),
|
||||
@ -890,7 +890,7 @@ AllocateRuntimeCopyPool (
|
||||
{
|
||||
VOID *NewBuffer;
|
||||
|
||||
NewBuffer = InternalAllocateCopyPool (EfiRuntimeServicesData, AllocationSize, Buffer);
|
||||
NewBuffer = InternalAllocateCopyPool(EfiRuntimeServicesData, AllocationSize, Buffer);
|
||||
if (NewBuffer != NULL) {
|
||||
MemoryProfileLibRecord (
|
||||
(PHYSICAL_ADDRESS) (UINTN) RETURN_ADDRESS(0),
|
||||
|
@ -2290,7 +2290,7 @@ EfiBootManagerRefreshAllBootOption (
|
||||
// Mark the boot option as added by BDS by setting OptionalData to a special GUID
|
||||
//
|
||||
for (Index = 0; Index < BootOptionCount; Index++) {
|
||||
BootOptions[Index].OptionalData = AllocateCopyPool (sizeof (EFI_GUID), &mBmAutoCreateBootOptionGuid);
|
||||
BootOptions[Index].OptionalData = AllocateCopyPool(sizeof (EFI_GUID), &mBmAutoCreateBootOptionGuid);
|
||||
BootOptions[Index].OptionalDataSize = sizeof (EFI_GUID);
|
||||
}
|
||||
|
||||
|
@ -245,7 +245,7 @@ BmGetDescriptionFromDiskInfo (
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Description = AllocateCopyPool (StrSize (Description), Description);
|
||||
Description = AllocateCopyPool(StrSize (Description), Description);
|
||||
}
|
||||
|
||||
return Description;
|
||||
@ -538,7 +538,7 @@ BmGetLoadFileDescription (
|
||||
}
|
||||
|
||||
if (Description != NULL) {
|
||||
return AllocateCopyPool (StrSize (Description), Description);
|
||||
return AllocateCopyPool(StrSize (Description), Description);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@ -704,7 +704,7 @@ BmGetMiscDescription (
|
||||
break;
|
||||
}
|
||||
|
||||
return AllocateCopyPool (StrSize (Description), Description);
|
||||
return AllocateCopyPool(StrSize (Description), Description);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -94,7 +94,7 @@ BmGetControllerName (
|
||||
}
|
||||
|
||||
if (!EFI_ERROR(Status)) {
|
||||
return AllocateCopyPool (StrSize (ControllerName), ControllerName);
|
||||
return AllocateCopyPool(StrSize (ControllerName), ControllerName);
|
||||
} else {
|
||||
return ConvertDevicePathToText (
|
||||
DevicePathFromHandle (ChildHandle != NULL ? ChildHandle : ControllerHandle),
|
||||
|
@ -451,7 +451,7 @@ BmGetActiveConsoleIn (
|
||||
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
|
||||
);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Handles = AllocateCopyPool (sizeof (EFI_HANDLE), &gST->ConsoleInHandle);
|
||||
Handles = AllocateCopyPool(sizeof (EFI_HANDLE), &gST->ConsoleInHandle);
|
||||
if (Handles != NULL) {
|
||||
*Count = 1;
|
||||
}
|
||||
@ -805,7 +805,7 @@ EfiBootManagerRegisterContinueKeyOption (
|
||||
VA_END (Args);
|
||||
|
||||
if (!EFI_ERROR(Status)) {
|
||||
mBmContinueKeyOption = AllocateCopyPool (sizeof (EFI_BOOT_MANAGER_KEY_OPTION), &KeyOption);
|
||||
mBmContinueKeyOption = AllocateCopyPool(sizeof (EFI_BOOT_MANAGER_KEY_OPTION), &KeyOption);
|
||||
ASSERT (mBmContinueKeyOption != NULL);
|
||||
if (mBmHotkeyServiceStarted) {
|
||||
BmProcessKeyOption (mBmContinueKeyOption);
|
||||
|
@ -497,10 +497,10 @@ EfiBootManagerInitializeLoadOption (
|
||||
Option->OptionNumber = OptionNumber;
|
||||
Option->OptionType = OptionType;
|
||||
Option->Attributes = Attributes;
|
||||
Option->Description = AllocateCopyPool (StrSize (Description), Description);
|
||||
Option->Description = AllocateCopyPool(StrSize (Description), Description);
|
||||
Option->FilePath = DuplicateDevicePath (FilePath);
|
||||
if (OptionalData != NULL) {
|
||||
Option->OptionalData = AllocateCopyPool (OptionalDataSize, OptionalData);
|
||||
Option->OptionalData = AllocateCopyPool(OptionalDataSize, OptionalData);
|
||||
Option->OptionalDataSize = OptionalDataSize;
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ BmSetMemoryTypeInformationVariable (
|
||||
return;
|
||||
}
|
||||
VariableSize = GET_GUID_HOB_DATA_SIZE (GuidHob);
|
||||
PreviousMemoryTypeInformation = AllocateCopyPool (VariableSize, GET_GUID_HOB_DATA (GuidHob));
|
||||
PreviousMemoryTypeInformation = AllocateCopyPool(VariableSize, GET_GUID_HOB_DATA (GuidHob));
|
||||
if (PreviousMemoryTypeInformation == NULL) {
|
||||
return;
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ HiiSetString (
|
||||
//
|
||||
// Allocate a copy of the SupportLanguages string that passed in
|
||||
//
|
||||
AllocatedLanguages = AllocateCopyPool (AsciiStrSize (SupportedLanguages), SupportedLanguages);
|
||||
AllocatedLanguages = AllocateCopyPool(AsciiStrSize (SupportedLanguages), SupportedLanguages);
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -710,7 +710,7 @@ AllocateReservedZeroPool (
|
||||
|
||||
**/
|
||||
VOID *
|
||||
InternalAllocateCopyPool (
|
||||
InternalAllocateCopyPool(
|
||||
IN EFI_MEMORY_TYPE PoolType,
|
||||
IN UINTN AllocationSize,
|
||||
IN CONST VOID *Buffer
|
||||
@ -747,14 +747,14 @@ InternalAllocateCopyPool (
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
AllocateCopyPool (
|
||||
AllocateCopyPool(
|
||||
IN UINTN AllocationSize,
|
||||
IN CONST VOID *Buffer
|
||||
)
|
||||
{
|
||||
VOID *NewBuffer;
|
||||
|
||||
NewBuffer = InternalAllocateCopyPool (EfiBootServicesData, AllocationSize, Buffer);
|
||||
NewBuffer = InternalAllocateCopyPool(EfiBootServicesData, AllocationSize, Buffer);
|
||||
if (NewBuffer != NULL) {
|
||||
MemoryProfileLibRecord (
|
||||
(PHYSICAL_ADDRESS) (UINTN) RETURN_ADDRESS(0),
|
||||
@ -794,7 +794,7 @@ AllocateRuntimeCopyPool (
|
||||
{
|
||||
VOID *NewBuffer;
|
||||
|
||||
NewBuffer = InternalAllocateCopyPool (EfiRuntimeServicesData, AllocationSize, Buffer);
|
||||
NewBuffer = InternalAllocateCopyPool(EfiRuntimeServicesData, AllocationSize, Buffer);
|
||||
if (NewBuffer != NULL) {
|
||||
MemoryProfileLibRecord (
|
||||
(PHYSICAL_ADDRESS) (UINTN) RETURN_ADDRESS(0),
|
||||
@ -834,7 +834,7 @@ AllocateReservedCopyPool (
|
||||
{
|
||||
VOID *NewBuffer;
|
||||
|
||||
NewBuffer = InternalAllocateCopyPool (EfiReservedMemoryType, AllocationSize, Buffer);
|
||||
NewBuffer = InternalAllocateCopyPool(EfiReservedMemoryType, AllocationSize, Buffer);
|
||||
if (NewBuffer != NULL) {
|
||||
MemoryProfileLibRecord (
|
||||
(PHYSICAL_ADDRESS) (UINTN) RETURN_ADDRESS(0),
|
||||
|
@ -231,7 +231,7 @@ InstallAcpiTable (
|
||||
//
|
||||
// Install the ACPI table
|
||||
//
|
||||
AcpiTableBufferConst = AllocateCopyPool (AcpiTableBufferSize,AcpiTableBuffer);
|
||||
AcpiTableBufferConst = AllocateCopyPool(AcpiTableBufferSize,AcpiTableBuffer);
|
||||
*TableKey = 0;
|
||||
Status = AddTableToList (
|
||||
AcpiTableInstance,
|
||||
|
@ -320,7 +320,7 @@ SetBootLogo2 (
|
||||
//
|
||||
// Allocate new logo buffer
|
||||
//
|
||||
mLogoBltBuffer = AllocateCopyPool (BufferSize, BltBuffer);
|
||||
mLogoBltBuffer = AllocateCopyPool(BufferSize, BltBuffer);
|
||||
if (mLogoBltBuffer == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
@ -396,7 +396,7 @@ GraphicsConsoleControllerDriverStart (
|
||||
//
|
||||
// Initialize the Graphics Console device instance
|
||||
//
|
||||
Private = AllocateCopyPool (
|
||||
Private = AllocateCopyPool(
|
||||
sizeof (GRAPHICS_CONSOLE_DEV),
|
||||
&mGraphicsConsoleDevTemplate
|
||||
);
|
||||
@ -1777,7 +1777,7 @@ DrawUnicodeWeightAtCursorN (
|
||||
Blt->Width = (UINT16) (Private->ModeData[This->Mode->Mode].GopWidth);
|
||||
Blt->Height = (UINT16) (Private->ModeData[This->Mode->Mode].GopHeight);
|
||||
|
||||
String = AllocateCopyPool ((Count + 1) * sizeof (CHAR16), UnicodeWeight);
|
||||
String = AllocateCopyPool((Count + 1) * sizeof (CHAR16), UnicodeWeight);
|
||||
if (String == NULL) {
|
||||
FreePool(Blt);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
|
@ -55,7 +55,7 @@ GraphicsOutputQueryMode (
|
||||
}
|
||||
|
||||
*SizeOfInfo = This->Mode->SizeOfInfo;
|
||||
*Info = AllocateCopyPool (*SizeOfInfo, This->Mode->Info);
|
||||
*Info = AllocateCopyPool(*SizeOfInfo, This->Mode->Info);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@ -422,7 +422,7 @@ GraphicsOutputDriverBindingStart (
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
Private = AllocateCopyPool (sizeof (mGraphicsOutputInstanceTemplate), &mGraphicsOutputInstanceTemplate);
|
||||
Private = AllocateCopyPool(sizeof (mGraphicsOutputInstanceTemplate), &mGraphicsOutputInstanceTemplate);
|
||||
if (Private == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto CloseProtocols;
|
||||
|
@ -312,7 +312,7 @@ InitializeTerminalConsoleTextMode (
|
||||
|
||||
ASSERT (TextModeCount != NULL);
|
||||
|
||||
TextModeData = AllocateCopyPool (sizeof (mTerminalConsoleModeData), mTerminalConsoleModeData);
|
||||
TextModeData = AllocateCopyPool(sizeof (mTerminalConsoleModeData), mTerminalConsoleModeData);
|
||||
if (TextModeData == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
@ -597,7 +597,7 @@ TerminalDriverBindingStart (
|
||||
//
|
||||
// Initialize the Terminal Dev
|
||||
//
|
||||
TerminalDevice = AllocateCopyPool (sizeof (TERMINAL_DEV), &mTerminalDevTemplate);
|
||||
TerminalDevice = AllocateCopyPool(sizeof (TERMINAL_DEV), &mTerminalDevTemplate);
|
||||
if (TerminalDevice == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto CloseProtocols;
|
||||
|
@ -160,7 +160,7 @@ DiskIoDriverBindingStart (
|
||||
//
|
||||
// Initialize the Disk IO device instance.
|
||||
//
|
||||
Instance = AllocateCopyPool (sizeof (DISK_IO_PRIVATE_DATA), &gDiskIoPrivateDataTemplate);
|
||||
Instance = AllocateCopyPool(sizeof (DISK_IO_PRIVATE_DATA), &gDiskIoPrivateDataTemplate);
|
||||
if (Instance == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto ErrorExit;
|
||||
|
@ -140,7 +140,7 @@ RamDiskDxeEntryPoint (
|
||||
//
|
||||
// Create a private data structure.
|
||||
//
|
||||
ConfigPrivate = AllocateCopyPool (sizeof (RAM_DISK_CONFIG_PRIVATE_DATA), &mRamDiskConfigPrivateDataTemplate);
|
||||
ConfigPrivate = AllocateCopyPool(sizeof (RAM_DISK_CONFIG_PRIVATE_DATA), &mRamDiskConfigPrivateDataTemplate);
|
||||
if (ConfigPrivate == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
@ -617,7 +617,7 @@ RamDiskRegister (
|
||||
//
|
||||
// Create a new RAM disk instance and initialize its private data
|
||||
//
|
||||
PrivateData = AllocateCopyPool (
|
||||
PrivateData = AllocateCopyPool(
|
||||
sizeof (RAM_DISK_PRIVATE_DATA),
|
||||
&mRamDiskPrivateDataTemplate
|
||||
);
|
||||
@ -633,7 +633,7 @@ RamDiskRegister (
|
||||
//
|
||||
// Generate device path information for the registered RAM disk
|
||||
//
|
||||
RamDiskDevNode = AllocateCopyPool (
|
||||
RamDiskDevNode = AllocateCopyPool(
|
||||
sizeof (MEDIA_RAM_DISK_DEVICE_PATH),
|
||||
&mRamDiskDeviceNodeTemplate
|
||||
);
|
||||
|
@ -482,7 +482,7 @@ DuplicateFid (
|
||||
)
|
||||
{
|
||||
*NewFileIdentifierDesc =
|
||||
(UDF_FILE_IDENTIFIER_DESCRIPTOR *)AllocateCopyPool (
|
||||
(UDF_FILE_IDENTIFIER_DESCRIPTOR *)AllocateCopyPool(
|
||||
(UINTN) GetFidDescriptorLength (FileIdentifierDesc), FileIdentifierDesc);
|
||||
}
|
||||
|
||||
@ -503,7 +503,7 @@ DuplicateFe (
|
||||
OUT VOID **NewFileEntry
|
||||
)
|
||||
{
|
||||
*NewFileEntry = AllocateCopyPool (Volume->FileEntrySize, FileEntry);
|
||||
*NewFileEntry = AllocateCopyPool(Volume->FileEntrySize, FileEntry);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -198,7 +198,7 @@ GetToken (
|
||||
|
||||
String = HiiGetString (HiiHandle, Token, NULL);
|
||||
if (String == NULL) {
|
||||
String = AllocateCopyPool (StrSize (mUnknownString), mUnknownString);
|
||||
String = AllocateCopyPool(StrSize (mUnknownString), mUnknownString);
|
||||
ASSERT (String != NULL);
|
||||
}
|
||||
|
||||
@ -2028,7 +2028,7 @@ UpdateHighlightMenuInfo (
|
||||
if (gHighligthMenuInfo.HLTOpCode != NULL) {
|
||||
FreePool(gHighligthMenuInfo.HLTOpCode);
|
||||
}
|
||||
gHighligthMenuInfo.HLTOpCode = AllocateCopyPool (Statement->OpCode->Length, Statement->OpCode);
|
||||
gHighligthMenuInfo.HLTOpCode = AllocateCopyPool(Statement->OpCode->Length, Statement->OpCode);
|
||||
ASSERT (gHighligthMenuInfo.HLTOpCode != NULL);
|
||||
|
||||
gHighligthMenuInfo.HLTIndex = GetIndexInfoForOpcode(Statement->OpCode);
|
||||
@ -2045,7 +2045,7 @@ UpdateHighlightMenuInfo (
|
||||
if (gHighligthMenuInfo.TOSOpCode != NULL) {
|
||||
FreePool(gHighligthMenuInfo.TOSOpCode);
|
||||
}
|
||||
gHighligthMenuInfo.TOSOpCode = AllocateCopyPool (Statement->OpCode->Length, Statement->OpCode);
|
||||
gHighligthMenuInfo.TOSOpCode = AllocateCopyPool(Statement->OpCode->Length, Statement->OpCode);
|
||||
ASSERT (gHighligthMenuInfo.TOSOpCode != NULL);
|
||||
|
||||
gHighligthMenuInfo.TOSIndex = GetIndexInfoForOpcode(Statement->OpCode);
|
||||
|
@ -880,7 +880,7 @@ PasswordProcess (
|
||||
// Compare two typed-in new passwords
|
||||
//
|
||||
if (StrCmp (StringPtr, TempString) == 0) {
|
||||
gUserInput->InputValue.Buffer = AllocateCopyPool (Question->CurrentValue.BufferLen, StringPtr);
|
||||
gUserInput->InputValue.Buffer = AllocateCopyPool(Question->CurrentValue.BufferLen, StringPtr);
|
||||
gUserInput->InputValue.BufferLen = Question->CurrentValue.BufferLen;
|
||||
gUserInput->InputValue.Type = Question->CurrentValue.Type;
|
||||
gUserInput->InputValue.Value.string = HiiSetString(gFormData->HiiHandle, gUserInput->InputValue.Value.string, StringPtr, NULL);
|
||||
@ -1113,7 +1113,7 @@ ProcessOptions (
|
||||
//
|
||||
gUserInput->SelectedStatement = Question;
|
||||
gMisMatch = TRUE;
|
||||
ValueArray = AllocateCopyPool (Question->CurrentValue.BufferLen, Question->CurrentValue.Buffer);
|
||||
ValueArray = AllocateCopyPool(Question->CurrentValue.BufferLen, Question->CurrentValue.Buffer);
|
||||
ASSERT (ValueArray != NULL);
|
||||
gUserInput->InputValue.Buffer = ValueArray;
|
||||
gUserInput->InputValue.BufferLen = Question->CurrentValue.BufferLen;
|
||||
@ -1359,7 +1359,7 @@ ProcessOptions (
|
||||
return Status;
|
||||
}
|
||||
|
||||
gUserInput->InputValue.Buffer = AllocateCopyPool (Question->CurrentValue.BufferLen, StringPtr);
|
||||
gUserInput->InputValue.Buffer = AllocateCopyPool(Question->CurrentValue.BufferLen, StringPtr);
|
||||
gUserInput->InputValue.BufferLen = Question->CurrentValue.BufferLen;
|
||||
gUserInput->InputValue.Type = Question->CurrentValue.Type;
|
||||
gUserInput->InputValue.Value.string = HiiSetString(gFormData->HiiHandle, gUserInput->InputValue.Value.string, StringPtr, NULL);
|
||||
|
@ -372,7 +372,7 @@ DriverHealthManagerGetDriverName (
|
||||
}
|
||||
|
||||
if (!EFI_ERROR(Status)) {
|
||||
return AllocateCopyPool (StrSize (DriverName), DriverName);
|
||||
return AllocateCopyPool(StrSize (DriverName), DriverName);
|
||||
} else {
|
||||
return ConvertDevicePathToText (DevicePathFromHandle (DriverBindingHandle), FALSE, TRUE);
|
||||
}
|
||||
@ -499,7 +499,7 @@ DriverHealthManagerGetControllerName (
|
||||
}
|
||||
|
||||
if (!EFI_ERROR(Status)) {
|
||||
return AllocateCopyPool (StrSize (ControllerName), ControllerName);
|
||||
return AllocateCopyPool(StrSize (ControllerName), ControllerName);
|
||||
} else {
|
||||
return ConvertDevicePathToText (DevicePathFromHandle (ChildHandle != NULL ? ChildHandle : ControllerHandle), FALSE, TRUE);
|
||||
}
|
||||
|
@ -519,7 +519,7 @@ FvSimpleFileSystemDriverStart (
|
||||
// If we didn't decide on a volume label, set a fallback one
|
||||
//
|
||||
if (Instance->VolumeLabel == NULL) {
|
||||
Instance->VolumeLabel = AllocateCopyPool (
|
||||
Instance->VolumeLabel = AllocateCopyPool(
|
||||
sizeof (FVFS_FALLBACK_VOLUME_LABEL),
|
||||
FVFS_FALLBACK_VOLUME_LABEL
|
||||
);
|
||||
|
@ -281,7 +281,7 @@ ExtractKeyword (
|
||||
}
|
||||
*NextString = String + StrLen (String);
|
||||
|
||||
*Keyword = AllocateCopyPool (StrSize (String), String);
|
||||
*Keyword = AllocateCopyPool(StrSize (String), String);
|
||||
if (*Keyword == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
@ -336,7 +336,7 @@ ExtractValue (
|
||||
}
|
||||
*NextString = String + StrLen (String);
|
||||
|
||||
*Value = AllocateCopyPool (StrSize (String), String);
|
||||
*Value = AllocateCopyPool(StrSize (String), String);
|
||||
if (*Value == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
@ -1345,7 +1345,7 @@ GetStringIdFromRecord (
|
||||
return KEYWORD_HANDLER_KEYWORD_NOT_FOUND;
|
||||
} else {
|
||||
if (*NameSpace == NULL) {
|
||||
*NameSpace = AllocateCopyPool (AsciiStrSize (StringPackage->StringPkgHdr->Language), StringPackage->StringPkgHdr->Language);
|
||||
*NameSpace = AllocateCopyPool(AsciiStrSize (StringPackage->StringPkgHdr->Language), StringPackage->StringPkgHdr->Language);
|
||||
if (*NameSpace == NULL) {
|
||||
return KEYWORD_HANDLER_UNDEFINED_PROCESSING_ERROR;
|
||||
}
|
||||
@ -1933,7 +1933,7 @@ GetNameFromId (
|
||||
NULL
|
||||
);
|
||||
if (BestLanguage == NULL) {
|
||||
BestLanguage = AllocateCopyPool (AsciiStrLen ("en-US"), "en-US");
|
||||
BestLanguage = AllocateCopyPool(AsciiStrLen ("en-US"), "en-US");
|
||||
ASSERT (BestLanguage != NULL);
|
||||
}
|
||||
|
||||
@ -2244,7 +2244,7 @@ ExtractValueFromDriver (
|
||||
*StringEnd = L'\0';
|
||||
}
|
||||
|
||||
*ValueElement = AllocateCopyPool (StrSize (StringPtr), StringPtr);
|
||||
*ValueElement = AllocateCopyPool(StrSize (StringPtr), StringPtr);
|
||||
if (*ValueElement == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
@ -2339,7 +2339,7 @@ GetStringIdFromDatabase (
|
||||
if ((DevicePathPkg = Record->PackageList->DevicePathPkg) != NULL) {
|
||||
DestDevicePath = (EFI_DEVICE_PATH_PROTOCOL *) (DevicePathPkg + sizeof (EFI_HII_PACKAGE_HEADER));
|
||||
DevicePathSize = GetDevicePathSize ((EFI_DEVICE_PATH_PROTOCOL *) DestDevicePath);
|
||||
*DevicePath = AllocateCopyPool (DevicePathSize, DestDevicePath);
|
||||
*DevicePath = AllocateCopyPool(DevicePathSize, DestDevicePath);
|
||||
if (*DevicePath == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
@ -2632,7 +2632,7 @@ EnumerateAllKeywords (
|
||||
//
|
||||
// Keep the NameSpace string.
|
||||
//
|
||||
LocalNameSpace = AllocateCopyPool (AsciiStrSize (StringPackage->StringPkgHdr->Language), StringPackage->StringPkgHdr->Language);
|
||||
LocalNameSpace = AllocateCopyPool(AsciiStrSize (StringPackage->StringPkgHdr->Language), StringPackage->StringPkgHdr->Language);
|
||||
if (LocalNameSpace == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
@ -2860,7 +2860,7 @@ EfiConfigKeywordHandlerSetData (
|
||||
//
|
||||
// Use temp string to avoid changing input string buffer.
|
||||
//
|
||||
TempString = AllocateCopyPool (StrSize (KeywordString), KeywordString);
|
||||
TempString = AllocateCopyPool(StrSize (KeywordString), KeywordString);
|
||||
ASSERT (TempString != NULL);
|
||||
StringPtr = TempString;
|
||||
|
||||
@ -3158,7 +3158,7 @@ EfiConfigKeywordHandlerGetData (
|
||||
// Use temp string to avoid changing input string buffer.
|
||||
//
|
||||
if (NameSpaceId != NULL) {
|
||||
TempString = AllocateCopyPool (StrSize (NameSpaceId), NameSpaceId);
|
||||
TempString = AllocateCopyPool(StrSize (NameSpaceId), NameSpaceId);
|
||||
ASSERT (TempString != NULL);
|
||||
}
|
||||
//
|
||||
@ -3187,7 +3187,7 @@ EfiConfigKeywordHandlerGetData (
|
||||
//
|
||||
// Use temp string to avoid changing input string buffer.
|
||||
//
|
||||
TempString = AllocateCopyPool (StrSize (KeywordString), KeywordString);
|
||||
TempString = AllocateCopyPool(StrSize (KeywordString), KeywordString);
|
||||
ASSERT (TempString != NULL);
|
||||
StringPtr = TempString;
|
||||
|
||||
|
@ -234,7 +234,7 @@ GenerateSubStr (
|
||||
ASSERT (String != NULL && SubStr != NULL);
|
||||
|
||||
if (Buffer == NULL) {
|
||||
*SubStr = AllocateCopyPool (StrSize (String), String);
|
||||
*SubStr = AllocateCopyPool(StrSize (String), String);
|
||||
ASSERT (*SubStr != NULL);
|
||||
return;
|
||||
}
|
||||
@ -359,7 +359,7 @@ OutputConfigBody (
|
||||
//
|
||||
// It is the last <ConfigResp> of the incoming configuration string.
|
||||
//
|
||||
Result = AllocateCopyPool (StrSize (String), String);
|
||||
Result = AllocateCopyPool(StrSize (String), String);
|
||||
if (Result == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
} else {
|
||||
@ -372,7 +372,7 @@ OutputConfigBody (
|
||||
if (Length == 0) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
Result = AllocateCopyPool (Length * sizeof (CHAR16), String);
|
||||
Result = AllocateCopyPool(Length * sizeof (CHAR16), String);
|
||||
if (Result == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
@ -917,7 +917,7 @@ CompareAndMergeDefaultString (
|
||||
//
|
||||
// Copy the content of <ConfigAltResp> which contain current AltConfigHdr in AltCfgResp.
|
||||
//
|
||||
ConfigAltResp = AllocateCopyPool (StrSize (*AltCfgResp), *AltCfgResp);
|
||||
ConfigAltResp = AllocateCopyPool(StrSize (*AltCfgResp), *AltCfgResp);
|
||||
if (ConfigAltResp == NULL) {
|
||||
goto Exit;
|
||||
}
|
||||
@ -4744,7 +4744,7 @@ HiiConfigRoutingExtractConfig (
|
||||
// Process each <ConfigRequest> of <MultiConfigRequest>
|
||||
//
|
||||
Length = CalculateConfigStringLen (StringPtr);
|
||||
ConfigRequest = AllocateCopyPool ((Length + 1) * sizeof (CHAR16), StringPtr);
|
||||
ConfigRequest = AllocateCopyPool((Length + 1) * sizeof (CHAR16), StringPtr);
|
||||
if (ConfigRequest == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
@ -4835,7 +4835,7 @@ HiiConfigRoutingExtractConfig (
|
||||
// Not any request block is found.
|
||||
//
|
||||
if (!GetElementsFromRequest(ConfigRequest)) {
|
||||
AccessResults = AllocateCopyPool (StrSize (ConfigRequest), ConfigRequest);
|
||||
AccessResults = AllocateCopyPool(StrSize (ConfigRequest), ConfigRequest);
|
||||
goto NextConfigString;
|
||||
}
|
||||
}
|
||||
@ -5307,7 +5307,7 @@ HiiConfigRoutingRouteConfig (
|
||||
// Process each <ConfigResp> of <MultiConfigResp>
|
||||
//
|
||||
Length = CalculateConfigStringLen (StringPtr);
|
||||
ConfigResp = AllocateCopyPool ((Length + 1) * sizeof (CHAR16), StringPtr);
|
||||
ConfigResp = AllocateCopyPool((Length + 1) * sizeof (CHAR16), StringPtr);
|
||||
if (ConfigResp == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
@ -2777,7 +2777,7 @@ HiiGetFontInfo (
|
||||
//
|
||||
if (LocalFontHandle == NULL) {
|
||||
if (StringInfoOut != NULL) {
|
||||
*StringInfoOut = AllocateCopyPool (StringInfoOutLen, SystemDefault);
|
||||
*StringInfoOut = AllocateCopyPool(StringInfoOutLen, SystemDefault);
|
||||
if (*StringInfoOut == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
LocalFontHandle = NULL;
|
||||
|
@ -287,7 +287,7 @@ InstallFileLoadProtocol (
|
||||
continue;
|
||||
}
|
||||
if (!IsInPrivateList (&NameGuid)) {
|
||||
Private = (LOAD_FILE_ON_FV2_PRIVATE_DATA *)AllocateCopyPool (sizeof (mLoadFileOnFv2PrivateDataTemplate), &mLoadFileOnFv2PrivateDataTemplate);
|
||||
Private = (LOAD_FILE_ON_FV2_PRIVATE_DATA *)AllocateCopyPool(sizeof (mLoadFileOnFv2PrivateDataTemplate), &mLoadFileOnFv2PrivateDataTemplate);
|
||||
ASSERT (Private != NULL);
|
||||
Private->Fv = Fv;
|
||||
Private->DevicePath = CreateFileDevicePath (Handle, &NameGuid, UiName);
|
||||
|
@ -162,7 +162,7 @@ GetPcdName (
|
||||
//
|
||||
// Only need to get the TokenSpaceCName.
|
||||
//
|
||||
Name = AllocateCopyPool (AsciiStrSize (TokenSpaceName), TokenSpaceName);
|
||||
Name = AllocateCopyPool(AsciiStrSize (TokenSpaceName), TokenSpaceName);
|
||||
} else {
|
||||
//
|
||||
// Need to get the full PCD name.
|
||||
|
@ -121,7 +121,7 @@ GetPcdName (
|
||||
//
|
||||
// Only need to get the TokenSpaceCName.
|
||||
//
|
||||
Name = AllocateCopyPool (AsciiStrSize (TokenSpaceName), TokenSpaceName);
|
||||
Name = AllocateCopyPool(AsciiStrSize (TokenSpaceName), TokenSpaceName);
|
||||
} else {
|
||||
//
|
||||
// Need to get the full PCD name.
|
||||
|
@ -117,7 +117,7 @@ DevicePathToStr (
|
||||
TRUE
|
||||
);
|
||||
if (Text == NULL) {
|
||||
Text = AllocateCopyPool (sizeof (L"?"), L"?");
|
||||
Text = AllocateCopyPool(sizeof (L"?"), L"?");
|
||||
ASSERT (Text != NULL);
|
||||
}
|
||||
|
||||
@ -259,7 +259,7 @@ GetImageName (
|
||||
//
|
||||
// Make sure device path node is aligned when accessing it's FV Name Guid field.
|
||||
//
|
||||
AlignedDevPathNode = AllocateCopyPool (DevicePathNodeLength(DevPathNode), DevPathNode);
|
||||
AlignedDevPathNode = AllocateCopyPool(DevicePathNodeLength(DevPathNode), DevPathNode);
|
||||
|
||||
//
|
||||
// Find the Fv File path
|
||||
|
@ -167,7 +167,7 @@ OnigurumaMatch (
|
||||
// Region beg/end values represent bytes, not characters
|
||||
//
|
||||
(*Captures)[Index].Length = (Region->end[Index] - Region->beg[Index]) / sizeof(CHAR16);
|
||||
(*Captures)[Index].CapturePtr = AllocateCopyPool (
|
||||
(*Captures)[Index].CapturePtr = AllocateCopyPool(
|
||||
((*Captures)[Index].Length) * sizeof (CHAR16),
|
||||
(CHAR16*)((UINTN)String + Region->beg[Index])
|
||||
);
|
||||
|
@ -177,7 +177,7 @@ CreateQuestion (
|
||||
NameValueNode = AllocateZeroPool (sizeof (NAME_VALUE_NODE));
|
||||
ASSERT (NameValueNode != NULL);
|
||||
NameValueNode->Signature = NAME_VALUE_NODE_SIGNATURE;
|
||||
NameValueNode->Name = AllocateCopyPool (StrSize (Statement->VariableName), Statement->VariableName);
|
||||
NameValueNode->Name = AllocateCopyPool(StrSize (Statement->VariableName), Statement->VariableName);
|
||||
ASSERT (NameValueNode->Name != NULL);
|
||||
NameValueNode->Value = AllocateZeroPool (0x10);
|
||||
ASSERT (NameValueNode->Value != NULL);
|
||||
@ -443,7 +443,7 @@ CreateStorage (
|
||||
|
||||
Storage->BrowserStorage = BrowserStorage;
|
||||
InitializeConfigHdr (FormSet, Storage);
|
||||
Storage->ConfigRequest = AllocateCopyPool (StrSize (Storage->ConfigHdr), Storage->ConfigHdr);
|
||||
Storage->ConfigRequest = AllocateCopyPool(StrSize (Storage->ConfigHdr), Storage->ConfigHdr);
|
||||
Storage->SpareStrLen = 0;
|
||||
|
||||
return Storage;
|
||||
@ -594,7 +594,7 @@ InitializeRequestElement (
|
||||
Question->StorageWidth
|
||||
);
|
||||
HiiToLower(RequestElement);
|
||||
Question->BlockName = AllocateCopyPool ((StrLen + 1) * sizeof (CHAR16), RequestElement);
|
||||
Question->BlockName = AllocateCopyPool((StrLen + 1) * sizeof (CHAR16), RequestElement);
|
||||
} else {
|
||||
StrLen = UnicodeSPrint (RequestElement, 30 * sizeof (CHAR16), L"&%s", Question->VariableName);
|
||||
}
|
||||
@ -658,7 +658,7 @@ InitializeRequestElement (
|
||||
ConfigInfo = AllocateZeroPool(sizeof (FORM_BROWSER_CONFIG_REQUEST));
|
||||
ASSERT (ConfigInfo != NULL);
|
||||
ConfigInfo->Signature = FORM_BROWSER_CONFIG_REQUEST_SIGNATURE;
|
||||
ConfigInfo->ConfigRequest = AllocateCopyPool (StrSize (FormsetStorage->ConfigHdr), FormsetStorage->ConfigHdr);
|
||||
ConfigInfo->ConfigRequest = AllocateCopyPool(StrSize (FormsetStorage->ConfigHdr), FormsetStorage->ConfigHdr);
|
||||
ASSERT (ConfigInfo->ConfigRequest != NULL);
|
||||
ConfigInfo->SpareStrLen = 0;
|
||||
ConfigInfo->Storage = FormsetStorage->BrowserStorage;
|
||||
@ -1340,7 +1340,7 @@ ParseOpCodes (
|
||||
case EFI_IFR_EQ_ID_VAL_LIST_OP:
|
||||
CopyMem (&ExpressionOpCode->QuestionId, &((EFI_IFR_EQ_ID_VAL_LIST *) OpCodeData)->QuestionId, sizeof (EFI_QUESTION_ID));
|
||||
CopyMem (&ExpressionOpCode->ListLength, &((EFI_IFR_EQ_ID_VAL_LIST *) OpCodeData)->ListLength, sizeof (UINT16));
|
||||
ExpressionOpCode->ValueList = AllocateCopyPool (ExpressionOpCode->ListLength * sizeof (UINT16), &((EFI_IFR_EQ_ID_VAL_LIST *) OpCodeData)->ValueList);
|
||||
ExpressionOpCode->ValueList = AllocateCopyPool(ExpressionOpCode->ListLength * sizeof (UINT16), &((EFI_IFR_EQ_ID_VAL_LIST *) OpCodeData)->ValueList);
|
||||
break;
|
||||
|
||||
case EFI_IFR_TO_STRING_OP:
|
||||
@ -2091,7 +2091,7 @@ ParseOpCodes (
|
||||
CopyMem (&CurrentDefault->DefaultId, &((EFI_IFR_DEFAULT *) OpCodeData)->DefaultId, sizeof (UINT16));
|
||||
if (CurrentDefault->Value.Type == EFI_IFR_TYPE_BUFFER) {
|
||||
CurrentDefault->Value.BufferLen = (UINT16) (OpCodeLength - OFFSET_OF (EFI_IFR_DEFAULT, Value));
|
||||
CurrentDefault->Value.Buffer = AllocateCopyPool (CurrentDefault->Value.BufferLen, &((EFI_IFR_DEFAULT *) OpCodeData)->Value);
|
||||
CurrentDefault->Value.Buffer = AllocateCopyPool(CurrentDefault->Value.BufferLen, &((EFI_IFR_DEFAULT *) OpCodeData)->Value);
|
||||
ASSERT (CurrentDefault->Value.Buffer != NULL);
|
||||
} else {
|
||||
CopyMem (&CurrentDefault->Value.Value, &((EFI_IFR_DEFAULT *) OpCodeData)->Value, OpCodeLength - OFFSET_OF (EFI_IFR_DEFAULT, Value));
|
||||
@ -2129,7 +2129,7 @@ ParseOpCodes (
|
||||
}
|
||||
|
||||
CurrentDefault->Value.BufferLen = (UINT16) (OpCodeLength - OFFSET_OF (EFI_IFR_ONE_OF_OPTION, Value));
|
||||
CurrentDefault->Value.Buffer = AllocateCopyPool (CurrentDefault->Value.BufferLen, &((EFI_IFR_ONE_OF_OPTION *) OpCodeData)->Value);
|
||||
CurrentDefault->Value.Buffer = AllocateCopyPool(CurrentDefault->Value.BufferLen, &((EFI_IFR_ONE_OF_OPTION *) OpCodeData)->Value);
|
||||
ASSERT (CurrentDefault->Value.Buffer != NULL);
|
||||
|
||||
//
|
||||
|
@ -1033,7 +1033,7 @@ GetToken (
|
||||
|
||||
String = HiiGetString (HiiHandle, Token, NULL);
|
||||
if (String == NULL) {
|
||||
String = AllocateCopyPool (StrSize (mUnknownString), mUnknownString);
|
||||
String = AllocateCopyPool(StrSize (mUnknownString), mUnknownString);
|
||||
ASSERT (String != NULL);
|
||||
}
|
||||
return (CHAR16 *) String;
|
||||
@ -1056,7 +1056,7 @@ NewStringCpy (
|
||||
if (*Dest != NULL) {
|
||||
FreePool(*Dest);
|
||||
}
|
||||
*Dest = AllocateCopyPool (StrSize (Src), Src);
|
||||
*Dest = AllocateCopyPool(StrSize (Src), Src);
|
||||
ASSERT (*Dest != NULL);
|
||||
}
|
||||
|
||||
@ -1185,7 +1185,7 @@ SetValueByName (
|
||||
if (Buffer != NULL) {
|
||||
FreePool(Buffer);
|
||||
}
|
||||
Buffer = AllocateCopyPool (StrSize (Value), Value);
|
||||
Buffer = AllocateCopyPool(StrSize (Value), Value);
|
||||
ASSERT (Buffer != NULL);
|
||||
if (SetValueTo == GetSetValueWithEditBuffer) {
|
||||
Node->EditValue = Buffer;
|
||||
@ -3009,7 +3009,7 @@ GetSyncRestoreConfigRequest(
|
||||
// Need to restore all the fields in the ConfigRequest.
|
||||
//
|
||||
if (*Progress == L'G') {
|
||||
*RestoreConfigRequest = AllocateCopyPool (StrSize (ConfigRequest), ConfigRequest);
|
||||
*RestoreConfigRequest = AllocateCopyPool(StrSize (ConfigRequest), ConfigRequest);
|
||||
ASSERT (*RestoreConfigRequest != NULL);
|
||||
return;
|
||||
}
|
||||
@ -3935,7 +3935,7 @@ GetOffsetFromConfigResp (
|
||||
//
|
||||
// 2. Change all hex digits in Question->BlockName to lower and compare again.
|
||||
//
|
||||
BlockData = AllocateCopyPool (StrSize(Question->BlockName), Question->BlockName);
|
||||
BlockData = AllocateCopyPool(StrSize(Question->BlockName), Question->BlockName);
|
||||
ASSERT (BlockData != NULL);
|
||||
HiiToLower (BlockData);
|
||||
RequestElement = StrStr (ConfigResp, BlockData);
|
||||
@ -4985,14 +4985,14 @@ IsQuestionValueChanged (
|
||||
switch (Question->Operand) {
|
||||
case EFI_IFR_ORDERED_LIST_OP:
|
||||
BufferWidth = Question->StorageWidth;
|
||||
BackUpBuffer = AllocateCopyPool (BufferWidth, Question->BufferValue);
|
||||
BackUpBuffer = AllocateCopyPool(BufferWidth, Question->BufferValue);
|
||||
ASSERT (BackUpBuffer != NULL);
|
||||
break;
|
||||
|
||||
case EFI_IFR_STRING_OP:
|
||||
case EFI_IFR_PASSWORD_OP:
|
||||
BufferWidth = (UINTN) Question->Maximum * sizeof (CHAR16);
|
||||
BackUpBuffer = AllocateCopyPool (BufferWidth, Question->BufferValue);
|
||||
BackUpBuffer = AllocateCopyPool(BufferWidth, Question->BufferValue);
|
||||
ASSERT (BackUpBuffer != NULL);
|
||||
break;
|
||||
|
||||
@ -5009,14 +5009,14 @@ IsQuestionValueChanged (
|
||||
switch (Question->Operand) {
|
||||
case EFI_IFR_ORDERED_LIST_OP:
|
||||
BufferWidth = Question->StorageWidth;
|
||||
BackUpBuffer2 = AllocateCopyPool (BufferWidth, Question->BufferValue);
|
||||
BackUpBuffer2 = AllocateCopyPool(BufferWidth, Question->BufferValue);
|
||||
ASSERT (BackUpBuffer2 != NULL);
|
||||
break;
|
||||
|
||||
case EFI_IFR_STRING_OP:
|
||||
case EFI_IFR_PASSWORD_OP:
|
||||
BufferWidth = (UINTN) Question->Maximum * sizeof (CHAR16);
|
||||
BackUpBuffer2 = AllocateCopyPool (BufferWidth, Question->BufferValue);
|
||||
BackUpBuffer2 = AllocateCopyPool(BufferWidth, Question->BufferValue);
|
||||
ASSERT (BackUpBuffer2 != NULL);
|
||||
break;
|
||||
|
||||
@ -5411,7 +5411,7 @@ ConfigRequestAdjust (
|
||||
}
|
||||
|
||||
if (Storage->ConfigRequest == NULL) {
|
||||
Storage->ConfigRequest = AllocateCopyPool (StrSize (ConfigRequest), ConfigRequest);
|
||||
Storage->ConfigRequest = AllocateCopyPool(StrSize (ConfigRequest), ConfigRequest);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -5600,7 +5600,7 @@ LoadStorage (
|
||||
FreePool(Result);
|
||||
}
|
||||
|
||||
Storage->BrowserStorage->ConfigRequest = AllocateCopyPool (StrSize (Storage->ConfigRequest), Storage->ConfigRequest);
|
||||
Storage->BrowserStorage->ConfigRequest = AllocateCopyPool(StrSize (Storage->ConfigRequest), Storage->ConfigRequest);
|
||||
|
||||
//
|
||||
// Input NULL for ConfigRequest field means sync all fields from editbuffer to buffer.
|
||||
@ -5905,7 +5905,7 @@ GetIfrBinaryData (
|
||||
// of the Form Package.
|
||||
//
|
||||
*BinaryLength = PackageHeader.Length - Offset2;
|
||||
*BinaryData = AllocateCopyPool (*BinaryLength, OpCodeData);
|
||||
*BinaryData = AllocateCopyPool(*BinaryLength, OpCodeData);
|
||||
|
||||
FreePool(HiiPackageList);
|
||||
|
||||
@ -6411,7 +6411,7 @@ RegisterHotKey (
|
||||
HotKey = AllocateZeroPool (sizeof (BROWSER_HOT_KEY));
|
||||
ASSERT (HotKey != NULL);
|
||||
HotKey->Signature = BROWSER_HOT_KEY_SIGNATURE;
|
||||
HotKey->KeyData = AllocateCopyPool (sizeof (EFI_INPUT_KEY), KeyData);
|
||||
HotKey->KeyData = AllocateCopyPool(sizeof (EFI_INPUT_KEY), KeyData);
|
||||
InsertTailList (&gBrowserHotKeyList, &HotKey->Link);
|
||||
|
||||
//
|
||||
@ -6422,7 +6422,7 @@ RegisterHotKey (
|
||||
if (HotKey->HelpString != NULL) {
|
||||
FreePool(HotKey->HelpString);
|
||||
}
|
||||
HotKey->HelpString = AllocateCopyPool (StrSize (HelpString), HelpString);
|
||||
HotKey->HelpString = AllocateCopyPool(StrSize (HelpString), HelpString);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
@ -550,7 +550,7 @@ MeasureSmbiosTable (
|
||||
DEBUG ((DEBUG_INFO, "The Smbios Table size: 0x%x\n", TableLength));
|
||||
DEBUG_CODE (InternalDumpHex ((UINT8 *)(UINTN)SmbiosTableAddress, TableLength););
|
||||
|
||||
TableAddress = AllocateCopyPool ((UINTN)TableLength, (VOID *)(UINTN)SmbiosTableAddress);
|
||||
TableAddress = AllocateCopyPool((UINTN)TableLength, (VOID *)(UINTN)SmbiosTableAddress);
|
||||
if (TableAddress == NULL) {
|
||||
return ;
|
||||
}
|
||||
|
@ -324,7 +324,7 @@ AllocateReservedZeroPool (
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
AllocateCopyPool (
|
||||
AllocateCopyPool(
|
||||
IN UINTN AllocationSize,
|
||||
IN CONST VOID *Buffer
|
||||
);
|
||||
|
@ -214,7 +214,7 @@ ExtractGuidedSectionRegisterHandlers (
|
||||
// Install the Guided Section GUID configuration table to record the GUID itself.
|
||||
// Then the content of the configuration table buffer will be the same as the GUID value itself.
|
||||
//
|
||||
GuidData = AllocateCopyPool (sizeof (GUID), (VOID *) SectionGuid);
|
||||
GuidData = AllocateCopyPool(sizeof (GUID), (VOID *) SectionGuid);
|
||||
if (GuidData != NULL) {
|
||||
gBS->InstallConfigurationTable ((EFI_GUID *) SectionGuid, GuidData);
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ HstiAipGetInfo (
|
||||
|
||||
HstiAip = HSTI_AIP_PRIVATE_DATA_FROM_THIS(This);
|
||||
|
||||
*InformationBlock = AllocateCopyPool (HstiAip->HstiSize, HstiAip->Hsti);
|
||||
*InformationBlock = AllocateCopyPool(HstiAip->HstiSize, HstiAip->Hsti);
|
||||
if (*InformationBlock == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
@ -153,7 +153,7 @@ HstiAipGetSupportedTypes (
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
*InfoTypesBuffer = AllocateCopyPool (sizeof(gAdapterInfoPlatformSecurityGuid), &gAdapterInfoPlatformSecurityGuid);
|
||||
*InfoTypesBuffer = AllocateCopyPool(sizeof(gAdapterInfoPlatformSecurityGuid), &gAdapterInfoPlatformSecurityGuid);
|
||||
if (*InfoTypesBuffer == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ HstiLibSetTable (
|
||||
if (HstiAip == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
HstiAip->Hsti = AllocateCopyPool (HstiSize, Hsti);
|
||||
HstiAip->Hsti = AllocateCopyPool(HstiSize, Hsti);
|
||||
if (HstiAip->Hsti == NULL) {
|
||||
FreePool(HstiAip);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
|
@ -570,7 +570,7 @@ AllocateReservedZeroPool (
|
||||
|
||||
**/
|
||||
VOID *
|
||||
InternalAllocateCopyPool (
|
||||
InternalAllocateCopyPool(
|
||||
IN EFI_MEMORY_TYPE PoolType,
|
||||
IN UINTN AllocationSize,
|
||||
IN CONST VOID *Buffer
|
||||
@ -607,7 +607,7 @@ InternalAllocateCopyPool (
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
AllocateCopyPool (
|
||||
AllocateCopyPool(
|
||||
IN UINTN AllocationSize,
|
||||
IN CONST VOID *Buffer
|
||||
)
|
||||
@ -648,7 +648,7 @@ AllocateRuntimeCopyPool (
|
||||
IN CONST VOID *Buffer
|
||||
)
|
||||
{
|
||||
return InternalAllocateCopyPool (EfiRuntimeServicesData, AllocationSize, Buffer);
|
||||
return InternalAllocateCopyPool(EfiRuntimeServicesData, AllocationSize, Buffer);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -675,7 +675,7 @@ AllocateReservedCopyPool (
|
||||
IN CONST VOID *Buffer
|
||||
)
|
||||
{
|
||||
return InternalAllocateCopyPool (EfiReservedMemoryType, AllocationSize, Buffer);
|
||||
return InternalAllocateCopyPool(EfiReservedMemoryType, AllocationSize, Buffer);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -674,12 +674,12 @@ InternalPeiServicesInstallFvInfoPpi (
|
||||
FvInfoPpi->FvInfo = (VOID *) FvInfo;
|
||||
FvInfoPpi->FvInfoSize = FvInfoSize;
|
||||
if (ParentFvName != NULL) {
|
||||
ParentFvNameValue = AllocateCopyPool (sizeof (EFI_GUID), ParentFvName);
|
||||
ParentFvNameValue = AllocateCopyPool(sizeof (EFI_GUID), ParentFvName);
|
||||
ASSERT (ParentFvNameValue != NULL);
|
||||
FvInfoPpi->ParentFvName = ParentFvNameValue;
|
||||
}
|
||||
if (ParentFileName != NULL) {
|
||||
ParentFileNameValue = AllocateCopyPool (sizeof (EFI_GUID), ParentFileName);
|
||||
ParentFileNameValue = AllocateCopyPool(sizeof (EFI_GUID), ParentFileName);
|
||||
ASSERT (ParentFileNameValue != NULL);
|
||||
FvInfoPpi->ParentFileName = ParentFileNameValue;
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ SmmIoLibInternalEndOfDxeNotify (
|
||||
|
||||
MergeGcdMmioEntry (MemSpaceMap, &NumberOfDescriptors);
|
||||
|
||||
mSmmIoLibGcdMemSpace = AllocateCopyPool (NumberOfDescriptors * sizeof (EFI_GCD_MEMORY_SPACE_DESCRIPTOR), MemSpaceMap);
|
||||
mSmmIoLibGcdMemSpace = AllocateCopyPool(NumberOfDescriptors * sizeof (EFI_GCD_MEMORY_SPACE_DESCRIPTOR), MemSpaceMap);
|
||||
ASSERT (mSmmIoLibGcdMemSpace != NULL);
|
||||
if (mSmmIoLibGcdMemSpace == NULL) {
|
||||
gBS->FreePool(MemSpaceMap);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user