Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions build/linker/x86_64.ld
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@

ENTRY(_start)

/* 16 MiB. Modern UEFI firmware on x86_64 (OVMF on QEMU, real-world
* EDK2 builds, Lenovo / Dell / HP firmware) typically reserves the
* 0–16 MiB range for its own code, ACPI tables, and BootServices
* data. Loading the kernel above that line keeps the .data + .bss
/* 32 MiB. Modern UEFI firmware on x86_64 (OVMF on QEMU, real-world
* EDK2 builds, Lenovo / Dell / HP firmware) can reserve low memory for
* code, ACPI tables, BootServices data, and SMM communication buffers.
* Secure Boot OVMF with SMM reserves through 26 MiB. Loading the kernel
* above that line keeps the .data + .bss
* LOAD segment (~38 MiB once the 32-MiB static heap arena is
* accounted for) inside contiguous EfiConventionalMemory. The PVH
* direct-boot path (QEMU `-kernel`) honours the same ELF p_paddr,
* so this works for both protocols. */
KERNEL_LOAD_BASE = 0x1000000;
KERNEL_LOAD_BASE = 0x2000000;
KERNEL_VIRT_BASE = 0xFFFFFFFF80000000;

/* VA span reserved for the kernel image. The module text window begins
Expand Down
3 changes: 3 additions & 0 deletions build/specification/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ and CI compiler-cache integration.
- Kernel ELFs on both architectures carry a deterministic SHA-1 GNU build-ID;
linker symbols `__build_id_note_start` and `__build_id_note_end` delimit the
retained note for `/sys/kernel/notes`.
- The x86_64 ELF uses a 32 MiB physical load base for both PVH and
Multiboot2. This keeps its fixed load span above the low-memory ACPI NVS and
SMM communication reservations exposed by Secure Boot OVMF.
- Workspace: single Cargo workspace so Global LTO spans everything.

## 4. Invariants & safety properties
Expand Down
2 changes: 1 addition & 1 deletion build/xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9982,7 +9982,7 @@ interface_resolution: 1024x768
\x20 probes.\n\
\x20 -cpu max is required: the kernel uses RDTSCP / RDSEED / etc. that the\n\
\x20 default qemu64 model doesn't expose.\n\
\x20 -m 1024M leaves room for the kernel image (~52 MiB at LOAD_BASE 16 MiB)\n\
\x20 -m 1024M leaves room for the kernel image (~52 MiB at LOAD_BASE 32 MiB)\n\
\x20 + UEFI's reservations + the 32 MiB static heap arena."
);
Ok(())
Expand Down
Loading