From: Sebastian H. <he...@gm...> - 2010-05-17 18:34:31
|
Sebastian Herbszt wrote: > Stanislav Shwartsman wrote: >> Looks like it is somehow related to memory issue (I mean it is not enough to >> change BIOSROMSZ to enable 2M BIOS). >> LGDT reads from address 0xfff80 which returns 0xffffffff 0xffffffff -> looks >> like bogus memory. >> I guess it supposed to be something else. >> Need to look into memory.cc/misc_mem.cc and see why it goes to bogus. >> >> Stanislav > > The BIOS mapping could be the problem. The high mapping at 0xffe00000 > seems correct because we can execute the code. The data is used from 0xf0000. > So if the mapping is bogus wrong data will be accessed. > gdtr at 0xffffff80 looks ok and points to 0xffffff90. gdtr at 0x000fff80 is all 0xf. If i modify readPhysicalPage() to use *data_ptr = BX_MEM_THIS rom[BIOSROMSZ - 0x100000 + (a20addr & BIOS_MASK)]; instead of *data_ptr = BX_MEM_THIS rom[a20addr & BIOS_MASK]; i can make it return the first two correct bytes, but the second memory read is still wrong. First one seems to use read_virtual_word_32() which somehow ends up in readPhysicalPage() and the second one is read_virtual_dword_32() which doesn't end up there. The memory handling in Bochs looks like a maze to me, so i might give up sooner or later. Hope you can figure it out. Sebastian |