Is there a plan to add UEFI support in seL4 for x86 hardware in the near
future?  Newer x86 boards are frequently UEFI only.  It is possible to
get around the lack of UEFI support, as I have done with the UP board:

but I am hitting problems which I will detail below.

When I compile using ia32_debug_xml_defconfig and boot using the
resulting images the board fails to find the RSDP location.  To fix this
I had to modify the source code a bit:

* seL4test/projects/util_libs/libplatsupport/src/plat/pc99/acpi/acpi.h

+    #define UPBOARD_RSDP   0x5B161000

* seL4test/projects/util_libs/libplatsupport/src/plat/pc99/acpi/acpi.c

-    acpi->rsdp = acpi_sig_search(acpi, ACPI_SIG_RSDP,
-                                 (void *) BIOS_PADDR_START, (void *)
+    acpi->rsdp = (void *)UPBOARD_RSDP;

* seL4test/kernel/src/plat/pc99/machine/acpi.c

-    for (addr = (char*)BIOS_PADDR_START; addr < (char*)BIOS_PADDR_END;
addr += 16) {
+    for (addr = (char*)0; addr < (char*)PPTR_BASE; addr += 16) {

It would be handy to have this as a kernel parameter to cover cases
where it is not successfully discovered automatically.  With these
changes I can boot the board and several tests pass but then I get stuck
on INTERRUPT0001 (Test interrupts with timer).  I don't get a test
failure or an error the board just sits and makes no more progress.
Someone had that test fail in this post:

and the first recommendation was to check if the irq of the timer was
correctly found. I booted the board into linux to find the correct irq
which was listed as 0 in /proc/interupts.  I added a printf to
handleInterrupt in the kernel source, recompiled and when I booted seL4
I found that the irq reported to handleInterrupt is 125 (which sel4
reports as the max interrupt value) every time that function is called.
Adding this printf also showed me that when the test hangs the board
hasn't crashed or locked up as calls to handleInterrupt are made

At this point I noticed that before any tests started to run several
ACPI tables are not recognized:

Parsing ACPI tables
Skipping table FPDTD, unknown
Skipping table FIDT<9c>, unknown
Skipping table UEFIB, unknown
Skipping table TPM24, unknown
Skipping table LPIT^D^A, unknown
Skipping table BCFG9^A, unknown
Skipping table PRAM0, unknown
Skipping table CSRTL^A, unknown
Skipping table BCFG9^A, unknown
Skipping table OEM0<84>, unknown
Skipping table OEM1@, unknown
Skipping table PIDVÜ, unknown
Skipping table RSCI,, unknown
Skipping table WDAT^D^A, unknown
Warning: skipping table ACPI XSDT

Maybe one or more of those tables needs to be loaded to handle
interrupts properly. The LPIT table is conspicuous in the case of the
timer test but I think other tests are likely to depend on the other tables.

Any suggestions about porting this type of hardware?

Edward Sandberg
Adventium Labs
111 3rd Avenue S. Suite #100
Minneapolis, MN 55401

Devel mailing list

Reply via email to