EmbeddedRelated.com
Forums

Slightly[OT]---Memory-Mapped I/O

Started by Charles Jean January 28, 2005
I just answered one here about this topic and it brought a question to
my mine.  Does anybody know of software that can be use on an 80xxx
series computer that provides a memory map of used/unused I/O port
addresses?
GRAVITY:

It's not just a good idea-IT'S THE LAW!
Easy

Just create a simple program ( I used QB4.5 about ugh, 10 years ago..) that
Inputs from every port ( 0 to 65535) and display the results.
Usually any unused port will come back with 255 as the data bus is pulled
high.
You can reduce the number of polls by trying just every 16th port as a lot
of cards use addresses in groups of 16.

Hope this helps.

Jay




"Charles Jean" <alchemcj@earthlink.net> wrote

> GRAVITY: > It's not just a good idea-IT'S THE LAW!
It's just another of those unproven theorems... Life would be simpler if it had simply been called "Darwin's _Law_ of Evolotion." -- Nicholas O. Lindan, Cleveland, Ohio Consulting Engineer: Electronics; Informatics; Photonics. To reply, remove spaces: n o lindan at ix . netcom . com psst.. want to buy an f-stop timer? nolindan.com/da/fstop/
Charles Jean wrote:
> > I just answered one here about this topic and it brought a > question to my mine. Does anybody know of software that can be > use on an 80xxx series computer that provides a memory map of > used/unused I/O port addresses?
As usual, it depends. You can scan the i/o space for values, but some input ports are designed to reset something when read (such as a data ready status) which may cause deep difficulties. Unfortunately there is no guarantee that writing to an output port will be detectable, nor that it will be harmless. In general, if the port is in use, it will be harmful. You might be telling your disk system to clear itself. To me this is a reason to prefer CPUs with separate memory and i/o spaces. You can at least probe and test memory areas then. -- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson
Charles Jean <alchemcj@earthlink.net> wrote:

> I just answered one here about this topic and it brought a question > to my mine. Does anybody know of software that can be use on an > 80xxx series computer
80xxx --- what exactly is that series supposed to be? I'll assume you meant 'Intel x86 series' instead.
> that provides a memory map of used/unused I/O port addresses?
Unfortunately, no. That's the reason why (among other things) automatic hardware self-detection by operating systems was not even really worth *trying* on PCs before the days of PCI. This is the main problem the whole (badly botched) ISA-bus "Plug-n-Play" campaign was started to fight. To support this, a historical note from early Linux: there were certain combinations of two chips (network or audio interfaces, typically), where either one's Linux kernel driver, just by trying to see if its own hardware was actually present, would render the other device unusable until reboot. Thus you needed lots of different kernel images in a distribution, and sometimes you even *had* to bake your own kernel (telling one or both drivers to not run the device presence check, or hardwiring the addresses they were trying to detect), just to be able to use all the installed hardware. -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain.