Porting HostAP to ARM


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 : c283782c
Flags: 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 c28321e8 
20000013 ffffffff
c0a8dea0: 43e11080 00000001 000003e0 c02e5400 c2837b30 c28383ac 00000000 02082298
c0a8dec0: c0a8c000 ffffffea c0102230 c02e5400 c28383ac 00000000 c01f3e10 c0a8df08
c0a8dee0: c0a8deec c01022a4 c01021f0 c28383ac c2824000 c0987000 0000004c c0a8dfac
c0a8df00: c0a8df0c c283244c c0102254 00000000 c0046290 c0987000 c0988000 0000000a
c0a8df20: c02eecc0 00000060 c2812000 c2824060 00015280 00000000 00000000 00000000
c0a8df40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
c0a8df60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
c0a8df80: 00000000 bfffde38 02055f40 02055e64 c0a8c000 c0039988 00000080 bfffde38
c0a8dfa0: 00000000 c0a8dfb0 c0039820 c0045b98 bfffde38 c003fc08 bfffde38 02082298
c0a8dfc0: 00000000 00000248 bfffde38 02055f40 02055e64 c2824000 00015280 00000002
c0a8dfe0: bfffde38 bffffef8 400b21d0 bfffde08 02014dcc 400b21dc 20000010 bfffde38
Backtrace:
Function entered at [] from []
 r7 = C01F3E10 r6 = 00000000 r5 = C28383AC r4 = C02E5400 Function entered at [] from []
 r7 = 0000004C r6 = C0987000 r5 = C2824000 r4 = C28383AC Function entered at [] from []
Code: 30861001 e59f0168 (e5914000) eb001ad1 e59f0160 Segmentation fault

This archive was generated by hypermail 2.1.4.