Initialize the registers for the next call to Int386 in GetBiosMemoryMap.
authorHartmut Birr <osexpert@googlemail.com>
Wed, 27 Nov 2002 20:31:17 +0000 (20:31 +0000)
committerHartmut Birr <osexpert@googlemail.com>
Wed, 27 Nov 2002 20:31:17 +0000 (20:31 +0000)
svn path=/trunk/; revision=3797

freeldr/freeldr/arch/i386/i386mem.c

index ecf04f6..13fe065 100644 (file)
@@ -202,6 +202,13 @@ U32 GetBiosMemoryMap(BIOS_MEMORY_MAP BiosMemoryMap[32])
                        DbgPrint((DPRINT_MEMORY, "End Of System Memory Map!\n\n"));
                        break;
                }
+               // setup the register for the next call
+               Regs.x.eax = 0x0000E820;
+               Regs.x.edx = 0x534D4150; // ('SMAP')
+               Regs.x.ebx = 0x00000001;
+               Regs.x.ecx = sizeof(BIOS_MEMORY_MAP);
+               Regs.w.es = BIOSCALLBUFSEGMENT;
+               Regs.w.di = BIOSCALLBUFOFFSET;
        }
 
        return MapCount;