Altera_Forum
Honored Contributor
13 years agoCan I upload Nios2 SMP system?
Hi, guys & Altera corp.
I'm now making a Nios2 SMP system for my research purpose. It's still a little bit buggy and slow, but I succeeded to boot Linux kernel and execute bash.
Linux version 2.6.30 (hamada@Messiah2) (gcc version 4.1.2 (Wind River Linux Sour
cery G++ 4.1-176))# 1915 SMP Tue Sep 4 18:16:32 JST 2012
console enabled
Early printk initialized
Linux/Nios II-MMU
Altera Nios II-MMU support (C) 2004 Wind River Systems.
init_bootmem_node(?,0x3d0, 0x0, 0x8000)
free_bootmem(0x3d0000, 0x7c30000)
reserve_bootmem(0x3d0000, 0x1000)
Detected 1 available secondary CPU(s)
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: kgdboc=ttyS0, 115200 kgdbwait
NR_IRQS:32
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x25
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
We have 32768 pages of RAM
Memory available: 125824k/3902k RAM, 0k/0k ROM (1457k kernel code, 2445k data)
Calibrating delay loop... 19.55 BogoMIPS (lpj=97792)
Mount-cache hash table entries: 512
CPU1: Booted secondary processor
Calibrating delay loop... 19.96 BogoMIPS (lpj=99840)
Brought up 2 CPUs
SMP: Total of 2 processors activated (39.52 BogoMIPS).
init_BSP(): registering device resources
bio: create slab <bio-0> at 0
msgmni has been set to 246
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
ttyJ0 at MMIO 0xa60a440 (irq = 2) is a Altera JTAG UART
console handover: boot -> real
ttyS0 at MMIO 0x8000060 (irq = 3) is a Altera UART
ifconfig: socket: Function not implemented
ifconfig: socket: Function not implemented
Welcome to
____ _ _
/ __| ||_|
_ _| | | | _ ____ _ _ _ _
| | | | | | || | _ \| | | |\ \/ /
| |_| | |__| || | | | | |_| |/ \
| ___\____|_||_|_| |_|\____|\_/\_/
| |
|_|
For further information check:
http://www.uclinux.org/
Why came here? CPU0, task inetd pte c71f4c40, entry 07a0704b, address 2ab10000
BusyBox v1.14.2 (2012-06-26 16:39:29 JST) hush - the humble shell
Enter 'help' for a list of built-in commands.
/# ls
bin etc init mnt root sys usr
dev home lib proc sbin tmp var
/# bash # ls -lp
drwxr-xr-x 2 root root 0 Sep 4 2012 bin/
drwxr-xr-x 6 root root 0 Sep 4 2012 dev/
drwxr-xr-x 5 root root 0 Sep 4 2012 etc/
drwxr-xr-x 3 root root 0 Sep 4 2012 home/
lrwxrwxrwx 1 root root 10 Sep 4 2012 init -> /sbin/init
drwxr-xr-x 3 root root 0 Sep 4 2012 lib/
drwxr-xr-x 2 root root 0 Sep 4 2012 mnt/
dr-xr-xr-x 34 root root 0 Nov 30 00:00 proc/
drwxr-xr-x 2 root root 0 Sep 4 2012 root/
lrwxrwxrwx 1 root root 3 Sep 4 2012 sbin -> bin/
drwxr-xr-x 11 root root 0 Nov 30 00:00 sys/
drwxr-xr-x 2 root root 0 Nov 30 00:01 tmp/
drwxr-xr-x 5 root root 0 Sep 4 2012 usr/
drwxr-xr-x 7 root root 0 Nov 30 00:01 var/ # cat /proc/cpuinfo
CPU: NIOS2 MultiCore
MMU: ways:16 entries:512
FPU: none
Clocking: <not supported>
BogoMips: 19.96
Calibration: 9984000 loops
CPU: NIOS2 MultiCore
MMU: ways:16 entries:512
FPU: none
Clocking: <not supported>
BogoMips: 19.96
Calibration: 9984000 loops # cat /proc/interrupts
CPU0
0: 13931 NIOS2-INTC timer
2: 133 NIOS2-INTC JTAGUART
3: 0 NIOS2-INTC UART
30: 4875 NIOS2-INTC IPI 0
31: 17375 NIOS2-INTC IPI 1 # cat /proc/stat
cpu 124 0 27259 1939 0 0 2 0 0
cpu0 54 0 13448 1183 0 0 2 0 0
cpu1 70 0 13811 756 0 0 0 0 0
intr 38284 14687 0 163 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 515
9 18275
ctxt 33554
btime 943920000
processes 674
procs_running 2
procs_blocked 0 #
The cpu core is a clone of the genuine Nios2/f core and almost all features are implemented except the details of 1st data cache. If anyone has interest, I want to upload these to 'Altera Wiki', but it's a problem because the 'cpu' is a clone and Altera corp. has their copyright for Nios2's instruction set and its architecture. If Altera corp. kindly permit me to upload all including hardware's source codes, this is the best way. But if not so, how can we share these result? Kazu