Skip to content

UEFI boot should avoid using the lower 1MB of physical RAM #311

Description

@jasoncouture

When activating additional CPUs they will start in real mode.
Trampoline assembly is used to initialize them, after issuing two IPI (inter processor interrupts) (INIT and START) via the APIC.

The start IPI sends the starting code segment for real mode, which is limited to the lower 1MB of memory.

The maximum physical memory address for real mode is FFFFF, which equates to segment F0, offset FFFF

Currently, the bootloader, in UEFI mode, will allocate pages starting near page 0, leaving no space left to place the IPI trampoline.

We could achieve this by allocating all pages below 1MB using UEFI allocate page function in a loop, and freeing them immediately preceding the call to exit boot services. This would ensure the UEFI loader does not allocate and reserve physical pages below 1MB.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions