Hi everyone, These details on gem5-resources have also been tested multiple times. We have also gotten unmodified OpenSBI working with gem5 as well. Ayaz can provide more details if you need.
https://gem5.googlesource.com/public/gem5-resources/+/refs/heads/stable/src/riscv-fs/ Cheers, Jason On Fri, Jun 25, 2021 at 8:22 AM Νικόλαος Ταμπουρατζής via gem5-users < gem5-users@gem5.org> wrote: > Dear David, > > I have used the bbl, Linux Kernel, and riscv_disk from the following > GitHub: https://github.com/ppeetteerrs/gem5-RISC-V-FS-Linux/ .You can > use either the files from prebuild directory or you can create your > own according to instructions of this Github. Specifically, I have > used the following configurations which are working properly (5 of 6): > > ------------ RISCV 1 core ------------ > > AtomicSimpleCPU (Working) > > $GEM5/build/RISCV/gem5.opt -d $GEM5/node0 > $GEM5/configs/example/riscv/fs_linux.py --kernel=$OUT/bbl --caches > --mem-size=512MB --mem-type=DDR4_2400_8x8 --cpu-type=AtomicSimpleCPU > --disk-image=$OUT/riscv_disk -n 1 > > > TimingSimpleCPU (Working) > > $GEM5/build/RISCV/gem5.opt -d $GEM5/node0 > $GEM5/configs/example/riscv/fs_linux.py --kernel=$OUT/bbl --caches > --mem-size=512MB --mem-type=DDR4_2400_8x8 --cpu-type=TimingSimpleCPU > --disk-image=$OUT/riscv_disk -n 1 > > DerivO3CPU (Working) > > $GEM5/build/RISCV/gem5.opt -d $GEM5/node0 > $GEM5/configs/example/riscv/fs_linux.py --kernel=$OUT/bbl --caches > --mem-size=512MB --mem-type=DDR4_2400_8x8 --cpu-type=DerivO3CPU > --disk-image=$OUT/riscv_disk -n 1 > > > ------------ RISCV 2 cores ------------ > > AtomicSimpleCPU (Working) > > $GEM5/build/RISCV/gem5.opt -d $GEM5/node0 > $GEM5/configs/example/riscv/fs_linux.py --kernel=$OUT/bbl --caches > --mem-size=512MB --mem-type=DDR4_2400_8x8 --cpu-type=AtomicSimpleCPU > --disk-image=$OUT/riscv_disk -n 2 > > TimingSimpleCPU (Working) > > $GEM5/build/RISCV/gem5.opt -d $GEM5/node0 > $GEM5/configs/example/riscv/fs_linux.py --kernel=$OUT/bbl --caches > --mem-size=512MB --mem-type=DDR4_2400_8x8 --cpu-type=TimingSimpleCPU > --disk-image=$OUT/riscv_disk -n 2 > > DerivO3CPU (NOT Working): void BaseDynInst< <template-parameter-1-1> > >::initVars() [with Impl = O3CPUImpl]: Assertion `cpu->instcount <= > 1500' failed. > > $GEM5/build/RISCV/gem5.opt -d $GEM5/node0 > $GEM5/configs/example/riscv/fs_linux.py --kernel=$OUT/bbl --caches > --mem-size=512MB --mem-type=DDR4_2400_8x8 --cpu-type=DerivO3CPU > --disk-image=$OUT/riscv_disk -n 2 > > > To be noticed that when I use --mem-size more than 512MB, gem5 is not > booted. > > > Finally, when I use the last configuration I get the above error > (please let me know if you/anyone can resolve it :)) > > Best regards, > Nikolaos Tampouratzis > > > Quoting Truan David via gem5-users <gem5-users@gem5.org>: > > > Hello, > > We are a team working on gem5 RISCV. We are trying to use gem5 > > full-system but we are encountering some issues when mounting the > > rootfs/initramfs. > > > > This is our setup: > > - gem5 on branch develop from > > https://gem5.googlesource.com/public/gem5 (c493d2c4ad) > > - BBL on branche master from https://github.com/riscv/riscv-pk.git > (e8e6b3aa) > > - Linux 5.10, checkout on v5.10 tag (2c85ebc57) > > > > This is what we tried so far: > > > > -Compiling BBL with and without specifying the DTS: No changes > > -Compiling BBL with Linux vmlinux OR Image as payload: No changes > > -Compiling Linux with an minimalistic initramfs which only prints a > > "Hello World" from the init script: No changes > > -Using fs_linux.py OR run_riscv.py as the entry point: No changes > > > > Here are the boot logs from different experiments, with only the > > last lines of the boot log to keep this mail short: > > > > ===================== > > This is the boot log when specifying a disk-image param, using > fs_linux.py: > > > > Command: > > $GEM5_FAST_BIN -v \ > > -d $GEM5_OUTPUT \ > > $GEM5_HOME/configs/example/riscv/fs_linux.py \ > > --cpu-type=AtomicSimpleCPU \ > > --cpu-clock=1GHz \ > > -n 1 \ > > --disk-image=$DISK \ > > --kernel=<BBL> \ > > --mem-type=DDR4_2400_4x16 \ > > --mem-size=4GB \ > > --command-line="root=/dev/vda ro console=ttyS0" > > > > > > ==== m5 terminal: Terminal 0 ==== > > ... > > [ 1.123014] [drm] radeon kernel modesetting enabled. > > [ 1.146199] loop: module loaded > > [ 1.147219] virtio_blk virtio0: [vda] 6821 512-byte logical > > blocks (3.49 MB/3.33 MiB) > > [ 1.147423] vda: detected capacity change from 0 to 3492352 > > > > ===================== > > This is the boot log when NOT specifying a disk-image param, using > > fs_linux.py: > > > > Command: > > $GEM5_FAST_BIN -v \ > > -d $GEM5_OUTPUT \ > > $GEM5_HOME/configs/example/riscv/fs_linux.py \ > > --cpu-type=AtomicSimpleCPU \ > > --cpu-clock=1GHz \ > > -n 1 \ > > --kernel=<BBL> \ > > --mem-type=DDR4_2400_4x16 \ > > --mem-size=4GB \ > > --command-line="root=/dev/vda ro console=ttyS0" > > > > ==== m5 terminal: Terminal 0 ==== > > ... > > [ 1.121246] [drm] radeon kernel modesetting enabled. > > [ 1.144593] loop: module loaded > > [ 1.148461] libphy: Fixed MDIO Bus: probed > > [ 1.152291] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver > > [ 1.152426] ehci-pci: EHCI PCI platform driver > > [ 1.152703] ehci-platform: EHCI generic platform driver > > [ 1.152981] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver > > [ 1.153111] ohci-pci: OHCI PCI platform driver > > [ 1.153376] ohci-platform: OHCI generic platform driver > > [ 1.154497] usbcore: registered new interface driver uas > > [ 1.154842] usbcore: registered new interface driver usb-storage > > [ 1.155422] mousedev: PS/2 mouse device common for all mice > > [ 1.156642] usbcore: registered new interface driver usbhid > > [ 1.156760] usbhid: USB HID core driver > > [ 1.161109] NET: Registered protocol family 10 > > [ 1.164410] Segment Routing with IPv6 > > [ 1.164841] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver > > [ 1.167720] NET: Registered protocol family 17 > > [ 1.168261] Key type dns_resolver registered > > [ 1.170789] Freeing unused kernel memory: 184K > > > > > > ===================== > > This is the boot log using run_riscv.py: > > > > Command: > > $GEM5_BIN -v \ > > -d $GEM5_OUTPUT \ > > $HOME/riscv-fs/configs-riscv-fs/run_riscv.py \ > > $BOOTLOADER \ > > $DISK \ > > simple \ > > 1 > > > > ==== m5 terminal: Terminal 0 ==== > > ... > > [ 1.040529] [drm] radeon kernel modesetting enabled. > > [ 1.083453] loop: module loaded > > [ 1.085896] virtio_blk virtio0: [vda] 1048576 512-byte logical > > blocks (537 MB/512 MiB) > > [ 1.086433] vda: detected capacity change from 0 to 536870912 > > [ 1.097333] libphy: Fixed MDIO Bus: probed > > [ 1.099885] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver > > [ 1.100302] ehci-pci: EHCI PCI platform driver > > [ 1.101024] ehci-platform: EHCI generic platform driver > > [ 1.101590] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver > > [ 1.101965] ohci-pci: OHCI PCI platform driver > > [ 1.102395] ohci-platform: OHCI generic platform driver > > [ 1.104650] usbcore: registered new interface driver uas > > [ 1.105608] usbcore: registered new interface driver usb-storage > > [ 1.106993] mousedev: PS/2 mouse device common for all mice > > [ 1.108385] usbcore: registered new interface driver usbhid > > [ 1.109064] usbhid: USB HID core driver > > [ 1.113051] NET: Registered protocol family 10 > > [ 1.118537] Segment Routing with IPv6 > > [ 1.119142] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver > > [ 1.122581] NET: Registered protocol family 17 > > [ 1.123375] Key type dns_resolver registered > > [ 1.129869] Freeing unused kernel memory: 184K > > ===================== > > > > > > Everything works fine using QEMU, either using the full rootfs or > > only booting on the minimalistic initramfs: > > > > qemu-system-riscv64 -machine virt -m 512 -nographic \ > > -kernel <bbl.bin> \ > > -device loader,file=<linux 5.10 with or without > initramfs>,addr=0x80200000 \ > > -drive file=<full rootfs>,format=raw,id=hd0 \ > > -device virtio-blk-device,drive=hd0 \ > > -netdev > > > user,id=net0,hostfwd=tcp::2323-10.0.2.20:23,hostfwd=tcp::8080-10.0.2.20:80 > > \ > > -device virtio-net-device,netdev=net0 \ > > -append "root=/dev/vda ro console=ttyS0" > > > > Do you have any hint or do you spot something that is missing in our > > setup? I'll gladly provide more informations if needed. > > > > Thanks in advance for your answers! > > > > > > > > > > David TRUAN > > > > Ingénieur Ra&D > > Institut Reconfigurable & Embedded Digital Systems (REDS) > > > > david.tr...@heig-vd.ch > > > > Bureau A23 > > > > Haute École d'Ingénierie et de Gestion du Canton de Vaud > > Route de Cheseaux 1 - CP 521 - 1401 Yverdon-les-Bains > > _______________________________________________ > > gem5-users mailing list -- gem5-users@gem5.org > > To unsubscribe send an email to gem5-users-le...@gem5.org > > %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s > > > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-le...@gem5.org > %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
_______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s