Skip to content

Remapping UEFI runtime services via set_virtual_address_map() breaks the SystemTable struct #278

Closed
@foxcob

Description

@foxcob

When remapping the UEFI runtime code and data memory regions, if the the region containing the UEFI SystemTable is remapped, the existing SystemTable struct will continue to keep a pointer to the old physical location and likely result in a crash if accessed again.

A method needs to be provided to construct a new SystemTable from the existing with a new internal virtual address.

The way this makes the most sense to me is to pass the newly translated address into the call to set_virtual_address_map() and have set_virtual_adddress_map return a new SystemTable. Maybe it should consume the existing table as well.

A separate method could also be provided. As it is now, no public method exists for creating a new SystemTable and so the runtime services are useless if the UEFI memory regions are relocated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions