OSDev.org
https://forum.osdev.org/

problems with address 0x00100000
https://forum.osdev.org/viewtopic.php?f=1&t=11240
Page 1 of 1

Author:  DIGIT4L_PUNK [ Sat Jan 07, 2006 4:47 pm ]
Post subject:  problems with address 0x00100000

hi
I'm working on kernel image loader for DOS. I use flat-real mode to copy the image to the destination memory address (pointed by ES:EDI) when EDI = 0x00100000 (beginnig of the 1st megabyte) after the mem-copy is done, system hangs. and e.g. if EDI = 0x00200000 everithing works fine.
so, what's the problem? ???
keep in mind, I have Compaq DeskPro

Author:  kataklinger [ Sat Jan 07, 2006 5:03 pm ]
Post subject:  Re:problems with address 0x00100000

Flat real mode? Memory area from 0x100000 to 0x10FFEF is known as HMA maybe DOS puts some drivers or TSRs there.

Author:  GLneo [ Sat Jan 07, 2006 5:06 pm ]
Post subject:  Re:problems with address 0x00100000

try the deleting the command in config.sys:DEVICE=C:\WINDOWS\HIMEM.SYS
that should stop dos from puting things in hma, mabey?

Author:  Candy [ Sat Jan 07, 2006 5:09 pm ]
Post subject:  Re:problems with address 0x00100000

DIGIT4L_PUNK wrote:
hi
I'm working on kernel image loader for DOS. I use flat-real mode to copy the image to the destination memory address (pointed by ES:EDI) when EDI = 0x00100000 (beginnig of the 1st megabyte) after the mem-copy is done, system hangs. and e.g. if EDI = 0x00200000 everithing works fine.
so, what's the problem? ???
keep in mind, I have Compaq DeskPro


If your A20 doesn't enable properly, you're memcpy'ing to the IVT and further on. The very next interrupt (random-ish) will crash your system then.

If your DOS uses a HMA driver, that crashes your system if the A20 does work.

If neither of these, it should work.


Note, 0x200000 doesn't use A20 but A21 (and A[19..0]) so it does work if the A20 enable failed.

Author:  DIGIT4L_PUNK [ Sat Jan 07, 2006 5:38 pm ]
Post subject:  Re:problems with address 0x00100000

I made a test of A20. here it is:
Code:
mov word [ES:DWORD 0x001b8000],'! '

It shoud print '!' on the screen if the memmory-wrapping was active.
... and I've got a question: when enabling A20 GATE, only 20th bit is enabled? :o I knew that entire >=20 bits were enabled when toggling A20 GATE. Am i wrong ???

Author:  Candy [ Sun Jan 08, 2006 3:17 am ]
Post subject:  Re:problems with address 0x00100000

DIGIT4L_PUNK wrote:
... and I've got a question: when enabling A20 GATE, only 20th bit is enabled? :o I knew that entire >=20 bits were enabled when toggling A20 GATE. Am i wrong ???

AFAIK, the A20 gate ONLY controls the A20 line. That means, the A21..A31 line are always on, but that doesn't matter since you can't access them from real-mode anyway.

So, if you can't get the A20 enabled, you'll have half your memory in 1M chunks with gaps.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/