Maybe this is what you want, please look at Page 10. http://people.openrays.org/~comcat/godson/doc/godson2e.north.bridge.manual.pdf But it is written in Chinese, I'm sorry that I also don't have an English version.
On Wed, Jun 30, 2010 at 9:38 PM, Isaku Yamahata <yamah...@valinux.co.jp> wrote: > Can you elaborate on how pci bus is mapped into local bus? > Is there specification publicly available? Google didn't tell me. > > > On Wed, Jun 30, 2010 at 06:39:53PM +0800, Huacai Chen wrote: >> It seems like software may both use CPU address or PCI address to access a >> PCI >> device. For example, Bonito north bridge map PCI memory space at 0x10000000 ~ >> 0x1C000000. PMON code use 0x00000000 ~ 0x0C000000, but Linux kernel code use >> 0x10000000 ~ 0x1C000000 to access devices. If set pci_mem_base to 0, PMON >> can't >> work, but if set pci_mem_base to 0x10000000, Linux can't access PCI. So I >> make >> this patch to make both cases works. >> >> However, I don't know whether the modification will break other archs, so >> request for comments here. >> >> Signed-off-by: Huacai Chen <zltjiang...@gmail.com> >> --- >> hw/pci.c | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/hw/pci.c b/hw/pci.c >> index 7787005..50e3572 100644 >> --- a/hw/pci.c >> +++ b/hw/pci.c >> @@ -672,7 +672,7 @@ PCIDevice *pci_register_device(PCIBus *bus, const char >> *name, >> static target_phys_addr_t pci_to_cpu_addr(PCIBus *bus, >> target_phys_addr_t addr) >> { >> - return addr + bus->mem_base; >> + return addr | bus->mem_base; >> } >> >> static void pci_unregister_io_regions(PCIDevice *pci_dev) >> -- >> 1.7.0.4 >> > > -- > yamahata > -- Huacai Chen