Re: [seL4] UEFI support for x86
Hello, On 04.12.2017 18:15, Edward Sandberg wrote:
I modified the demo.run file to use fb_boot_drv and built the uefi image. I tested it on an UP board, a Minnowboard Turbot, a Dell M3800 laptop, and a Dell Precision 5810 desktop. I was unable to get graphical output on any of them. I have pasted the logs for all (except the laptop which has no serial port) below.
* UP BOARD ******************************** WARNING: no console will be available to OS Bender: Hello World. framebuffer at [80000000+808ca000) 1920x1200@32 framebuffer at [80000000+808ca000) 1920x1200@32
good
[init -> fb_boot_drv] Framebuffer with 1920x1200x32 @ 0x80000000 type=1 pitch=7680 [init] child "report_rom" announces service "Report" [init -> fb_boot_drv] resource_request: ram_quota=4612096
If you see such a message, the driver or component in general will not continue. The specified memory for the driver seems to be too low, try to increase it. It should be something above 9.2M (7680 Byte * 1200 = 9.2 M + some memory for the driver). Maybe 10-11M should suffice.
* MinnowBoard *********************************** framebuffer at [80000000+808ca000) 1920x1200@32 framebuffer at [80000000+808ca000) 1920x1200@32
good
[init -> fb_boot_drv] Framebuffer with 1920x1200x32 @ 0x80000000 type=1 pitch=7680 [init -> fb_boot_drv] resource_request: ram_quota=4612096
Same here, try increase the memory for the framebuffer.
* Dell Precision 5810 ************************************** Bender: Hello World. framebuffer at [f1000000+f1300000) 1024x768@32 framebuffer at [f1000000+f1300000) 1024x768@32
good
Boot config: parsing cmdline 'sel4 disable_iommu' Boot config: console_port = 0x3f8 Boot config: debug_port = 0x3f8 Boot config: disable_iommu = true module #0: start=0xf9b8000 end=0xffff228 size=0x647228 name='image.elf' Physical Memory Region from 0 size a0000 type 1 Physical Memory Region from 100000 size 997ae000 type 1 Adding physical memory region 0x100000-0x1f800000 Physical Memory Region from 998ae000 size 9ac000 type 2 Physical Memory Region from 9a25a000 size 49000 type 3 Physical Memory Region from 9a2a3000 size c71000 type 4 Physical Memory Region from 9af14000 size 492000 type 2 Physical Memory Region from 9b3a6000 size 65000 type 20 Physical Memory Region from 9b40b000 size 1000 type 1 Physical Memory Region from 9b40c000 size e000 type 2 Physical Memory Region from 9b41a000 size 1be6000 type 1 Physical Memory Region from a0000000 size 10000000 type 2 Physical Memory Region from fed1c000 size 4000 type 2 Physical Memory Region from ff000000 size 1000000 type 2 Physical Memory Region from 1000000000 size 1760000000 type 1 Physical memory region not addressable Adding physical memory region 0x0-0x1f800000 seL4 failed assertion '!p_region_overlaps(reg)' at /home/esandberg/projects/embedded/genode-17.11/genode-17.11/contrib/sel4-097171f475bff21223783e130445b9be6b3d1bb4/src/kernel/sel4/src/arn halting...
This is a assertion in the seL4 kernel. Probably it complains about that region overlap due to following lines
Adding physical memory region 0x100000-0x1f800000 Adding physical memory region 0x0-0x1f800000
I'm not sure, whether here the Multiboot 2 information is incorrect or the parsing by the kernel is too strict. Here one would require some more investigation in the Multiboot 2 spec (overlapping regions are valid or not?) and on the target machine in grub2/uefi, potentially bender and the sel4 kernel. Thanks for testing and the infos. -- Alexander Boettcher Genode Labs http://www.genode-labs.com - http://www.genode.org Genode Labs GmbH - Amtsgericht Dresden - HRB 28424 - Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
I tried your suggestion and increased the memory for the framebuffer.The UP board booted all the way to the graphical interface, very exciting! Unfortunately the usb keyboard and mouse do not work. The Minnowboard still does not give any graphical output. The logs for both are below. I have found that on some hardware the OS does not know where to find the RSDP value when booting via multiboot and UEFI and as a result USB peripherals do not work. This is not just a problem with sel4 I have seen it with xen as well. That may be the problem here. I attempted to fix the problem by editing the sel4 source code. I added: #define UPBOARD_RSDP 0x5B161000 to ./contrib/sel4-097171f475bff21223783e130445b9be6b3d1bb4/src/kernel/sel4/include/plat/pc99/plat/machine/acpi.h. Then I replaced the function acpi_get_rsdp in ./contrib/sel4-097171f475bff21223783e130445b9be6b3d1bb4/src/kernel/sel4/src/plat/pc99/machine/acpi.c with: acpi_get_rsdp(void) { return (acpi_rsdp_t*)UPBOARD_RSDP; } But either my intuition about the problem is wrong or I am attempting to fix it incorrectly. I get exactly the same logs with or without the above fixes. Do you have any suggestions on the keyboard and mouse? * UP board *********************************** WARNING: no console will be available to OS Bender: Hello World. framebuffer at [80000000+808ca000) 1920x1200@32 framebuffer at [80000000+808ca000) 1920x1200@32 Boot config: parsing cmdline 'sel4 disable_iommu' Boot config: console_port = 0x3f8 Boot config: debug_port = 0x3f8 Boot config: disable_iommu = true module #0: start=0xf9b8000 end=0xffff228 size=0x647228 name='image.elf' Physical Memory Region from 0 size 8f000 type 1 Physical Memory Region from 8f000 size 1000 type 4 Physical Memory Region from 90000 size e000 type 1 Physical Memory Region from 9e000 size 2000 type 2 Physical Memory Region from 100000 size 1ef00000 type 1 Adding physical memory region 0x100000-0x1f000000 Physical Memory Region from 1f000000 size 1200000 type 2 Physical Memory Region from 20200000 size 3af29000 type 1 Physical Memory Region from 5b129000 size 30000 type 2 Physical Memory Region from 5b159000 size 25000 type 3 Physical Memory Region from 5b17e000 size 5d2000 type 4 Physical Memory Region from 5b750000 size 2b9000 type 2 Physical Memory Region from 5ba09000 size 79000 type 20 Physical Memory Region from 5ba82000 size 57e000 type 1 Physical Memory Region from e0000000 size 4000000 type 2 Physical Memory Region from fea00000 size 100000 type 2 Physical Memory Region from fec00000 size 1000 type 2 Physical Memory Region from fed01000 size 1000 type 2 Physical Memory Region from fed03000 size 1000 type 2 Physical Memory Region from fed06000 size 1000 type 2 Physical Memory Region from fed08000 size 2000 type 2 Physical Memory Region from fed1c000 size 1000 type 2 Physical Memory Region from fed80000 size 40000 type 2 Physical Memory Region from fee00000 size 1000 type 2 Physical Memory Region from ffc00000 size 400000 type 2 Got framebuffer info in multiboot2. Current video mode is at physical address=80000000 pitch=7680 resolution=1920x1200@32 type=1 Detected 1 boot module(s): Kernel loaded to: start=0x200000 end=0x27e000 size=0x7e000 entry=0x20007e ACPI: RSDT paddr=0x5b161028 ACPI: RSDT vaddr=0xdfd61028 ACPI: FADT paddr=0x5b1611a8 ACPI: FADT vaddr=0xdfd611a8 ACPI: FADT flags=0x421 ACPI: MADT paddr=0x5b177380 ACPI: MADT vaddr=0xdfd77380 ACPI: MADT apic_addr=0xfee00000 ACPI: MADT flags=0x1 ACPI: MADT_APIC apic_id=0x0 ACPI: MADT_APIC apic_id=0x2 ACPI: MADT_APIC apic_id=0x4 ACPI: MADT_APIC apic_id=0x6 ACPI: MADT_IOAPIC ioapic_id=1 ioapic_addr=0xfec00000 gsib=0 ACPI: MADT_ISO bus=0 source=0 gsi=2 flags=0x0 ACPI: MADT_ISO bus=0 source=9 gsi=9 flags=0xd ACPI: 4 CPU(s) detected ELF-loading userland images from boot modules: size=0xd88000 v_entry=0x2000000 v_start=0x2000000 v_end=0x2d88000 p_start=0x10000000 p_end=0x10d88000 Moving loaded userland images to final location: from=0x10000000 to=0x27e000 size=0xd88000 Starting node #0 with APIC ID 0 Starting node #1 with APIC ID 2 Starting node #2 with APIC ID 4 Starting node #3 with APIC ID 6 Booting all finished, dropped to user space virtual address layout of core: overall [00002000,c0000000) core image [02000000,02d88000) ipc buffer [02d88000,02d89000) boot_info [02d89000,02d8b000) stack area [40000000,50000000) Warning: need physical memory, but Platform object not constructed yet Warning: need physical memory, but Platform object not constructed yet Warning: need physical memory, but Platform object not constructed yet Warning: need physical memory, but Platform object not constructed yet :phys_alloc: Allocator 0x2804018 dump: Block: [00200000,00201000) size=4K avail=0 max_avail=0 Block: [00201000,00202000) size=4K avail=0 max_avail=0 Block: [00202000,00203000) size=4K avail=0 max_avail=0 Block: [00203000,00204000) size=4K avail=0 max_avail=0 Block: [00204000,00205000) size=4K avail=0 max_avail=0 Block: [00205000,00206000) size=4K avail=0 max_avail=0 Block: [00206000,00207000) size=4K avail=0 max_avail=0 Block: [00207000,00208000) size=4K avail=0 max_avail=0 Block: [00208000,00209000) size=4K avail=0 max_avail=0 Block: [00209000,0020a000) size=4K avail=0 max_avail=0 Block: [0020a000,0020b000) size=4K avail=0 max_avail=0 Block: [0020b000,0020c000) size=4K avail=0 max_avail=0 Block: [0020c000,0020d000) size=4K avail=0 max_avail=0 Block: [01006000,01007000) size=4K avail=0 max_avail=0 Block: [01007000,01008000) size=4K avail=0 max_avail=0 Block: [01008000,01009000) size=4K avail=0 max_avail=0 Block: [01009000,0100a000) size=4K avail=0 max_avail=0 Block: [0100a000,0100b000) size=4K avail=0 max_avail=0 Block: [0100b000,0100c000) size=4K avail=0 max_avail=0 Block: [0100c000,0100d000) size=4K avail=0 max_avail=0 Block: [0100d000,0100e000) size=4K avail=0 max_avail=0 Block: [0100e000,0100f000) size=4K avail=0 max_avail=0 Block: [0100f000,01010000) size=4K avail=0 max_avail=0 Block: [01010000,01011000) size=4K avail=0 max_avail=0 Block: [01011000,01012000) size=4K avail=0 max_avail=0 Block: [01012000,01013000) size=4K avail=0 max_avail=0 Block: [01013000,01014000) size=4K avail=0 max_avail=0 Block: [01014000,01015000) size=4K avail=0 max_avail=0 Block: [01015000,01016000) size=4K avail=0 max_avail=0 Block: [01016000,01017000) size=4K avail=0 max_avail=0 Block: [01017000,01018000) size=4K avail=0 max_avail=0 Block: [01018000,01019000) size=4K avail=0 max_avail=0 Block: [01019000,0101a000) size=4K avail=0 max_avail=0 Block: [0101a000,0101b000) size=4K avail=0 max_avail=0 Block: [0101b000,0101c000) size=4K avail=0 max_avail=0 Block: [0101c000,0101d000) size=4K avail=0 max_avail=0 Block: [0101d000,0101e000) size=4K avail=0 max_avail=0 Block: [0101e000,0101f000) size=4K avail=0 max_avail=0 Block: [0101f000,01020000) size=4K avail=0 max_avail=0 Block: [01020000,01021000) size=4K avail=0 max_avail=0 Block: [01021000,01022000) size=4K avail=0 max_avail=0 Block: [01022000,01023000) size=4K avail=0 max_avail=0 Block: [01023000,01024000) size=4K avail=0 max_avail=0 Block: [01024000,01025000) size=4K avail=0 max_avail=0 Block: [01025000,01026000) size=4K avail=0 max_avail=0 Block: [01026000,01027000) size=4K avail=0 max_avail=0 Block: [01027000,01028000) size=4K avail=0 max_avail=0 Block: [01028000,01029000) size=4K avail=0 max_avail=0 Block: [01029000,0102a000) size=4K avail=0 max_avail=0 Block: [0102a000,0102b000) size=4K avail=0 max_avail=400M Block: [0102b000,0102c000) size=4K avail=0 max_avail=0 Block: [0102c000,0102d000) size=4K avail=0 max_avail=0 Block: [0102d000,0102e000) size=4K avail=0 max_avail=0 Block: [0102e000,0102f000) size=4K avail=0 max_avail=0 Block: [0102f000,01030000) size=4K avail=0 max_avail=0 Block: [01030000,01031000) size=4K avail=0 max_avail=0 Block: [01031000,01032000) size=4K avail=0 max_avail=0 Block: [01032000,01033000) size=4K avail=0 max_avail=0 Block: [01033000,01034000) size=4K avail=0 max_avail=0 Block: [01034000,01035000) size=4K avail=0 max_avail=0 Block: [01035000,01036000) size=4K avail=0 max_avail=0 Block: [01036000,01037000) size=4K avail=0 max_avail=0 Block: [01037000,01038000) size=4K avail=0 max_avail=0 Block: [01038000,01039000) size=4K avail=0 max_avail=0 Block: [01039000,0103a000) size=4K avail=0 max_avail=0 Block: [0103a000,0103b000) size=4K avail=0 max_avail=0 Block: [0103b000,0103c000) size=4K avail=0 max_avail=0 Block: [0103c000,0103d000) size=4K avail=0 max_avail=0 Block: [0103d000,0103e000) size=4K avail=0 max_avail=0 Block: [0103e000,0103f000) size=4K avail=0 max_avail=0 Block: [0103f000,01040000) size=4K avail=0 max_avail=0 Block: [01040000,01041000) size=4K avail=0 max_avail=0 Block: [01041000,01042000) size=4K avail=0 max_avail=0 Block: [01042000,01043000) size=4K avail=0 max_avail=400M Block: [01043000,01044000) size=4K avail=0 max_avail=0 Block: [01044000,01045000) size=4K avail=0 max_avail=0 Block: [01045000,01046000) size=4K avail=0 max_avail=0 Block: [01046000,01047000) size=4K avail=0 max_avail=0 Block: [01047000,01048000) size=4K avail=0 max_avail=0 Block: [01048000,01049000) size=4K avail=0 max_avail=0 Block: [01049000,0104a000) size=4K avail=0 max_avail=0 Block: [0104a000,0104b000) size=4K avail=0 max_avail=0 Block: [0104b000,0104c000) size=4K avail=0 max_avail=0 Block: [0104c000,0104d000) size=4K avail=0 max_avail=0 Block: [0104d000,0104e000) size=4K avail=0 max_avail=0 Block: [0104e000,0104f000) size=4K avail=0 max_avail=400M Block: [0104f000,01050000) size=4K avail=0 max_avail=0 Block: [01050000,01051000) size=4K avail=0 max_avail=3764K Block: [01051000,01052000) size=4K avail=0 max_avail=0 Block: [01052000,01053000) size=4K avail=0 max_avail=3764K Block: [01053000,01400000) size=3764K avail=3764K max_avail=3764K Block: [01800000,01801000) size=4K avail=0 max_avail=400M Block: [01801000,02000000) size=8188K avail=8188K max_avail=8188K Block: [03000000,1c000000) size=400M avail=400M max_avail=400M Block: [1e000000,1ebe0000) size=12160K avail=12160K max_avail=12160K => mem_size=444493824 (423 MB) / mem_avail=444121088 (423 MB) :unused_phys_alloc:Allocator 0x28094dc dump: Block: [00100000,00200000) size=1M avail=1M max_avail=1M Block: [0020d000,01006000) size=14308K avail=14308K max_avail=14308K Block: [01400000,01800000) size=4M avail=4M max_avail=4M Block: [02000000,03000000) size=16M avail=16M max_avail=32M Block: [1c000000,1e000000) size=32M avail=32M max_avail=32M Block: [1ebe0000,1f000000) size=4224K avail=4224K max_avail=32M Block: [fec00000,fec01000) size=4K avail=4K max_avail=4K Block: [fee00000,fee01000) size=4K avail=4K max_avail=64K Block: [ffff0000,ffffffff] size=64K avail=64K max_avail=64K => mem_size=74625024 (71 MB) / mem_avail=74625024 (71 MB) :unused_virt_alloc:Allocator 0x280a548 dump: Block: [00002000,02000000) size=32760K avail=32760K max_avail=32760K Block: [02d8b000,04d8b000) size=32M avail=0 max_avail=0 Block: [04d8b000,40000000) size=969172K avail=969172K max_avail=1792M Block: [50000000,c0000000) size=1792M avail=1792M max_avail=1792M => mem_size=2938580992 (2802 MB) / mem_avail=2905026560 (2770 MB) :virt_alloc: Allocator 0x2805084 dump: Block: [02842000,02843000) size=4K avail=0 max_avail=0 Block: [02843000,02844000) size=4K avail=0 max_avail=0 Block: [02844000,02845000) size=4K avail=0 max_avail=32M Block: [02845000,02846000) size=4K avail=0 max_avail=0 Block: [02846000,02d88000) size=5384K avail=5384K max_avail=32M Block: [02d8b000,04d8b000) size=32M avail=32M max_avail=32M => mem_size=39084032 (37 MB) / mem_avail=39067648 (37 MB) :io_mem_alloc: Allocator 0x28060fc dump: Block: [00000000,00100000) size=1M avail=1M max_avail=1M Block: [1f000000,fec00000) size=3580M avail=3580M max_avail=3580M Block: [fec01000,fee00000) size=2044K avail=2044K max_avail=18364K Block: [fee01000,ffff0000) size=18364K avail=18364K max_avail=18364K => mem_size=3775848448 (3600 MB) / mem_avail=3775848448 (3600 MB) boot module 'acpi_drv' (96740 bytes) boot module 'nit_focus' (73404 bytes) boot module 'status_bar' (114128 bytes) boot module 'init' (254840 bytes) boot module 'platform_drv' (285668 bytes) boot module 'ps2_drv' (119592 bytes) boot module 'testnit' (84060 bytes) boot module 'global_keys_handler' (127104 bytes) boot module 'config' (7527 bytes) boot module 'launchpad.config' (594 bytes) boot module 'ld.lib.so' (702836 bytes) boot module 'rom_filter' (91040 bytes) boot module 'timer' (89820 bytes) boot module 'pointer' (129336 bytes) boot module 'report_rom' (101204 bytes) boot module 'nitpicker' (296548 bytes) boot module 'scout' (1703900 bytes) boot module 'fb_boot_drv' (100756 bytes) boot module 'liquid_fb' (249004 bytes) boot module 'launchpad' (740628 bytes) boot module 'nitlog' (124752 bytes) Warning: need physical memory, but Platform object not constructed yet Warning: need physical memory, but Platform object not constructed yet Genode 17.11 423 MiB RAM and 261141 caps assigned to init Warning: void Genode::Rpc_cap_factory::free(Genode::Native_capability) not implemented - resources leaked: 0x1 Warning: void Genode::Rpc_cap_factory::free(Genode::Native_capability) not implemented - resources leaked: 0x2 Warning: void Genode::Rpc_cap_factory::free(Genode::Native_capability) not implemented - resources leaked: 0x4 Warning: void Genode::Rpc_cap_factory::free(Genode::Native_capability) not implemented - resources leaked: 0x8 Warning: void Genode::Rpc_cap_factory::free(Genode::Native_capability) not implemented - resources leaked: 0x10 [init] child "nitpicker_config" announces service "ROM" [init] child "report_rom" announces service "Report" [init] child "report_rom" announces service "ROM" [init] child "acpi_report_rom" announces service "Report" [init] child "acpi_report_rom" announces service "ROM" [init] child "timer" announces service "Timer" [init -> nitpicker_config] Warning: top-level node <xray> missing in input ROM xray [init -> fb_boot_drv] Framebuffer with 1920x1200x32 @ 0x80000000 type=1 pitch=7680 [init -> nitpicker_config] Warning: could not obtain input value for input xray_enabled [init] child "fb_boot_drv" announces service "Framebuffer" Warning: void Genode::Rpc_cap_factory::free(Genode::Native_capability) not implemented - resources leaked: 0x20 [init -> acpi_drv] Found MADT [init -> acpi_drv] MADT IRQ 0 -> GSI 2 flags: 0 [init -> acpi_drv] MADT IRQ 9 -> GSI 9 flags: 13 [init -> acpi_drv] Found MCFG [init -> acpi_drv] MCFG BASE 0xe0000000 seg 0x0 bus 0x0-0xff Warning: void Genode::Rpc_cap_factory::free(Genode::Native_capability) not implemented - resources leaked: 0x40 Warning: void Genode::Rpc_cap_factory::free(Genode::Native_capability) not implemented - resources leaked: 0x80 [init] child "platform_drv" announces service "Platform" [init -> ps2_drv] Error: no data available [init -> ps2_drv] Error: no data available [init -> ps2_drv] i8042: self test failed (0x23) [init -> ps2_drv] Error: failed to read from port [init -> ps2_drv] Warning: scan code setting not supported [init -> ps2_drv] Using keyboard with scan code set 1 [init -> ps2_drv] Error: failed to read from port [init -> ps2_drv] Warning: could not reset mouse (missing ack) [init -> ps2_drv] Error: failed to read from port [init -> ps2_drv] Warning: could not reset mouse (unexpected response) [init -> ps2_drv] Error: failed to read from port [init -> ps2_drv] Error: failed to read from port [init -> ps2_drv] Warning: could not enable stream [init -> ps2_drv] Error: failed to read from port [init -> ps2_drv] Error: failed to read from port [init -> ps2_drv] Error: failed to read from port [init -> platform_drv] PS2 uses IRQ, vector 0x1 [init -> platform_drv] PS2 uses IRQ, vector 0xc [init -> ps2_drv] Error: failed to read from port [init -> ps2_drv] Warning: setting of mode indicators failed (0xed) [init -> ps2_drv] Error: failed to read from port [init -> ps2_drv] Warning: setting of mode indicators failed (0xed) [init -> ps2_drv] Error: failed to read from port [init -> ps2_drv] Warning: setting of mode indicators failed (0xed) [init] child "ps2_drv" announces service "Input" [init] child "nitpicker" announces service "Nitpicker" Warning: flush page table entries - mapping cache full - PD: init -> fb_boot_drv [init -> scout] png is 101 x 92, depth=8 Warning: flush page table entries - mapping cache full - PD: init -> fb_boot_drv Warning: flush page table entries - mapping cache full - PD: init -> nitpicker * Minnowboard ********************************** Booting `Genode on seL4' WARNING: no console will be available to OS Bender: Hello World. framebuffer at [80000000+808ca000) 1920x1200@32 framebuffer at [80000000+808ca000) 1920x1200@32 Boot config: parsing cmdline 'sel4 disable_iommu' Boot config: console_port = 0x3f8 Boot config: debug_port = 0x3f8 Boot config: disable_iommu = true module #0: start=0xf9b8000 end=0xffff228 size=0x647228 name='image.elf' Physical Memory Region from 0 size 8f000 type 1 Physical Memory Region from 8f000 size 1000 type 4 Physical Memory Region from 90000 size e000 type 1 Physical Memory Region from 9e000 size 62000 type 2 Physical Memory Region from 100000 size 1ff00000 type 1 Adding physical memory region 0x100000-0x1f800000 Physical Memory Region from 20000000 size 100000 type 2 Physical Memory Region from 20100000 size 587d1000 type 1 Physical Memory Region from 788d1000 size 100000 type 2 Physical Memory Region from 789d1000 size 200000 type 20 Physical Memory Region from 78bd1000 size 600000 type 2 Physical Memory Region from 791d1000 size 100000 type 4 Physical Memory Region from 792d1000 size 40000 type 3 Physical Memory Region from 79311000 size cef000 type 1 Physical Memory Region from 7a000000 size 800000 type 2 Physical Memory Region from 7ae00000 size 5200000 type 2 Physical Memory Region from e00f8000 size 1000 type 2 Physical Memory Region from fed01000 size 1000 type 2 Got framebuffer info in multiboot2. Current video mode is at physical address=80000000 pitch=7680 resolution=1920x1200@32 type=1 Detected 1 boot module(s): Kernel loaded to: start=0x200000 end=0x27e000 size=0x7e000 entry=0x20007e ACPI: RSDT paddr=0x7930f074 ACPI: RSDT vaddr=0xdff0f074 ACPI: FADT paddr=0x7930e000 ACPI: FADT vaddr=0xdff0e000 ACPI: FADT flags=0x4a1 ACPI: MADT paddr=0x7930b000 ACPI: MADT vaddr=0xdff0b000 ACPI: MADT apic_addr=0xfee00000 ACPI: MADT flags=0x1 ACPI: MADT_APIC apic_id=0x0 ACPI: MADT_APIC apic_id=0x4 ACPI: MADT_IOAPIC ioapic_id=2 ioapic_addr=0xfec00000 gsib=0 ACPI: MADT_ISO bus=0 source=0 gsi=2 flags=0x0 ACPI: MADT_ISO bus=0 source=9 gsi=9 flags=0xd ACPI: 2 CPU(s) detected ELF-loading userland images from boot modules: size=0xd88000 v_entry=0x2000000 v_start=0x2000000 v_end=0x2d88000 p_start=0x10000000 p_end=0x10d88000 Moving loaded userland images to final location: from=0x10000000 to=0x27e000 size=0xd88000 Starting node #0 with APIC ID 0 Starting node #1 with APIC ID 4 Booting all finished, dropped to user space virtual address layout of core: overall [00002000,c0000000) core image [02000000,02d88000) ipc buffer [02d88000,02d89000) boot_info [02d89000,02d8b000) stack area [40000000,50000000) Warning: need physical memory, but Platform object not constructed yet Warning: need physical memory, but Platform object not constructed yet :phys_alloc: Allocator 0x2804018 dump: Block: [00200000,00201000) size=4K avail=0 max_avail=0 Block: [00201000,00202000) size=4K avail=0 max_avail=0 Block: [00202000,00203000) size=4K avail=0 max_avail=0 Block: [00203000,00204000) size=4K avail=0 max_avail=0 Block: [00204000,00205000) size=4K avail=0 max_avail=0 Block: [00205000,00206000) size=4K avail=0 max_avail=0 Block: [00206000,00207000) size=4K avail=0 max_avail=0 Block: [00207000,00208000) size=4K avail=0 max_avail=0 Block: [00208000,00209000) size=4K avail=0 max_avail=0 Block: [00209000,0020a000) size=4K avail=0 max_avail=0 Block: [0020a000,0020b000) size=4K avail=0 max_avail=0 Block: [0020b000,0020c000) size=4K avail=0 max_avail=0 Block: [0020c000,0020d000) size=4K avail=0 max_avail=0 Block: [01006000,01007000) size=4K avail=0 max_avail=0 Block: [01007000,01008000) size=4K avail=0 max_avail=0 Block: [01008000,01009000) size=4K avail=0 max_avail=0 Block: [01009000,0100a000) size=4K avail=0 max_avail=0 Block: [0100a000,0100b000) size=4K avail=0 max_avail=0 Block: [0100b000,0100c000) size=4K avail=0 max_avail=0 Block: [0100c000,0100d000) size=4K avail=0 max_avail=0 Block: [0100d000,0100e000) size=4K avail=0 max_avail=0 Block: [0100e000,0100f000) size=4K avail=0 max_avail=0 Block: [0100f000,01010000) size=4K avail=0 max_avail=0 Block: [01010000,01011000) size=4K avail=0 max_avail=0 Block: [01011000,01012000) size=4K avail=0 max_avail=0 Block: [01012000,01013000) size=4K avail=0 max_avail=0 Block: [01013000,01014000) size=4K avail=0 max_avail=0 Block: [01014000,01015000) size=4K avail=0 max_avail=0 Block: [01015000,01016000) size=4K avail=0 max_avail=0 Block: [01016000,01017000) size=4K avail=0 max_avail=0 Block: [01017000,01018000) size=4K avail=0 max_avail=0 Block: [01018000,01019000) size=4K avail=0 max_avail=0 Block: [01019000,0101a000) size=4K avail=0 max_avail=0 Block: [0101a000,0101b000) size=4K avail=0 max_avail=0 Block: [0101b000,0101c000) size=4K avail=0 max_avail=0 Block: [0101c000,0101d000) size=4K avail=0 max_avail=0 Block: [0101d000,0101e000) size=4K avail=0 max_avail=0 Block: [0101e000,0101f000) size=4K avail=0 max_avail=0 Block: [0101f000,01020000) size=4K avail=0 max_avail=0 Block: [01020000,01021000) size=4K avail=0 max_avail=0 Block: [01021000,01022000) size=4K avail=0 max_avail=0 Block: [01022000,01023000) size=4K avail=0 max_avail=0 Block: [01023000,01024000) size=4K avail=0 max_avail=0 Block: [01024000,01025000) size=4K avail=0 max_avail=0 Block: [01025000,01026000) size=4K avail=0 max_avail=434172K Block: [01026000,01027000) size=4K avail=0 max_avail=0 Block: [01027000,01028000) size=4K avail=0 max_avail=0 Block: [01028000,01029000) size=4K avail=0 max_avail=0 Block: [01029000,0102a000) size=4K avail=0 max_avail=0 Block: [0102a000,0102b000) size=4K avail=0 max_avail=0 Block: [0102b000,0102c000) size=4K avail=0 max_avail=0 Block: [0102c000,0102d000) size=4K avail=0 max_avail=0 Block: [0102d000,0102e000) size=4K avail=0 max_avail=0 Block: [0102e000,0102f000) size=4K avail=0 max_avail=0 Block: [0102f000,01030000) size=4K avail=0 max_avail=0 Block: [01030000,01031000) size=4K avail=0 max_avail=0 Block: [01031000,01032000) size=4K avail=0 max_avail=0 Block: [01032000,01033000) size=4K avail=0 max_avail=0 Block: [01033000,01034000) size=4K avail=0 max_avail=0 Block: [01034000,01035000) size=4K avail=0 max_avail=0 Block: [01035000,01036000) size=4K avail=0 max_avail=0 Block: [01036000,01037000) size=4K avail=0 max_avail=0 Block: [01037000,01038000) size=4K avail=0 max_avail=0 Block: [01038000,01039000) size=4K avail=0 max_avail=0 Block: [01039000,0103a000) size=4K avail=0 max_avail=0 Block: [0103a000,0103b000) size=4K avail=0 max_avail=0 Block: [0103b000,0103c000) size=4K avail=0 max_avail=0 Block: [0103c000,0103d000) size=4K avail=0 max_avail=0 Block: [0103d000,0103e000) size=4K avail=0 max_avail=434172K Block: [0103e000,0103f000) size=4K avail=0 max_avail=0 Block: [0103f000,01040000) size=4K avail=0 max_avail=0 Block: [01040000,01041000) size=4K avail=0 max_avail=0 Block: [01041000,01042000) size=4K avail=0 max_avail=0 Block: [01042000,01043000) size=4K avail=0 max_avail=0 Block: [01043000,01044000) size=4K avail=0 max_avail=0 Block: [01044000,01045000) size=4K avail=0 max_avail=0 Block: [01045000,01046000) size=4K avail=0 max_avail=0 Block: [01046000,01047000) size=4K avail=0 max_avail=0 Block: [01047000,01048000) size=4K avail=0 max_avail=0 Block: [01048000,01049000) size=4K avail=0 max_avail=0 Block: [01049000,0104a000) size=4K avail=0 max_avail=434172K Block: [0104a000,0104b000) size=4K avail=0 max_avail=0 Block: [0104b000,0104c000) size=4K avail=0 max_avail=0 Block: [0104c000,0104d000) size=4K avail=0 max_avail=0 Block: [0104d000,0104e000) size=4K avail=0 max_avail=3780K Block: [0104e000,0104f000) size=4K avail=0 max_avail=0 Block: [0104f000,01400000) size=3780K avail=3780K max_avail=3780K Block: [01800000,01801000) size=4K avail=0 max_avail=434172K Block: [01801000,1c000000) size=434172K avail=434172K max_avail=434172K Block: [1f000000,1f3e0000) size=3968K avail=3968K max_avail=3968K => mem_size=452882432 (431 MB) / mem_avail=452526080 (431 MB) :unused_phys_alloc:Allocator 0x28094dc dump: Block: [00100000,00200000) size=1M avail=1M max_avail=1M Block: [0020d000,01006000) size=14308K avail=14308K max_avail=14308K Block: [01400000,01800000) size=4M avail=4M max_avail=4M Block: [1c000000,1f000000) size=48M avail=48M max_avail=48M Block: [1f3e0000,1f800000) size=4224K avail=4224K max_avail=4224K Block: [fec00000,fec01000) size=4K avail=4K max_avail=4224K Block: [fee00000,fee01000) size=4K avail=4K max_avail=64K Block: [ffff0000,ffffffff] size=64K avail=64K max_avail=64K => mem_size=74625024 (71 MB) / mem_avail=74625024 (71 MB) :unused_virt_alloc:Allocator 0x280a548 dump: Block: [00002000,02000000) size=32760K avail=32760K max_avail=32760K Block: [02d8b000,04d8b000) size=32M avail=0 max_avail=0 Block: [04d8b000,40000000) size=969172K avail=969172K max_avail=1792M Block: [50000000,c0000000) size=1792M avail=1792M max_avail=1792M => mem_size=2938580992 (2802 MB) / mem_avail=2905026560 (2770 MB) :virt_alloc: Allocator 0x2805084 dump: Block: [02842000,02843000) size=4K avail=0 max_avail=0 Block: [02843000,02844000) size=4K avail=0 max_avail=0 Block: [02844000,02d88000) size=5392K avail=5392K max_avail=32M Block: [02d8b000,04d8b000) size=32M avail=32M max_avail=32M => mem_size=39084032 (37 MB) / mem_avail=39075840 (37 MB) :io_mem_alloc: Allocator 0x28060fc dump: Block: [00000000,00100000) size=1M avail=1M max_avail=1M Block: [1f800000,fec00000) size=3572M avail=3572M max_avail=3572M Block: [fec01000,fee00000) size=2044K avail=2044K max_avail=18364K Block: [fee01000,ffff0000) size=18364K avail=18364K max_avail=18364K => mem_size=3767459840 (3592 MB) / mem_avail=3767459840 (3592 MB) boot module 'acpi_drv' (96740 bytes) boot module 'nit_focus' (73404 bytes) boot module 'status_bar' (114128 bytes) boot module 'init' (254840 bytes) boot module 'platform_drv' (285668 bytes) boot module 'ps2_drv' (119592 bytes) boot module 'testnit' (84060 bytes) boot module 'global_keys_handler' (127104 bytes) boot module 'config' (7527 bytes) boot module 'launchpad.config' (594 bytes) boot module 'ld.lib.so' (702836 bytes) boot module 'rom_filter' (91040 bytes) boot module 'timer' (89820 bytes) boot module 'pointer' (129336 bytes) boot module 'report_rom' (101204 bytes) boot module 'nitpicker' (296548 bytes) boot module 'scout' (1703900 bytes) boot module 'fb_boot_drv' (100756 bytes) boot module 'liquid_fb' (249004 bytes) boot module 'launchpad' (740628 bytes) boot module 'nitlog' (124752 bytes) Warning: need physical memory, but Platform object not constructed yet Genode 17.11 431 MiB RAM and 261141 caps assigned to init Warning: void Genode::Rpc_cap_factory::free(Genode::Native_capability) not implemented - resources leaked: 0x1 Warning: void Genode::Rpc_cap_factory::free(Genode::Native_capability) not implemented - resources leaked: 0x2 Warning: void Genode::Rpc_cap_factory::free(Genode::Native_capability) not implemented - resources leaked: 0x4 Warning: void Genode::Rpc_cap_factory::free(Genode::Native_capability) not implemented - resources leaked: 0x8 Warning: void Genode::Rpc_cap_factory::free(Genode::Native_capability) not implemented - resources leaked: 0x10 [init] child "acpi_report_rom" announces service "Report" [init] child "acpi_report_rom" announces service "ROM" [init] child "report_rom" announces service "Report" [init] child "report_rom" announces service "ROM" [init] child "nitpicker_config" announces service "ROM" [init] child "timer" announces service "Timer" [init -> fb_boot_drv] Framebuffer with 1920x1200x32 @ 0x80000000 type=1 pitch=7680 [init -> nitpicker_config] Warning: top-level node <xray> missing in input ROM xray [init -> nitpicker_config] Warning: could not obtain input value for input xray_enabled [init -> acpi_drv] Found MADT [init -> acpi_drv] MADT IRQ 0 -> GSI 2 flags: 0 [init -> acpi_drv] MADT IRQ 9 -> GSI 9 flags: 13 [init -> acpi_drv] Found MCFG [init -> acpi_drv] MCFG BASE 0xe0000000 seg 0x0 bus 0x0-0x3f Warning: void Genode::Rpc_cap_factory::free(Genode::Native_capability) not implemented - resources leaked: 0x20 [init] child "fb_boot_drv" announces service "Framebuffer" Warning: void Genode::Rpc_cap_factory::free(Genode::Native_capability) not implemented - resources leaked: 0x40 [init] child "platform_drv" announces service "Platform" -- Edward Sandberg Adventium Labs 111 3rd Avenue S. Suite #100 Minneapolis, MN 55401
Hello, On 08.12.2017 17:19, Edward Sandberg wrote:
I tried your suggestion and increased the memory for the framebuffer.The UP board booted all the way to the graphical interface, very exciting!
nice.
Unfortunately the usb keyboard and mouse do not work. The Minnowboard still does not give any graphical output. The logs for both are below.
I have found that on some hardware the OS does not know where to find the RSDP value when booting via multiboot and UEFI and as a result USB peripherals do not work. This is not just a problem with sel4 I have seen it with xen as well. That may be the problem here. I attempted to fix the problem by editing the sel4 source code. I added:
#define UPBOARD_RSDP 0x5B161000
to ./contrib/sel4-097171f475bff21223783e130445b9be6b3d1bb4/src/kernel/sel4/include/plat/pc99/plat/machine/acpi.h. Then I replaced the function acpi_get_rsdp in ./contrib/sel4-097171f475bff21223783e130445b9be6b3d1bb4/src/kernel/sel4/src/plat/pc99/machine/acpi.c with:
acpi_get_rsdp(void) { return (acpi_rsdp_t*)UPBOARD_RSDP; }
But either my intuition about the problem is wrong or I am attempting to fix it incorrectly. I get exactly the same logs with or without the above fixes.
acpi_get_rsdp is not called for Multiboot2(MBI2)/UEFI case. The RSDP information is expected to be part of MBI2. The function try_boot_sys_mbi2 in contrib/sel4-097171f475bff21223783e130445b9be6b3d1bb4/src/kernel/sel4/src/arch/x86/kernel/boot_sys.c looks up the information and copies it to boot_state.acpi_rsdp.
Do you have any suggestions on the keyboard and mouse?
Yes, if you look at the lines about the boot modules
boot module 'acpi_drv' (96740 bytes) ...
you will miss a line about the usb driver. In the demo run scenario the usb driver is not started for x86, instead the ps2 driver is taken. You would need to adjust the demo scenario to use the usb driver instead of the ps2 driver. (Or at best use both drivers and add a input multiplexer, e.g. [0], which takes both drivers as input sources). Beforehand you may just try the usb_hid [1] scenario to actual test whether usb in general work on your machine(s). [0] repos/os/src/server/input_merger/README [1] repos/dde_linux/run/usb_hid.run -- Alexander Boettcher Genode Labs http://www.genode-labs.com - http://www.genode.org Genode Labs GmbH - Amtsgericht Dresden - HRB 28424 - Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
Hey Alexander,
Thanks to your suggestion I now have the UP board booting via UEFI and
USB input is working as expected. Thanks for your help. I am happy to
help test any UEFI modifications you make in future releases. For
anyone who is interested in reproducing this I will summarize what I did
to get a working demo built.
I created a build dir that specifies the sel4 kernel. This option is
listed as deprecated but it still works.
$ ./tool/create_builddir sel4_x86_32 build_sel4
I modified the build.conf file to build a UEFI image rather than and iso
for qemu and I enabled the libports and dde_linux repos. I pasted the
full text of my build.conf below.
I then modified the demo.run file to:
* remove ps2_drv
* remove fb_drv
* add fb_boot_drv
* add usb_drv
The usb_drv sections were copied from repos/dde_linux/run/usb_hid.run
but I removed the portions that referred to capslock, numlock and
scrlock as they were causing errors that interfered with the boot
process. I pasted the full text of my modified demo.run below.
Then all I had to do was prepare the dde_linux port and build my image:
$ ./tool/ports/prepare_port dde_linux
$ make run/demo
####### etc/build.conf #######
GENODE_DIR := /home/esandberg/projects/embedded/genode-17.11/genode-17.11
BASE_DIR := $(GENODE_DIR)/repos/base
CONTRIB_DIR := $(GENODE_DIR)/contrib
MAKE += -j4
KERNEL ?= sel4
KERNEL_RUN_OPT(sel4) := --include image/uefi
RUN_OPT += ${KERNEL_RUN_OPT(${KERNEL})} --include boot_dir/$(KERNEL)
REPOSITORIES += $(GENODE_DIR)/repos/base-$(KERNEL)
REPOSITORIES += $(GENODE_DIR)/repos/base
REPOSITORIES += $(GENODE_DIR)/repos/os
REPOSITORIES += $(GENODE_DIR)/repos/demo
REPOSITORIES += $(GENODE_DIR)/repos/libports
REPOSITORIES += $(GENODE_DIR)/repos/dde_linux
####### repos/os/run/demo.run #######
#
# Build
#
if {[have_spec odroid_xu]} {
puts "Run script does not support this platform."
exit 0
}
set build_components {
core init
drivers/timer
server/nitpicker app/pointer app/status_bar app/global_keys_handler
app/nit_focus
server/liquid_framebuffer app/launchpad app/scout
test/nitpicker server/nitlog
drivers/framebuffer drivers/input
server/report_rom server/rom_filter
drivers/usb
}
proc gpio_drv { } { if {[have_spec rpi] && [have_spec hw]} { return
hw_gpio_drv }
if {[have_spec rpi] && [have_spec foc]} { return
foc_gpio_drv }
return gpio_drv }
source ${genode_dir}/repos/base/run/platform_drv.inc
lappend_if [need_usb_hid] build_components drivers/usb
lappend_if [have_spec gpio] build_components drivers/gpio
append_platform_drv_build_components
build $build_components
create_boot_directory
#
# Generate config
#
append config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<default caps="100"/>}
append config {
<start name="usb_drv" caps="120">
<resource name="RAM" quantum="16M"/>
<provides><service name="Input"/></provides>
<config uhci="yes" ohci="yes" ehci="yes" xhci="yes"
bios_handoff="no">
<hid/>
</config>
<route>
<service name="ROM"> <parent/> </service>
<service name="CPU"> <parent/> </service>
<service name="PD"> <parent/> </service>
<service name="IO_PORT"> <parent/> </service>
<service name="IO_MEM"> <parent/> </service>
<service name="LOG"> <parent/> </service>
<service name="RM"> <parent/> </service>
<service name="Platform"> <any-child/> </service>
<service name="Timer"> <child name="timer"/> </service>
</route>
</start> }
append_if [have_spec sdl] config {
<start name="fb_sdl">
<resource name="RAM" quantum="12M"/>
<provides>
<service name="Input"/>
<service name="Framebuffer"/>
</provides>
</start>}
append_platform_drv_config
append_if [have_spec framebuffer] config {
<start name="fb_boot_drv">
<resource name="RAM" quantum="12M"/>
<provides><service name="Framebuffer"/></provides>
</start>}
append_if [have_spec gpio] config "
One more data point, ethernet also seems to be working. I compiled a UEFI image from the tcp_terminal example in the gems repo. I can now happily recommend the UP hardware (Atom) as an embedded platform for seL4 with driver support courtesy of Genode. -- Edward Sandberg Adventium Labs 111 3rd Avenue S. Suite #100 Minneapolis, MN 55401
participants (2)
-
Alexander Boettcher
-
Edward Sandberg