mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
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. svn path=/trunk/; revision=3823
This commit is contained in:
parent
f1592aa69f
commit
f54c214e8e
7 changed files with 18 additions and 10 deletions
|
@ -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)
|
Changes in v1.7.10 (11/24/2002) (brianp)
|
||||||
|
|
||||||
- Added assembler versions of memcmp() memcpy() memset()
|
- Added assembler versions of memcmp() memcpy() memset()
|
||||||
|
|
|
@ -136,7 +136,7 @@ U32 GetConventionalMemorySize(VOID)
|
||||||
return (U32)Regs.w.ax;
|
return (U32)Regs.w.ax;
|
||||||
}
|
}
|
||||||
|
|
||||||
U32 GetBiosMemoryMap(BIOS_MEMORY_MAP BiosMemoryMap[32])
|
U32 GetBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MaxMemoryMapSize)
|
||||||
{
|
{
|
||||||
REGS Regs;
|
REGS Regs;
|
||||||
U32 MapCount;
|
U32 MapCount;
|
||||||
|
@ -166,7 +166,7 @@ U32 GetBiosMemoryMap(BIOS_MEMORY_MAP BiosMemoryMap[32])
|
||||||
Regs.x.ecx = sizeof(BIOS_MEMORY_MAP);
|
Regs.x.ecx = sizeof(BIOS_MEMORY_MAP);
|
||||||
Regs.w.es = BIOSCALLBUFSEGMENT;
|
Regs.w.es = BIOSCALLBUFSEGMENT;
|
||||||
Regs.w.di = BIOSCALLBUFOFFSET;
|
Regs.w.di = BIOSCALLBUFOFFSET;
|
||||||
for (MapCount=0; MapCount<32; MapCount++)
|
for (MapCount=0; MapCount<MaxMemoryMapSize; MapCount++)
|
||||||
{
|
{
|
||||||
Int386(0x15, &Regs, &Regs);
|
Int386(0x15, &Regs, &Regs);
|
||||||
|
|
||||||
|
@ -202,10 +202,11 @@ U32 GetBiosMemoryMap(BIOS_MEMORY_MAP BiosMemoryMap[32])
|
||||||
DbgPrint((DPRINT_MEMORY, "End Of System Memory Map!\n\n"));
|
DbgPrint((DPRINT_MEMORY, "End Of System Memory Map!\n\n"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// setup the register for the next call
|
|
||||||
|
// Setup the registers for the next call
|
||||||
Regs.x.eax = 0x0000E820;
|
Regs.x.eax = 0x0000E820;
|
||||||
Regs.x.edx = 0x534D4150; // ('SMAP')
|
Regs.x.edx = 0x534D4150; // ('SMAP')
|
||||||
Regs.x.ebx = 0x00000001;
|
//Regs.x.ebx = 0x00000001; // Continuation value already set by the BIOS
|
||||||
Regs.x.ecx = sizeof(BIOS_MEMORY_MAP);
|
Regs.x.ecx = sizeof(BIOS_MEMORY_MAP);
|
||||||
Regs.w.es = BIOSCALLBUFSEGMENT;
|
Regs.w.es = BIOSCALLBUFSEGMENT;
|
||||||
Regs.w.di = BIOSCALLBUFOFFSET;
|
Regs.w.di = BIOSCALLBUFOFFSET;
|
||||||
|
|
|
@ -41,7 +41,7 @@ U32 GetSystemMemorySize(VOID); // Returns the amount of total memory in
|
||||||
// These functions are implemented in mem.S
|
// These functions are implemented in mem.S
|
||||||
U32 GetExtendedMemorySize(VOID); // Returns extended memory size in KB
|
U32 GetExtendedMemorySize(VOID); // Returns extended memory size in KB
|
||||||
U32 GetConventionalMemorySize(VOID); // Returns conventional memory size in KB
|
U32 GetConventionalMemorySize(VOID); // Returns conventional memory size in KB
|
||||||
U32 GetBiosMemoryMap(BIOS_MEMORY_MAP BiosMemoryMap[32]); // Fills structure with BIOS memory map and returns memory map item count
|
U32 GetBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MaxMemoryMapSize); // Fills structure with BIOS memory map and returns memory map item count
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
/* just some stuff */
|
/* just some stuff */
|
||||||
#define VERSION "FreeLoader v1.7.9"
|
#define VERSION "FreeLoader v1.7.11"
|
||||||
#define COPYRIGHT "Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>"
|
#define COPYRIGHT "Copyright (C) 1998-2002 Brian Palmer <brianp@sginet.com>"
|
||||||
#define AUTHOR_EMAIL "<brianp@sginet.com>"
|
#define AUTHOR_EMAIL "<brianp@sginet.com>"
|
||||||
#define BY_AUTHOR "by Brian Palmer"
|
#define BY_AUTHOR "by Brian Palmer"
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
//
|
//
|
||||||
#define FREELOADER_MAJOR_VERSION 1
|
#define FREELOADER_MAJOR_VERSION 1
|
||||||
#define FREELOADER_MINOR_VERSION 7
|
#define FREELOADER_MINOR_VERSION 7
|
||||||
#define FREELOADER_PATCH_VERSION 9
|
#define FREELOADER_PATCH_VERSION 11
|
||||||
|
|
||||||
|
|
||||||
PUCHAR GetFreeLoaderVersionString(VOID);
|
PUCHAR GetFreeLoaderVersionString(VOID);
|
||||||
|
|
|
@ -63,7 +63,7 @@ BOOL MmInitializeMemoryManager(VOID)
|
||||||
|
|
||||||
RtlZeroMemory(BiosMemoryMap, sizeof(BIOS_MEMORY_MAP) * 32);
|
RtlZeroMemory(BiosMemoryMap, sizeof(BIOS_MEMORY_MAP) * 32);
|
||||||
|
|
||||||
BiosMemoryMapEntryCount = GetBiosMemoryMap(BiosMemoryMap);
|
BiosMemoryMapEntryCount = GetBiosMemoryMap(BiosMemoryMap, 32);
|
||||||
ExtendedMemorySize = GetExtendedMemorySize();
|
ExtendedMemorySize = GetExtendedMemorySize();
|
||||||
ConventionalMemorySize = GetConventionalMemorySize();
|
ConventionalMemorySize = GetConventionalMemorySize();
|
||||||
|
|
||||||
|
|
|
@ -464,7 +464,7 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName)
|
||||||
mb_info.cmdline = (unsigned long)multiboot_kernel_cmdline;
|
mb_info.cmdline = (unsigned long)multiboot_kernel_cmdline;
|
||||||
mb_info.mods_count = 0;
|
mb_info.mods_count = 0;
|
||||||
mb_info.mods_addr = (unsigned long)multiboot_modules;
|
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)
|
if (mb_info.mmap_length)
|
||||||
{
|
{
|
||||||
mb_info.mmap_addr = (unsigned long)&multiboot_memory_map;
|
mb_info.mmap_addr = (unsigned long)&multiboot_memory_map;
|
||||||
|
|
|
@ -109,7 +109,7 @@ VOID RunLoader(VOID)
|
||||||
mb_info.cmdline = (unsigned long)multiboot_kernel_cmdline;
|
mb_info.cmdline = (unsigned long)multiboot_kernel_cmdline;
|
||||||
mb_info.mods_count = 0;
|
mb_info.mods_count = 0;
|
||||||
mb_info.mods_addr = (unsigned long)multiboot_modules;
|
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)
|
if (mb_info.mmap_length)
|
||||||
{
|
{
|
||||||
mb_info.mmap_addr = (unsigned long)&multiboot_memory_map;
|
mb_info.mmap_addr = (unsigned long)&multiboot_memory_map;
|
||||||
|
|
Loading…
Reference in a new issue