Skip to content
This repository was archived by the owner on Oct 18, 2025. It is now read-only.
This repository was archived by the owner on Oct 18, 2025. It is now read-only.

Big-endian support #72

@Gelbpunkt

Description

@Gelbpunkt

Hi there, I've been running into some issues with this crate when the CPU is in big-endian mode (i.e. the code compiled for aarch64_be). It appears that the crate assumes the endianess of the CPU to be little endian.

The GIC-600 technical reference manual states:

The GIC-600 supports data only in little-endian format.

And the Linux kernel also converts all data accesses from little endian to current CPU endianess and back. Something similar should probably be done here.

To my understanding, only the memory-mapped IO accesses need to be endian aware, since ARM endianess only affects load/store. It seems like safe-mmio is not endian aware.

It seems that this patch gets it working as intended: Gelbpunkt/safe-mmio@9ba84bf (but I assume you'll want something nicer for configurable endianess of the MMIO)

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