Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Honored Contributor I
1,589 Views

unstable-nios2mmu boot error

Hi all,

 

Here is what I try to do :

 

 

 

When I try to make my Linux boot I got the following :

fault during kernel misaligned fixup @ 0xd0212794; addr 0x00000003; isn=0x20800017

Linux version 2.6.39-rc3-01078-gaf7b9ea-dirty (ben@debian) (gcc version 4.1.2) #21 Thu May 12 14:31:53 CEST 2011

bootconsole [early0] enabled

early_console initialized at 0xe4842020

On node 0 totalpages: 4096

free_area_init_node: node 0, pgdat d04d66a8, node_mem_map d04f1800

DMA zone: 32 pages used for memmap

DMA zone: 0 pages reserved

DMA zone: 4064 pages, LIFO batch:0

pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768

pcpu-alloc: [0] 0 

Built 1 zonelists in Zone order, mobility grouping off. Total pages: 4064

Kernel command line: 

PID hash table entries: 64 (order: -4, 256 bytes)

Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)

Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)

Memory available: 11144k/5039k RAM (2107k kernel code, 2932k data)

NR_IRQS:32

Unable to handle kernel NULL pointer dereference at virtual address 00000000

ea = d0212b98, ra = d0212b98, cause = 14

Kernel panic - not syncing: Oops

I don't know where is the issue (hardware design, kernel, erroneous device-tree).

Maybe that comes from the first "error" I get : fault during kernel misaligned fixup @ 0xd0212794; addr 0x00000003;

Does someone has any idea ?

 

Best regards

 

 

See attached for the device tree

 

My nios.h (you still need to modify it) :

 

Code:

#ifndef _ASM_NIOS2_NIOS_H

#define _ASM_NIOS2_NIOS_H

 

/* Add some defines wich should REALLY be extracted from fdt */

/* ==> REMOVE */

#define DDR2_TOP_BASE 0x10000000

#define DDR2_TOP_SPAN 16777216

/* <== END REMOVE */

 

/*

* Maximum possible cache sizes on the Nios II. Only used in head.S where

* the information from cpuinfo is not yet available.

*/

#define NIOS2_DCACHE_SIZE 2048

#define NIOS2_ICACHE_SIZE 4096

 

/*

* Minumum possible cache line sizes on the Nios II. Only used in head.S

* where the information from cpuinfo is not yet available.

*/

#define NIOS2_DCACHE_LINE_SIZE 32

 

/* Nios II instruction cache line size is always 32 bytes */

#define NIOS2_ICACHE_LINE_SIZE 32

#define NIOS2_ICACHE_LINE_SHIFT 5

 

#endif /* _ASM_NIOS2_NIOS_H */

 

0 Kudos
4 Replies
Highlighted
Honored Contributor I
29 Views

Hi, 

 

I found the issue. In fact the device-tree generator (sopc2dts : from .sopcinfo to .dts) does not support the version 10.1 of the timer. So I manually modify the timer description in the .dts. But I forgot to add the clock-frequency value, so I got a "NULL pointer error". 

 

The timer description should be : 

 

--- Quote Start ---  

 

//Port data_master of cpu_0 

timer_0: timer@0x4842000 { 

compatible = "altr,timer-8.0"; 

reg = < 0x4842000 0x20>; 

interrupt-parent = < &cpu_0 >; 

clock-frequency = <50000000>; 

interrupts = < 0 >; 

}; //end unknown (timer_0) 

 

--- Quote End ---  

Now I get another issue in the boot process : 

 

 

--- Quote Start ---  

 

fault during kernel misaligned fixup @ 0xd02157b0; addr 0x00000003; isn=0x20800017 

Linux version 2.6.39-rc3-01078-gaf7b9ea-dirty (ben@debian) (gcc version 4.1.2)# 64 Fri May 13 10:56:50 CEST 2011 

bootconsole [early0] enabled 

early_console initialized at 0xe4842020 

On node 0 totalpages: 4096 

free_area_init_node: node 0, pgdat d04b2814, node_mem_map d04cd800 

DMA zone: 36 pages used for memmap 

DMA zone: 0 pages reserved 

DMA zone: 4060 pages, LIFO batch:0 

pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 

pcpu-alloc: [0] 0  

Built 1 zonelists in Zone order, mobility grouping off. Total pages: 4060 

Kernel command line:  

PID hash table entries: 64 (order: -4, 256 bytes) 

Dentry cache hash table entries: 2048 (order: 1, 8192 bytes) 

Inode-cache hash table entries: 1024 (order: 0, 4096 bytes) 

Memory available: 11272k/4895k RAM (2119k kernel code, 2776k data) 

NR_IRQS:32 

late time init = d0215b28 

Calibrating delay loop... 22.88 BogoMIPS (lpj=45760) 

pid_max: default: 32768 minimum: 301 

Mount-cache hash table entries: 512 

fault during kernel misaligned fixup @ 0xd02157b0; addr 0x00000003; isn=0x20800017 

Linux version 2.6.39-rc3-01078-gaf7b9ea-dirty (ben@debian) (gcc version 4.1.2)# 64 Fri May 13 10:56:50 CEST 2011 

bootconsole [early0] enabled 

early_console initialized at 0xe4842020 

On node 0 totalpages: 4096 

free_area_init_node: node 0, pgdat d04b2814, node_mem_map d04cd800 

DMA zone: 36 pages used for memmap 

DMA zone: 0 pages reserved 

DMA zone: 4060 pages, LIFO batch:0 

pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 

pcpu-alloc: [0] 0  

Built 1 zonelists in Zone order, mobility grouping off. Total pages: 4060 

Kernel command line:  

PID hash table entries: 64 (order: -4, 256 bytes) 

Dentry cache hash table entries: 2048 (order: 1, 8192 bytes) 

Inode-cache hash table entries: 1024 (order: 0, 4096 bytes) 

Memory available: 11272k/4895k RAM (2119k kernel code, 2776k data) 

NR_IRQS:32 

late time init = d0215b28 

Calibrating delay loop... 22.97 BogoMIPS (lpj=45952) 

pid_max: default: 32768 minimum: 301 

Mount-cache hash table entries: 512 

NET: Registered protocol family 16 

bio: create slab <bio-0> at 0 

Switching to clocksource timer 

NET: Registered protocol family 2 

IP route cache hash table entries: 1024 (order: 0, 4096 bytes) 

IPv4 FIB: Using LC-trie version 0.409 

TCP established hash table entries: 512 (order: 0, 4096 bytes) 

TCP bind hash table entries: 512 (order: -1, 2048 bytes) 

TCP: Hash tables configured (established 512 bind 512) 

TCP reno registered 

UDP hash table entries: 256 (order: 0, 4096 bytes) 

UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) 

NET: Registered protocol family 1 

RPC: Registered udp transport module. 

RPC: Registered tcp transport module. 

RPC: Registered tcp NFSv4.1 backchannel transport module. 

[few second to wait here] 

JFFS2 version 2.2. (NAND) &#65533;© 2001-2006 Red Hat, Inc. 

msgmni has been set to 22 

io scheduler noop registered 

io scheduler deadline registered 

io scheduler cfq registered (default) 

[few second to wait here] 

ttyAL0 at MMIO 0x4842020 (irq = 2) is a Altera UART 

console [ttyAL0] enabled, bootconsole disabled 

console [ttyAL0] enabled, bootconsole disabled 

dm9000 Ethernet Driver, V1.31 

TCP cubic registered 

NET: Registered protocol family 17 

Oops: Exception in kernel mode, sig: 4 

 

r1: d0c1c000 r2: 00000b0e r3: d0221000 r4: 00000000 

r5: 00000000 r6: 00000000 r7: ffffff80 r8: d04d2240 

r9: 00000218 r10: d04b28e4 r11: d04d2360 r12: d04d2248 

r13: 00000003 r14: ffffffff r15: 00000001 

ra: d021647c fp: fffffbff sp: d0c1ded4 gp: 00000000 

ea: d0216484 estatus: 00000001 

Kernel panic - not syncing: Attempted to kill init! 

 

--- Quote End ---  

I will give you feed back if I found this issue 

 

Best regards
0 Kudos
Highlighted
Honored Contributor I
29 Views

Hi zben, 

 

Did you succed to boot the kernel since you posted your message? 

 

I try to use the unstable-nios2mmu branch to use the device tree, but I have a problem. I can't find any linux-2.6/arch/nios2/boards/generic-dts/include/asm/nios.h path to modify the nios.h file.... 

Did you add this file or it was included in the unstable-nios2mmu branch ? 

 

With the support of device tree, did you tape only "make" in uClinuxDistr or "make path_to_device_tree.dts" in order to compile the kernel? 

 

Thank you for your help. 

 

Best regards. 

 

Pierre
0 Kudos
Highlighted
Honored Contributor I
29 Views

Hi, 

 

Yes I succeed to make it boot, the issues : 

- I update the kernel to a too new version 

- Same problem to the uClinux-dist directory 

so get the latest nios2-linux, then checkout but don't update 

 

For the nios.h I'm not sure to remember (I delete my project) but I think it was in arch/nios2/include/nios.h 

 

I compile using only make, the .dts to use is set in the .config of the kernel 

 

Best regards 

 

PS: If I remember well I have other errors after boot (like no network on the board or something like that, so I decide to wait for this branch be more mature and I return back to the trunk). I explain it in a post but Altera moderator block it...
0 Kudos
Highlighted
Honored Contributor I
29 Views

It's a bit late, but I have possibly found a bug that may provokes this 'fault during kernel misaligned fixup'. 

It happens when CONFIG_PASS_CMD_LINE is not set under menuconfig (because the parameter passed to early_init_devtree() is not initialized to be more precise). 

However, it has no relationship with the kernel panic that comes later...
0 Kudos