On Sat, Feb 04, 2023 at 05:43:17PM +0100, Patrick Wildt wrote:
> 
> Hi,

Hi Patrick,

> I was looking at upgrading sysutils/opensbi to version 1.2, and then
> realized that our current gcc/binutils fail to compile it because of
> some instruction set errors (which I forgot to write down).
> 
> So I figured maybe we should update the toolchain to GCC 12.2.0 and
> binutils 2.40.  Unfortunately that breaks the old U-Boot we have in
> our tree, but there's an easy fix one can cherry pick from upstream:
> 
> https://source.denx.de/u-boot/u-boot/-/commit/1dde977518f13824b847e23275001191139bc384
> 
> Thoughts?

Thanks for the update.  I tested those ports on amd64:

riscv-elf-binutils-2.40 binutils for riscv-elf cross-development
riscv-elf-gcc-12.2.0 gcc for riscv-elf cross-development
opensbi-1.2         RISC-V Supervisor Binary Interface
u-boot-riscv64-2021.10p4 U-Boot firmware 

Running OpenBSD/riscv64 on QEMU works fine for me.
ok kevlo@

OpenSBI v1.2
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|                                    
 | |  | |_ __   ___ _ __ | (___ | |_) || |                                      
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_                                     
  \____/| .__/ \___|_| |_|_____/|____/_____|                         
        | |                                                                     
        |_|                                                                     
                                                                                
Platform Name             : riscv-virtio,qemu 
Platform Features         : medeleg                                             
Platform HART Count       : 2
Platform IPI Device       : aclint-mswi
Platform Timer Device     : aclint-mtimer @ 10000000Hz
Platform Console Device   : uart8250
Platform HSM Device       : ---
Platform PMU Device       : ---
Platform Reboot Device    : sifive_test
Platform Shutdown Device  : sifive_test
Firmware Base             : 0x80000000
Firmware Size             : 220 KB
Runtime SBI Version       : 1.0

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

Boot HART ID              : 1
Boot HART Domain          : root
Boot HART Priv Version    : v1.12
Boot HART Base ISA        : rv64imafdch
Boot HART ISA Extensions  : time,sstc
Boot HART PMP Count       : 16
Boot HART PMP Granularity : 4
Boot HART PMP Address Bits: 54
Boot HART MHPM Count      : 16
Boot HART MIDELEG         : 0x0000000000001666
Boot HART MEDELEG         : 0x0000000000f0b509
                                                         

U-Boot 2021.10 (Feb 06 2023 - 11:52:28 +0800)

CPU:   rv64imafdch_zicsr_zifencei_zihintpause_zba_zbb_zbc_zbs_sstc
Model: riscv-virtio,qemu
DRAM:  2 GiB
Flash: 32 MiB
Loading Environment from nowhere... OK
In:    serial@10000000
Out:   serial@10000000
Err:   serial@10000000
Net:   eth0: virtio-net#1
Hit any key to stop autoboot:  0 

Device 0: 1af4 VirtIO Block Device
            Type: Hard Disk
            Capacity: 8192.0 MB = 8.0 GB (16777216 x 512)
... is now current device
Scanning virtio 0:1...
** Unable to read file / **
Failed to load '/'
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk virtio-blk#8...
Found 3 disks
No EFI system partition
BootOrder not defined
EFI boot manager: Cannot load any image
Found EFI removable media binary efi/boot/bootriscv64.efi
152954 bytes read in 2 ms (72.9 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Booting /efi\boot\bootriscv64.efi
disks: sd0*
>> OpenBSD/riscv64 BOOTRISCV64 1.5
boot> 
booting sd0a:/bsd: 5548504+1350272+214012+701380 [359916+122+503472+359393]=0xa0
a488
bootargs: 
all mapped
type 0x4 pa 0x80000000 va 0x80000000 pages 0x40 attr 0x8
type 0x7 pa 0x80040000 va 0x80040000 pages 0x1c0 attr 0x8
type 0x2 pa 0x80200000 va 0x80200000 pages 0x4000 attr 0x8
type 0x7 pa 0x84200000 va 0x84200000 pages 0x3cfb attr 0x8
type 0x9 pa 0x87efb000 va 0x87efb000 pages 0xa attr 0x8
type 0x7 pa 0x87f05000 va 0x87f05000 pages 0x766f1 attr 0x8
type 0x2 pa 0xfe5f6000 va 0xfe5f6000 pages 0x3 attr 0x8
type 0x4 pa 0xfe5f9000 va 0xfe5f9000 pages 0x1 attr 0x8
type 0x7 pa 0xfe5fa000 va 0xfe5fa000 pages 0x1 attr 0x8
type 0x2 pa 0xfe5fb000 va 0xfe5fb000 pages 0x100 attr 0x8
type 0x1 pa 0xfe6fb000 va 0xfe6fb000 pages 0x26 attr 0x8
type 0x4 pa 0xfe721000 va 0xfe721000 pages 0x8 attr 0x8
type 0x6 pa 0xfe729000 va 0xfe729000 pages 0x1 attr 0x8000000000000008
type 0x4 pa 0xfe72a000 va 0xfe72a000 pages 0x3 attr 0x8
type 0x6 pa 0xfe72d000 va 0xfe72d000 pages 0x3 attr 0x8000000000000008
type 0x4 pa 0xfe730000 va 0xfe730000 pages 0x1 attr 0x8
type 0x6 pa 0xfe731000 va 0xfe731000 pages 0x4 attr 0x8000000000000008
type 0x4 pa 0xfe735000 va 0xfe735000 pages 0x8 attr 0x8
type 0x2 pa 0xfe73d000 va 0xfe73d000 pages 0x1822 attr 0x8
type 0x5 pa 0xfff5f000 va 0xfff5f000 pages 0x1 attr 0x8000000000000008
type 0x2 pa 0xfff60000 va 0xfff60000 pages 0xa0 attr 0x8
[ using 1223880 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2023 OpenBSD. All rights reserved.  https://www.OpenBSD.org

OpenBSD 7.2-current (GENERIC.MP) #279: Mon Feb  6 02:43:22 MST 2023
    dera...@riscv64.openbsd.org:/usr/src/sys/arch/riscv64/compile/GENERIC.MP
real mem  = 2147483648 (2048MB)
avail mem = 2027999232 (1934MB)
SBI: OpenSBI v1.2, SBI Specification Version 1.0
random: good seed from bootblocks
mainbus0 at root: riscv-virtio,qemu
cpu0 at mainbus0: vendor 0 arch 70200 imp 70200 rv64imafdch_zicsr_zifencei_zihin
K@
h_c~_
intc0 at cpu0
cpu1 at mainbus0: vendor 0 arch 70200 imp 70200 rv64imafdch_zicsr_zifencei_zihin
K@
h
syscon0 at mainbus0: "poweroff"
syscon1 at mainbus0: "reboot"
"fw-cfg" at mainbus0 not configured
"flash" at mainbus0 not configured
simplebus0 at mainbus0: "platform-bus"
simplebus1 at mainbus0: "soc"
syscon2 at simplebus1: "test"
plic0 at simplebus1
"pmu" at simplebus1 not configured
gfrtc0 at simplebus1
com0 at simplebus1: ns16550, no working fifo
com0: console
pciecam0 at simplebus1
scsibus2 at softraid0: 256 targets
root on sd0a (509eb9d5fbee5b5e.a) swap on sd0b dump on sd0b    
Automatic boot in progress: starting file system checks.           
/dev/sd0a (509eb9d5fbee5b5e.a): file system is clean; not checking              
/dev/sd0e (509eb9d5fbee5b5e.e): file system is clean; not checking              
/dev/sd0d (509eb9d5fbee5b5e.d): file system is clean; not checking
pf enabled                                                                      
starting network
reordering: ld.so libc libcrypto sshd.                                          
openssl: generating isakmpd RSA keys... done.                                   
openssl: generating iked ECDSA keys... done.
ssh-keygen: generating new host keys: RSA ECDSA ED25519 
starting early daemons: syslogd pflogd ntpd.    
starting RPC daemons:.                                                          
savecore: no core dump                                                          
checking quotas: done.                                                          
clearing /tmp                                                                   
kern.securelevel: 0 -> 1                                                        
creating runtime link editor directory cache.                                   
preserving editor files.                                                       
starting network daemons: sshd smtpd sndiod.                                    
running rc.firsttime
fw_update: added none; updated none; kept none                                  
starting local daemons: cron.
Tue Feb  7 09:32:48 CST 2023

OpenBSD/riscv64 (riscv64) (console)

login:

Reply via email to