All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Rowand <frank_rowand@mvista.com>
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Linux kernel <linux-kernel@vger.rutgers.edu>,
	Linux/PPC Development <linuxppc-dev@lists.linuxppc.org>,
	Linux/MIPS Development <linux@cthulhu.engr.sgi.com>
Subject: Re: Proposal: non-PC ISA bus support
Date: Tue, 20 Jun 2000 10:11:45 -0700	[thread overview]
Message-ID: <394FA5D1.DDAEA1F6@mvista.com> (raw)
In-Reply-To: Pine.GSO.4.10.10006201254290.8592-100000@dandelion.sonytel.be

Geert Uytterhoeven wrote:
> 
> The following patch fixes 2 problems related to ISA bus access on non-PC
> platforms:
> 
>  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 on
>     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. PPC
>     and some MIPS boxes). This means you cannot e.g. use
>     request_mem_region(0xa0000, 65536) to request the legacy VGA region.
> 
> Solutions:
> 
>  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
>         callisto$
> 
>     The region marked `IO' is ISA (also PCI) I/O space, while the region marked
>     `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:
> 
>         isa_request_mem_region()
>         isa_check_mem_region()
>         isa_release_mem_region()
> 
>     On ia32, these are identical to the normal memory resource management
>     functions.
> 
>     [ 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 >


> 
> Gr{oetje,eeting}s,
> 
>                                                 Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> 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 that.
>                                                             -- Linus Torvalds
> 
> ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

-Frank
-- 
Frank Rowand <frank_rowand@mvista.com>
MontaVista Software, Inc

  parent reply	other threads:[~2000-06-20 17:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-20 11:21 Proposal: non-PC ISA bus support Geert Uytterhoeven
2000-06-20 12:23 ` Benjamin Herrenschmidt
2000-06-20 12:23   ` Benjamin Herrenschmidt
2000-06-20 12:41   ` Geert Uytterhoeven
2000-06-20 13:02     ` Benjamin Herrenschmidt
2000-06-20 13:09       ` Geert Uytterhoeven
2000-06-20 13:25   ` De Schrijver Peter
2000-06-20 13:25     ` De Schrijver Peter
2000-06-20 13:30     ` Benjamin Herrenschmidt
2000-06-20 13:30       ` Benjamin Herrenschmidt
2000-06-21 21:47   ` Michel Lanners
2000-06-21 21:47     ` Michel Lanners
2000-06-20 17:11 ` Frank Rowand [this message]
2000-06-20 17:29   ` Geert Uytterhoeven
2000-06-20 20:10 ` Russell King
2000-06-20 20:10   ` Russell King
2000-06-21 23:57 ` Richard Henderson
2000-06-22  6:45   ` Geert Uytterhoeven
2000-06-22  7:19     ` Richard Henderson
2000-06-22  7:41       ` Geert Uytterhoeven
2000-06-22  8:59         ` Richard Henderson
2000-06-22  9:15           ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=394FA5D1.DDAEA1F6@mvista.com \
    --to=frank_rowand@mvista.com \
    --cc=Geert.Uytterhoeven@sonycom.com \
    --cc=frowand@mvista.com \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=linux@cthulhu.engr.sgi.com \
    --cc=linuxppc-dev@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.