Closed Yuxin-Yu closed 1 year ago
Hi @abejgonzalez .I used a method to generate NVDLA's Linux image files . The specific process is as follows:
OpenSBI v1.2
____ _____ ____ _____
/ __ \ / ____| _ \_ _|
| | | |_ __ ___ _ __ | (___ | |_) || |
| | | | '_ \ / _ \ '_ \ \___ \| _ < | |
| |__| | |_) | __/ | | |____) | |_) || |_
\____/| .__/ \___|_| |_|_____/|___/_____|
| |
|_|
Platform Name : freechips,rocketchip-unknown Platform Features : medeleg Platform HART Count : 1 Platform IPI Device : aclint-mswi Platform Timer Device : aclint-mtimer @ 1000000Hz Platform Console Device : sifive_uart Platform HSM Device : --- Platform PMU Device : --- Platform Reboot Device : --- Platform Shutdown Device : --- Platform Suspend Device : --- Firmware Base : 0x80000000 Firmware Size : 232 KB Firmware RW Offset : 0x20000 Runtime SBI Version : 1.0
Domain0 Name : root Domain0 Boot HART : 0 Domain0 HARTs : 0* Domain0 Region00 : 0x0000000002000000-0x000000000200ffff M: (I,R,W) S/U: () Domain0 Region01 : 0x0000000080000000-0x000000008001ffff M: (R,X) S/U: () Domain0 Region02 : 0x0000000080020000-0x000000008003ffff M: (R,W) S/U: () Domain0 Region03 : 0x0000000000000000-0xffffffffffffffff M: (R,W,X) S/U: (R,W,X) Domain0 Next Address : 0x0000000080200000 Domain0 Next Arg1 : 0x0000000081500000 Domain0 Next Mode : S-mode Domain0 SysReset : yes Domain0 SysSuspend : yes
Boot HART ID : 0
Boot HART Domain : root
Boot HART Priv Version : v1.11
Boot HART Base ISA : rv64imafdcx
Boot HART ISA Extensions : none
Boot HART PMP Count : 8
Boot HART PMP Granularity : 4
Boot HART PMP Address Bits: 31
Boot HART MHPM Count : 2
Boot HART MIDELEG : 0x0000000000000222
Boot HART MEDELEG : 0x000000000000b109
[ 0.000000] OF: fdt: No chosen node found, continuing without
[ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[ 0.000000] Forcing kernel command line to: console=ttyS0 console=ttySIF0 earlycon
[ 0.000000] Linux version 5.7.0-rc3-58540-g66e8cf3c569c (yyx@yyx-virtual-machine) (gcc version 12.2.0 (g2ee5e430018), GNU ld (GNU Binutils) 2.39) #7 SMP Tue Jul 18 09:07:51 CST 2023
[ 0.000000] Malformed early option 'earlycon'
[ 0.000000] initrd not found or empty - disabling initrd
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000080200000-0x00000000ffffffff]
[ 0.000000] Normal [mem 0x0000000100000000-0x000000017fffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080200000-0x000000017fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x000000017fffffff]
[ 0.000000] On node 0 totalpages: 1048064
[ 0.000000] DMA32 zone: 7161 pages used for memmap
[ 0.000000] DMA32 zone: 0 pages reserved
[ 0.000000] DMA32 zone: 523776 pages, LIFO batch:63
[ 0.000000] Normal zone: 7168 pages used for memmap
[ 0.000000] Normal zone: 524288 pages, LIFO batch:63
[ 0.000000] software IO TLB: mapped [mem 0xfbfff000-0xfffff000] (64MB)
[ 0.000000] SBI specification v1.0 detected
[ 0.000000] SBI implementation ID=0x1 Version=0x10002
[ 0.000000] SBI v0.2 TIME extension detected
[ 0.000000] SBI v0.2 IPI extension detected
[ 0.000000] SBI v0.2 RFENCE extension detected
[ 0.000000] SBI v0.2 HSM extension detected
[ 0.000000] elf_hwcap is 0x112d
[ 0.000000] percpu: Embedded 17 pages/cpu s29720 r8192 d31720 u69632
[ 0.000000] pcpu-alloc: s29720 r8192 d31720 u69632 alloc=17*4096
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 1033735
[ 0.000000] Kernel command line: console=ttyS0 console=ttySIF0 earlycon
[ 0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.000000] Sorting ex_table...
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 4043800K/4192256K available (3034K kernel code, 3350K rwdata, 2048K rodata, 10077K init, 255K bss, 148456K reserved, 0K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] fixmap : 0xffffffcefee00000 - 0xffffffceff000000 (2048 kB)
[ 0.000000] pci io : 0xffffffceff000000 - 0xffffffcf00000000 ( 16 MB)
[ 0.000000] vmemmap : 0xffffffcf00000000 - 0xffffffcfffffffff (4095 MB)
[ 0.000000] vmalloc : 0xffffffd000000000 - 0xffffffdfffffffff (65535 MB)
[ 0.000000] lowmem : 0xffffffe000000000 - 0xffffffe0ffe00000 (4094 MB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=32 to nr_cpu_ids=1.
[ 0.000000] rcu: RCU debug extended QS entry/exit.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
[ 0.000000] plic: mapped 3 interrupts with 1 handlers for 2 contexts.
[ 0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0]
[ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 3526361616960 ns
[ 0.000127] sched_clock: 64 bits at 1000kHz, resolution 1000ns, wraps every 2199023255500ns
[ 0.001983] Console: colour dummy device 80x25
[ 0.002640] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=4000)
[ 0.002949] pid_max: default: 32768 minimum: 301
[ 0.007338] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 0.008694] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 0.039806] rcu: Hierarchical SRCU implementation.
[ 0.048598] smp: Bringing up secondary CPUs ...
[ 0.048828] smp: Brought up 1 node, 1 CPU
[ 0.057160] devtmpfs: initialized
[ 0.078287] random: get_random_u32 called from bucket_table_alloc.isra.0+0x4a/0xbc with crng_init=0
[ 0.080008] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.080456] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[ 0.252079] clocksource: Switched to clocksource riscv_clocksource
[ 2.013675] workingset: timestamp_bits=62 max_order=20 bucket_order=0
[ 2.188566] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[ 2.188797] io scheduler mq-deadline registered
[ 2.188976] io scheduler kyber registered
[ 2.189641] start plist test
[ 2.330326] end plist test
[ 3.236930] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[ 3.257038] 64000000.serial: ttySIF0 at MMIO 0x64000000 (irq = 2, base_baud = 0) is a SiFive UART v0
[ 3.257279] BUG: spinlock bad magic on CPU#0, swapper/0/1
[ 3.257537] lock: 0xffffffe0fbdb5018, .magic: 00000000, .owner:
Welcome to Buildroot buildroot login: root Password: Login incorrect login[100]: invalid password for 'root' on 'console' buildroot login: buildroot login: root Password: Login incorrect login[100]: invalid password for 'root' on 'console'
During the Linux startup process, there was a kernel error, and I was unable to log in using root+fpga (theoretical account and password) or root+firesim on the login console.
Additionally, based on the description in question https://github.com/ucb-bar/chipyard/issues/573, I have attempted the following two methods:
1. Add the following Linux configuration information to firemarshal/boards/prototype/base workloads/br base/Linux configuration:
CONFIG_DEBUG_RT_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_RWSEMS=y CONFIG_DEBUG_ATOMIC_SLEEP=y
2. Try switching the Rocket kernel to the Boom kernel.
Unfortunately, after trying the above two methods, the kernel still reported the same error and was unable to access Linux
I have resolved the above issue and made the following modifications:
CONFIG_DEBUG_RT_MUTEXES=n
CONFIG_DEBUG_SPINLOCK=n
CONFIG_DEBUG_MUTEXES=n
CONFIG_DEBUG_RWSEMS=n
CONFIG_DEBUG_ATOMIC_SLEEP=n
And I am not sure if the issue with login failure on Linux is due to a mismatch between the bit file and the Linux image, or if there is a problem with the latest version of Firemarshal
Background Work
Chipyard Version and Hash
Release:1.10
OS Setup
In order to verify the functionality of nvdla in FPGA, I generated a rocket soc bit file which equipped with small nvdla. However, I am not sure how to generate the corresponding Linux image. According to the readme in nvdla workload. I switched the Linux repository in Firemarshal to the nvdla-linux-v57 branch and ran the instructions
./marshall - v - d build ../nvdla-workload/marshal-config/nvdla-base. json
,but the following error occurred:Additionally, it should be noted that my
marshal-config. yaml
uses the prototype mode, and the content of this file is as follows:board-dir : 'boards/prototype'
Secondly, it is normal for me to generate the default prototype configuration's liunx image in the firemarshal conda environmentOther Setup
No response
Current Behavior
no
Expected Behavior
no
Other Information
No response