openhwgroup / cva6

The CORE-V CVA6 is an Application class 6-stage RISC-V CPU capable of booting Linux
https://docs.openhwgroup.org/projects/cva6-user-manual/
Other
2.25k stars 682 forks source link

After boot completed of the cva6 core,the GDB Read and write questions? #633

Closed gz2023 closed 3 years ago

gz2023 commented 3 years ago

########################################

First:The serial port prints information

######################################## Hello World! init SPI status: 0x0000000000000025 status: 0x0000000000000025 SPI initialized! initializing SD... SD command cmd0 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 00 sd initialized! gpt partition table header: signature: 5452415020494645 revision: 00010000 size: 0000005C crc_header: 672B50E8 reserved: 00000000 current lba: 0000000000000001 backup lda: 0000000003AFBFFF partition entries lba: 0000000000000002 number partition entries: 00000080 size partition entries: 00000080 gpt partition entry 00 partition type guid: D5F7127456A1134B81DC867174929325 partition guid: 8C9CBCE7EA3BA54A96366416ACC57F55 first lba: 0000000000000800 last lba: 00000000000107FF attributes: 0000000000000000 name: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 gpt partition entry 01 partition type guid: AF3DC60F838472478E793D69D8477DE4 partition guid: 2A5D77892DB0FB4B99B6B75AEAC6CA69 first lba: 0000000000010800 last lba: 0000000003AFBFDE attributes: 0000000000000000 name: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 gpt partition entry 02 partition type guid: 00000000000000000000000000000000 partition guid: 00000000000000000000000000000000 first lba: 0000000000000000 last lba: 0000000000000000 attributes: 0000000000000000 name: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 gpt partition entry 03 partition type guid: 00000000000000000000000000000000 partition guid: 00000000000000000000000000000000 first lba: 0000000000000000 last lba: 0000000000000000 attributes: 0000000000000000 name: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 copying boot image ................................ done! bbl loader initializing sm Hello World! init SPI status: 0x0000000000000025 status: 0x0000000000000025 SPI initialized! initializing SD... SD command cmd0 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 00 sd initialized! gpt partition table header: signature: 5452415020494645 revision: 00010000 size: 0000005C crc_header: 672B50E8 reserved: 00000000 current lba: 0000000000000001 backup lda: 0000000003AFBFFF partition entries lba: 0000000000000002 number partition entries: 00000080 size partition entries: 00000080 gpt partition entry 00 partition type guid: D5F7127456A1134B81DC867174929325 partition guid: 8C9CBCE7EA3BA54A96366416ACC57F55 first lba: 0000000000000800 last lba: 00000000000107FF attributes: 0000000000000000 name: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 gpt partition entry 01 partition type guid: AF3DC60F838472478E793D69D8477DE4 partition guid: 2A5D77892DB0FB4B99B6B75AEAC6CA69 first lba: 0000000000010800 last lba: 0000000003AFBFDE attributes: 0000000000000000 name: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 gpt partition entry 02 partition type guid: 00000000000000000000000000000000 partition guid: 00000000000000000000000000000000 first lba: 0000000000000000 last lba: 0000000000000000 attributes: 0000000000000000 name: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 gpt partition entry 03 partition type guid: 00000000000000000000000000000000 partition guid: 00000000000000000000000000000000 first lba: 0000000000000000 last lba: 0000000000000000 attributes: 0000000000000000 name: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 copying boot image ................................ done! bbl loader initializing sm initialized sm [ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000 [ 0.000000] Linux version 5.1.0-rc7 (root@lihui-virtual-machine) (gcc version 8.2.0 (GCC)) #75 SMP Wed Dec 16 09:37:39 CST 2020 [ 0.000000] initrd not found or empty - disabling initrd [ 0.000000] Zone ranges: [ 0.000000] DMA32 [mem 0x0000000080200000-0x00000000bfffffff] [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000080200000-0x00000000bfffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000bfffffff] [ 0.000000] software IO TLB: mapped [mem 0xbb1fd000-0xbf1fd000] (64MB) [ 0.000000] elf_hwcap is 0x112d [ 0.000000] percpu: Embedded 15 pages/cpu s24280 r8192 d28968 u61440 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 258055 [ 0.000000] Kernel command line: earlyprintk [ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes) [ 0.000000] Sorting ex_table... [ 0.000000] Memory: 952412K/1046528K available (3709K kernel code, 230K rwdata, 1046K rodata, 6443K init, 797K bss, 94116K reserved, 0K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] rcu: Hierarchical RCU implementation. [ 0.000000] rcu: RCU event tracing is enabled. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 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: 0x6eb3e4560, max_idle_ns: 881590406254 ns [ 0.000328] sched_clock: 64 bits at 15MHz, resolution 66ns, wraps every 4398046511080ns [ 0.322925] printk: console [hvc0] enabled [ 0.330471] Calibrating delay loop (skipped), value calculated using timer frequency.. 30.00 BogoMIPS (lpj=150000) [ 0.347980] pid_max: default: 32768 minimum: 301 [ 0.365749] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes) [ 0.377262] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes) [ 0.416928] VALIDATE proc [ 0.472949] rcu: Hierarchical SRCU implementation. [ 0.507440] smp: Bringing up secondary CPUs ... [ 0.514296] smp: Brought up 1 node, 1 CPU [ 0.541959] devtmpfs: initialized [ 0.605906] random: get_random_bytes called from setup_net+0x32/0x15c with crng_init=0 [ 0.625338] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.641729] futex hash table entries: 256 (order: 2, 16384 bytes) [ 0.674441] NET: Registered protocol family 16 [ 1.140746] usbcore: registered new interface driver usbfs [ 1.152088] usbcore: registered new interface driver hub [ 1.163233] usbcore: registered new device driver usb [ 1.214603] clocksource: Switched to clocksource riscv_clocksource [ 1.293945] NET: Registered protocol family 2 [ 1.334791] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes) [ 1.347908] TCP established hash table entries: 8192 (order: 4, 65536 bytes) [ 1.364032] TCP bind hash table entries: 8192 (order: 5, 131072 bytes) [ 1.381645] TCP: Hash tables configured (established 8192 bind 8192) [ 1.403873] UDP hash table entries: 512 (order: 2, 16384 bytes) [ 1.414320] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes) [ 1.432089] NET: Registered protocol family 1 [ 1.474030] RPC: Registered named UNIX socket transport module. [ 1.482338] RPC: Registered udp transport module. [ 1.491126] RPC: Registered tcp transport module. [ 1.499086] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 21.645267] workingset: timestamp_bits=62 max_order=18 bucket_order=0 [ 22.300943] NFS: Registering the id_resolver key type [ 22.309467] Key type id_resolver registered [ 22.316303] Key type id_legacy registered [ 22.322306] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 27.067853] io scheduler mq-deadline registered [ 27.074870] io scheduler kyber registered [ 30.321158] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 30.406207] 10000000.uart: ttyS0 at MMIO 0x10000000 (irq = 1, base_baud = 3125000) is a TI16750 [ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000 [ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000 [ 0.000000] Linux version 5.1.0-rc7 (root@lihui-virtual-machine) (gcc version 8.2.0 (GCC)) #75 SMP Wed Dec 16 09:37:39 CST 2020 [ 0.000000] Linux version 5.1.0-rc7 (root@lihui-virtual-machine) (gcc version 8.2.0 (GCC)) #75 SMP Wed Dec 16 09:37:39 CST 2020 [ 0.000000] initrd not found or empty - disabling initrd [ 0.000000] initrd not found or empty - disabling initrd [ 0.000000] Zone ranges: [ 0.000000] Zone ranges: [ 0.000000] DMA32 [mem 0x0000000080200000-0x00000000bfffffff] [ 0.000000] DMA32 [mem 0x0000000080200000-0x00000000bfffffff] [ 0.000000] Normal empty [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000080200000-0x00000000bfffffff] [ 0.000000] node 0: [mem 0x0000000080200000-0x00000000bfffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000bfffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000bfffffff] [ 0.000000] software IO TLB: mapped [mem 0xbb1fd000-0xbf1fd000] (64MB) [ 0.000000] software IO TLB: mapped [mem 0xbb1fd000-0xbf1fd000] (64MB) [ 0.000000] elf_hwcap is 0x112d [ 0.000000] elf_hwcap is 0x112d [ 0.000000] percpu: Embedded 15 pages/cpu s24280 r8192 d28968 u61440 [ 0.000000] percpu: Embedded 15 pages/cpu s24280 r8192 d28968 u61440 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 258055 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 258055 [ 0.000000] Kernel command line: earlyprintk [ 0.000000] Kernel command line: earlyprintk [ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes) [ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes) [ 0.000000] Sorting ex_table... [ 0.000000] Sorting ex_table... [ 0.000000] Memory: 952412K/1046528K available (3709K kernel code, 230K rwdata, 1046K rodata, 6443K init, 797K bss, 94116K reserved, 0K cma-reserved) [ 0.000000] Memory: 952412K/1046528K available (3709K kernel code, 230K rwdata, 1046K rodata, 6443K init, 797K bss, 94116K reserved, 0K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] rcu: Hierarchical RCU implementation. [ 0.000000] rcu: Hierarchical RCU implementation. [ 0.000000] rcu: RCU event tracing is enabled. [ 0.000000] rcu: RCU event tracing is enabled. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies. [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1 [ 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] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0 [ 0.000000] plic: mapped 3 interrupts with 1 handlers for 2 contexts. [ 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] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0] [ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x6eb3e4560, max_idle_ns: 881590406254 ns [ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x6eb3e4560, max_idle_ns: 881590406254 ns [ 0.000328] sched_clock: 64 bits at 15MHz, resolution 66ns, wraps every 4398046511080ns [ 0.000328] sched_clock: 64 bits at 15MHz, resolution 66ns, wraps every 4398046511080ns [ 0.322925] printk: console [hvc0] enabled [ 0.322925] printk: console [hvc0] enabled [ 0.330471] Calibrating delay loop (skipped), value calculated using timer frequency.. 30.00 BogoMIPS (lpj=150000) [ 0.330471] Calibrating delay loop (skipped), value calculated using timer frequency.. 30.00 BogoMIPS (lpj=150000) [ 0.347980] pid_max: default: 32768 minimum: 301 [ 0.347980] pid_max: default: 32768 minimum: 301 [ 0.365749] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes) [ 0.365749] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes) [ 0.377262] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes) [ 0.377262] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes) [ 0.416928] VALIDATE proc [ 0.416928] VALIDATE proc [ 0.472949] rcu: Hierarchical SRCU implementation. [ 0.472949] rcu: Hierarchical SRCU implementation. [ 0.507440] smp: Bringing up secondary CPUs ... [ 0.507440] smp: Bringing up secondary CPUs ... [ 0.514296] smp: Brought up 1 node, 1 CPU [ 0.514296] smp: Brought up 1 node, 1 CPU [ 0.541959] devtmpfs: initialized [ 0.541959] devtmpfs: initialized [ 0.605906] random: get_random_bytes called from setup_net+0x32/0x15c with crng_init=0 [ 0.605906] random: get_random_bytes called from setup_net+0x32/0x15c with crng_init=0 [ 0.625338] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.625338] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.641729] futex hash table entries: 256 (order: 2, 16384 bytes) [ 0.641729] futex hash table entries: 256 (order: 2, 16384 bytes) [ 0.674441] NET: Registered protocol family 16 [ 0.674441] NET: Registered protocol family 16 [ 1.140746] usbcore: registered new interface driver usbfs [ 1.140746] usbcore: registered new interface driver usbfs [ 1.152088] usbcore: registered new interface driver hub [ 1.152088] usbcore: registered new interface driver hub [ 1.163233] usbcore: registered new device driver usb [ 1.163233] usbcore: registered new device driver usb [ 1.214603] clocksource: Switched to clocksource riscv_clocksource [ 1.214603] clocksource: Switched to clocksource riscv_clocksource [ 1.293945] NET: Registered protocol family 2 [ 1.293945] NET: Registered protocol family 2 [ 1.334791] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes) [ 1.334791] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes) [ 1.347908] TCP established hash table entries: 8192 (order: 4, 65536 bytes) [ 1.347908] TCP established hash table entries: 8192 (order: 4, 65536 bytes) [ 1.364032] TCP bind hash table entries: 8192 (order: 5, 131072 bytes) [ 1.364032] TCP bind hash table entries: 8192 (order: 5, 131072 bytes) [ 1.381645] TCP: Hash tables configured (established 8192 bind 8192) [ 1.381645] TCP: Hash tables configured (established 8192 bind 8192) [ 1.403873] UDP hash table entries: 512 (order: 2, 16384 bytes) [ 1.403873] UDP hash table entries: 512 (order: 2, 16384 bytes) [ 1.414320] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes) [ 1.414320] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes) [ 1.432089] NET: Registered protocol family 1 [ 1.432089] NET: Registered protocol family 1 [ 1.474030] RPC: Registered named UNIX socket transport module. [ 1.474030] RPC: Registered named UNIX socket transport module. [ 1.482338] RPC: Registered udp transport module. [ 1.482338] RPC: Registered udp transport module. [ 1.491126] RPC: Registered tcp transport module. [ 1.491126] RPC: Registered tcp transport module. [ 1.499086] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 1.499086] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 21.645267] workingset: timestamp_bits=62 max_order=18 bucket_order=0 [ 21.645267] workingset: timestamp_bits=62 max_order=18 bucket_order=0 [ 22.300943] NFS: Registering the id_resolver key type [ 22.300943] NFS: Registering the id_resolver key type [ 22.309467] Key type id_resolver registered [ 22.309467] Key type id_resolver registered [ 22.316303] Key type id_legacy registered [ 22.316303] Key type id_legacy registered [ 22.322306] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 22.322306] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 27.067853] io scheduler mq-deadline registered [ 27.067853] io scheduler mq-deadline registered [ 27.074870] io scheduler kyber registered [ 27.074870] io scheduler kyber registered [ 30.321158] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 30.321158] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 30.406207] 10000000.uart: ttyS0 at MMIO 0x10000000 (irq = 1, base_baud = 3125000) is a TI16750 [ 30.406207] 10000000.uart: ttyS0 at MMIO 0x10000000 (irq = 1, base_baud = 3125000) is a TI16750 [ 31.830270] printk: console [ttyS0] enabled [ 31.830270] printk: console [ttyS0] enabled [ 31.910666] xilinx_spi 20000000.xps-spi: at 0x20000000 mapped to 0x(__ptrval__), irq=2 [ 31.910666] xilinx_spi 20000000.xps-spi: at 0x20000000 mapped to 0x(__ptrval____), irq=2 [ 31.956712] libphy: Fixed MDIO Bus: probed [ 31.956712] libphy: Fixed MDIO Bus: probed [ 31.986719] lowrisc-digilent-ethernet: Lowrisc ethernet platform (30000000-30007FFF) mapped to ffffffd004028000 [ 31.986719] lowrisc-digilent-ethernet: Lowrisc ethernet platform (30000000-30007FFF) mapped to ffffffd004028000 [ 32.272438] libphy: GPIO Bitbanged LowRISC: probed [ 32.272438] libphy: GPIO Bitbanged LowRISC: probed [ 32.283972] Probing lowrisc-0:01 (address 1) [ 32.283972] Probing lowrisc-0:01 (address 1) [ 32.304634] RTL8211E Gigabit Ethernet lowrisc-0:01: attached PHY driver [RTL8211E Gigabit Ethernet] (mii_bus:phy_addr=lowrisc-0:01, irq=POLL) [ 32.304634] RTL8211E Gigabit Ethernet lowrisc-0:01: attached PHY driver [RTL8211E Gigabit Ethernet] (mii_bus:phy_addr=lowrisc-0:01, irq=POLL) [ 32.369026] lowrisc-eth 30000000.lowrisc-eth: Lowrisc Ether100MHz registered [ 32.369026] lowrisc-eth 30000000.lowrisc-eth: Lowrisc Ether100MHz registered [ 32.391923] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 32.391923] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 32.467272] mmc_spi spi0.0: SD/MMC host mmc0, no WP, no poweroff, cd polling [ 32.467272] mmc_spi spi0.0: SD/MMC host mmc0, no WP, no poweroff, cd polling [ 32.497800] usbcore: registered new interface driver usbhid [ 32.497800] usbcore: registered new interface driver usbhid [ 32.510197] usbhid: USB HID core driver [ 32.510197] usbhid: USB HID core driver [ 32.584096] NET: Registered protocol family 10 [ 32.584096] NET: Registered protocol family 10 [ 32.669374] Segment Routing with IPv6 [ 32.669374] Segment Routing with IPv6 [ 32.682046] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 32.682046] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 32.730841] NET: Registered protocol family 17 [ 32.730841] NET: Registered protocol family 17 [ 32.773905] Key type dns_resolver registered [ 32.773905] Key type dns_resolver registered [ 32.874241] mmc0: host does not support reading read-only switch, assuming write-enable [ 32.874241] mmc0: host does not support reading read-only switch, assuming write-enable [ 32.894217] mmc0: new SDHC card on SPI [ 32.894217] mmc0: new SDHC card on SPI [ 33.009784] mmcblk0: mmc0:0000 SDU1 29.5 GiB [ 33.009784] mmcblk0: mmc0:0000 SDU1 29.5 GiB [ 33.502773] Freeing unused kernel memory: 6440K [ 33.502773] Freeing unused kernel memory: 6440K [ 33.512239] This architecture does not have kernel memory protection. [ 33.512239] This architecture does not have kernel memory protection. [ 33.532467] Run /init as init process [ 33.532467] Run /init as init process [ 34.314807] mmcblk0: p1 p2 [ 34.314807] mmcblk0: p1 p2 Starting logging: start-stop-daemon: open pidfile /var/run/syslogd.pid: Not a directory start-stop-daemon: open pidfile /var/run/klogd.pid: Not a directory OK Initializing random number generator... [ 39.216160] random: dd: uninitialized urandom read (512 bytes read) [ 39.216160] random: dd: uninitialized urandom read (512 bytes read) done. Starting rpcbind: start-stop-daemon: open pidfile /var/run/rpcbind.pid: Not a directory OK [ 41.509526] random: ssh-keygen: uninitialized urandom read (32 bytes read) [ 41.509526] random: ssh-keygen: uninitialized urandom read (32 bytes read) Starting sshd: [ 42.061252] random: sshd: uninitialized urandom read (32 bytes read) [ 42.061252] random: sshd: uninitialized urandom read (32 bytes read) touch: /var/lock/sshd: Not a directory OK NFS preparation skipped, OK

Welcome to Buildroot buildroot login:

########################################

Second:openocd -f ./ariane.cfg

######################################## [gzl@gzl fpga]$ openocd -f ./ariane.cfg Open On-Chip Debugger 0.10.0+dev-01405-gc56aa66 (2020-11-20-15:05) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : auto-selecting first available session transport "jtag". To override use 'transport select '. Info : clock speed 500 kHz Info : JTAG tap: riscv.cpu tap/device found: 0x00000001 (mfg: 0x000 (), part: 0x0000, ver: 0x0) Info : datacount=2 progbufsize=8 Info : Examined RISC-V core; found 1 harts Info : hart 0: XLEN=64, misa=0x800000000014112d Info : starting gdb server for riscv.cpu on 3333 Info : Listening on port 3333 for gdb connections Ready for Remote Connections Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections Info : accepting 'gdb' connection on tcp/3333 Warn : Prefer GDB command "target extended-remote 3333" instead of "target remote 3333"

########################################

Three:riscv64-unknown-elf-gdb ./hello.elf

########################################

[gzl@gzl cva6]$ riscv64-unknown-elf-gdb ./hello.elf GNU gdb (GDB) 8.0.50.20170724-git Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-pc-linux-gnu --target=riscv64-unknown-elf". Type "show configuration" for configuration details. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./hello.elf...(no debugging symbols found)...done. (gdb) target remote localhost:3333 Remote debugging using localhost:3333 0xffffffe00064c0e4 in ?? () (gdb) x/3w 0x40000000 0x40000000: Ignoring packet error, continuing... Reply contains invalid hex digit 116 (gdb) x/3w 0x80000000 Ignoring packet error, continuing... 0x80000000: Reply contains invalid hex digit 116 (gdb) x/i 0x1000 0x1000: Ignoring packet error, continuing... Reply contains invalid hex digit 116 (gdb)

Why did it report an error " 0x40000000: Ignoring packet error, continuing..." and "0x80000000: Reply contains invalid hex digit 116 "?

niwis commented 3 years ago

Hi @gzhan88, it looks like you are trying to access physical memory after attaching gdb to the core running on virtual memory. This errors, because 0x40000000 and 0x80000000 are not mapped to the virtual memory space. If, however, this is what you want, you need to remove the following lines from ariane.cfg: https://github.com/openhwgroup/cva6/blob/4abae602c57045a2c89147a2c9c2cc47eab8fc14/fpga/ariane.cfg#L38-L40 This will result in the debugger exclusively accessing physical addresses. Best, Nils

gz2023 commented 3 years ago

Hi niwis,thank you very much for your prompt reply.The problem has already been settled.

Wcm926 commented 3 years ago

hi,I can not log in to linux by default username root when starting the operating system. Nothing happens when I type root , and the log is same as you.