/proc/bus/isa?

Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be)
Sat, 10 Oct 1998 21:39:00 +0200 (CEST)


Some applications need to be able to access the ISA I/O and ISA memory spaces.
On Intel, this is easy because you know where those spaces are (at 0 :-).

On other architectures that have memory mapped I/O, things are more complex
because the addresses are not fixed. They may even be different for different
machines within the same architecture. E.g. on Linux/PPC, this is the case for
the PReP and CHRP platforms. So the application has to be informed of the base
addresses to mmap.

One solution would be to add 2 lines to /proc/cpuinfo, like

isa_io_base: 0xf8000000
isa_mem_base: 0xf7000000

(for CHRP LongTrail).

Another solution (IMHO better) would be to add /proc/bus/isa/io and
/proc/bus/isa/mem. On machines with memory mapped I/O, you can mmap() these, on
ordinary PCs you have to use read/write. The advantage of a /proc/bus/isa is
that you can add ISA PnP (yuk) device identifation later (cfr. the other
/proc/bus/ drivers).

Or make them real memory devices (char major 1): /dev/isa_io and /dev/isa_mem?

What do you think?

Greetings,

Geert

--
Geert Uytterhoeven                     Geert.Uytterhoeven@cs.kuleuven.ac.be
Wavelets, Linux/{m68k~Amiga,PPC~CHRP}  http://www.cs.kuleuven.ac.be/~geert/
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/