Index: boot/freeldr/freeldr/arch/i386/pcmem.c =================================================================== --- boot/freeldr/freeldr/arch/i386/pcmem.c (revision 66087) +++ boot/freeldr/freeldr/arch/i386/pcmem.c (working copy) @@ -203,7 +203,7 @@ REGS Regs; ULONGLONG RealBaseAddress, EndAddress, RealSize; TYPE_OF_MEMORY MemoryType; - ULONG Size; + ULONG Size, RequiredSize; ASSERT(PcBiosMapCount == 0); TRACE("GetBiosMemoryMap()\n"); @@ -212,18 +212,19 @@ bit value at address 0x413 inside the BDA, which gives us the usable size in KB */ Size = (*(PUSHORT)(ULONG_PTR)0x413) * 1024; - if (Size < MEMORY_MARGIN) + RequiredSize = FREELDR_BASE + FrLdrImageSize + PAGE_SIZE; + if (Size < RequiredSize) { FrLdrBugCheckWithMessage( MEMORY_INIT_FAILURE, __FILE__, __LINE__, - "The BIOS reported a usable memory range up to 0x%x, which is too small!\n\n" + "The BIOS reported a usable memory range up to 0x%x, which is too small!\n" + "Required size is 0x%x\n\n" "If you see this, please report to the ReactOS team!", - Size); + Size, RequiredSize); } - /* Int 15h AX=E820h * Newer BIOSes - GET SYSTEM MEMORY MAP * Index: boot/freeldr/freeldr/include/arch/pc/x86common.h =================================================================== --- boot/freeldr/freeldr/include/arch/pc/x86common.h (revision 66087) +++ boot/freeldr/freeldr/include/arch/pc/x86common.h (working copy) @@ -16,7 +16,7 @@ #define STACKADDR HEX(F000) /* The 32/64-bit stack top will be at 0000:F000, or 0xF000 */ #define FREELDR_BASE HEX(F800) #define FREELDR_PE_BASE HEX(10000) -#define MEMORY_MARGIN HEX(90000) /* We need this much memory */ +#define MEMORY_MARGIN HEX(88000) /* We need this much memory */ #define BIOSCALLBUFSEGMENT (BIOSCALLBUFFER/16) /* Buffer to store temporary data for any Int386() call */ #define BIOSCALLBUFOFFSET HEX(0000) /* Buffer to store temporary data for any Int386() call */