阅读:2479回复:10
PowerPC下的PCI驱动
我想把我的Intel处理器下的PCI数据采集卡驱动程序移植到
PowerPC上,我使用的Linux-2.4.20: 1、我需要注意什么问题? 2、程序需要改变码? |
|
|
沙发#
发布于:2004-09-06 16:51
Intel is little endian, and PowerPC is big endian. Notice it.
And then recompile the driver on PPC to see the warning & errors, then you will know how much efforts to do it ;) |
|
|
板凳#
发布于:2004-09-08 11:15
我没有powerpc的环境,但是需要知道可能出现的问题,因为我需要去客户哪儿现场调试,我想预先知道一些这方面的错误,能说具体点吗?
|
|
|
地板#
发布于:2004-09-08 13:00
why not take the ppc kerncode to your hand, and compare to your own intel kernel code, such as a same pci device driver, then you can figure out what's the differences.
Also, I have two ppc, but none of they installed Linux, all are AIX. :P |
|
|
地下室#
发布于:2004-09-09 20:23
本人做过PPC8265A的PCI驱动!遇到了以下几个问题:
1)字节顺序 2)访问PPC处理器内部寄存器(PCI寄存器要用汇编语言) 3)在Intel环境下,进行交叉编译,很有可能基地址有问题。因此在安装过程中出错。 4)在PPC中运行,很有可能中断服务程序不能正确调用,要修改内核!!! 5)一定要注意驱动的目标代码不要使用powerpc等保留字!!!! |
|
5楼#
发布于:2004-10-12 12:48
http://bbs.chinaunix.net/forum/9/20041006/419527.html
can you tell me how you get the io_addr to do the BUS I/O. I get it from BAR0, but crash when attach and access it |
|
|
6楼#
发布于:2004-10-13 09:54
你可以利用PCI设备的ID和Version号,来获得访问PCI设备的软对象。利用该软对象,就可以访问得到相应的端口范围,然后注册该端口范围,并将其映射到虚拟内存上去!这样就可以访问了!!!!!!!!!! :)
|
|
7楼#
发布于:2004-10-13 10:55
yes, yes, but it crash every time I access the attached map space. :( :mad:
Thanks for your reply. /yftty www.unix-driver.org |
|
|
8楼#
发布于:2004-10-13 20:27
建议,你先看看bar0是不是已经被赋值?!看看bios有没有对第一个基地址寄存器初始化????!
|
|
9楼#
发布于:2004-10-13 22:10
yes, it has been set with a value.
And I have the answer for IBM's guru. thx though. I will put it after ;) cause I didn't put PdAt in the driver config file, so the problems come :( |
|
|
10楼#
发布于:2004-10-19 21:12
当然要改,片子都不一样。
|
|
|