Skip to content

SD card boot gets stuck often resulting in board not booting. #15

Description

@kraj

I am using starfive_vic7100_evb_sd_net_defconfig for kernel and it results in kernel hangs during boot at times, almost everytime the system is rebooted. Following message is seen when the kernel gets stuck

[    2.216987] sdhci: Secure Digital Host Controller Interface driver
[    2.223206] sdhci: Copyright(c) Pierre Ossman
[    2.227616] Synopsys Designware Multimedia Card Interface Driver
[    2.233929] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.240680] dw_mmc 10000000.sdio0: IDMAC supports 32-bit address mode.
[    2.241157] NET: Registered protocol family 10
[    2.247368] dw_mmc 10000000.sdio0: Using internal DMA controller.
[    2.257870] dw_mmc 10000000.sdio0: Version ID is 290a
[    2.263093] dw_mmc 10000000.sdio0: DW MMC controller at irq 32,32 bit host data width,32 deep fifo
[    2.272303] Segment Routing with IPv6
[    2.272351] mmc_host mmc0: card is polling.
[    2.276110] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.280826] dw_mmc 10010000.sdio1: IDMAC supports 32-bit address mode.
[    2.287217] NET: Registered protocol family 17
[    2.292709] dw_mmc 10010000.sdio1: Using internal DMA controller.
[    2.297470] 9pnet: Installing 9P2000 support
[    2.303231] dw_mmc 10010000.sdio1: Version ID is 290a
[    2.307588] Key type dns_resolver registered
[    2.312602] dw_mmc 10010000.sdio1: DW MMC controller at irq 33,32 bit host data width,32 deep fifo
[    2.316984] debug_vm_pgtable: [debug_vm_pgtable         ]: Validating architecture page table helpers
[    2.326026] mmc_host mmc1: card is non-removable.
[    2.340468] dw-apb-uart 12440000.serial: forbid DMA for kernel console
[    2.491434] mmc_host mmc0: Bus speed (slot 0) = 100000000Hz (slot req 400000Hz, actual 400000HZ div = 125)
[    2.551443] mmc_host mmc1: Bus speed (slot 0) = 100000000Hz (slot req 400000Hz, actual 400000HZ div = 125)
[    2.771949] Waiting for root device /dev/mmcblk0p2...
[    2.811404] dw_mmc 10010000.sdio1: Unexpected interrupt latency

I am now building with https://github.com/starfive-tech/freelight-u-sdk/blob/starfive/conf/sdk_210209_defconfig and that seems to result in better behavior where it does not get stuck in SD card issues as much.

but I do see another issue

[ 1059.839470] Showing busy workqueues and worker pools:
[ 1059.844509] workqueue events: flags=0x0
[ 1059.848329]   pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=5/256 refcnt=6
[ 1059.855104]     in-flight: 50:request_firmware_work_func
[ 1059.860413]     pending: delayed_fput, do_free_init, deferred_probe_work_func, rht_deferred_worker
[ 1059.869397] workqueue events_unbound: flags=0x2
[ 1059.873912]   pwq 4: cpus=0-1 flags=0x4 nice=0 active=2/512 refcnt=5
[ 1059.880250]     in-flight: 43:fsnotify_mark_destroy_workfn BAR(107), 7:fsnotify_connector_destroy_workfn
[ 1059.889726] workqueue events_freezable: flags=0x4
[ 1059.894409]   pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=1/256 refcnt=2
[ 1059.901184]     pending: mmc_rescan
[ 1059.904685] workqueue events_power_efficient: flags=0x80
[ 1059.909976]   pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=2/256 refcnt=3
[ 1059.916748]     pending: gc_worker, reg_check_chans_work [cfg80211]
[ 1059.923849] workqueue rcu_gp: flags=0x8
[ 1059.927671]   pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=1/256 refcnt=2
[ 1059.934449]     pending: process_srcu
[ 1059.938121] workqueue mm_percpu_wq: flags=0x8
[ 1059.942462]   pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=1/256 refcnt=2
[ 1059.949235]     pending: vmstat_update
[ 1059.953005] pool 2: cpus=1 node=0 flags=0x0 nice=0 hung=1054s workers=3 idle: 35 17
[ 1059.960659] pool 4: cpus=0-1 flags=0x4 nice=0 hung=20s workers=4 idle: 119 49
[ 1028.471352] BUG: workqueue lockup - pool cpus=1 node=0 flags=0x0 nice=0 stuck for 1023s!

Activity

  1. pdp7 commented on May 12, 2021

    @pdp7
    Collaborator

    @kraj thank you for opening this issue, are you using the Fedora branch in this repo that Wei Fu (@tekkamanninja) created? Wei Fu told me he is staying on 5.10 as @rwmjones is using that for Fedora/RISC-V however the 5.12 branch from @esmil does seem to be working well for some of the beta developers that have tried it/

  2. kraj commented on May 12, 2021

    @kraj
    ContributorAuthor

    yes I am on latest on fedora branch of 5.10 kernel

  3. added
    bugSomething isn't working
    on May 18, 2021
  4. pdp7 commented on May 20, 2021

    @pdp7
    Collaborator

    @kraj I am discussing with @tekkamanninja and @MichaelZhuxx, could you please add the full boot log from the console the next time this happens?

  5. kraj commented on May 25, 2021

    @kraj
    ContributorAuthor

    here is full log

    Starting kernel ...
    
    Linux version 5.13.0-rc3-starlight (oe-user@oe-host) (riscv64-yoe-linux-gcc (GCC) 11.1.1 20210523, GNU ld (GNU Binutils) 2.36.1.20210209) #1 SMP Tue May 25 01:38:19 UTC 2021
    OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
    Machine model: BeagleV Starlight Beta
    earlycon: uart0 at MMIO32 0x0000000012440000 (options '115200n8')
    printk: bootconsole [uart0] enabled
    efi: UEFI not found.
    Reserved memory: created CMA memory pool at 0x00000000a0000000, size 640 MiB
    OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
    Reserved memory: created DMA memory pool at 0x00000000f9000000, size 16 MiB
    OF: reserved mem: initialized node framebuffer@f9000000, compatible id shared-dma-pool
    Reserved memory: created DMA memory pool at 0x00000000fb000000, size 32 MiB
    OF: reserved mem: initialized node framebuffer@fb000000, compatible id shared-dma-pool
    Zone ranges:
      DMA32    [mem 0x0000000080200000-0x00000000ffffffff]
      Normal   [mem 0x0000000100000000-0x000000027fffffff]
    Movable zone start for each node
    Early memory node ranges
      node   0: [mem 0x0000000080200000-0x00000000f8ffffff]
      node   0: [mem 0x00000000f9000000-0x00000000f9ffffff]
      node   0: [mem 0x00000000fa000000-0x00000000faffffff]
      node   0: [mem 0x00000000fb000000-0x00000000fcffffff]
      node   0: [mem 0x00000000fd000000-0x000000027fffffff]
    Initmem setup node 0 [mem 0x0000000080200000-0x000000027fffffff]
    SBI specification v0.3 detected
    SBI implementation ID=0x1 Version=0x9
    SBI TIME extension detected
    SBI IPI extension detected
    SBI RFENCE extension detected
    software IO TLB: mapped [mem 0x000000009c000000-0x00000000a0000000] (64MB)
    SBI v0.2 HSM extension detected
    riscv: ISA extensions acdfim
    riscv: ELF capabilities acdfim
    percpu: Embedded 18 pages/cpu s34200 r8192 d31336 u73728
    Built 1 zonelists, mobility grouping on.  Total pages: 2067975
    Kernel command line: earlycon root=/dev/mmcblk0p2 rootwait console=ttyS0,115200 stmmac.chain_mode=1
    Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
    Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
    Sorting __ex_table...
    mem auto-init: stack:off, heap alloc:off, heap free:off
    Memory: 6747088K/8386560K available (6826K kernel code, 4815K rwdata, 4096K rodata, 2138K init, 324K bss, 984112K reserved, 655360K cma-reserved)
    SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
    rcu: Hierarchical RCU implementation.
    rcu:    RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
            Tracing variant of Tasks RCU enabled.
    rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
    rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
    NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
    riscv-intc: 64 local interrupts mapped
    plic: disable L2 cache irq 128 in plic
    plic: disable L2 cache irq 131 in plic
    plic: disable L2 cache irq 129 in plic
    plic: disable L2 cache irq 130 in plic
    plic: disable L2 cache irq 128 in plic
    plic: disable L2 cache irq 131 in plic
    plic: disable L2 cache irq 129 in plic
    plic: disable L2 cache irq 130 in plic
    plic: interrupt-controller@c000000: mapped 127 interrupts with 2 handlers for 4 contexts.
    riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0]
    clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x171024e6b, max_idle_ns: 440795202301 ns
    sched_clock: 64 bits at 6MHz, resolution 160ns, wraps every 4398046511040ns
    Console: colour dummy device 80x25
    Calibrating delay loop (skipped), value calculated using timer frequency.. 12.50 BogoMIPS (lpj=25000)
    pid_max: default: 32768 minimum: 301
    Mount-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
    Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
    ASID allocator disabled
    rcu: Hierarchical SRCU implementation.
    EFI services will not be available.
    smp: Bringing up secondary CPUs ...
    smp: Brought up 1 node, 2 CPUs
    devtmpfs: initialized
    random: get_random_u32 called from bucket_table_alloc.isra.0+0x50/0x140 with crng_init=0
    clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
    futex hash table entries: 512 (order: 3, 32768 bytes, linear)
    NET: Registered protocol family 16
    thermal_sys: Registered thermal governor 'step_wise'
    raid6: skip pq benchmark and using algorithm int64x8
    raid6: using intx1 recovery algorithm
    starfive_gpio 11910000.gpio: StarFive GPIO chip registered 0 GPIOs
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    i2c_designware 118b0000.i2c: running with gpio recovery mode! scl,sda
    i2c_designware 118c0000.i2c: running with gpio recovery mode! scl,sda
    i2c_designware 12450000.i2c: running with gpio recovery mode! scl,sda
    clocksource: Switched to clocksource riscv_clocksource
    NET: Registered protocol family 2
    IP idents hash table entries: 131072 (order: 8, 1048576 bytes, linear)
    tcp_listen_portaddr_hash hash table entries: 4096 (order: 4, 65536 bytes, linear)
    TCP established hash table entries: 65536 (order: 7, 524288 bytes, linear)
    TCP bind hash table entries: 65536 (order: 8, 1048576 bytes, linear)
    TCP: Hash tables configured (established 65536 bind 65536)
    UDP hash table entries: 4096 (order: 5, 131072 bytes, linear)
    UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes, linear)
    NET: Registered protocol family 1
    RPC: Registered named UNIX socket transport module.
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    Initialise system trusted keyrings
    workingset: timestamp_bits=62 max_order=21 bucket_order=0
    xor: measuring software checksum speed
       8regs           :  2185 MB/sec
       8regs_prefetch  :  2181 MB/sec
       32regs          :  2343 MB/sec
       32regs_prefetch :  2337 MB/sec
    xor: using function: 32regs (2343 MB/sec)
    Key type asymmetric registered
    Asymmetric key parser 'x509' registered
    Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
    io scheduler bfq registered
    starfive,vpp-lcdc 12000000.sfivefb: starfive_fb_probe
    panel_name: tda_998x_1080p
    of_parse_rd_cmd_info: failed, key=id_read_cmd_info
    of_parse_rd_cmd_info: failed, key=esd_read_cmd_info
    of_parse_wr_cmd: failed, key=panel-on-command
    of_parse_wr_cmd: failed, key=panel-off-command
    of_parse_reset_seq:707, error reading reset-sequence, length found = 0
    panel_name: seeed_5_inch
    of_parse_rd_cmd_info: failed, key=id_read_cmd_info
    of_parse_rd_cmd_info: failed, key=esd_read_cmd_info
    of_parse_wr_cmd: failed, key=panel-on-command
    of_parse_wr_cmd: failed, key=panel-off-command
    of_parse_reset_seq:707, error reading reset-sequence, length found = 0
    starfive,vpp-lcdc 12000000.sfivefb: select displayer: tda_998x_1080p
    starfive,vpp-lcdc 12000000.sfivefb: DDR to LCDC
    starfive,vpp-lcdc 12000000.sfivefb: sf_fb_set_addr NO use PPx
    Console: switching to colour frame buffer device 240x67
    starfive,vpp-lcdc 12000000.sfivefb: sf_fb_set_addr NO use PPx
    select displayer: tda_998x_1080p
    i2c_designware 118b0000.i2c: controller timed out
    tda998x 0-0070: Error -110 writing to cec:0xff
    tda998x 0-0070: tda998x is not ready!
    dw_axi_dmac_platform 100b0000.dma-controller: DesignWare AXI DMA Controller, 4 channels
    dw_axi_dmac_platform 10500000.dma-controller: DesignWare AXI DMA Controller, 16 channels
    L2CACHE: No. of Banks in the cache: 2                                                                                                                                                                  [39/1991]
    L2CACHE: No. of ways per bank: 16
    L2CACHE: Sets per bank: 1024
    L2CACHE: Bytes per cache block: 64
    L2CACHE: Index of the largest way enabled: 0
    Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
    dw-apb-uart 11870000.serial: detected caps 00000000 should be 00000100
    11870000.serial: ttyS1 at MMIO 0x11870000 (irq = 8, base_baud = 4640625) is a 16550
    12440000.serial: ttyS0 at MMIO 0x12440000 (irq = 10, base_baud = 6250000) is a 16550A
    printk: console [ttyS0] enabled
    printk: console [ttyS0] enabled
    printk: bootconsole [uart0] disabled
    printk: bootconsole [uart0] disabled
    loop: module loaded
    zram: Added device: zram0
    i2c_designware 118b0000.i2c: controller timed out
    tps65086 0-005e: Failed to read revision register
    tps65086: probe of 0-005e failed with error -110
    dw_spi_mmio 12410000.spi: DMA init failed
    wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
    wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
    libphy: Fixed MDIO Bus: probed
    tun: Universal TUN/TAP device driver, 1.6
    stmmaceth 10020000.ethernet: IRQ eth_lpi not found
    stmmaceth 10020000.ethernet: force_sf_dma_mode is ignored if force_thresh_dma_mode is set.
    stmmaceth 10020000.ethernet: PTP uses main clock
    stmmaceth 10020000.ethernet: User ID: 0x59, Synopsys ID: 0x37
    stmmaceth 10020000.ethernet:    DWMAC1000
    stmmaceth 10020000.ethernet: DMA HW capability register supported
    stmmaceth 10020000.ethernet: RX Checksum Offload Engine supported
    stmmaceth 10020000.ethernet: COE Type 2
    stmmaceth 10020000.ethernet: Wake-Up On Lan supported
    stmmaceth 10020000.ethernet: Enhanced/Alternate descriptors
    stmmaceth 10020000.ethernet: Enabled extended descriptors
    stmmaceth 10020000.ethernet: Chain mode enabled
    stmmaceth 10020000.ethernet: Enable RX Mitigation via HW Watchdog Timer
    stmmaceth 10020000.ethernet: device MAC address 2c:f7:f1:1b:e3:33
    libphy: stmmac: probed
    Micrel KSZ9031 Gigabit PHY stmmac-0:07: attached PHY driver (mii_bus:phy_addr=stmmac-0:07, irq=POLL)
    xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
    xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
    xhci-hcd xhci-hcd.0.auto: hcc params 0x200073c8 hci version 0x100 quirks 0x0000002000018010
    xhci-hcd xhci-hcd.0.auto: irq 14, io mem 0x104d0000
    usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.13
    usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb1: Product: xHCI Host Controller
    usb usb1: Manufacturer: Linux 5.13.0-rc3-starlight xhci-hcd
    usb usb1: SerialNumber: xhci-hcd.0.auto
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
    xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
    xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
    usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
    usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.13
    usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb2: Product: xHCI Host Controller
    usb usb2: Manufacturer: Linux 5.13.0-rc3-starlight xhci-hcd
    usb usb2: SerialNumber: xhci-hcd.0.auto
    hub 2-0:1.0: USB hub found
    hub 2-0:1.0: 1 port detected
    usbcore: registered new interface driver uas
    usbcore: registered new interface driver usb-storage
    i2c /dev entries driver
    sfctemp 124a0000.tmon: hwmon0: sensor '124a0000.tmon'
    Synopsys Designware Multimedia Card Interface Driver
    dw_mmc 10000000.mmc: IDMAC supports 32-bit address mode.
    usbcore: registered new interface driver usbhid
    dw_mmc 10000000.mmc: Using internal DMA controller.
    usbhid: USB HID core driver
    dw_mmc 10000000.mmc: Version ID is 290a
    NET: Registered protocol family 10
    dw_mmc 10000000.mmc: DW MMC controller at irq 31,32 bit host data width,32 deep fifo
    mmc_host mmc0: card is polling.
    dw_mmc 10010000.mmc: IDMAC supports 32-bit address mode.
    dw_mmc 10010000.mmc: Using internal DMA controller.
    dw_mmc 10010000.mmc: Version ID is 290a
    mmc_host mmc0: Bus speed (slot 0) = 100000000Hz (slot req 400000Hz, actual 400000HZ div = 125)
    dw_mmc 10010000.mmc: DW MMC controller at irq 32,32 bit host data width,32 deep fifo
    dw_mmc 10010000.mmc: allocated mmc-pwrseq
    mmc_host mmc1: card is non-removable.
    Segment Routing with IPv6
    NET: Registered protocol family 17
    Loading compiled-in X.509 certificates
    mmc_host mmc1: Bus speed (slot 0) = 100000000Hz (slot req 400000Hz, actual 400000HZ div = 125)
    Btrfs loaded, crc32c=crc32c-generic, zoned=no
    dw_mmc 10000000.mmc: Unexpected interrupt latency
    cfg80211: Loading compiled-in X.509 certificates for regulatory database
    cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
    dw-apb-uart 12440000.serial: forbid DMA for kernel console
    Waiting for root device /dev/mmcblk0p2...
    dw_mmc 10010000.mmc: Unexpected interrupt latency
    xhci-hcd xhci-hcd.0.auto: Error while assigning device slot ID
    xhci-hcd xhci-hcd.0.auto: Max number of devices this xHCI host supports is 32.
    usb usb1-port1: couldn't allocate usb_device
    xhci-hcd xhci-hcd.0.auto: Error while assigning device slot ID
    xhci-hcd xhci-hcd.0.auto: Max number of devices this xHCI host supports is 32.
    usb usb2-port1: couldn't allocate usb_device
    
    
  6. MichaelZhuxx commented on May 26, 2021

    @MichaelZhuxx
    Collaborator

    I got an interesting finds that hartid will be zero in opensbi booting infomation and I2C and on-chip temperature sensor work not normally in kernel log when every time system get stuck.

    here is findings when get stuck

    Domain0 Boot HART         : 0
    Boot HART ID              : 0
    
    [    4.003090] i2c_designware 118b0000.i2c: controller timed out
    [    4.008908] tda998x 0-0070: Error -110 writing to cec:0xff
    [    4.014439] tda998x 0-0070: tda998x is not ready!
    [    4.726129] temp(c): -81.-10
    

    here is the information that the system started successfully

    Domain0 Boot HART         : 1
    Boot HART ID              : 1
    
    [    3.121276] tda998x 0-0070: found TDA19988
    [    3.867158] temp(c): 38.69
    [    6.177588]  mmcblk0: p1 p2
    

    Heard from our SoC team, the hartid is zero as default before running into kernel.
    maybe there are some potential issues in opensbi, I guess.
    @tekkamanninja

  7. esmil commented on May 26, 2021

    @esmil
    Collaborator

    @MichaelZhuxx Very nice find! Is hart 0 the E24 co-processor, because then it's no wonder everything is broken when that is chosen as boot hart.

  8. kraj commented on May 26, 2021

    @kraj
    ContributorAuthor

    I am using fedora branch of starfive fork of openSBI

    https://github.com/riscv/meta-riscv/blob/master/recipes-bsp/opensbi/opensbi_starfive-0.8.0.bb#L12

    I wonder if we should switch to using upstream version now that support has landed there ?

  9. pdp7 commented on May 26, 2021

    @pdp7
    Collaborator

    I am using fedora branch of starfive fork of openSBI

    https://github.com/riscv/meta-riscv/blob/master/recipes-bsp/opensbi/opensbi_starfive-0.8.0.bb#L12

    I wonder if we should switch to using upstream version now that support has landed there ?

    I opened starfive-tech/opensbi#4 to see if we can switch. Hopefully @lbmeng and @tekkamanninja can comment

  10. pdp7 commented on May 29, 2021

    @pdp7
    Collaborator

    @MichaelZhuxx any updates from the investigation you have been doing into this issue?

  11. mcd500 commented on May 31, 2021

    @mcd500
    Contributor

    I realized that this is the same issue. starfive-tech/Fedora_on_StarFive#40
    Closed it at the Fedora_on_StarFive/issues/40.

  12. mcd500 commented on May 31, 2021

    @mcd500
    Contributor

    @pdp7 @esmil @davidlt @geertu I made the PR to fix the boot hang. Please see the
    esmil/linux#15 <- found later, this is not needed.
    and
    davidlt/opensbi#1

    It prevent choosing hart0 which is e24 and booting from hart1 or hart2 from u74 in the opensbi lottery selection.
    Which makes a bit complicate it is that the fix in opensbi require the dtsi fix in linux at the same time.
    This is the log of opensbi.

    OpenSBI v0.5-407-g7e1952c
       ____                    _____ ____ _____
      / __ \                  / ____|  _ \_   _|
     | |  | |_ __   ___ _ __ | (___ | |_) || |
     | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
     | |__| | |_) |  __/ | | |____) | |_) || |_
      \____/| .__/ \___|_| |_|_____/|____/_____|
            | |
            |_|
    
    Platform Name             : StarFive VIC7100
    Platform Features         : timer,mfdeleg
    Platform HART Count       : 2
    Firmware Base             : 0x80000000
    Firmware Size             : 112 KB
    Runtime SBI Version       : 0.3
    
    Domain0 Name              : root
    Domain0 Boot HART         : 1
    Domain0 HARTs             : 1*,2*
    Domain0 Region00          : 0x0000000080000000-0x000000008001ffff ()
    Domain0 Region01          : 0x0000000000000000-0x0000007fffffffff (R,W,X)
    Domain0 Next Address      : 0x0000000080200000
    Domain0 Next Arg1         : 0x0000000088000000
    Domain0 Next Mode         : S-mode
    Domain0 SysReset          : yes
    
    Boot HART ID              : 1
    Boot HART Domain          : root
    Boot HART ISA             : rv64imafdcsux
    Boot HART Features        : scounteren,mcounteren
    Boot HART PMP Count       : 16
    Boot HART PMP Granularity : 4096
    Boot HART PMP Address Bits: 36
    Boot HART MHPM Count      : 0
    Boot HART MHPM Count      : 0
    Boot HART MIDELEG         : 0x0000000000000222
    Boot HART MEDELEG         : 0x000000000000b109
    
    
    U-Boot 2021.04-13662-ga18449847e (May 26 2021 - 20:54:21 +0900)
    
    CPU:   rv64imafdc
    DRAM:  8 GiB
    MMC:   sdio0@10000000: 0, sdio1@10010000: 1
    Net:   dwmac.10020000
    Autoboot in 2 seconds
    MMC CD is 0x0, force to True.
    MMC CD is 0x0, force to True.
    switch to partitions #0, OK
    mmc0 is current device
    Scanning mmc 0:1...
    Found /extlinux/extlinux.conf
    Retrieving file: /extlinux/extlinux.conf
    1964 bytes read in 9 ms (212.9 KiB/s)
    Fedora-riscv64-vic7100-xfce-dev-Rawhide-20210516233526.n.0 Boot Options.
    1:      debug
    2:      Custom-kernel aligh
    3:      Custom-kernel sd-aligh
    4:      Custom-kernel sd
    5:      Fedora-riscv64-vic7100-xfce-dev-Rawhide-20210516233526.n.0 (5.10.6-210.0.riscv64.)
    Enter choice: 1:        debug
    Retrieving file: /initramfs-5.10.6-210.0.riscv64.fc33.riscv64.img
    16475287 bytes read in 3446 ms (4.6 MiB/s)
    Retrieving file: /Image.gz
    6294544 bytes read in 1319 ms (4.6 MiB/s)
    append: ro root=UUID=ae1e722a-d01b-4cdc-ab56-7b68abcdd0fe rhgb console=tty0 console=ttyS08
    Retrieving file: /jh7100-starlight.dtb
    17366 bytes read in 10 ms (1.7 MiB/s)
       Uncompressing Kernel Image
    Moving Image from 0x84000000 to 0x80200000, end=817c8000
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Using Device Tree in place at 0000000088000000, end 00000000880073d5
    
    Starting kernel ...
    
    Linux version 5.13.0-rc3-starlight-201461-gce0d090ee714 (akirat@ryzen-micro) (riscv64-unk1
    OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
    Machine model: BeagleV Starlight Beta
    efi: UEFI not found.
    Reserved memory: created CMA memory pool at 0x00000000a0000000, size 640 MiB
    OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
    Reserved memory: created DMA memory pool at 0x00000000f9000000, size 16 MiB
    OF: reserved mem: initialized node framebuffer@f9000000, compatible id shared-dma-pool
    Reserved memory: created DMA memory pool at 0x00000000fb000000, size 32 MiB
    OF: reserved mem: initialized node framebuffer@fb000000, compatible id shared-dma-pool
    Zone ranges:
      DMA32    [mem 0x0000000080200000-0x00000000ffffffff]
      Normal   [mem 0x0000000100000000-0x000000027fffffff]
    Movable zone start for each node
    Early memory node ranges
      node   0: [mem 0x0000000080200000-0x00000000f8ffffff]
      node   0: [mem 0x00000000f9000000-0x00000000f9ffffff]
      node   0: [mem 0x00000000fa000000-0x00000000faffffff]
      node   0: [mem 0x00000000fb000000-0x00000000fcffffff]
      node   0: [mem 0x00000000fd000000-0x000000027fffffff]
    Initmem setup node 0 [mem 0x0000000080200000-0x000000027fffffff]
    SBI specification v0.3 detected
    SBI implementation ID=0x1 Version=0x9
    SBI TIME extension detected
    SBI IPI extension detected
    SBI RFENCE extension detected
    software IO TLB: mapped [mem 0x000000009c000000-0x00000000a0000000] (64MB)
    SBI v0.2 HSM extension detected
    riscv: ISA extensions acdfim
    riscv: ELF capabilities acdfim
    percpu: Embedded 25 pages/cpu s70808 r0 d31592 u102400
    Built 1 zonelists, mobility grouping on.  Total pages: 2067975
    Kernel command line: ro root=UUID=ae1e722a-d01b-4cdc-ab56-7b68abcdd0fe rhgb console=tty0 8
    Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
    Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
    Sorting __ex_table...
    mem auto-init: stack:off, heap alloc:off, heap free:off
    Memory: 6728892K/8386560K available (8281K kernel code, 5427K rwdata, 4096K rodata, 2197K)
    SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
    trace event string verifier disabled
    rcu: Hierarchical RCU implementation.
    rcu:    RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
            Tracing variant of Tasks RCU enabled.
    rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
    rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
    NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
    riscv-intc: 64 local interrupts mapped
    plic: disable L2 cache irq 128 in plic
    plic: disable L2 cache irq 131 in plic
    plic: disable L2 cache irq 129 in plic
    plic: disable L2 cache irq 130 in plic
    plic: disable L2 cache irq 128 in plic
    plic: disable L2 cache irq 131 in plic
    plic: disable L2 cache irq 129 in plic
    plic: disable L2 cache irq 130 in plic
    plic: interrupt-controller@c000000: mapped 127 interrupts with 2 handlers for 4 contexts.
    riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [1]
    clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x171024e6b, max_idls
    sched_clock: 64 bits at 6MHz, resolution 160ns, wraps every 4398046511040ns
    Console: colour dummy device 80x25
    printk: console [tty0] enabled
    Calibrating delay loop (skipped), value calculated using timer frequency.. 12.50 BogoMIPS)
    pid_max: default: 32768 minimum: 301
    Mount-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
    Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
    ASID allocator disabled
    rcu: Hierarchical SRCU implementation.
    EFI services will not be available.
    smp: Bringing up secondary CPUs ...
    CPU1: failed to start
    smp: Brought up 1 node, 1 CPU
    devtmpfs: initialized
    random: get_random_u32 called from bucket_table_alloc.isra.0+0x50/0x180 with crng_init=0
    clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100s
    futex hash table entries: 512 (order: 3, 32768 bytes, linear)
    NET: Registered protocol family 16
    thermal_sys: Registered thermal governor 'step_wise'
    raid6: skip pq benchmark and using algorithm int64x8
    raid6: using intx1 recovery algorithm
    starfive_gpio 11910000.gpio: StarFive GPIO chip registered 0 GPIOs
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    i2c_designware 118b0000.i2c: running with gpio recovery mode! scl,sda
    i2c_designware 118c0000.i2c: running with gpio recovery mode! scl,sda
    i2c_designware 12450000.i2c: running with gpio recovery mode! scl,sda
    clocksource: Switched to clocksource riscv_clocksource
    NET: Registered protocol family 2
    IP idents hash table entries: 131072 (order: 8, 1048576 bytes, linear)
    tcp_listen_portaddr_hash hash table entries: 4096 (order: 4, 65536 bytes, linear)
    TCP established hash table entries: 65536 (order: 7, 524288 bytes, linear)
    TCP bind hash table entries: 65536 (order: 8, 1048576 bytes, linear)
    TCP: Hash tables configured (established 65536 bind 65536)
    UDP hash table entries: 4096 (order: 5, 131072 bytes, linear)
    UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes, linear)
    NET: Registered protocol family 1
    RPC: Registered named UNIX socket transport module.
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    Initialise system trusted keyrings
    Unpacking initramfs...
    workingset: timestamp_bits=62 max_order=21 bucket_order=0
    xor: measuring software checksum speed
       8regs           :  2187 MB/sec
       8regs_prefetch  :  2183 MB/sec
       32regs          :  2343 MB/sec
       32regs_prefetch :  2337 MB/sec
    xor: using function: 32regs (2343 MB/sec)
    Key type asymmetric registered
    Asymmetric key parser 'x509' registered
    Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
    io scheduler bfq registered
    starfive,vpp-lcdc 12000000.sfivefb: starfive_fb_probe
    panel_name: tda_998x_1080p
    of_parse_rd_cmd_info: failed, key=id_read_cmd_info
    of_parse_rd_cmd_info: failed, key=esd_read_cmd_info
    of_parse_wr_cmd: failed, key=panel-on-command
    of_parse_wr_cmd: failed, key=panel-off-command
    of_parse_reset_seq:707, error reading reset-sequence, length found = 0
    panel_name: seeed_5_inch
    of_parse_rd_cmd_info: failed, key=id_read_cmd_info
    of_parse_rd_cmd_info: failed, key=esd_read_cmd_info
    of_parse_wr_cmd: failed, key=panel-on-command
    of_parse_wr_cmd: failed, key=panel-off-command
    of_parse_reset_seq:707, error reading reset-sequence, length found = 0
    starfive,vpp-lcdc 12000000.sfivefb: select displayer: tda_998x_1080p
    starfive,vpp-lcdc 12000000.sfivefb: DDR to LCDC
    starfive,vpp-lcdc 12000000.sfivefb: sf_fb_set_addr NO use PPx
    Console: switching to colour frame buffer device 240x67
    starfive,vpp-lcdc 12000000.sfivefb: sf_fb_set_addr NO use PPx
    select displayer: tda_998x_1080p
    tda998x 0-0070: found TDA19988
    random: fast init done
    dw_axi_dmac_platform 100b0000.dma-controller: DesignWare AXI DMA Controller, 4 channels
    dw_axi_dmac_platform 10500000.dma-controller: DesignWare AXI DMA Controller, 16 channels
    L2CACHE: No. of Banks in the cache: 2
    L2CACHE: No. of ways per bank: 16
    L2CACHE: Sets per bank: 1024
    L2CACHE: Bytes per cache block: 64
    L2CACHE: Index of the largest way enabled: 15
    Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
    dw-apb-uart 11870000.serial: detected caps 00000000 should be 00000100
    11870000.serial: ttyS1 at MMIO 0x11870000 (irq = 6, base_baud = 4640625) is a 16550
    12440000.serial: ttyS0 at MMIO 0x12440000 (irq = 7, base_baud = 6250000) is a 16550A
    Freeing initrd memory: 16088K
    printk: console [ttyS0] enabled
    vic-rng 118d0000.trng: Initialized
    loop: module loaded
    zram: Added device: zram0
    tps65086 0-005e: Device: TPS650861, OTP: A, Rev: 0
    dw_spi_mmio 12410000.spi: DMA init failed
    wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
    wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reser.
    libphy: Fixed MDIO Bus: probed
    tun: Universal TUN/TAP device driver, 1.6
    stmmaceth 10020000.ethernet: IRQ eth_lpi not found
    stmmaceth 10020000.ethernet: force_sf_dma_mode is ignored if force_thresh_dma_mode is set.
    stmmaceth 10020000.ethernet: PTP uses main clock
    stmmaceth 10020000.ethernet: User ID: 0x59, Synopsys ID: 0x37
    stmmaceth 10020000.ethernet:    DWMAC1000
    stmmaceth 10020000.ethernet: DMA HW capability register supported
    stmmaceth 10020000.ethernet: RX Checksum Offload Engine supported
    stmmaceth 10020000.ethernet: COE Type 2
    stmmaceth 10020000.ethernet: Wake-Up On Lan supported
    stmmaceth 10020000.ethernet: Enhanced/Alternate descriptors
    stmmaceth 10020000.ethernet: Enabled extended descriptors
    stmmaceth 10020000.ethernet: Chain mode enabled
    stmmaceth 10020000.ethernet: Enable RX Mitigation via HW Watchdog Timer
    stmmaceth 10020000.ethernet: device MAC address 2c:f7:f1:1b:e4:44
    libphy: stmmac: probed
    Micrel KSZ9031 Gigabit PHY stmmac-0:07: attached PHY driver (mii_bus:phy_addr=stmmac-0:07)
    xhci-hcd xhci-hcd.3.auto: xHCI Host Controller
    xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 1
    xhci-hcd xhci-hcd.3.auto: hcc params 0x200073c8 hci version 0x100 quirks 0x000000200001800
    xhci-hcd xhci-hcd.3.auto: irq 11, io mem 0x104d0000
    usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.13
    usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb1: Product: xHCI Host Controller
    usb usb1: Manufacturer: Linux 5.13.0-rc3-starlight-201461-gce0d090ee714 xhci-hcd
    usb usb1: SerialNumber: xhci-hcd.3.auto
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    xhci-hcd xhci-hcd.3.auto: xHCI Host Controller
    xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus number 2
    xhci-hcd xhci-hcd.3.auto: Host supports USB 3.0 SuperSpeed
    usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
    usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.13
    usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb2: Product: xHCI Host Controller
    usb usb2: Manufacturer: Linux 5.13.0-rc3-starlight-201461-gce0d090ee714 xhci-hcd
    usb usb2: SerialNumber: xhci-hcd.3.auto
    hub 2-0:1.0: USB hub found
    hub 2-0:1.0: 1 port detected
    usbcore: registered new interface driver uas
    usbcore: registered new interface driver usb-storage
    i2c /dev entries driver
    sfctemp 124a0000.tmon: hwmon0: sensor '124a0000.tmon'
    Synopsys Designware Multimedia Card Interface Driver
    usbcore: registered new interface driver usbhid
    usbhid: USB HID core driver
    NET: Registered protocol family 10
    usb 1-1: new high-speed USB device number 2 using xhci-hcd
    dw_mmc 10000000.mmc: IDMAC supports 32-bit address mode.
    dw_mmc 10000000.mmc: Using internal DMA controller.
    dw_mmc 10000000.mmc: Version ID is 290a
    dw_mmc 10000000.mmc: DW MMC controller at irq 29,32 bit host data width,32 deep fifo
    mmc_host mmc0: card is polling.
    dw_mmc 10010000.mmc: IDMAC supports 32-bit address mode.
    dw_mmc 10010000.mmc: Using internal DMA controller.
    dw_mmc 10010000.mmc: Version ID is 290a
    dw_mmc 10010000.mmc: DW MMC controller at irq 30,32 bit host data width,32 deep fifo
    dw_mmc 10010000.mmc: allocated mmc-pwrseq
    mmc_host mmc1: card is non-removable.
    mmc_host mmc0: Bus speed (slot 0) = 100000000Hz (slot req 400000Hz, actual 400000HZ div =)
    Segment Routing with IPv6
    NET: Registered protocol family 17
    Loading compiled-in X.509 certificates
    mmc_host mmc1: Bus speed (slot 0) = 100000000Hz (slot req 400000Hz, actual 400000HZ div =)
    Btrfs loaded, crc32c=crc32c-generic, zoned=no
    cfg80211: Loading compiled-in X.509 certificates for regulatory database
    cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
    platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
    cfg80211: failed to load regulatory.db
    dw-apb-uart 12440000.serial: forbid DMA for kernel console
    Freeing unused kernel memory: 2196K
    Checked W+X mappings: passed, no W+X pages found
    rodata_test: all tests were successful
    Run /init as init process
    usb 1-1: New USB device found, idVendor=05e3, idProduct=0610, bcdDevice= 4.02
    usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    usb 1-1: Product: USB2.0 Hub
    usb 1-1: Manufacturer: GenesysLogic
    mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
    mmc_host mmc0: Bus speed (slot 0) = 100000000Hz (slot req 50000000Hz, actual 50000000HZ d)
    usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
    mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
    mmc0: new high speed SDHC card at address 1234
    usb 2-1: New USB device found, idVendor=05e3, idProduct=0616, bcdDevice= 4.02
    usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    usb 2-1: Product: USB3.0 Hub
    usb 2-1: Manufacturer: GenesysLogic
    systemd[1]: System time before build time, advancing clock.
    mmcblk0: mmc0:1234 SA16G 14.4 GiB 
    mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
    systemd[1]: systemd v246.6-3.0.riscv64.fc33 running in system mode. (+PAM +AUDIT +SELINUX)
    systemd[1]: Detected architecture riscv64.
    hub 1-1:1.0: USB hub found
     mmcblk0: p1 p2
    mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
    hub 1-1:1.0: 4 ports detected
    hub 2-1:1.0: USB hub found
    systemd[1]: Running in initial RAM disk.
    hub 2-1:1.0: 4 ports detected
    
    Welcome to Fedora 33 (Rawhide) dracut-050-26.git20200316.mmc1: queuing unknown CIS tuple )
    0.riscv64.fc33 (Initramfs)!
    
    
  13. mcd500 commented on May 31, 2021

    @mcd500
    Contributor

    It turns out that it is not that simple.
    Only davidlt/opensbi#2 is required to make the opensbi not to select hart0.
    The esmil/linux#15 was not needed.
    However, with the patch davidlt/opensbi#2, I found that it will reduce the performance of the network.
    This is the logs.

    with the patch on opensbi

    --------------------------
    OpenSBI v0.5-408-gb846c80
       ____                    _____ ____ _____
      / __ \                  / ____|  _ \_   _|
     | |  | |_ __   ___ _ __ | (___ | |_) || |
     | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
     | |__| | |_) |  __/ | | |____) | |_) || |_
      \____/| .__/ \___|_| |_|_____/|____/_____|
            | |
            |_|
    
    Platform Name             : StarFive VIC7100
    Platform Features         : timer,mfdeleg
    Platform HART Count       : 2
    Firmware Base             : 0x80000000
    Firmware Size             : 108 KB
    Runtime SBI Version       : 0.3
    
    Domain0 Name              : root
    Domain0 Boot HART         : 1
    Domain0 HARTs             : 1*,2*
    Domain0 Region00          : 0x0000000080000000-0x000000008001ffff ()
    Domain0 Region01          : 0x0000000000000000-0x0000007fffffffff (R,W,X)
    Domain0 Next Address      : 0x0000000080200000
    Domain0 Next Arg1         : 0x0000000088000000
    Domain0 Next Mode         : S-mode
    Domain0 SysReset          : yes
    
    Boot HART ID              : 1
    Boot HART Domain          : root
    Boot HART ISA             : rv64imafdcsux
    Boot HART Features        : scounteren,mcounteren
    Boot HART PMP Count       : 16
    Boot HART PMP Granularity : 4096
    Boot HART PMP Address Bits: 36
    Boot HART MHPM Count      : 0
    Boot HART MHPM Count      : 0
    Boot HART MIDELEG         : 0x0000000000000222
    Boot HART MEDELEG         : 0x000000000000b109
    
    
    U-Boot 2021.04-13662-ga18449847e (May 31 2021 - 19:31:31 +0900)
    
    CPU:   rv64imafdc
    DRAM:  8 GiB
    MMC:   sdio0@10000000: 0, sdio1@10010000: 1
    Net:   dwmac.10020000
    Autoboot in 2 seconds
    MMC CD is 0x0, force to True.
    MMC CD is 0x0, force to True.
    switch to partitions #0, OK
    mmc0 is current device
    Scanning mmc 0:1...
    Found /extlinux/extlinux.conf
    Retrieving file: /extlinux/extlinux.conf
    1964 bytes read in 9 ms (212.9 KiB/s)
    

    but this is the network performance

    [root@fedora-starfive ~]# iperf3 -s
    -----------------------------------------------------------
    Server listening on 5201
    -----------------------------------------------------------
    Accepted connection from 192.168.1.153, port 44560
    [  5] local 192.168.1.112 port 5201 connected to 192.168.1.153 port 44562
    [ ID] Interval           Transfer     Bitrate
    [  5]   0.00-1.01   sec  72.6 MBytes   606 Mbits/sec                  
    [  5]   1.01-2.00   sec  74.8 MBytes   631 Mbits/sec                  
    [  5]   2.00-3.00   sec  74.1 MBytes   622 Mbits/sec                  
    [  5]   3.00-4.01   sec  53.7 MBytes   449 Mbits/sec                  
    [  5]   4.01-5.00   sec  74.7 MBytes   630 Mbits/sec                  
    [  5]   5.00-6.00   sec  74.8 MBytes   627 Mbits/sec                  
    [  5]   6.00-7.00   sec  74.4 MBytes   623 Mbits/sec                  
    [  5]   7.00-8.00   sec  74.6 MBytes   626 Mbits/sec                  
    [  5]   8.00-9.01   sec  75.1 MBytes   627 Mbits/sec                  
    [  5]   9.01-10.00  sec  72.3 MBytes   609 Mbits/sec                  
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bitrate
    [  5]   0.00-10.00  sec   721 MBytes   605 Mbits/sec                  receiver
    -----------------------------------------------------------
    Server listening on 5201
    -----------------------------------------------------------
    stmmaceth 10020000.ethernet eth0: Link is Down
    stmmaceth 10020000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
    Accepted connection from 192.168.1.153, port 44564
    [  5] local 192.168.1.112 port 5201 connected to 192.168.1.153 port 44566
    [ ID] Interval           Transfer     Bitrate
    [  5]   0.00-1.00   sec  72.8 MBytes   610 Mbits/sec                  
    [  5]   1.00-2.00   sec  75.3 MBytes   633 Mbits/sec                  
    [  5]   2.00-3.00   sec  73.3 MBytes   615 Mbits/sec                  
    [  5]   3.00-4.01   sec  74.9 MBytes   625 Mbits/sec                  
    [  5]   4.01-5.00   sec  48.6 MBytes   409 Mbits/sec                  
    [  5]   5.00-6.00   sec  50.0 MBytes   420 Mbits/sec                  
    [  5]   6.00-7.00   sec  51.9 MBytes   436 Mbits/sec                  
    [  5]   7.00-8.00   sec  59.2 MBytes   496 Mbits/sec                  
    [  5]   8.00-9.00   sec  59.0 MBytes   495 Mbits/sec                  
    [  5]   9.00-10.00  sec  59.1 MBytes   495 Mbits/sec                  
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bitrate
    [  5]   0.00-10.00  sec   624 MBytes   523 Mbits/sec                  receiver
    -----------------------------------------------------------
    Server listening on 5201
    -----------------------------------------------------------
    Accepted connection from 192.168.1.153, port 44568
    [  5] local 192.168.1.112 port 5201 connected to 192.168.1.153 port 44570
    [ ID] Interval           Transfer     Bitrate
    [  5]   0.00-1.00   sec  72.9 MBytes   611 Mbits/sec                  
    [  5]   1.00-2.00   sec  74.8 MBytes   627 Mbits/sec                  
    [  5]   2.00-3.00   sec  74.5 MBytes   626 Mbits/sec                  
    [  5]   3.00-4.00   sec  75.2 MBytes   631 Mbits/sec                  
    [  5]   4.00-5.00   sec  75.0 MBytes   629 Mbits/sec                  
    [  5]   5.00-6.00   sec  73.3 MBytes   616 Mbits/sec                  
    [  5]   6.00-7.00   sec  74.7 MBytes   626 Mbits/sec                  
    [  5]   7.00-8.00   sec  74.6 MBytes   626 Mbits/sec                  
    [  5]   8.00-9.00   sec  74.1 MBytes   621 Mbits/sec                  
    [  5]   9.00-10.00  sec  74.9 MBytes   628 Mbits/sec                  
    [  5]  10.00-10.00  sec   506 KBytes  1.43 Gbits/sec                  
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bitrate
    [  5]   0.00-10.00  sec   745 MBytes   624 Mbits/sec                  receiver
    -----------------------------------------------------------
    Server listening on 5201
    -----------------------------------------------------------
    Accepted connection from 192.168.1.153, port 44572
    [  5] local 192.168.1.112 port 5201 connected to 192.168.1.153 port 44574
    [ ID] Interval           Transfer     Bitrate
    [  5]   0.00-1.00   sec  74.0 MBytes   621 Mbits/sec                  
    [  5]   1.00-2.01   sec  75.1 MBytes   626 Mbits/sec                  
    [  5]   2.01-3.00   sec  74.7 MBytes   629 Mbits/sec                  
    [  5]   3.00-4.00   sec  67.0 MBytes   561 Mbits/sec                  
    [  5]   4.00-5.00   sec  55.9 MBytes   469 Mbits/sec                  
    [  5]   5.00-6.00   sec  59.0 MBytes   495 Mbits/sec                  
    [  5]   6.00-7.00   sec  59.0 MBytes   495 Mbits/sec                  
    [  5]   7.00-8.00   sec  59.1 MBytes   495 Mbits/sec                  
    [  5]   8.00-9.00   sec  71.5 MBytes   602 Mbits/sec                  
    [  5]   9.00-10.01  sec  74.4 MBytes   621 Mbits/sec                  
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bitrate
    [  5]   0.00-10.01  sec   670 MBytes   561 Mbits/sec                  receiver
    -----------------------------------------------------------
    Server listening on 5201
    -----------------------------------------------------------
    Accepted connection from 192.168.1.153, port 44576
    [  5] local 192.168.1.112 port 5201 connected to 192.168.1.153 port 44578
    [ ID] Interval           Transfer     Bitrate
    [  5]   0.00-1.00   sec  72.8 MBytes   611 Mbits/sec                  
    [  5]   1.00-2.00   sec  74.1 MBytes   621 Mbits/sec                  
    [  5]   2.00-3.00   sec  74.3 MBytes   623 Mbits/sec                  
    [  5]   3.00-4.00   sec  74.3 MBytes   624 Mbits/sec                  
    [  5]   4.00-5.00   sec  74.6 MBytes   626 Mbits/sec                  
    [  5]   5.00-6.00   sec  74.4 MBytes   624 Mbits/sec                  
    [  5]   6.00-7.00   sec  74.4 MBytes   625 Mbits/sec                  
    [  5]   7.00-8.00   sec  74.7 MBytes   624 Mbits/sec                  
    [  5]   8.00-9.00   sec  74.3 MBytes   623 Mbits/sec                  
    [  5]   9.00-10.00  sec  74.6 MBytes   626 Mbits/sec                  
    [  5]  10.00-10.01  sec   506 KBytes  1.06 Gbits/sec                  
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bitrate
    [  5]   0.00-10.01  sec   743 MBytes   623 Mbits/sec                  receiver
    -----------------------------------------------------------
    

    Before patching the opensbi:

    --------------------
    OpenSBI v0.5-407-g7e1952c
       ____                    _____ ____ _____
      / __ \                  / ____|  _ \_   _|
     | |  | |_ __   ___ _ __ | (___ | |_) || |
     | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
     | |__| | |_) |  __/ | | |____) | |_) || |_
      \____/| .__/ \___|_| |_|_____/|____/_____|
            | |
            |_|
    
    Platform Name             : StarFive VIC7100
    Platform Features         : timer,mfdeleg
    Platform HART Count       : 2
    Firmware Base             : 0x80000000
    Firmware Size             : 108 KB
    Runtime SBI Version       : 0.3
    
    Domain0 Name              : root
    Domain0 Boot HART         : 1
    Domain0 HARTs             : 0*,1*
    Domain0 Region00          : 0x0000000080000000-0x000000008001ffff ()
    Domain0 Region01          : 0x0000000000000000-0x0000007fffffffff (R,W,X)
    Domain0 Next Address      : 0x0000000080200000
    Domain0 Next Arg1         : 0x0000000088000000
    Domain0 Next Mode         : S-mode
    Domain0 SysReset          : yes
    
    Boot HART ID              : 1
    Boot HART Domain          : root
    Boot HART ISA             : rv64imafdcsux
    Boot HART Features        : scounteren,mcounteren
    Boot HART PMP Count       : 16
    Boot HART PMP Granularity : 4096
    Boot HART PMP Address Bits: 36
    Boot HART MHPM Count      : 0
    Boot HART MHPM Count      : 0
    Boot HART MIDELEG         : 0x0000000000000222
    Boot HART MEDELEG         : 0x000000000000b109
    
    
    U-Boot 2021.04-13662-ga18449847e (May 31 2021 - 20:11:58 +0900)
    
    CPU:   rv64imafdc
    DRAM:  8 GiB
    MMC:   sdio0@10000000: 0, sdio1@10010000: 1
    Net:   dwmac.10020000
    Autoboot in 2 seconds
    MMC CD is 0x0, force to True.
    MMC CD is 0x0, force to True.
    switch to partitions #0, OK
    mmc0 is current device
    Scanning mmc 0:1...
    Found /extlinux/extlinux.conf
    Retrieving file: /extlinux/extlinux.conf
    1964 bytes read in 9 ms (212.9 KiB/s)
    

    The network performance is good.

    ---------------------
    root@fedora-starfive ~]# iperf3 -s
    -----------------------------------------------------------
    Server listening on 5201
    -----------------------------------------------------------
    Accepted connection from 192.168.1.153, port 44608
    [  5] local 192.168.1.112 port 5201 connected to 192.168.1.153 port 44610
    [ ID] Interval           Transfer     Bitrate
    [  5]   0.00-1.00   sec   100 MBytes   841 Mbits/sec                  
    [  5]   1.00-2.00   sec   107 MBytes   894 Mbits/sec                  
    [  5]   2.00-3.00   sec   102 MBytes   854 Mbits/sec                  
    [  5]   3.00-4.00   sec   103 MBytes   860 Mbits/sec                  
    [  5]   4.00-5.00   sec   107 MBytes   894 Mbits/sec                  
    [  5]   5.00-6.00   sec   108 MBytes   903 Mbits/sec                  
    [  5]   6.00-7.00   sec   107 MBytes   900 Mbits/sec                  
    [  5]   7.00-8.00   sec   104 MBytes   873 Mbits/sec                  
    [  5]   8.00-9.00   sec   107 MBytes   901 Mbits/sec                  
    [  5]   9.00-10.00  sec   106 MBytes   885 Mbits/sec                  
    [  5]  10.00-10.01  sec   478 KBytes   801 Mbits/sec                  
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bitrate
    [  5]   0.00-10.01  sec  1.03 GBytes   881 Mbits/sec                  receiver
    -----------------------------------------------------------
    Server listening on 5201
    -----------------------------------------------------------
    Accepted connection from 192.168.1.153, port 44612
    [  5] local 192.168.1.112 port 5201 connected to 192.168.1.153 port 44614
    [ ID] Interval           Transfer     Bitrate
    [  5]   0.00-1.00   sec   105 MBytes   879 Mbits/sec                  
    [  5]   1.00-2.00   sec   108 MBytes   904 Mbits/sec                  
    [  5]   2.00-3.00   sec   107 MBytes   901 Mbits/sec                  
    [  5]   3.00-4.00   sec   108 MBytes   902 Mbits/sec                  
    [  5]   4.00-5.00   sec   108 MBytes   906 Mbits/sec                  
    [  5]   5.00-6.00   sec   107 MBytes   900 Mbits/sec                  
    [  5]   6.00-7.00   sec   108 MBytes   906 Mbits/sec                  
    [  5]   7.00-8.00   sec   108 MBytes   904 Mbits/sec                  
    [  5]   8.00-9.00   sec   108 MBytes   902 Mbits/sec                  
    [  5]   9.00-10.00  sec   108 MBytes   905 Mbits/sec                  
    [  5]  10.00-10.01  sec   612 KBytes   902 Mbits/sec                  
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bitrate
    [  5]   0.00-10.01  sec  1.05 GBytes   901 Mbits/sec                  receiver
    -----------------------------------------------------------
    

    The kernel is build with unalign access optimization at here https://github.com/mcd500/linux-jh7100/tree/starlight-sdimproved-misaligh-ok-old

    It require more investigation. It looks likt it is related to exception handling.

  14. 53 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions