Subject: Re: ARM exception handlers -- question
To: Ben Harris <>
From: Jason R Thorpe <>
List: port-arm
Date: 11/09/2001 09:54:04
On Fri, Nov 09, 2001 at 04:45:06PM +0000, Ben Harris wrote:

 > Are you fixing up tf_pc when you catch the fault to skip over the faulting
 > instruction?  If you don't, you'll re-execute the faulting instruction
 > and hence go into a loop.

Yes, I am.

 > That would seem very strange, since it would need the board to be able to
 > detect whether you'd returned from the fault handler (since aborts aren't
 > disabled the way interrupts are).

Actually, I tracked down my problem a few minutes ago... my badaddr
routine is okay (and I'm about to commit it).  The problem turns out
that I was also getting an IRQ for the Master Abort, which I wasn't
handling.  I don't need to service that particular IRQ, so I just
disable it :-)

I now can read PCI config space on this board, whee!

RedBoot(tm) debug environment - built 17:16:14, Feb 12 2001
Platform: IQ80310 (XScale) 
Copyright (C) 2000, Red Hat, Inc.

RAM: 0xa0000000-0xa2000000
FLASH: 0x00000000 - 0x00800000, 64 blocks of 0x00020000 bytes each.
IP:, Default server:
RedBoot> load
Entry point: 0xa0200000, address range: 0xa0200000-0xa038e638
RedBoot> go

NetBSD/evbarm (IQ80310) booting ...
Resetting secondary PCI bus...
initarm: Configuring system ...
physmemory: 8192 pages at 0xa0000000 -> 0xa1ffffff
Allocating page tables
freestart = 0xa0009000, free_pages = 503 (0x000001f7)
IRQ stack: p0xa01de000 v0xa01de000
ABT stack: p0xa01dd000 v0xa01dd000
UND stack: p0xa01dc000 v0xa01dc000
SVC stack: p0xa01da000 v0xa01da000
Creating L1 page table at 0xa01fc000
Mapping kernel
map_chunk: pa=a0200000 va=a0200000 sz=250000 rem=250000 acc=1 flg=c
map_chunk: pa=a0450000 va=a0450000 sz=63000 rem=63000 acc=1 flg=c
map_chunk: LLLLLLPPP
Constructing L2 page tables
map_chunk: pa=a01de000 va=a01de000 sz=1000 rem=1000 acc=1 flg=c
map_chunk: P
map_chunk: pa=a01dd000 va=a01dd000 sz=1000 rem=1000 acc=1 flg=c
map_chunk: P
map_chunk: pa=a01dc000 va=a01dc000 sz=1000 rem=1000 acc=1 flg=c
map_chunk: P
map_chunk: pa=a01da000 va=a01da000 sz=2000 rem=2000 acc=1 flg=c
map_chunk: PP
map_chunk: pa=a01fc000 va=a01fc000 sz=4000 rem=4000 acc=1 flg=0
map_chunk: PPPP
fe800000 -> fe8fffff @ fe800000
Mapping PIOW 0x90000000 -> 0x9000ffff @ 0xfe400000
map_chunk: pa=90000000 va=fe400000 sz=10000 rem=10000 acc=1 flg=0
map_chunk: L
Mapping SIOW 0x90010000 -> 0x9001ffff @ 0xfe410000
map_chunk: pa=90010000 va=fe410000 sz=10000 rem=10000 acc=1 flg=0
map_chunk: L
Mapping 80312 0x00001000 -> 0x00001fff @ 0xfe420000
map_chunk: pa=1000 va=fe420000 sz=1000 rem=1000 acc=1 flg=0
map_chunk: P
freestart = 0xa03b3000, free_pages = 7245 (0x1c4d)
switching to new L1 page table  @0xa01fc000...done!
bootstrap done.
init subsystems: stacks vectors undefined pmap irq done.
[ using 147548 bytes of netbsd ELF symbol table ]
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.5Y (IQ80310) #196: Fri Nov  9 09:46:08 PST 2001
total memory = 32768 KB
avail memory = 25492 KB
using 435 buffers containing 1740 KB of memory
mainbus0 (root)
cpu0 at mainbus0: i80200 rev 0 (XScale core) DC enabled IC enabled WB enabled LABT
obio0 at mainbus0: board rev. F, CPLD rev. D, backplane present
com0 at obio0 addr 0xfe800000: ns16550a, working fifo
com1 at obio0 addr 0xfe810000: ns16550a, working fifo
com1: console
iopxs0 at mainbus0: i80312 Companion I/O, acting as PCI host
pci0 at iopxs0 bus 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
conf_read: 1/0/0 bad address
conf_read: 1/1/0 bad address
conf_read: 1/2/0 bad address
conf_read: 1/3/0 bad address
conf_read: 1/4/0 bad address
conf_read: 1/5/0 bad address
conf_read: 1/6/0 bad address
Digital Equipment DECchip 21154 PCI-PCI Bridge (PCI bridge, revision 0x05) at pci0 dev 7 function 0 not configured
conf_read: 1/8/0 bad address
conf_read: 1/9/0 bad address
conf_read: 1/10/0 bad address
conf_read: 1/11/0 bad address
conf_read: 1/12/0 bad address
conf_read: 1/13/0 bad address
conf_read: 1/14/0 bad address
conf_read: 1/15/0 bad address
conf_read: 1/16/0 bad address
conf_read: 1/17/0 bad address
conf_read: 1/18/0 bad address
conf_read: 1/19/0 bad address
conf_read: 1/20/0 bad address
clock: hz=100 stathz=100 profhz=100
boot device: <unknown>
root device: 

        -- Jason R. Thorpe <>