Mail Archives: djgpp/1994/06/13/18:22:39
DJ Delorie writes:
>
> In non-DPMI mode, you can try adding 0xe0000000 to the physical
> address and go32 may map it for you.
^^^
|||
Dear DJ,
This is in refer to your reply on the subject a while ago. What do
you mean by the word 'may' above? How do I force go32 to set up the
mapping?
I have a memory mapped hardware device which is mapped to the
0xd0000-0xd3fff address range. In the program I included below, it
does not seem to access the real physical address unless I have a
debug32 breakpoint set up. Once the debug32 breakpoint is entered I
am able to access the memory location. I have tried to make a bdos
call to force a protected-to-real switching but it did not seem to
work either.
-------------- Program example -----------------
void
main
(
int argc, /* number of command line arguments */
char *argv[] /* array of pointers to command line arguments */
)
{
unsigned short *rom_init = (unsigned short *)0xd0000412;
bdos (0x0b, 0, 0); /* Try to force a protected-to-real
switch */
outpb (0x240, 0x40); /* This code sets up the board mapping/
outpb (0x240, 0); /* to 0xd0000 */
outpb (0x242, 0xd000 >> 9);
outpb (0x240, 0x20);
*rom_init = 0; /* This does not happen unless a breakpoint
is entered prior to this point. */
}
---------------- End of example ----------------------
Thanks,
==============================================================
Hung Bui Internet: hvb AT netrix DOT com
Netrix Corporation Phone: +1 703 793 1016
13595 Dulles Technology Drive Fax: +1 703 713 3805
Herndon Va 22071
==============================================================
- Raw text -