From: Stanislav S. <stl...@gm...> - 2010-05-17 19:19:27
|
Sebastian, this change looks me weird. 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]; BIOSROMSZ = 0x200000 so you change it access 0x100000 + (a20addr & BIOS_MASK). But before you increased BIOSROMSZ it was BIOSROMSZ = 0x80000 and with the change you access ... don't know what. What the access supposed to be ? Isn't it supposed to be something generic for any BIOSROMSZ ? Stanislav -----Original Message----- From: Sebastian Herbszt [mailto:he...@gm...] Sent: Monday, May 17, 2010 9:34 PM To: Stanislav Shwartsman; boc...@li... Subject: Re: [Bochs-developers] UEFI and jump_protected: gate type 0unsupported 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 |