Wednesday, March 01, 2023

Pine64 Ox64 RISC-V SBC

 After a bit of fiddling with serial connection and flashing all the stuff. It boots.

It does feel a bit strange that you can now have a 64-bit, 64MB computer that fits on a breadboard. That runs full Linux.

My first 64-bit system was a Aspen Alpine Alpha board, AT format. 275Mhz Alpha CPU and also 64MB of memory. That ran full Linux (a probably still do. It should still work)

Anyway, boot log from serial console for the Ox64 below:

[I][]   ____                   ____               __  __      _       
[I][]  / __ \                 |  _ \             / _|/ _|    | |      
[I][] | |  | |_ __   ___ _ __ | |_) | ___  _   _| |_| |_ __ _| | ___  
[I][] | |  | | '_ \ / _ \ '_ \|  _ < / _ \| | | |  _|  _/ _` | |/ _ \ 
[I][] | |__| | |_) |  __/ | | | |_) | (_) | |_| | | | || (_| | | (_) |
[I][]  \____/| .__/ \___|_| |_|____/ \___/ \__,_|_| |_| \__,_|_|\___/ 
[I][]        | |                                                      
[I][]        |_|                                                      
[I][] 
[I][] Powered by BouffaloLab
[I][] Build:09:51:53,Feb 19 2023
[I][] Copyright (c) 2023 OpenBouffalo team
[I][] Copyright (c) 2022 Bouffalolab team
[I][] dynamic memory init success,heap s[I][LowLoad] D0 start...
[I][LowLoad] low_load start... 
[I][LowLoad] Section dtb(1) - Start 0x58080100, Size 3335
[I][LowLoad] Copying DTB to 0x51ff8000...0x51ff8d07
[I][LowLoad] Done!
[I][LowLoad] Section OpenSBI(2) - Start 0x58090100, Size 109864
[I][LowLoad] Copying OpenSBI to 0x3ef80000...0x3ef9ad28
[I][LowLoad] Done!
[I][LowLoad] Section Kernel(3) - Start 0x580b0100, Size 3933429
[I][LowLoad] Uncompressing Kernel to 0x50000000...
[I][LowLoad] Done!
[I][LowLoad] CRC: 00000000
[I][LowLoad] load time: 449038 us 
[I][LowLoad] Setting PMP
[I][LowLoad] Booting OpenSBI at 0x000000003ef80000 with DTB at 0x51ff8000

OpenSBI v1.2
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|

Platform Name             : Pine64 Ox64
Platform Features         : medeleg
Platform HART Count       : 1
Platform IPI Device       : aclint-mswi
Platform Timer Device     : aclint-mtimer @ 1000000Hz
Platform Console Device   : bflb_uart
Platform HSM Device       : ---
Platform PMU Device       : ---
Platform Reboot Device    : ---
Platform Shutdown Device  : ---
Firmware Base             : 0x3ef80000
Firmware Size             : 200 KB
Runtime SBI Version       : 1.0

Domain0 Name              : root
Domain0 Boot HART         : 0
Domain0 HARTs             : 0*
Domain0 Region00          : 0x00000000e4008000-0x00000000e400bfff (I)
Domain0 Region01          : 0x00000000e4000000-0x00000000e4007fff (I)
Domain0 Region02          : 0x000000003ef80000-0x000000003efbffff ()
Domain0 Region03          : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address      : 0x0000000050000000
Domain0 Next Arg1         : 0x0000000051ff8000
Domain0 Next Mode         : S-mode
Domain0 SysReset          : yes

Boot HART ID              : 0
Boot HART Domain          : root
Boot HART Priv Version    : v1.11
Boot HART Base ISA        : rv64imafdcvx
Boot HART ISA Extensions  : time
Boot HART PMP Count       : 8
Boot HART PMP Granularity : 4096
Boot HART PMP Address Bits: 38
Boot HART MHPM Count      : 8
Boot HART MIDELEG         : 0x0000000000000222
Boot HART MEDELEG         : 0x000000000000b109
[    0.000000] Linux version 6.2.0-rc8 (runner@fv-az461-503) (riscv64-unknown-linux-gnu-gcc (Xuantie-900 linux-5.10.4 glibc gcc Toolchain V2.6.1 B-20220906) 10.2.0, GNU ld (GNU Binutils) 2.35) #1 Sun Feb 19 09:21:12 UTC 2023
[    0.000000] Machine model: Pine64 Ox64
[    0.000000] earlycon: sbi0 at I/O port 0x0 (options '')
[    0.000000] printk: bootconsole [sbi0] enabled
[    0.000000] efi: UEFI not found.
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000050000000-0x0000000053ffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000050000000-0x0000000053ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000050000000-0x0000000053ffffff]
[    0.000000] SBI specification v1.0 detected
[    0.000000] SBI implementation ID=0x1 Version=0x10002
[    0.000000] SBI TIME extension detected
[    0.000000] SBI IPI extension detected
[    0.000000] SBI RFENCE extension detected
[    0.000000] riscv: base ISA extensions acdfim
[    0.000000] riscv: ELF capabilities acdfim
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16160
[    0.000000] Kernel command line: console=ttyS0,2000000 loglevel=8 earlycon=sbi root=PARTLABEL=rootfs rootwait rootfstype=ext4
[    0.000000] Dentry cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 50136K/65536K available (3941K kernel code, 4584K rwdata, 2048K rodata, 2118K init, 301K bss, 15400K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] riscv-intc: 64 local interrupts mapped
[    0.000000] plic: interrupt-controller@e0000000: mapped 64 interrupts with 1 handlers for 2 contexts.
[    0.000000] riscv-timer: 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.000002] sched_clock: 64 bits at 1000kHz, resolution 1000ns, wraps every 2199023255500ns
[    0.000917] Console: colour dummy device 80x25
[    0.001161] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=4000)
[    0.001683] pid_max: default: 32768 minimum: 301
[    0.002394] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.002736] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.007687] cblist_init_generic: Setting adjustable number of callback queues.
[    0.008005] cblist_init_generic: Setting shift to 0 and lim to 1.
[    0.008909] ASID allocator using 16 bits (65536 entries)
[    0.010126] EFI services will not be available.
[    0.011150] devtmpfs: initialized
[    0.014636] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.015133] futex hash table entries: 256 (order: 0, 6144 bytes, linear)
[    0.015752] pinctrl core: initialized pinctrl subsystem
[    0.018300] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.019159] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.019546] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.025099] bflb-ipc 30005000.mailbox: Bouffalo Lab IPC mailbox interrupt controller
[    0.030226] SCSI subsystem initialized
[    0.032783] clocksource: Switched to clocksource riscv_clocksource
[    0.061401] NET: Registered PF_INET protocol family
[    0.062066] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.064181] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.064619] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.065130] TCP established hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.065541] TCP bind hash table entries: 512 (order: 1, 8192 bytes, linear)
[    0.065976] TCP: Hash tables configured (established 512 bind 512)
[    0.066659] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.066994] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.067759] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.070262] workingset: timestamp_bits=62 max_order=14 bucket_order=0
[    0.072557] NET: Registered PF_ALG protocol family
[    0.072993] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.073339] io scheduler mq-deadline registered
[    0.073594] io scheduler kyber registered
[    0.073934] io scheduler bfq registered
[    0.075116] bflb-gpio-pinctrl 200008c4.pinctrl: No cache defaults, reading back from HW
[    0.077467] bflb-gpio-pinctrl 200008c4.pinctrl: Bouffalo Lab pinctrl+GPIO(+interrupt) controller - Registered 32 function(s) for 46 pin(s)
[    0.083320] 30002000.serial: ttyS0 at MMIO 0x30002000 (irq = 2, base_baud = 2500000) is a BFLB UART
[    0.083799] printk: console [ttyS0] enabled
[    0.083799] printk: console [ttyS0] enabled
[    0.084250] printk: bootconsole [sbi0] disabled
[    0.084250] printk: bootconsole [sbi0] disabled
[    0.085883] 2000aa00.serial: ttyS1 at MMIO 0x2000aa00 (irq = 3, base_baud = 2500000) is a BFLB UART
[    0.114568] brd: module loaded
[    0.131263] loop: module loaded
[    0.132547] physmap-flash 58500000.xip_flash: physmap platform flash device: [mem 0x58500000-0x588fffff]
[    0.138427] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    0.138922] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld . All Rights Reserved.
[    0.139555] PPP generic driver version 2.4.2
[    0.140253] PPP BSD Compression module registered
[    0.140565] PPP Deflate Compression module registered
[    0.141679] sdhci: Secure Digital Host Controller Interface driver
[    0.142071] sdhci: Copyright(c) Pierre Ossman
[    0.142341] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.143649] mmc0 bounce up to 128 segments into one, max segment size 65536 bytes
[    0.144836] ledtrig-cpu: registered to indicate activity on CPUs
[    0.145624] bflb-seceng 20004000.seceng: No cache defaults, reading back from HW
[    0.149132] random: crng init done
[    0.149379] bflb-seceng 20004000.seceng: Bouffalo Lab Secure Engine
[    0.150314] riscv-pmu-sbi: SBI PMU extension is available
[    0.150721] riscv-pmu-sbi: 16 firmware and 10 hardware counters
[    0.152676] NET: Registered PF_INET6 protocol family
[    0.155491] Segment Routing with IPv6
[    0.155860] In-situ OAM (IOAM) with IPv6
[    0.156294] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    0.158192] NET: Registered PF_PACKET protocol family
[    0.158580] Key type dns_resolver registered
[    0.182669] debug_vm_pgtable: [debug_vm_pgtable         ]: Validating architecture page table helpers
[    0.196778] mmc0: SDHCI controller on 20060000.sdhci [20060000.sdhci] using DMA
[    0.197576] Waiting for root device PARTLABEL=rootfs...