From: Darrel Deane (darrel_at_au-zone.com)
Date: 2002-07-18 13:51:41 UTC
Hi,
I'm trying to port HostAP to an ARM processor. I am getting a segmentation fault in the function prism2_plx_probe (file hostap_plx.c). The fault occurs when I try to read the interrupt control/status register:
...
/* Enable PCI interrupts if they are not already enabled */
reg = inl(plx_ioaddr + PLX_INTCSR);
...
The macro "inl" expands to give the line (as defined in linux/asm/io.h):
reg = (*(volatile unsigned int *)(plx_ioaddr + PLX_INTCSR));
I have checked /proc/ioports and the card is allocated the memory 43e11000-43e1107f and 43e11080-43e110bf. The virtual address in question is within this range (see segmentation fault output below).
My compile options are:
arm-linux-gcc -I/linux/include -O2 -D__KERNEL__
-DMODULE -Wall -c -fomit-frame-pointer -o driver/modules/hostap_plx.o
driver/modules/hostap_plx.c
I can't figure out why there is a segmentation fault. Please let me know if I can provide you with any more information. Any help is much appreciated.
Thanks,
Darrel
For what it's worth, here is the output of the segmentation fault:
Unable to handle kernel paging request at virtual address 43e1104c
pgd = c0bfc000
*pgd = 00000000, *pmd = 00000000
Internal error: Oops: 0
CPU: 0 pc : [] lr : [] sp : c0a8dea0 ip : c0a8de5c fp : c0a8dee8 r10: 00000000 r9 : 43e11080 r8 : c283b000 r7 : c02e5400 r6 : 43e11000 r5 : 43e1104c r4 : 00000400 r3 : 43e1104c r2 : 00000001 r1 : 43e1104c r0 : c283782cFlags: nzCv IRQs on FIQs on Mode SVC_32 Segment user Control: C0BFF17F Table: C0BFF17F DAC: 00000015 Process insmod (pid: 32, stackpage=c0a8d000) Stack:
c0a8de80: c004527c c28321e820000013 ffffffff