From: Pete Popov <ppopov@mvista.com>
To: Keith M Wesolowski <wesolows@foobazco.org>
Cc: Wayne Gowcher <wgowcher@yahoo.com>,
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>,
linux-mips@oss.sgi.com
Subject: Re: Configuration of PCI Video card on a BIOS-less board
Date: Thu, 10 May 2001 14:15:43 -0700 [thread overview]
Message-ID: <3AFB04FF.353198C6@mvista.com> (raw)
In-Reply-To: 20010510131431.A27228@foobazco.org
Keith M Wesolowski wrote:
>
> On Thu, May 10, 2001 at 11:12:57AM -0700, Pete Popov wrote:
>
> > I'm not clear on how this works with the good driver. If you write to
> > 0xC000 0000, that's a mips virtual address in the kseg2 region, which is
> > a mapped region. So what physical address you put on the bus when you
> > write to 0xC000 0000 depends on the tlb entry you've setup. If 0xC000
> > 0000 is truly a PCI memory physical address, then you need to setup a
> Repeat after me until done: BAR values have nothing to do with CPU
> addresses. If your PCI bus happens to map PCI memory location 0 onto
> physical address 0, then they are the same. That's almost certainly
> not the case. Otherwise, an address in a BAR is the *PCI bus
> address*, NOT a CPU physical address.
Wayne's email indicated, if I understood it correctly, that he is trying
to access the card's registers by writing to 0xC000 0000, after he has
written 0xC000 0000 to the BAR. That address cannot be an address that
the host to pci controller understands as PCI memory address because it
overlaps with kseg2. So if 0xC000 0000 is the correct address to write
in the BAR, then he needs to access the card's registers through the PCI
mem region that looks something like your example below. But if his
memory map is 1:1, then 0xC000 0000 is the wrong value to write to that
register.
> A simple example: a PCI bridge exists in a system. It is wired into
> the CPU address bus such that it responds to 0x18000000-0x19ffffff
> physical. On the other side of the bridge, it maps
> 0x00000000-0x7fffffff bus addresses onto physical memory (for DMA),
> and 0x80000000-0xffffffff onto PCI memory space (for PIO). The bridge
> translates addresses such that:
> bus_address_for_BARs == 0x80000000 + (cpu_physical_address - 0x18000000)
> bus_address_for_DMA == cpu_physical_address
> and, of course,
> cpu_virtual_address_for_pointers == KSEG[01]ADDR (cpu_physical_address)
> In the example above, the PCI bus is mapped into CPU memory such that
> it can be accessed via ksegX, which is normal. If it were mapped at,
> for example, 0x40000000, that would not be the case and you would need
> a TLB entry. Note that for mips64, you can use KPHYS to access any
> physical address; ie it need not be below 0x20000000.
next prev parent reply other threads:[~2001-05-10 21:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-10 5:55 Configuration of PCI Video card on a BIOS-less board Wayne Gowcher
2001-05-10 6:01 ` Keith M Wesolowski
2001-05-10 6:15 ` Geert Uytterhoeven
2001-05-10 17:11 ` Pete Popov
2001-05-10 17:20 ` Geert Uytterhoeven
2001-05-10 17:44 ` Pete Popov
2001-05-10 17:53 ` Wayne Gowcher
2001-05-10 18:12 ` Pete Popov
2001-05-10 18:43 ` Wayne Gowcher
2001-05-10 20:14 ` Keith M Wesolowski
2001-05-10 21:15 ` Pete Popov [this message]
2001-05-18 20:23 ` Netscape on linux-mipsel ?? Wayne Gowcher
2001-05-18 20:29 ` Pete Popov
2001-05-19 3:50 ` Ralf Baechle
2001-05-10 22:02 ` Configuration of PCI Video card on a BIOS-less board Jun Sun
2001-05-11 0:19 ` Wayne Gowcher
2001-05-10 18:23 ` 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=3AFB04FF.353198C6@mvista.com \
--to=ppopov@mvista.com \
--cc=Geert.Uytterhoeven@sonycom.com \
--cc=linux-mips@oss.sgi.com \
--cc=wesolows@foobazco.org \
--cc=wgowcher@yahoo.com \
/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.