![](https://secure.gravatar.com/avatar/e176e14e28b50d7e9f374225457cd6de.jpg?s=120&d=mm&r=g)
Hello everyone, I am trying to create a grub iso image in order to run sel4bench on real hardware. The target architecture is x86_64 and I would prefer a grub iso because no changes to the hardware setup would be necessary then. What I did so far: I create the sel4bench images as follows mkdir sel4bench cd sel4bench repo init -u -u https://github.com/seL4/sel4bench-manifest.git repo sync mkdir build cd build ../init-build.sh -DPLATFORM=x86_64 ninja I get two elf images in the build/images directory as expected. Now in order to creat a bootable iso image i followed this guide https://www.gnu.org/software/grub/manual/grub/html_node/Making-a-GRUB-bootab... Which means: mkdir -p iso/boot/grub grub-mkrescue -o grub.iso cp /path/to/kernel-x86_64-pc99 iso cp /path/to/sel4benchapp-image-x86_64-pc99 iso Then I add the grub.cfg under iso/boot/grub/grub.cfg menuentry "Load seL4 VM" --class os { multiboot /kernel-x86_64-pc99 module /sel4benchapp-image-x86_64-pc99 } There are a few lines missing from your offered grub stanza here https://docs.sel4.systems/Hardware/IA32 Mainly because I was having issues with getting it to run with them and without them I got further. Then I run grub-mkrescue -o grub.iso iso And try out the resulting iso as follows: qemu-system-x86_64 -cdrom grub.iso -nographic -enable-kvm -cpu Haswell,-vme,+pdpe1gb,+xsave,+xsaveopt,-xsavec,+fsgsbase,+invpcid,+syscall,+lm,enforce -m size=512M I get the following output: seL4 Benchmark ============== Switching to a safer, bigger stack... Setting up global fault handler... Failed to allocate object of size 140737488355328, error 1 Failed to allocate object of size 70368744177664, error 1 Failed to allocate object of size 35184372088832, error 1 Failed to allocate object of size 17592186044416, error 1 Failed to allocate object of size 8796093022208, error 1 Failed to allocate object of size 4398046511104, error 1 Failed to allocate object of size 2199023255552, error 1 Failed to allocate object of size 1099511627776, error 1 Failed to allocate object of size 549755813888, error 1 Failed to allocate object of size 274877906944, error 1 Failed to allocate object of size 137438953472, error 1 Failed to allocate object of size 68719476736, error 1 Failed to allocate object of size 34359738368, error 1 Failed to allocate object of size 17179869184, error 1 Failed to allocate object of size 8589934592, error 1 Failed to allocate object of size 4294967296, error 1 Failed to allocate object of size 2147483648, error 1 Failed to allocate object of size 1073741824, error 1 Failed to allocate object of size 536870912, error 1 Failed to allocate object of size 268435456, error 1 ipc Benchmarks ============== irquser Benchmarks ============== arch_simple_get_IOPort_cap not implemented Failed to get capability for IOPort range 0x43-0x43 PIT command failed! [Cond failed: error] Failed to init timer Benchmark failed, result 1 Register dump: rip: 0x4138a0 rsp: 0x10011640 rflags: 0x246 rax: 0x10000000 rbx: 0x10011660 rcx: 0x420c48 rdx: 0xffffffffffffffff rsi: 0x1 rdi: 0x2 rbp: 0x10011680 r8: 0x2b r9: 0x12008180c100f r10: 0x1 r11: 0x206 r12: 0x10011d88 r13: 0x10011d98 r14: 0x0 r15: 0x0 fs_base: 0x7494d0 gs_base: 0x0 [Cond failed: result == NULL] Failed to run benchmark irquser So ipc seems to run fine but irquser is not. Now I am only interested in the benchmark IPC for now. And maybe FAULT as well later. So I do not need to get irquser to run. Therefore I do the following setup again: mkdir sel4bench cd sel4bench repo init -u -u https://github.com/seL4/sel4bench-manifest.git repo sync mkdir build cd build ../init-build.sh -DPLATFORM=x86_64 and not i run ccmake . which opens a configuration screen where I can choose which benchmarks I want to include in the image. I disable everything except FASTPATH (this does not seem to be a benchmark) and IPC. I run ninja again and use the resulting images are build into an iso as stated above. Now running qemu results in this: Boot config: debug_port = 0x3f8 Boot config: disable_iommu = false Detected 1 boot module(s): module #0: start=0xa87000 end=0xd4e6a0 size=0x2c76a0 name='' Parsing GRUB physical memory map Physical Memory Region from 0 size 9fc00 type 1 Physical Memory Region from 9fc00 size 400 type 2 Physical Memory Region from f0000 size 10000 type 2 Physical Memory Region from 100000 size 1fee0000 type 1 Adding physical memory region 0x100000-0x1ffe0000 Physical Memory Region from 1ffe0000 size 20000 type 2 Physical Memory Region from feffc000 size 4000 type 2 Physical Memory Region from fffc0000 size 40000 type 2 Got VBE info in multiboot. Current video mode is 3 ACPI: RSDP paddr=0xf5b20 ACPI: RSDP vaddr=0xf5b20 ACPI: RSDT paddr=0x1ffe1550 ACPI: RSDT vaddr=0x1ffe1550 Kernel loaded to: start=0x100000 end=0xa14000 size=0x914000 entry=0x10040b ACPI: RSDT paddr=0x1ffe1550 ACPI: RSDT vaddr=0x1ffe1550 ACPI: FADT paddr=0x1ffe1404 ACPI: FADT vaddr=0x1ffe1404 ACPI: FADT flags=0x80a5 ACPI: 0 IOMMUs detected ACPI: MADT paddr=0x1ffe1478 ACPI: MADT vaddr=0x1ffe1478 ACPI: MADT apic_addr=0xfee00000 ACPI: MADT flags=0x1 ACPI: MADT_APIC apic_id=0x0 ACPI: MADT_IOAPIC ioapic_id=0 ioapic_addr=0xfec00000 gsib=0 ACPI: MADT_ISO bus=0 source=0 gsi=2 flags=0x0 ACPI: MADT_ISO bus=0 source=5 gsi=5 flags=0xd ACPI: MADT_ISO bus=0 source=9 gsi=9 flags=0xd ACPI: MADT_ISO bus=0 source=10 gsi=10 flags=0xd ACPI: MADT_ISO bus=0 source=11 gsi=11 flags=0xd ACPI: 1 CPU(s) detected ELF-loading userland images from boot modules: size=0x242000 v_entry=0x449631 v_start=0x400000 v_end=0x642000 p_start=0xd4f000 p_end=0xf91000 Moving loaded userland images to final location: from=0xd4f000 to=0xa14000 size=0x242000 Starting node #0 with APIC ID 0 Mapping kernel window is done available phys memory regions: 1 [100000..1ffe0000] reserved virt address space regions: 1 [ffffff8000100000..ffffff8000c56000] Booting all finished, dropped to user space seL4 Benchmark ============== Switching to a safer, bigger stack... Setting up global fault handler... vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 140737488355328, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 70368744177664, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 35184372088832, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 17592186044416, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 8796093022208, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 4398046511104, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 2199023255552, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 1099511627776, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 549755813888, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 274877906944, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 137438953472, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 68719476736, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 34359738368, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 17179869184, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 8589934592, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 4294967296, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 2147483648, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 1073741824, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 536870912, error 1 vka_alloc_object_at_maybe_dev@object.h:57 Failed to allocate object of size 268435456, error 1 ipc Benchmarks ============== libsel4muslcsys: Error attempting syscall 228 libsel4muslcsys: Error attempting syscall 96 JSON OUTPUT [{"Benchmark": "One way IPC microbenchmarks", "Results": [{"Function": "seL4_Call", "Direction": "client->server", "Client Prio": 254, "Server Prio": 254, "Same vspace?": true, "IPT .... All is well in the universe. Fin So the benchmark runs but now a libsel4muslcsys error is new. syscall 228 is sys_clock_gettime so I assume it is important for the benchmark and even so it is not terminating I am not sure whether the results are correct with that error. So somehow removing the other benchmarks resulted in an error in the ipc benchmark which was not there or at least not shown there when compiling with all benchmarks. When trying to find out which removal is causing the problem a variety of other problems is appearing. Do you think the musllib error is related to the missing lines in the grub.cfg? If so do you have an idea which one? Why do the different benchmarks influence each other, am I compiling it wrong? If there are information missing feel free to let me know and I will try to add them Kind regards, Bengt
![](https://secure.gravatar.com/avatar/e176e14e28b50d7e9f374225457cd6de.jpg?s=120&d=mm&r=g)
Running the images only including the IPC Benchmark with the given simulate script (with added --enable-kvm) is also showing the libsel4muslcsys: Error attempting syscall 228 libsel4muslcsys: Error attempting syscall 96 errors. I am pretty sure I allready ran that without getting this error though.
![](https://secure.gravatar.com/avatar/e176e14e28b50d7e9f374225457cd6de.jpg?s=120&d=mm&r=g)
Well it is working without an error now. I believe I also disabled "Release" which is not a benchmark. The working configuration now is ARM_HYP ON CMAKE_INSTALL_PREFIX /usr/local FASTPATH ON FAULT ON HARDWARE ON IPC ON IRQ ON IRQUSER OFF KernelArmExportPMUUser OFF KernelCustomDTS MAPPING ON MCS OFF OPENSBI_PATH .../sel4bench/projects/sel4bench/../../tools/opensbi PLATFORM x86_64 RELEASE ON SCHED OFF SIGNAL OFF SMP OFF SYNC ON Sel4benchAllowSettingsOverride OFF VCPU ON Running the created grub iso with qemu is working fine as well. Just thought I update this here in case someone else runs into this problem.
participants (2)
-
Bengt.Lennicke@mailbox.tu-dresden.de
-
bengt.lennicke@mailbox.tu-dresden.de