#define EFI_DEFAULT_PAGE_ALLOCATION_ALIGNMENT (EFI_PAGE_SIZE)\r
\r
//\r
-// Entry for tracking the memory regions for each memory type to help cooalese like memory types\r
+// Entry for tracking the memory regions for each memory type to coalesce similar memory types\r
//\r
typedef struct {\r
EFI_PHYSICAL_ADDRESS BaseAddress;\r
LIST_ENTRY *Link;\r
EFI_GCD_MAP_ENTRY *Entry;\r
\r
- DEBUG ((DEBUG_ERROR | DEBUG_PAGE, "Promote the memory resource\n"));\r
+ DEBUG ((DEBUG_PAGE, "Promote the memory resource\n"));\r
\r
CoreAcquireGcdMemoryLock ();\r
\r
// Debug code - verify conversion is allowed\r
//\r
if (!(NewType == EfiConventionalMemory ? 1 : 0) ^ (Entry->Type == EfiConventionalMemory ? 1 : 0)) {\r
- DEBUG ((DEBUG_ERROR , "ConvertPages: Incompatible memory types\n"));\r
+ DEBUG ((DEBUG_ERROR | DEBUG_PAGE, "ConvertPages: Incompatible memory types\n"));\r
return EFI_NOT_FOUND;\r
}\r
\r
Entry = CR(Link, MEMORY_MAP, Link, MEMORY_MAP_SIGNATURE);\r
if (Entry->Attribute & EFI_MEMORY_RUNTIME) {\r
if (Entry->Type == EfiACPIReclaimMemory || Entry->Type == EfiACPIMemoryNVS) {\r
- DEBUG((DEBUG_ERROR, "ExitBootServices: ACPI memory entry has RUNTIME attribute set.\n"));\r
- CoreReleaseMemoryLock ();\r
- return EFI_INVALID_PARAMETER;\r
+ DEBUG((DEBUG_ERROR | DEBUG_PAGE, "ExitBootServices: ACPI memory entry has RUNTIME attribute set.\n"));\r
+ Status = EFI_INVALID_PARAMETER;\r
+ goto Done;\r
}\r
if (Entry->Start & (EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT - 1)) {\r
- DEBUG((DEBUG_ERROR, "ExitBootServices: A RUNTIME memory entry is not on a proper alignment.\n"));\r
- CoreReleaseMemoryLock ();\r
- return EFI_INVALID_PARAMETER;\r
+ DEBUG((DEBUG_ERROR | DEBUG_PAGE, "ExitBootServices: A RUNTIME memory entry is not on a proper alignment.\n"));\r
+ Status = EFI_INVALID_PARAMETER;\r
+ goto Done;\r
}\r
if ((Entry->End + 1) & (EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT - 1)) {\r
- DEBUG((DEBUG_ERROR, "ExitBootServices: A RUNTIME memory entry is not on a proper alignment.\n"));\r
- CoreReleaseMemoryLock ();\r
- return EFI_INVALID_PARAMETER;\r
+ DEBUG((DEBUG_ERROR | DEBUG_PAGE, "ExitBootServices: A RUNTIME memory entry is not on a proper alignment.\n"));\r
+ Status = EFI_INVALID_PARAMETER;\r
+ goto Done;\r
}\r
}\r
}\r
Status = EFI_INVALID_PARAMETER;\r
}\r
\r
+Done:\r
CoreReleaseMemoryLock ();\r
\r
return Status;\r