Messages in this thread | | | From | Patrick Lerda <> | Subject | ioremap(), bus_to_virt() and PCI devices on different Linux archi tectures ... | Date | Thu, 28 Oct 1999 09:49:58 +0200 |
| |
I don't know the correct and universal way on all linux architecture to map PCI memory. Some drivers in the kernel use ioremap, other use bus_to_virt() ...
I've made some test in linux Intel and PPC. The only way to have a defined virtual memory ptr is to use ioremap on an Intel box. On Linux PPC ioremap returns 0 sometimes, or otherwise returns a pointer without doing any PCI memory to physical memory conversion (is this correct ? And don't know the real goal of ioremap: remapping only I/O or something more global ). On Linux PPC bus_to_virt() alone yield a defined virtual memory pointer (virtual memory is preallocated in bats registers), but on an Intel Box this method is not usabled these memory range are not defined in the MMU.
The correct method is probably to do a bus_to_virt followed by an ioremap ?
If you have an accurate definition of these function compatible with all linux architecture (Intel, PPC, ...) let me know.
(There is some explaination in file 'linux/Documentation/IO-mapping.txt' but the PCI memory mapping is not precisely describe in a working way)
> Patrick LERDA >
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |