public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Can't access I/O ports with dosemu 1.0.2
@ 2002-12-27 16:20 Stas Sergeev
  2002-12-27 21:08 ` Brad Rodriguez
  0 siblings, 1 reply; 5+ messages in thread
From: Stas Sergeev @ 2002-12-27 16:20 UTC (permalink / raw)
  To: linux-msdos

Hello.

Brad Rodriguez wrote:
> I tried changing the ownership of the executable, and giving it setuid
> status, but that didn't work.  I tried running it as the root user; but 
> that wasn't allowed (I got a message saying I have to run as normal 
> user). 
Upgrade your dosemu.

> $_ports = "range 0x2f8,0x2ff range 0x320,0x327 range 0x378,0x37f range
> 0x3f8,0x3ff"
If any of that range is listed in
/proc/ioports, then dosemu will not
allow its usage to avoid the conflicts.
So you have to disable the in-kernel
support for that devices.

> The software I'm using requires direct hardware access to the LPT1
Yes, LPT is a weak part of dosemu unless
you do a simple printing.

> COM1, and COM2 ports
Why would the one require a direct
access to the COM ports? The support
for those is fairly complete under
dosemu.

> Are there some simple diagnostics that I can 
> perform to tell me if DOSEMU is configured properly?
-D9+Tci log would do.


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: Can't access I/O ports with dosemu 1.0.2
@ 2002-12-27 22:14 Stas Sergeev
  0 siblings, 0 replies; 5+ messages in thread
From: Stas Sergeev @ 2002-12-27 22:14 UTC (permalink / raw)
  To: linux-msdos

Hello.

Brad Rodriguez wrote:
> I see that COM1, COM2, and LPT1 are all listed in /proc/ioports, so 
> I'll have to learn how to disable the kernel support.
Probably you can simply hack the
dosemu's ports.c and replace a
/proc/ioports there with /dev/null.
I don't know for sure will such a
cheat work or will it be safe, but
at least you can try.
As for disabling the in-kernel support,
you have to reconfigure/recompile
your kernel without a parport support,
or, which is better, if the support is
modular, just unload the relevant
modules and that should do the trick.

> But 0x320-0x327 (the 
> EPROM emulator) is not listed in /proc/ioports and I don't seem able to 
> access those ports either.
Yes, I also think it is a permissions
problem.

>> Yes, LPT is a weak part of dosemu unless
>> you do a simple printing.
>  Unfortunately, I'm not using it to print.
And unfortunately dosemu doesn't have
a proper LPT support.

>> Why would the one require a direct
>> access to the COM ports? The support
>> for those is fairly complete under
>> dosemu.
>  Perhaps I don't understand how these are supported under DOSEMU.  The 
Yep.

>  programs I am using are not using BIOS calls to access the serial port.  
>  As far as I know, they include their own serial I/O drivers that talk 
>  directly 
>  to the bare metal.  (Come to think of it, they probably also speak to 
>  the interrupt controller chip, and I don't know *how* I can allow that 
>  without completely corrupting the system.)
Please just stop making problems where
they don't exist. The LPT is problematic,
yes, but the PIC and Serials are fully
supported (except that the speed of the
emulated serial is not always sufficient).


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Can't access I/O ports with dosemu 1.0.2
@ 2002-12-27 15:52 Brad Rodriguez
  0 siblings, 0 replies; 5+ messages in thread
From: Brad Rodriguez @ 2002-12-27 15:52 UTC (permalink / raw)
  To: linux-msdos

I'm trying to run some legacy DOS software that requires direct access to
the I/O ports and interrupts, using DOSEMU.  Although DOSEMU works, I can't
access the hardware ports.  I've tried everything I could find in the
Quickstart, the README, and the HOWTO, with on luck...hence this email.

Details: I'm using Red Hat 8.0.  I first attempted the ready-to-use binary
distribution of DOSEMU 1.0.2.1, per the instructions in README.bindlist,
with the FreeDos distribution currently on the dosemu.org site.  I
installed this as my normal user into a subdirectory and it ran fine, but
didn't give I/O access.  It didn't take much reading to discover that I
needed to run DOSEMU suid root in order to access I/O ports.

I tried changing the ownership of the executable, and giving it setuid
status, but that didn't work.  I tried running it as the root user; but 
that wasn't allowed (I got a message saying I have to run as normal user). 
  So I concluded that I needed to do a full installation.

I downloaded the 1.0.2 source package and followed the instructions in
Quickstart (2) to compile DOSEMU, (2a) to install systemwide, and (4) to
configure for a systemwide suid-root installation.  I've copied the
distributed dosemu.conf to /etc/dosemu.conf and made only the following
changes:

$_irqpassing = "3 4"	

$_ports = "range 0x2f8,0x2ff range 0x320,0x327 range 0x378,0x37f range
0x3f8,0x3ff"

(The software I'm using requires direct hardware access to the LPT1, COM1,
and COM2 ports, and also uses a LeBurg EPROM emulator at 0x320-0x327.)
I've also copied the distributed dosemu.users.secure to /etc/dosemu.users
and added the following line for my own user account, right after the "root
c_all" line:

brad c_all

Finally I've copied the distributed global.conf, unchanged, to
/var/lib/dosemu/global.conf.

Again, DOSEMU runs and seems to execute DOS programs -- I'm using xdosemu
under Gnome -- but the programs cannot read the I/O ports.  I've tried
directly reading the I/O ports using Pygmy Forth 1.4 for DOS, and the ports
all read as 0xFF.  Writing to them seems to have no effect.  I haven't
tried writing a hardware diagnostic for the interrupts yet, but I have
tried to run Procomm and it doesn't seem to talk to the serial port.

The DOS software I'm trying to run is:
MPE Ltd. Xshell3 IDE and XZ8 cross compiler
New Micros MaxTerm serial communications program
LeBurg EPEM32 EPROM emulator
Procomm 2.4.1 (for testing)
Pygmy Forth 1.4 (for testing)
Qedit 2.1 (for testing)

None of these use DPMI.

I'm guessing that I've missed a configuration setting somewhere.  Can 
anyone shed some light?  Are there some simple diagnostics that I can 
perform to tell me if DOSEMU is configured properly?

Regards,
Brad Rodriguez   bj@zetetics.com





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-12-27 22:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-27 16:20 Can't access I/O ports with dosemu 1.0.2 Stas Sergeev
2002-12-27 21:08 ` Brad Rodriguez
2002-12-27 21:23   ` Bart Oldeman
  -- strict thread matches above, loose matches on Subject: below --
2002-12-27 22:14 Stas Sergeev
2002-12-27 15:52 Brad Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox