Clean up EfiLdr:

Refine code to pass CYGWIN GCC tool chain build 

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7405 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8 2009-02-03 00:49:30 +00:00
parent 9008db4a28
commit ffdc186777
1 changed files with 3 additions and 3 deletions

View File

@ -111,7 +111,7 @@ FindSpace (
if ((EfiMemoryDescriptor[Index].Type == EfiConventionalMemory) && if ((EfiMemoryDescriptor[Index].Type == EfiConventionalMemory) &&
(EfiMemoryDescriptor[Index].NumberOfPages >= NoPages)) { (EfiMemoryDescriptor[Index].NumberOfPages >= NoPages)) {
if (EfiMemoryDescriptor[Index].PhysicalStart > MaxPhysicalStart) { if (EfiMemoryDescriptor[Index].PhysicalStart > MaxPhysicalStart) {
if (EfiMemoryDescriptor[Index].PhysicalStart + LShiftU64(EfiMemoryDescriptor[Index].NumberOfPages, EFI_PAGE_SHIFT) <= 0x100000000) { if (EfiMemoryDescriptor[Index].PhysicalStart + LShiftU64(EfiMemoryDescriptor[Index].NumberOfPages, EFI_PAGE_SHIFT) <= 0x100000000ULL) {
MaxPhysicalStart = EfiMemoryDescriptor[Index].PhysicalStart; MaxPhysicalStart = EfiMemoryDescriptor[Index].PhysicalStart;
MaxNoPages = EfiMemoryDescriptor[Index].NumberOfPages; MaxNoPages = EfiMemoryDescriptor[Index].NumberOfPages;
CurrentMemoryDescriptor = &EfiMemoryDescriptor[Index]; CurrentMemoryDescriptor = &EfiMemoryDescriptor[Index];
@ -206,7 +206,7 @@ GenMemoryMap (
// //
// Update Memory Ceiling // Update Memory Ceiling
// //
if ((BaseAddress >= 0x100000) && (BaseAddress < 0x100000000)) { if ((BaseAddress >= 0x100000) && (BaseAddress < 0x100000000ULL)) {
if (Ceiling > BaseAddress) { if (Ceiling > BaseAddress) {
Ceiling = BaseAddress; Ceiling = BaseAddress;
} }
@ -228,7 +228,7 @@ GenMemoryMap (
for (Index = 0; Index < *NumberOfMemoryMapEntries; Index++) { for (Index = 0; Index < *NumberOfMemoryMapEntries; Index++) {
if ((EfiMemoryDescriptor[Index].Type == EfiConventionalMemory) && if ((EfiMemoryDescriptor[Index].Type == EfiConventionalMemory) &&
(EfiMemoryDescriptor[Index].PhysicalStart > 0x100000) && (EfiMemoryDescriptor[Index].PhysicalStart > 0x100000) &&
(EfiMemoryDescriptor[Index].PhysicalStart < 0x100000000)) { (EfiMemoryDescriptor[Index].PhysicalStart < 0x100000000ULL)) {
if (EfiMemoryDescriptor[Index].PhysicalStart >= Ceiling) { if (EfiMemoryDescriptor[Index].PhysicalStart >= Ceiling) {
EfiMemoryDescriptor[Index].Type = EfiReservedMemoryType; EfiMemoryDescriptor[Index].Type = EfiReservedMemoryType;
} }