* Re: DOS memory management
@ 2003-12-09 19:30 Stas Sergeev
2003-12-09 21:29 ` Bart Oldeman
0 siblings, 1 reply; 5+ messages in thread
From: Stas Sergeev @ 2003-12-09 19:30 UTC (permalink / raw)
To: 'dosemu'
Hello.
Updegrove, Timothy (Tim) wrote:
> to the DMA hardware, map a physical address to a
> linear address, etc will work as is under Linux or
> are modifications required?
This functionality is not implemented in dosemu.
The relevant API is missing in a DPMI server, the
$_hardware_ram option doesn't work, the DMA
controller (at least the legacy one of ISA) is not
accesible under dosemu and will most likely require
a kernel module to be.
> Where can I found documentation about
> the DOSEMU DPMI API for memory allocation, physical
> address mapping, etc?
Nowhere. Nobody is working on that.
So unless someone needs this badly enough to start
coding it up, it will not be implemented. I don't
even remember if someone ever asked about this here
during the last 4 years.
In general this is needed if your hardware is not
supported natively under Linux, so it is not a common
thing.
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: DOS memory management
2003-12-09 19:30 DOS memory management Stas Sergeev
@ 2003-12-09 21:29 ` Bart Oldeman
0 siblings, 0 replies; 5+ messages in thread
From: Bart Oldeman @ 2003-12-09 21:29 UTC (permalink / raw)
To: 'dosemu'
On Tue, 9 Dec 2003, Stas Sergeev wrote:
> Updegrove, Timothy (Tim) wrote:
> > to the DMA hardware, map a physical address to a
> > linear address, etc will work as is under Linux or
> > are modifications required?
> This functionality is not implemented in dosemu.
> The relevant API is missing in a DPMI server, the
> $_hardware_ram option doesn't work
the hardware_ram option works but is really limited,
as it only works for addresses between 0xc8000 and 0xf0000.
the example hardware_ram in dosemu.conf gives you the following mapping:
000c8000-000c9000 rw-s 000c8000 03:06 273019 /dev/mem
000c9000-000cc000 rwxp 000c9000 00:00 0
000cc000-000d0000 rw-s 000cc000 03:06 273019 /dev/mem
> > Where can I found documentation about
> > the DOSEMU DPMI API for memory allocation, physical
> > address mapping, etc?
> Nowhere. Nobody is working on that.
> So unless someone needs this badly enough to start
> coding it up, it will not be implemented. I don't
> even remember if someone ever asked about this here
> during the last 4 years.
> In general this is needed if your hardware is not
> supported natively under Linux, so it is not a common
> thing.
True. And in Tim's case it would just be a layer so he can avoid porting.
Bart
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: DOS memory management
@ 2003-12-10 4:54 Stas Sergeev
0 siblings, 0 replies; 5+ messages in thread
From: Stas Sergeev @ 2003-12-10 4:54 UTC (permalink / raw)
To: 'dosemu'
Hello.
Bart Oldeman wrote:
>> $_hardware_ram option doesn't work
> the hardware_ram option works but is really limited,
OK, I looked up the MAPPING_INIT_HWRAM flag, which is
not handled, but it also uses MAPPING_KMEM, so yes, it
works for that small memory region.
I am wondering now, if it will be allowed to use any
region (why not btw?), then the one can use it to map
the hardware ram on startup, and then there is no work
required on a DPMI side. So something may probably
actually work that way?
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
* DOS memory management
@ 2003-12-08 21:31 Updegrove, Timothy (Tim)
2003-12-09 21:21 ` Bart Oldeman
0 siblings, 1 reply; 5+ messages in thread
From: Updegrove, Timothy (Tim) @ 2003-12-08 21:31 UTC (permalink / raw)
To: 'dosemu'
Currently, DJGPP is used for a program to access a memory-mapped PCI device.
Currently, the program is compiled and run on a Windows machine. The task
is to take the same (or nearly same) source, compile and run it on a Linux
Red Hat 9 machine running DOSEMU. I'm wondering if the DJGPP/DPMI functions
to allocate DOS memory, get a physical address for that DOS memory to pass
to the DMA hardware, map a physical address to a linear address, etc will
work as is under Linux or are modifications required?
I'm new to Linux and DOSEMU so any help (step-by-step directions, etc) would
be much appreciated.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: DOS memory management
2003-12-08 21:31 Updegrove, Timothy (Tim)
@ 2003-12-09 21:21 ` Bart Oldeman
0 siblings, 0 replies; 5+ messages in thread
From: Bart Oldeman @ 2003-12-09 21:21 UTC (permalink / raw)
To: Updegrove, Timothy (Tim); +Cc: 'dosemu'
On Mon, 8 Dec 2003, Updegrove, Timothy (Tim) wrote:
> Currently, DJGPP is used for a program to access a memory-mapped PCI device.
> Currently, the program is compiled and run on a Windows machine. The task
> is to take the same (or nearly same) source, compile and run it on a Linux
> Red Hat 9 machine running DOSEMU. I'm wondering if the DJGPP/DPMI functions
> to allocate DOS memory, get a physical address for that DOS memory to pass
> to the DMA hardware, map a physical address to a linear address, etc will
> work as is under Linux or are modifications required?
it's not possible, as Stas explained. You'd be better off to port the
program to Linux, either as a kernel driver or running it as root.
To access physical memory in a user program one needs to open /dev/mem and
read or write or mmap it -- it works just like a normal file but instead
it contents are the physical memory contents.
Bart
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-12-10 4:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-09 19:30 DOS memory management Stas Sergeev
2003-12-09 21:29 ` Bart Oldeman
-- strict thread matches above, loose matches on Subject: below --
2003-12-10 4:54 Stas Sergeev
2003-12-08 21:31 Updegrove, Timothy (Tim)
2003-12-09 21:21 ` Bart Oldeman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox