* Configuration of PCI Video card on a BIOS-less board
@ 2001-05-10 5:55 Wayne Gowcher
2001-05-10 6:01 ` Keith M Wesolowski
` (2 more replies)
0 siblings, 3 replies; 17+ messages in thread
From: Wayne Gowcher @ 2001-05-10 5:55 UTC (permalink / raw)
To: linux-mips
Dear All,
I was wondering if anyone has any experience in
configuring the PCI registers in a PCI Video Card on a
MIPS board that has no BIOS like in a PC.
At the moment when I have some "home grown" PCI
probing routines based on my best interpretation of
the PCI spec. But it's not working.
I can probe the Base Address Register successfully,
determine the cards memory requirement and that it is
memory rather than mapped IO. But when I try to write
the address I have allocated to the PCI card ( eg
0xC000 0000 ) the address will not latch in the base
address register.
The card is designed for x86 PCs and when the PC bios
configures the card, the base address register has the
value 0xF200 0000.
Any comments from anybody with any insight into what
is happening here / or how I might fix my probelm,
would be greatly appreciated.
Does anyone know of any code that carries out PCI
probing similar to that found on x86 PC's ?
TIA
Wayne
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: Configuration of PCI Video card on a BIOS-less board 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 2 siblings, 0 replies; 17+ messages in thread From: Keith M Wesolowski @ 2001-05-10 6:01 UTC (permalink / raw) To: Wayne Gowcher; +Cc: linux-mips On Wed, May 09, 2001 at 10:55:12PM -0700, Wayne Gowcher wrote: > I can probe the Base Address Register successfully, > determine the cards memory requirement and that it is > memory rather than mapped IO. But when I try to write > the address I have allocated to the PCI card ( eg > 0xC000 0000 ) the address will not latch in the base > address register. Is that a valid bus address on your system? > Does anyone know of any code that carries out PCI > probing similar to that found on x86 PC's ? Look in drivers/pci - that can scan the bus and such - it's generic code used on many architectures. Many systems lack "bios" and work fine in linux. -- Keith M Wesolowski <wesolows@foobazco.org> http://foobazco.org/~wesolows ------(( Project Foobazco Coordinator and Network Administrator ))------ "Nothing motivates a man more than to see his boss put in an honest day's work." -- The fortune file ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Configuration of PCI Video card on a BIOS-less board 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 2 siblings, 0 replies; 17+ messages in thread From: Geert Uytterhoeven @ 2001-05-10 6:15 UTC (permalink / raw) To: Wayne Gowcher; +Cc: linux-mips On Wed, 9 May 2001, Wayne Gowcher wrote: > I was wondering if anyone has any experience in > configuring the PCI registers in a PCI Video Card on a > MIPS board that has no BIOS like in a PC. > > At the moment when I have some "home grown" PCI > probing routines based on my best interpretation of > the PCI spec. But it's not working. > > I can probe the Base Address Register successfully, > determine the cards memory requirement and that it is > memory rather than mapped IO. But when I try to write > the address I have allocated to the PCI card ( eg > 0xC000 0000 ) the address will not latch in the base > address register. > > The card is designed for x86 PCs and when the PC bios > configures the card, the base address register has the > value 0xF200 0000. > > Any comments from anybody with any insight into what > is happening here / or how I might fix my probelm, > would be greatly appreciated. > > Does anyone know of any code that carries out PCI > probing similar to that found on x86 PC's ? Initialising video cards is a real PITA. The simplest method is to use a x86 BIOS emulator to execute the code in the video BIOS on the card. Note that some cards (mostly older cards) power up in VGA legacy mode. They will not respond to PCI memory space as specified by the BAR before you tell them to do so (in a card-specific way :-( Most modern cards power up in PCI mode. However, to use them, you still have to know the card-specific initialization sequence. BTW, what video card do you have? If you're lucky and have a Matrox Millennium, you can use matroxfb, which knows how to initialize uninitialized cards. Good luck! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven ------------- Sony Software Development Center Europe (SDCE) Geert.Uytterhoeven@sonycom.com ------------------- Sint-Stevens-Woluwestraat 55 Voice +32-2-7248626 Fax +32-2-7262686 ---------------- B-1130 Brussels, Belgium ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Configuration of PCI Video card on a BIOS-less board 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 2 siblings, 1 reply; 17+ messages in thread From: Pete Popov @ 2001-05-10 17:11 UTC (permalink / raw) To: Wayne Gowcher; +Cc: linux-mips Wayne Gowcher wrote: > > Dear All, > > I was wondering if anyone has any experience in > configuring the PCI registers in a PCI Video Card on a > MIPS board that has no BIOS like in a PC. > > At the moment when I have some "home grown" PCI > probing routines based on my best interpretation of > the PCI spec. But it's not working. > > I can probe the Base Address Register successfully, > determine the cards memory requirement and that it is > memory rather than mapped IO. But when I try to write > the address I have allocated to the PCI card ( eg > 0xC000 0000 ) the address will not latch in the base > address register. > > The card is designed for x86 PCs and when the PC bios > configures the card, the base address register has the > value 0xF200 0000. > > Any comments from anybody with any insight into what > is happening here / or how I might fix my probelm, > would be greatly appreciated. > > Does anyone know of any code that carries out PCI > probing similar to that found on x86 PC's ? The boot code on our mips boards, whether some version of pmon or yamon does that initialization. The powerpc guys have implemented pci scanning scheme that allows the kernel to complete initialize pretty much arbitrarily complex pci bus systems with pci-to-pci bridges etc. I hope I'll have time to someday port that to mips. I don't think you can wait till then :-) Are you really trying to assign 0xC000 0000 to the card or was that just an example address? Unless your pci to memory window is such that there's a translation that occurs, that address is incorrect. If the window is 1:1, the physical address 0xC000 0000 does not exist. You need to assign the card a real physical address; if your system has 32MB of memory, than that address would have to be between 0 and 0x2000000. (well, you can't give it address "0" because of interrupt vectors, but you get the point). I can point you to some examples if you have problems. Pete ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Configuration of PCI Video card on a BIOS-less board 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 0 siblings, 2 replies; 17+ messages in thread From: Geert Uytterhoeven @ 2001-05-10 17:20 UTC (permalink / raw) To: Pete Popov; +Cc: Wayne Gowcher, linux-mips On Thu, 10 May 2001, Pete Popov wrote: > Are you really trying to assign 0xC000 0000 to the card or was that just > an example address? Unless your pci to memory window is such that > there's a translation that occurs, that address is incorrect. If the > window is 1:1, the physical address 0xC000 0000 does not exist. You > need to assign the card a real physical address; if your system has 32MB > of memory, than that address would have to be between 0 and 0x2000000. > (well, you can't give it address "0" because of interrupt vectors, but > you get the point). I can point you to some examples if you have > problems. If you have 32 MB of RAM and you put a PCI card at an address between 0 and 0x2000000 you'll have a problem! PCI cards must not overlap with real memory. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven ------------- Sony Software Development Center Europe (SDCE) Geert.Uytterhoeven@sonycom.com ------------------- Sint-Stevens-Woluwestraat 55 Voice +32-2-7248626 Fax +32-2-7262686 ---------------- B-1130 Brussels, Belgium ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Configuration of PCI Video card on a BIOS-less board 2001-05-10 17:20 ` Geert Uytterhoeven @ 2001-05-10 17:44 ` Pete Popov 2001-05-10 17:53 ` Wayne Gowcher 1 sibling, 0 replies; 17+ messages in thread From: Pete Popov @ 2001-05-10 17:44 UTC (permalink / raw) To: Wayne Gowcher; +Cc: Geert Uytterhoeven, linux-mips Geert Uytterhoeven wrote: > > On Thu, 10 May 2001, Pete Popov wrote: > > Are you really trying to assign 0xC000 0000 to the card or was that just > > an example address? Unless your pci to memory window is such that > > there's a translation that occurs, that address is incorrect. If the > > window is 1:1, the physical address 0xC000 0000 does not exist. You > > need to assign the card a real physical address; if your system has 32MB > > of memory, than that address would have to be between 0 and 0x2000000. > > (well, you can't give it address "0" because of interrupt vectors, but > > you get the point). I can point you to some examples if you have > > problems. > > If you have 32 MB of RAM and you put a PCI card at an address between 0 and > 0x2000000 you'll have a problem! PCI cards must not overlap with real memory. Sorry Wayne, I'm working on an ethernet driver and was thinking of descriptors and data buffers for PCI ethernet cards, which have to be in real physical memory. Geert is right, but 0xC000 0000 still seems suspicious. That's a very high physical address and pci devices are usually mapped at lower addresses. Something like 0x2000 0000 is more reasonable and makes accessing the card through kseg1 possible. Pete ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Configuration of PCI Video card on a BIOS-less board 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:23 ` Geert Uytterhoeven 1 sibling, 2 replies; 17+ messages in thread From: Wayne Gowcher @ 2001-05-10 17:53 UTC (permalink / raw) To: Geert Uytterhoeven, Pete Popov; +Cc: linux-mips Geert, Pete, Thanks for your input, it makes me question things I should have questioned before. 0xC000 0000 is the actual address I am trying to use. I used it because another PCI card that I have a driver for was using it and so I just carried on its use. I didnt really question the value or its use. But obviously it works for that card. After your emails I revisited that code and now I partially understand why it works. The chip has an internal bus that translates address requests internally. So when i write to 0xC000 0000 it would never make to the actual address lines of the chip and instead be routed to the PCI controller ( I think :) ) The original card i had a problem had an ATI Rage chip. I am now experimenting with a VGA card with a Cirrus Logic chip. I've got this card to accept the programmed base address and am in teh process of studying clgenfb.c to see if I can modify it to my needs. On first inspection clgenfb.c is written for the Amiga??? and so I am trying to weed out the dependencies. If anyone knows of a more generic driver it would be much appreciated. Wayne __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Configuration of PCI Video card on a BIOS-less board 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 18:23 ` Geert Uytterhoeven 1 sibling, 2 replies; 17+ messages in thread From: Pete Popov @ 2001-05-10 18:12 UTC (permalink / raw) To: Wayne Gowcher; +Cc: Geert Uytterhoeven, linux-mips Wayne Gowcher wrote: > > Geert, Pete, > > Thanks for your input, it makes me question things I > should have questioned before. > 0xC000 0000 is the actual address I am trying to use. > I used it because another PCI card that I have a > driver for was using it and so I just carried on its > use. I didnt really question the value or its use. But > obviously it works for that card. And this driver works on mips? When you read the base mem register from this card that works, it says "0xC0000000"? > After your emails I revisited that code and now I > partially understand why it works. The chip has an > internal bus that translates address requests > internally. So when i write to 0xC000 0000 it would > never make to the actual address lines of the chip and > instead be routed to the PCI controller ( I think :) ) 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 tlb entry that maps some virtual address to the physical address 0xC000 0000. I doubt you want to muck with that and would suggest you redo your PCI bus memory map so that the PCI bus is at a lower address, like 0x1000 0000. You can then access physical 0x1000 0000 through virtual address 0xB000 0000 (kseg1). I think you already told me, but what board/CPU are you working with? Pete ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Configuration of PCI Video card on a BIOS-less board 2001-05-10 18:12 ` Pete Popov @ 2001-05-10 18:43 ` Wayne Gowcher 2001-05-10 20:14 ` Keith M Wesolowski 1 sibling, 0 replies; 17+ messages in thread From: Wayne Gowcher @ 2001-05-10 18:43 UTC (permalink / raw) To: Pete Popov; +Cc: linux-mips Pete, I think I am in "dopey" mode this morning. The 0xC000 0000 I was talking about comes from another board I was working on recently that mapped a comapnion chip into kseg2 space. It seems it's been burnt into my brain :( The working PCI card is actually mapped to 0xA200 0000, and I am using that for the VGA card. My comments about the address translation were totally wrong. Sorry for any confusion. Time for a coffee and a long rethink :) __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Configuration of PCI Video card on a BIOS-less board 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 2001-05-10 22:02 ` Configuration of PCI Video card on a BIOS-less board Jun Sun 1 sibling, 2 replies; 17+ messages in thread From: Keith M Wesolowski @ 2001-05-10 20:14 UTC (permalink / raw) To: Pete Popov; +Cc: Wayne Gowcher, Geert Uytterhoeven, linux-mips 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. 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. -- Keith M Wesolowski <wesolows@foobazco.org> http://foobazco.org/~wesolows ------(( Project Foobazco Coordinator and Network Administrator ))------ "Nothing motivates a man more than to see his boss put in an honest day's work." -- The fortune file ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Configuration of PCI Video card on a BIOS-less board 2001-05-10 20:14 ` Keith M Wesolowski @ 2001-05-10 21:15 ` Pete Popov 2001-05-18 20:23 ` Netscape on linux-mipsel ?? Wayne Gowcher 2001-05-10 22:02 ` Configuration of PCI Video card on a BIOS-less board Jun Sun 1 sibling, 1 reply; 17+ messages in thread From: Pete Popov @ 2001-05-10 21:15 UTC (permalink / raw) To: Keith M Wesolowski; +Cc: Wayne Gowcher, Geert Uytterhoeven, linux-mips 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. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Netscape on linux-mipsel ?? 2001-05-10 21:15 ` Pete Popov @ 2001-05-18 20:23 ` Wayne Gowcher 2001-05-18 20:29 ` Pete Popov 2001-05-19 3:50 ` Ralf Baechle 0 siblings, 2 replies; 17+ messages in thread From: Wayne Gowcher @ 2001-05-18 20:23 UTC (permalink / raw) To: linux-mips Dear All, Does anyone know if Netscape or any other browser has been compiled to run on linux mipsel ? All I can find so far are "x86" source for netscape. If it has, care to tell me the links where I may get it ? Alternatively, if no one knows of anyone having a working linux mipsel Netscape binary / rpm. Anyone care to guess the scope of attempting to modify the x86 or mips-sgi-irix sources to run on mips ? TIA Wayne __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Netscape on linux-mipsel ?? 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 1 sibling, 0 replies; 17+ messages in thread From: Pete Popov @ 2001-05-18 20:29 UTC (permalink / raw) To: Wayne Gowcher; +Cc: linux-mips Wayne Gowcher wrote: >Dear All, > >Does anyone know if Netscape or any other browser has >been compiled to run on linux mipsel ? All I can find >so far are "x86" source for netscape. > >If it has, care to tell me the links where I may get >it ? > >Alternatively, if no one knows of anyone having a >working linux mipsel Netscape binary / rpm. Anyone >care to guess the scope of attempting to modify the >x86 or mips-sgi-irix sources to run on mips ? > We're pretty close on having both, be and le mips binaries. You'll need a graphics card which has frame buffer driver support so that X can run on top of the FBdev driver. Check with me again "later". Pete ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Netscape on linux-mipsel ?? 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 1 sibling, 0 replies; 17+ messages in thread From: Ralf Baechle @ 2001-05-19 3:50 UTC (permalink / raw) To: Wayne Gowcher; +Cc: linux-mips On Fri, May 18, 2001 at 01:23:42PM -0700, Wayne Gowcher wrote: > Does anyone know if Netscape or any other browser has > been compiled to run on linux mipsel ? All I can find > so far are "x86" source for netscape. > > If it has, care to tell me the links where I may get > it ? > > Alternatively, if no one knows of anyone having a > working linux mipsel Netscape binary / rpm. Anyone > care to guess the scope of attempting to modify the > x86 or mips-sgi-irix sources to run on mips ? If you check more exactly you'll find that all the sources are actually binaries ... I had Mozilla running on Linux/MIPS three years ago but didn't continue to debug it. Getting it to work shouldn't be rocket science. The text mode browsers lynx, w3m or link just work. Ralf ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Configuration of PCI Video card on a BIOS-less board 2001-05-10 20:14 ` Keith M Wesolowski 2001-05-10 21:15 ` Pete Popov @ 2001-05-10 22:02 ` Jun Sun 2001-05-11 0:19 ` Wayne Gowcher 1 sibling, 1 reply; 17+ messages in thread From: Jun Sun @ 2001-05-10 22:02 UTC (permalink / raw) To: Keith M Wesolowski Cc: Pete Popov, Wayne Gowcher, Geert Uytterhoeven, linux-mips 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. > Keith, What you said is right in theory. However not correct in practice. Most drivers read BAR address (in PCI memory space) and do ioremap() to get (usually uncached) virtual address to access the PCI memory region. On mips, the default ioremap() essentially does 1 to 1 mapping from PCI meory space to physical address space and then further maps it into KSEG1. That pretty much mandates each MIPS port must maintain 1:1 mapping between the PCI memory space and CPU physical space - unless you enjoy the fun of hacking with PCI fixups. > 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. > > -- > Keith M Wesolowski <wesolows@foobazco.org> http://foobazco.org/~wesolows > ------(( Project Foobazco Coordinator and Network Administrator ))------ > "Nothing motivates a man more than to see his boss put > in an honest day's work." -- The fortune file ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Configuration of PCI Video card on a BIOS-less board 2001-05-10 22:02 ` Configuration of PCI Video card on a BIOS-less board Jun Sun @ 2001-05-11 0:19 ` Wayne Gowcher 0 siblings, 0 replies; 17+ messages in thread From: Wayne Gowcher @ 2001-05-11 0:19 UTC (permalink / raw) To: Jun Sun, Keith M Wesolowski Cc: Pete Popov, Wayne Gowcher, Geert Uytterhoeven, linux-mips Guys, Sorry for all the confusion, and subsequent traffic as a result of my mistakes. I'm still feeling my way with regards to programming the PCI and have mixed up terms and addresses. Just for the record : In actual fact the PCI code is writing physical addresses to the Base Address Register, eg 0x02000000. Then later on when the driver is initialising itself it reads the BAR and adds on KSEG1 : dev->base_addr = KSEG1ADDR(base_addr); It is this "dev->base_addr" that gets reported to me on boot up ( 0xA2000000 ) as being the base address of the device. The 0xC000 0000 I wrote in my first mail was from another problem I had been working and was somehow burned into my brain. There is nothing like someone questioning one's assumptions to make one re-evaluate those assumptions. For this I am grateful to those people, for spotting the gaping whole of my mistake and bringing it to my attention. For me at least it has been very useful in that respect. I still would like to understand PCI issues more particularly with respect to so called "legacy PCi devices" VGA, sound card etc. So if anyone would like to mail me off the list with tips / reading they have found useful, it would be most appreciated. Wayne __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Configuration of PCI Video card on a BIOS-less board 2001-05-10 17:53 ` Wayne Gowcher 2001-05-10 18:12 ` Pete Popov @ 2001-05-10 18:23 ` Geert Uytterhoeven 1 sibling, 0 replies; 17+ messages in thread From: Geert Uytterhoeven @ 2001-05-10 18:23 UTC (permalink / raw) To: Wayne Gowcher; +Cc: Pete Popov, linux-mips On Thu, 10 May 2001, Wayne Gowcher wrote: > The original card i had a problem had an ATI Rage > chip. I am now experimenting with a VGA card with a > Cirrus Logic chip. I've got this card to accept the > programmed base address and am in teh process of > studying clgenfb.c to see if I can modify it to my > needs. > On first inspection clgenfb.c is written for the > Amiga??? and so I am trying to weed out the > dependencies. If anyone knows of a more generic driver > it would be much appreciated. Clgenfb supports both Amiga Zorro cards with a Cirrus Logic chip and PCI cards. Note that it may depend on some chip initialisation already been done. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven ------------- Sony Software Development Center Europe (SDCE) Geert.Uytterhoeven@sonycom.com ------------------- Sint-Stevens-Woluwestraat 55 Voice +32-2-7248626 Fax +32-2-7262686 ---------------- B-1130 Brussels, Belgium ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2001-05-19 4:00 UTC | newest] Thread overview: 17+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
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.