Port-amiga archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Work on PCI support :-)
Hi again.
As you have already (probably) seen, I'm working on a driver for PCI bus
present on CyberVisionPPC and BlizzardVisionPPC.
The basics are working - It is now possible to access the configuration
registers through PCI MI code, but I'm still facing a few problems, which I am
not sure how to solve:
- Implementation of bus_space_read_4 and write_4 is missing. It is used often
in the PCI MI code, and most importantly in pm2fb.c. Ofcourse the only proper
solution is to implement the missing functions functions, but I feel a bit lost
with all these dbsdr/dbsdw/dbsm/dbss/bsr/bsw/bswm/bsrm/wtf...
- PCI MI code needs bus_space_mmap. For now I've just faked it, but it should
be implemented to allow framebuffer mmaping. Not sure how to do it. I've looked
atari's implementation and it seems not that complicated, but not don't know if
it will work the same way on amiga port.
- PCI MI code needs bus_dma support, for now I've just included m68k/bus_dma.h
in pci_machdep.h.
- CVPPC/BVPPC are very tricky to detect. Newer versions of the firmware
autoconfigure the card like this:
Board (phase 5): Prod=8512/101($2140/$65) (@$FFFE0000 64K)
Board (phase 5): Prod=8512/101($2140/$65) (@$FFFA0000 64K)
Board (phase 5): Prod=8512/101($2140/$65) (@$FFFC0000 128K)
Board (phase 5): Prod=8512/101($2140/$65)
(@$E0000000, size RESERVED, subsize same)
Board (phase 5): Prod=8512/101($2140/$65)
(@$E0800000, size RESERVED, subsize same)
Board (phase 5): Prod=8512/101($2140/$65) (@$E1000000 128K)
The same vendor/product ID is used 6 times. Also, it is possible that the last
entry is different on some configurations (EF000000 instead of E1000000).
Unfortunately, some firmware versions do not create autoconfig entries at all.
- The above leads to another problem. PCI device resources are configured in
the E0000000 - EFFFFFFF area. Doing VA=PA mapping of this space immediately
leads to a panic, due to running out of Zorro I/O address space. I suspect that
I should create an extent(9) for this space and not map it directly?
- VA=PA mapping of FFFA0000-FFFE1000 space is now done with zbusmap, which is
kinda wrong, because I can't really use information from autoconfig.
Temporarily I had to rip zbusmap out of zbus.c and make it available to both
zbus.c and p5pb.c. I really dislike this solution.
- The pm2fb needs prop entries like "width", "height", "depth", "is_console".
It is possible to fake these entries in p5pb driver, or modify the pm2fb to
support operation when these entries are absent. I didn't look at pm2fb too
closely yet.
- I was not able to figure out how interrupt stuff works. Fortunately, it seems
that pm2fb does not need it. Same with DMA support, hardware is probably
capable of doing DMA.
Any suggestions on how to deal with these problems would be appreciated. All
information related to programming the Phase5 PCI bridge was obtained thorugh
reverse engineering, so I may be wrong here and there.
--
Best regards,
Radosław Kujawa
Home |
Main Index |
Thread Index |
Old Index