2

我按照How to make a multicore system using the RISC-V Rocket-chip processor to generate a multicore Rocket for FPGA (board: Xilinx ZC706) 中的说明进行操作,但 Linux 无法识别附加内核。

我确信 Linux 与 SMP 配合得很好,因为当我用火箭芯片仿真器或 Spike ISA 仿真器替换 FPGA 时,它可以识别多核。

截屏

更新:应用多核修复提交后,riscv Linux 停止:

root@zynq:~# ./fesvr-zynq +disk=/nfs/root.bin bbl /nfs/linux-3.14.33/vmlinux 
              vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
                  vvvvvvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrr       vvvvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrr      vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrr      vvvvvvvvvvvvvvvvvvvvvv  
rrrrrrrrrrrrr       vvvvvvvvvvvvvvvvvvvvvv    
rr                vvvvvvvvvvvvvvvvvvvvvv      
rr            vvvvvvvvvvvvvvvvvvvvvvvv      rr
rrrr      vvvvvvvvvvvvvvvvvvvvvvvvvv      rrrr
rrrrrr      vvvvvvvvvvvvvvvvvvvvvv      rrrrrr
rrrrrrrr      vvvvvvvvvvvvvvvvvv      rrrrrrrr
rrrrrrrrrr      vvvvvvvvvvvvvv      rrrrrrrrrr
rrrrrrrrrrrr      vvvvvvvvvv      rrrrrrrrrrrr
rrrrrrrrrrrrrr      vvvvvv      rrrrrrrrrrrrrr
rrrrrrrrrrrrrrrr      vv      rrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrr          rrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrr      rrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrr  rrrrrrrrrrrrrrrrrrrrrr

       INSTRUCTION SETS WANT TO BE FREE

****************Sometimes halt here************************

[    0.000000] Linux version 3.14.33-g043bb5d (guanglin@guanglin-a11-linux) (gcc version 5.2.0 (GCC) ) #5 SMP Tue Oct 13 14:56:14 EDT 2015
[    0.000000] Detected 0xfe00000 bytes of physical memory
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00200000-0x0fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00200000-0x0fffffff]
[    0.000000] PERCPU: Embedded 8 pages/cpu @ffffffff8062d000 s9432 r0 d23336 u32768
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 64135
[    0.000000] Kernel command line: root=/dev/htifblk0
[    0.000000] PID hash table entries: 1024 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 5, 131072 bytes)
[    0.000000] Sorting __ex_table...
[    0.000000] Memory: 253320K/260096K available (1898K kernel code, 119K rwdata, 368K rodata, 85K init, 221K bss, 6776K reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS:2
[    0.150000] Calibrating delay using timer specific routine.. 20.02 BogoMIPS (lpj=100145)
[    0.150000] pid_max: default: 32768 minimum: 301
[    0.150000] Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
[    0.150000] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes)
[    0.150000] Brought up 2 CPUs
[    0.150000] devtmpfs: initialized
[    0.150000] NET: Registered protocol family 16
[    0.150000] bio: create slab <bio-0> at 0
[    0.150000] Switched to clocksource riscv_clocksource
[    0.150000] NET: Registered protocol family 2
[    0.150000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.150000] TCP bind hash table entries: 2048 (order: 3, 32768 bytes)
[    0.150000] TCP: Hash tables configured (established 2048 bind 2048)
[    0.150000] TCP: reno registered
[    0.150000] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.150000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.150000] NET: Registered protocol family 1
[    0.150000] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.150000] io scheduler noop registered
[    0.150000] io scheduler cfq registered (default)
[    0.180000] htifcon htif1: detected console
[    0.190000] console [htifcon0] enabled
[    0.190000] htifblk htif2: detected disk
[    0.190000] htifblk htif2: added htifblk0
[    0.190000] TCP: cubic registered

****************Sometimes halt here************************

[    0.190000] VFS: Mounted root (ext2 filesystem) readonly on device 254:0.
[    0.190000] devtmpfs: mounted
[    0.190000] Freeing unused kernel memory: 84K (ffffffff80000000 - ffffffff80015000)
/ # 
/ # 
/ # cd /
/ # cd /usr
/usr # echo abc
abc
/usr # ls

****************Sometimes halt here************************
4

1 回答 1

2

您将需要重建 riscv-fesvr 并将其安装到 FPGA 上。这个提交解决了这个问题。重建 riscv-fesvr 的说明。

于 2015-10-15T17:34:57.303 回答