Skip to content

entry_offset wrong/deprected for recent linux kernels #131

@userid0x0

Description

@userid0x0

Hi,
I noticed the entry_offset in https://github.com/seL4/camkes-vm/blob/master/templates/seL4VMParameters.template.c#L23 is set to a deprecated value of 0x80000 for ARMv8/9. Within the Linux 5.8-5.10 timeframe the mandatory offset of 0x80000 was removed, compare [1]. This causes recent kernels to emit a error message [Firmware Bug]: Kernel image misaligned at boot, please fix your bootloader!.

The real fix would be to detect the AARCH64 image header [2] and to automatically apply the text_offset which is 0x80000 for old kernels and 0x0 for recent kernels.

[1] https://www.spinics.net/lists/arm-kernel/msg798878.html
[2] https://www.kernel.org/doc/Documentation/arm64/booting.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions