diff --git a/freeldr/freeldr/CHANGELOG b/freeldr/freeldr/CHANGELOG index fe3625ffcbb..91ddeb42673 100644 --- a/freeldr/freeldr/CHANGELOG +++ b/freeldr/freeldr/CHANGELOG @@ -1,3 +1,10 @@ +Changes in v1.7.11 (12/05/2002) (brianp) + +- Added memory map count to GetBiosMemoryMap() so that + it doesn't just assume the size of the array. +- Fix so that we use the continuation value that + the BIOS returns. + Changes in v1.7.10 (11/24/2002) (brianp) - Added assembler versions of memcmp() memcpy() memset() diff --git a/freeldr/freeldr/arch/i386/i386mem.c b/freeldr/freeldr/arch/i386/i386mem.c index 13fe0655340..4257b3716e5 100644 --- a/freeldr/freeldr/arch/i386/i386mem.c +++ b/freeldr/freeldr/arch/i386/i386mem.c @@ -136,7 +136,7 @@ U32 GetConventionalMemorySize(VOID) return (U32)Regs.w.ax; } -U32 GetBiosMemoryMap(BIOS_MEMORY_MAP BiosMemoryMap[32]) +U32 GetBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MaxMemoryMapSize) { REGS Regs; U32 MapCount; @@ -166,7 +166,7 @@ U32 GetBiosMemoryMap(BIOS_MEMORY_MAP BiosMemoryMap[32]) Regs.x.ecx = sizeof(BIOS_MEMORY_MAP); Regs.w.es = BIOSCALLBUFSEGMENT; Regs.w.di = BIOSCALLBUFOFFSET; - for (MapCount=0; MapCount<32; MapCount++) + for (MapCount=0; MapCount" #define AUTHOR_EMAIL "" #define BY_AUTHOR "by Brian Palmer" @@ -36,7 +36,7 @@ // #define FREELOADER_MAJOR_VERSION 1 #define FREELOADER_MINOR_VERSION 7 -#define FREELOADER_PATCH_VERSION 9 +#define FREELOADER_PATCH_VERSION 11 PUCHAR GetFreeLoaderVersionString(VOID); diff --git a/freeldr/freeldr/mm/meminit.c b/freeldr/freeldr/mm/meminit.c index 1657891af83..a7a6e0fc761 100644 --- a/freeldr/freeldr/mm/meminit.c +++ b/freeldr/freeldr/mm/meminit.c @@ -63,7 +63,7 @@ BOOL MmInitializeMemoryManager(VOID) RtlZeroMemory(BiosMemoryMap, sizeof(BIOS_MEMORY_MAP) * 32); - BiosMemoryMapEntryCount = GetBiosMemoryMap(BiosMemoryMap); + BiosMemoryMapEntryCount = GetBiosMemoryMap(BiosMemoryMap, 32); ExtendedMemorySize = GetExtendedMemorySize(); ConventionalMemorySize = GetConventionalMemorySize(); diff --git a/freeldr/freeldr/reactos/reactos.c b/freeldr/freeldr/reactos/reactos.c index b64d1a65fda..5d2cb17153c 100644 --- a/freeldr/freeldr/reactos/reactos.c +++ b/freeldr/freeldr/reactos/reactos.c @@ -464,7 +464,7 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName) mb_info.cmdline = (unsigned long)multiboot_kernel_cmdline; mb_info.mods_count = 0; mb_info.mods_addr = (unsigned long)multiboot_modules; - mb_info.mmap_length = (unsigned long)GetBiosMemoryMap((PBIOS_MEMORY_MAP)&multiboot_memory_map) * sizeof(memory_map_t); + mb_info.mmap_length = (unsigned long)GetBiosMemoryMap((PBIOS_MEMORY_MAP)&multiboot_memory_map, 32) * sizeof(memory_map_t); if (mb_info.mmap_length) { mb_info.mmap_addr = (unsigned long)&multiboot_memory_map; diff --git a/freeldr/freeldr/reactos/setupldr.c b/freeldr/freeldr/reactos/setupldr.c index 11742249179..bc399b47093 100644 --- a/freeldr/freeldr/reactos/setupldr.c +++ b/freeldr/freeldr/reactos/setupldr.c @@ -109,7 +109,7 @@ VOID RunLoader(VOID) mb_info.cmdline = (unsigned long)multiboot_kernel_cmdline; mb_info.mods_count = 0; mb_info.mods_addr = (unsigned long)multiboot_modules; - mb_info.mmap_length = (unsigned long)GetBiosMemoryMap((PBIOS_MEMORY_MAP)&multiboot_memory_map) * sizeof(memory_map_t); + mb_info.mmap_length = (unsigned long)GetBiosMemoryMap((PBIOS_MEMORY_MAP)&multiboot_memory_map, 32) * sizeof(memory_map_t); if (mb_info.mmap_length) { mb_info.mmap_addr = (unsigned long)&multiboot_memory_map;