Port-RISCV archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Status update



Hi,

With a bunch of help from Simon Burge we've managed to get the RISC-V port to running /rescue/sh in qemu for RV64.

Nick
nick@thinkbook:~/emulators/netbsd-riscv$ sh run.sh
WARNING: Image format was not specified for 'riscv64.img' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.

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

Platform Name             : riscv-virtio,qemu
Platform Features         : medeleg
Platform HART Count       : 1
Platform IPI Device       : aclint-mswi
Platform Timer Device     : aclint-mtimer @ 10000000Hz
Platform Console Device   : uart8250
Platform HSM Device       : ---
Platform Reboot Device    : sifive_test
Platform Shutdown Device  : sifive_test
Firmware Base             : 0x80000000
Firmware Size             : 288 KB
Runtime SBI Version       : 1.0

Domain0 Name              : root
Domain0 Boot HART         : 0
Domain0 HARTs             : 0*
Domain0 Region00          : 0x0000000002000000-0x000000000200ffff (I)
Domain0 Region01          : 0x0000000080000000-0x000000008007ffff ()
Domain0 Region02          : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address      : 0x0000000080200000
Domain0 Next Arg1         : 0x000000009fe00000
Domain0 Next Mode         : S-mode
Domain0 SysReset          : yes

Boot HART ID              : 0
Boot HART Domain          : root
Boot HART Priv Version    : v1.10
Boot HART Base ISA        : rv64imafdc
Boot HART ISA Extensions  : time
Boot HART PMP Count       : 16
Boot HART PMP Granularity : 4
Boot HART PMP Address Bits: 54
Boot HART MHPM Count      : 0
Boot HART MIDELEG         : 0x0000000000000222
Boot HART MEDELEG         : 0x000000000000b109
PM
[   1.0000000] NetBSD/riscv (fdt) booting ...
[   1.0000000] Loaded initial symtab at 0xffffffc000612240, strtab at 0xffffffc000668cd0, # entries 14768
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
[   1.0000000]     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
[   1.0000000]     2018, 2019, 2020, 2021, 2022
[   1.0000000]     The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights reserved.

[   1.0000000] NetBSD 9.99.107 (GENERIC) #56: Fri Dec  2 11:16:38 GMT 2022
[   1.0000000]  nick@thinkbook:/home/nick/netbsd/nick-aarch64/obj.riscv64/sys/arch/riscv/compile/GENERIC
[   1.0000000] total memory = 511472 KB
[   1.0000000] avail memory = 494664 KB
[   1.0000000] mainbus0 (root)
[   1.0000000] simplebus0 at mainbus0: riscv-virtio,qemu
[   1.0000000] cpus0 at simplebus0
[   1.0000000] simplebus1 at simplebus0
[   1.0000000] simplebus2 at simplebus0
[   1.0000000] simplebus3 at simplebus0
[   1.0000000] cpu0 at cpus0
[   1.0000000] intc0 at cpu0: local interrupt controller
[   1.0000000] plic0 at simplebus1: RISC-V PLIC (96 IRQs)
[   1.0000000] /soc/test@100000 at simplebus1 not configured
[   1.0000000] qemufwcfg0 at simplebus0
[   1.0000000] /flash@20000000 at simplebus0 not configured
[   1.0000000] /poweroff at simplebus0 not configured
[   1.0000000] /reboot at simplebus0 not configured
[   1.0000000] /soc/pmu at simplebus1 not configured
[   1.0000000] gfrtc0 at simplebus1: Google Goldfish RTC
[   1.0000000] com0 at simplebus1: ns16550a, 16-byte FIFO
[   1.0000000] com0: console
[   1.0000000] com0: interrupting on plic0 irq 10
[   1.0000000] /soc/pci@30000000 at simplebus1 not configured
[   1.0000000] virtio0 at simplebus1
[   1.0000000] virtio0: block device (id 2, rev. 0x01)
[   1.0000000] ld0 at virtio0: features: 0x10000a54<INDIRECT_DESC,CONFIG_WCE,FLUSH,BLK_SIZE,GEOMETRY,SEG_MAX>
[   1.0000000] virtio0: interrupting on plic0 irq 8
[   1.0000000] ld0: 2381 MB, 4837 cyl, 16 head, 63 sec, 512 bytes/sect x 4876288 sectors
[   1.0000000] virtio1 at simplebus1
[   1.0000000] virtio2 at simplebus1
[   1.0000000] virtio3 at simplebus1
[   1.0000000] virtio4 at simplebus1
[   1.0000000] virtio5 at simplebus1
[   1.0000000] virtio6 at simplebus1
[   1.0000000] virtio7 at simplebus1
[   1.0000000] /soc/clint@2000000 at simplebus1 not configured
[   1.0000030] riscv_timer_init: tc_init done
[   1.0393823] dk0 at ld0: "EFI", 163840 blocks at 32768, type: msdos
[   1.0393823] dk1 at ld0: "netbsd-root", 4677632 blocks at 196608, type: ffs
[   1.0695938] WARNING: system needs entropy for security; see entropy(7)
[   1.0793849] swwdog0: software watchdog initialized
[   1.0793849] root device: dk1
[   1.6302276] dump device: 
[   2.0553991] file system (default generic): 
[   2.9144455] root on dk1
[   2.9144455] mountroot: trying lfs...
[   2.9144455] mountroot: trying ffs...
[   2.9193087] root file system type: ffs
[   2.9293636] kern.module.path=/stand/riscv/9.99.107/modules
[   2.9393532] init path (default /sbin/init): /rescue/init
[   5.9737319] init: copying out flags `-s' 3
[   5.9737319] init: copying out path `/rescue/init' 13
Enter pathname of shell or RETURN for /rescue/sh: 
sp = 0x3ffffee9e0, argc = 3, argv = 0x3ffffee9f8 </bin/test> relocbase 0x3ff86de000
got is at 0x3ff86ee660, dynamic is at 0x3ff86ee4f0
env[0] = 0x3ffffeef4e ENV=/root/.shrc
env[1] = 0x3ffffeef5e BLOCKSIZE=1k
env[2] = 0x3ffffeef6b PWD=/
env[3] = 0x3ffffeef71 PATH=/rescue:/usr/bin:/bin:/usr/sbin:/sbin:/usr/pkg/bin:/usr/pkg/sbin:/usr/local/bin:/usr/local/sbin
env[4] = 0x3ffffeefd6 HOST=
headers: digesting PT_DYNAMIC at 0x3ff86ee4f0
  d_tag 16 at 0x3ff86ee4f0
  d_tag 4 at 0x3ff86ee500
  d_tag 5 at 0x3ff86ee510
  d_tag 6 at 0x3ff86ee520
  d_tag 10 at 0x3ff86ee530
  d_tag 11 at 0x3ff86ee540
  d_tag 7 at 0x3ff86ee550
  d_tag 8 at 0x3ff86ee560
  d_tag 9 at 0x3ff86ee570
  d_tag 1879048185 at 0x3ff86ee580
 added path "/usr/lib"
[   7.0193649] Trapframe @ 0xffffffc02a752ee0 (cause=2 (illegal instruction), status=0x4020, pc=      0x3ff86de000, va=0x464c457f):
[   7.0193649] ra =      0x3ff86e097e, sp =      0x3ffffee860, gp =      0x3ff86eea56, tp =      0x3ff86db000
[   7.0193649] s0 =      0x3ff86d8400, s1 =      0x3ff86ee758, s2 =      0x3ffffee950, s3 =               0x1
[   7.0193649] s4 =      0x3ff86e7c70, s5 =      0x3ff86e7b78, s6 =            0x2000, s7 =      0x3ff86eec28
[   7.0193649] s8 =      0x3ff86e81e8, s9 =      0x3ff844fcb0, s10=              0x4c, s11=      0x3ffffeeb28
[   7.0193649] a0 =      0x3ff84777e8, a1 =      0x3ff84b3f08, a2 =                 0, a3 =      0x3ff86e7b78
[   7.0193649] a4 =               0x1, a5 =      0x3ff86de000, a5 =      0x3ff84a52b8, a7 =      0x3ff86d8000
[   7.0193649] t0 =      0x3ff86eec28, t1 =                 0, t2 =                 0, t3 =               0x1
[   7.0193649] t4 =            0x1810, t5 =      0x3ff86ee638, t6 =             0x125
[   7.0293905] pid 97 (test), uid 0: exited on signal 4 (core not dumped, err = 30)
[1]   Illegal instruction     /bin/test -z "${HOST}"
# 


Home | Main Index | Thread Index | Old Index