Altera_Forum
Honored Contributor
15 years agoTLB Miss Exception
Hello,
I am trying to compile a working MMU uClinux with Nios II. I downloaded the nios2-linux-20100621.tar.gz After producing a custom FPGA project for a custom board and imported the board to the kernel tree (as in the wiki), I managed to compile a linux image. The problem I am observing is that the system hangs for an unhadled exception:Linux version 2.6.34-00692-g5bc7853-dirty (imagos@woody) (gcc version 4.1.2)# 7 Wed Feb 23 11:30:18 CET 2011
bootconsole enabled
early_console initialized at 0xe4000420
Linux/Nios II-MMU
init_bootmem_node(?,0x3b9, 0x0, 0x4000)
free_bootmem(0x3b9000, 0x3c47000)
reserve_bootmem(0x3b9000, 0x800)
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line:
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
We have 16384 pages of RAM
Memory available: 61152k/3811k RAM, 0k/0k ROM (873k kernel code, 2938k data)
Hierarchical RCU implementation.
NR_IRQS:32
Calibrating delay loop... 39.11 BogoMIPS (lpj=195584)
Mount-cache hash table entries: 512
init_BSP(): registering device resources
Switching to clocksource timer
msgmni has been set to 119
ttyJ0 at MMIO 0x4000420 (irq = 1) is a Altera JTAG UART
console enabled, bootconsole disabled
console enabled, bootconsole disabled
Freeing unused kernel memory: 2692k freed (0xc00dc000 - 0xc037c000)
Unhandled exception# 12 , fp 0xc3c18cfc
r1: c0000c20 r2: fffffff2 r3: 00000000 r4: 00004b98
r5: 00000468 r6: 00004b99 r7: 00000000 r8: fffff000
r9: fffffff2 r10: c03b5e60 r11: 00000000 r12: 000fffff
r13: 00000010 r14: 5a827999 r15: 6ed9eba1
ra: c0093040 fp: c3c18ea0 sp: c3c18d58 gp: 00000000
ea: c0006324 estatus: 00000001 Adding another print to the unhandled_exception function in arch/nios2/mm/tlb.c I managed to understand that the STATUS Register of cpu is zero. Tracing back to entry.S I see that the first thing the exception hander do is to clear status.EH flag, making it impossible to distinguish from Fast TLB Miss exception and Double TLB Miss Exception. Anyway, the cause 12 for an exception (control register 7) always drives to unhandled_exception in exception table. This may be not the point but it is where my poor observing skills bring. For your information, checking the GIT LOG, my version is quite dated: commit 5bc785348a8df706cecd7d318829b6476018a990
Author: Thomas Chou <thomas@wytron.com.tw>
Date: Mon Jun 21 11:04:09 2010 +0800 Do you think that an update can help me with this? You'll find the .h of the SOPC System in attachment, so you can check the memory map. I tried the same kernel sources on the NEEK board (with the proper board selection and sof from the wiki, obviously) and it arrives to the shell. I would like to see the shell in the custom design too. Any suggestion is appreciated. Thanks. Regards, Gabriele Gobbin