Geert Uytterhoeven wrote:
> The following patch fixes 2 problems related to ISA bus access on non-PC
> 1. ISA I/O space is memory mapped on many platforms (e.g. PPC and MIPS). To
> access it from user space, you cannot plainly use inb() and friends like
> PC, but you have to mmap() the correct region of /dev/mem first. This
> region depends on the machine type and currently there's no simple way to
> find out from user space.
> 2. ISA memory is not located at physical address 0 on many platforms (e.g.
> and some MIPS boxes). This means you cannot e.g. use
> request_mem_region(0xa0000, 65536) to request the legacy VGA region.
> 1. Provide /proc/bus/isa/map, which contains the ISA I/O and memory space
> mappings on machines where these are memory mapped.
> Example (on PPC CHRP LongTrail):
> callisto$ cat /proc/bus/isa/map
> f8000000 01000000 IO
> f7000000 01000000 MEM
> The region marked `IO' is ISA (also PCI) I/O space, while the region
> `MEM' is ISA memory space. Of course on a PC the first one is not
> available because there are separate I/O and memory spaces on ia32.
> 2. Provide new resource management functions for ISA memory space:
> On ia32, these are identical to the normal memory resource management
> [ Alternatively we could add tests to the *_mem_region() functions to test
> whether the requested region is < 16 MB (and thus in ISA memory space)
> and add the required offset. But this affects the common resource code
> and may cause problems on machines where there is no ISA space in the
> first 16 MB of memory space. ]
> The patch contains support for ia32, PPC and MIPS (limited to DDB Vrc-5074).
> It was tested on PPC only.
> Comments are welcomed!
Would it make sense to apply the same sort of fix to the following code in
__ioremap(), so that ISA space is handled consistently?:
* If the address lies within the first 16 MB, assume it's in ISA
* memory space
if (p < 16*1024*1024)
p += _ISA_MEM_BASE;
< patch deleted >
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 --
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like
> -- Linus Torvalds
> ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Frank Rowand <firstname.lastname@example.org>
MontaVista Software, Inc