Speaker
Yi-Yo Chiang
(Google)
Description
Android is evaluating the Linux EFI boot stub to standardize OS handoff and reduce bootloader feature duplication.
We present blockers encountered with embedded hardware constraints, and aim to discuss potential solutions.
Topics for Discussion:
-
EL2 Elevation and KVM within an EFI context
- The Problem: KVM requires booting the kernel at EL2. Since Android firmware operates at EL1, it must elevate to EL2 before kernel execution.
- Discussion: What are the options to elevate to EL2 before jumping to the kernel?
- Override UEFI
ExitBootServicesto hijack the boot flow? - Install a custom UEFI protocol callback that executes EL switch and takes over kernel jump?
- Override UEFI
-
Physical Image Placement and PE/COFF Relocation
- The Problem: The UEFI PE/COFF loader copies and relocates the kernel image to a dynamically allocated buffer address.
- The Constraint:
- Boot Latency: Copying large kernel payloads increases boot latency.
- Defeat Architectural Expectations: Hardware platforms might require the kernel image loaded at specific address ranges. The PE loader moving the kernel image around defeats this.
- Discussion: How do we eliminate unnecessary relocations and respect physical image placement done by the firmware/bootloader.