Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[PATCH 1/2] arm10_setup fix for OSK5912/OMAP5912
Booting OSK5912 fails with invalid instruction:
NetBSD/evbarm (OSK5912) booting ...
initarm: Configuring system ...
Allocating page tables
Creating L1 page table at 0x10230000
Mapping kernel
pmap_map_chunk: pa=0x10000000 va=0x80000000 size=0x1e8000 resid=0x1e8000
prot=01SLLLLLLLLLLLLLLPPPPPPPP
pmap_map_chunk: pa=0x101e8000 va=0x801e8000 size=0x45000 resid=0x45000
prot=0x31PPPPPPPPLLLPPPPPPPPPPPPP
Constructing L2 page tables
...
devmap: fff00000 -> ffffffff @ fff00000
pmap_map_chunk: pa=0xfff00000 va=0xfff00000 size=0x100000 resid=0x100000
prot=00S
Physical Virtual Num
Starting Ending Starting Ending Pages
SDRAM: 0x10000000 0x11ffffff 0x80000000 0x81ffffff 8192
text section: 0x10000000 0x101e7023 0x80000000 0x801e7023 488
data section: 0x101f0000 0x101f6258 0x801f0000 0x801f6258 7
bss section: 0x101f6258 0x1022c8cc 0x801f6258 0x8022c8cc 55
L1 page directory: 0x10230000 0x10233fff 0x80230000 0x80233fff 4
Exception Vectors: 0x1023a000 0x1023afff 0x00000000 0x00000fff 1
IRQ stack: 0x1023b000 0x1023bfff 0x8023b000 0x8023bfff 1
ABT stack: 0x1023c000 0x1023cfff 0x8023c000 0x8023cfff 1
UND stack: 0x1023d000 0x1023dfff 0x8023d000 0x8023dfff 1
SVC stack: 0x1023e000 0x1023ffff 0x8023e000 0x8023ffff 2
Message Buffer: 0x10240000 0x10240fff 1
Free Memory: 0x10241000 0x11ffffff 0x80241000 0x81ffffff 7615
switching to new L1 page table @0x10230000...bootstrap done.
init subsystems: stacks vectors undefined page pmap done.
[ Kernel symbol table missing! ]
Undefined instruction in kernel
Stopped in pid 0.1 (system) at 0x80011be4: mcr p15, 0, r3, c1, c0, 2
db>
The 0x0ffffff looks bogus when decoded manually with ARM ARM and
http://infocenter.arm.com/help/topic/com.arm.doc.ddi0198d/DDI0198_926_TRM.pdf
so it's #ifdef'ed out for CPU_ARM9E.
Thanks to Alexey Vyskubov for the original fix.
---
sys/arch/arm/arm/cpufunc.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/sys/arch/arm/arm/cpufunc.c b/sys/arch/arm/arm/cpufunc.c
index 987a067..79633fa 100644
--- a/sys/arch/arm/arm/cpufunc.c
+++ b/sys/arch/arm/arm/cpufunc.c
@@ -2393,7 +2393,9 @@ arm10_setup(args)
__asm volatile ("mcr\tp15, 0, r0, c7, c7, 0" : : );
/* Allow detection code to find the VFP if it's fitted. */
+#ifndef CPU_ARM9E
__asm volatile ("mcr\tp15, 0, %0, c1, c0, 2" : : "r" (0x0fffffff));
+#endif /* not CPU_ARM9E */
/* Set the control register */
curcpu()->ci_ctrl = cpuctrl;
--
1.5.6.5
Home |
Main Index |
Thread Index |
Old Index