Clean up to update the reference of the these macros:
EFI_SIGNATURE_16 -> SIGNATURE_16 EFI_SIGNATURE_32 -> SIGNATURE_32 EFI_SIGNATURE_64 -> SIGNATURE_64 EFI_FIELD_OFFSET -> OFFSET_OF EFI_MAX_BIT -> MAX_BIT EFI_MAX_ADDRESS -> MAX_ADDRESS These macros are not defined in UEFI spec. It makes more sense to use the equivalent macros in Base.h to avoid alias. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7056 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -53,24 +53,24 @@ LIST_ENTRY mFreeMemoryMapEntryList = INITIALIZE_LIST_HEAD_VARIABLE (mFreeMemor
|
||||
BOOLEAN mMemoryTypeInformationInitialized = FALSE;
|
||||
|
||||
EFI_MEMORY_TYPE_STAISTICS mMemoryTypeStatistics[EfiMaxMemoryType + 1] = {
|
||||
{ 0, EFI_MAX_ADDRESS, 0, 0, EfiMaxMemoryType, TRUE, FALSE }, // EfiReservedMemoryType
|
||||
{ 0, EFI_MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE }, // EfiLoaderCode
|
||||
{ 0, EFI_MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE }, // EfiLoaderData
|
||||
{ 0, EFI_MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE }, // EfiBootServicesCode
|
||||
{ 0, EFI_MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE }, // EfiBootServicesData
|
||||
{ 0, EFI_MAX_ADDRESS, 0, 0, EfiMaxMemoryType, TRUE, TRUE }, // EfiRuntimeServicesCode
|
||||
{ 0, EFI_MAX_ADDRESS, 0, 0, EfiMaxMemoryType, TRUE, TRUE }, // EfiRuntimeServicesData
|
||||
{ 0, EFI_MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE }, // EfiConventionalMemory
|
||||
{ 0, EFI_MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE }, // EfiUnusableMemory
|
||||
{ 0, EFI_MAX_ADDRESS, 0, 0, EfiMaxMemoryType, TRUE, FALSE }, // EfiACPIReclaimMemory
|
||||
{ 0, EFI_MAX_ADDRESS, 0, 0, EfiMaxMemoryType, TRUE, FALSE }, // EfiACPIMemoryNVS
|
||||
{ 0, EFI_MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE }, // EfiMemoryMappedIO
|
||||
{ 0, EFI_MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE }, // EfiMemoryMappedIOPortSpace
|
||||
{ 0, EFI_MAX_ADDRESS, 0, 0, EfiMaxMemoryType, TRUE, TRUE }, // EfiPalCode
|
||||
{ 0, EFI_MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE } // EfiMaxMemoryType
|
||||
{ 0, MAX_ADDRESS, 0, 0, EfiMaxMemoryType, TRUE, FALSE }, // EfiReservedMemoryType
|
||||
{ 0, MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE }, // EfiLoaderCode
|
||||
{ 0, MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE }, // EfiLoaderData
|
||||
{ 0, MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE }, // EfiBootServicesCode
|
||||
{ 0, MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE }, // EfiBootServicesData
|
||||
{ 0, MAX_ADDRESS, 0, 0, EfiMaxMemoryType, TRUE, TRUE }, // EfiRuntimeServicesCode
|
||||
{ 0, MAX_ADDRESS, 0, 0, EfiMaxMemoryType, TRUE, TRUE }, // EfiRuntimeServicesData
|
||||
{ 0, MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE }, // EfiConventionalMemory
|
||||
{ 0, MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE }, // EfiUnusableMemory
|
||||
{ 0, MAX_ADDRESS, 0, 0, EfiMaxMemoryType, TRUE, FALSE }, // EfiACPIReclaimMemory
|
||||
{ 0, MAX_ADDRESS, 0, 0, EfiMaxMemoryType, TRUE, FALSE }, // EfiACPIMemoryNVS
|
||||
{ 0, MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE }, // EfiMemoryMappedIO
|
||||
{ 0, MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE }, // EfiMemoryMappedIOPortSpace
|
||||
{ 0, MAX_ADDRESS, 0, 0, EfiMaxMemoryType, TRUE, TRUE }, // EfiPalCode
|
||||
{ 0, MAX_ADDRESS, 0, 0, EfiMaxMemoryType, FALSE, FALSE } // EfiMaxMemoryType
|
||||
};
|
||||
|
||||
EFI_PHYSICAL_ADDRESS mDefaultMaximumAddress = EFI_MAX_ADDRESS;
|
||||
EFI_PHYSICAL_ADDRESS mDefaultMaximumAddress = MAX_ADDRESS;
|
||||
|
||||
EFI_MEMORY_TYPE_INFORMATION gMemoryTypeInformation[EfiMaxMemoryType + 1] = {
|
||||
{ EfiReservedMemoryType, 0 },
|
||||
@ -387,7 +387,7 @@ PromoteMemoryResource (
|
||||
Entry = CR (Link, EFI_GCD_MAP_ENTRY, Link, EFI_GCD_MAP_SIGNATURE);
|
||||
|
||||
if (Entry->GcdMemoryType == EfiGcdMemoryTypeReserved &&
|
||||
Entry->EndAddress < EFI_MAX_ADDRESS &&
|
||||
Entry->EndAddress < MAX_ADDRESS &&
|
||||
(Entry->Capabilities & (EFI_MEMORY_PRESENT | EFI_MEMORY_INITIALIZED | EFI_MEMORY_TESTED)) ==
|
||||
(EFI_MEMORY_PRESENT | EFI_MEMORY_INITIALIZED)) {
|
||||
//
|
||||
@ -513,7 +513,7 @@ CoreAddMemoryDescriptor (
|
||||
gMemoryTypeInformation[FreeIndex].NumberOfPages
|
||||
);
|
||||
mMemoryTypeStatistics[Type].BaseAddress = 0;
|
||||
mMemoryTypeStatistics[Type].MaximumAddress = EFI_MAX_ADDRESS;
|
||||
mMemoryTypeStatistics[Type].MaximumAddress = MAX_ADDRESS;
|
||||
}
|
||||
}
|
||||
return;
|
||||
@ -571,7 +571,7 @@ CoreAddMemoryDescriptor (
|
||||
}
|
||||
}
|
||||
mMemoryTypeStatistics[Type].CurrentNumberOfPages = 0;
|
||||
if (mMemoryTypeStatistics[Type].MaximumAddress == EFI_MAX_ADDRESS) {
|
||||
if (mMemoryTypeStatistics[Type].MaximumAddress == MAX_ADDRESS) {
|
||||
mMemoryTypeStatistics[Type].MaximumAddress = mDefaultMaximumAddress;
|
||||
}
|
||||
}
|
||||
@ -1019,7 +1019,7 @@ CoreAllocatePages (
|
||||
//
|
||||
// The max address is the max natively addressable address for the processor
|
||||
//
|
||||
MaxAddress = EFI_MAX_ADDRESS;
|
||||
MaxAddress = MAX_ADDRESS;
|
||||
|
||||
if (Type == AllocateMaxAddress) {
|
||||
MaxAddress = Start;
|
||||
@ -1127,7 +1127,7 @@ CoreFreePages (
|
||||
//
|
||||
// Destroy the contents
|
||||
//
|
||||
if (Memory < EFI_MAX_ADDRESS) {
|
||||
if (Memory < MAX_ADDRESS) {
|
||||
DEBUG_CLEAR_MEMORY ((VOID *)(UINTN)Memory, NumberOfPages << EFI_PAGE_SHIFT);
|
||||
}
|
||||
|
||||
@ -1357,7 +1357,7 @@ CoreAllocatePoolPages (
|
||||
//
|
||||
// Find the pages to convert
|
||||
//
|
||||
Start = FindFreePages (EFI_MAX_ADDRESS, NumberOfPages, PoolType, Alignment);
|
||||
Start = FindFreePages (MAX_ADDRESS, NumberOfPages, PoolType, Alignment);
|
||||
|
||||
//
|
||||
// Convert it to boot services data
|
||||
|
Reference in New Issue
Block a user