On Tue, Sep 29, 2020 at 4:49 PM Andy Shevchenko
<andy.shevche...@gmail.com> wrote:
> On Tue, Sep 29, 2020 at 5:32 PM Andrew Lunn <and...@lunn.ch> wrote:
> > On Tue, Sep 29, 2020 at 04:55:40PM +0300, Andy Shevchenko wrote:
> >  Does Tianocore, or any
> > other implementations, have the needed le32_to_cpu() calls so that
> > they can boot on a big endian CPU?
>
> Not of my knowledge.

> > Is it feasible to boot an ARM system big endian?
>
> Not an ARM guy.

Most CPUs these days support both big-endian and little-endian,
and either allow code to switch between the two modes at runtime
or are stateless in the way that you have two sets of load/store
instructions, making endianness purely a compiler construct (see
also: Intel's icc compiler has a big-endian mode using the MOVBE
instruction).

For Arm kernels, we assume that the firmware is little-endian, but
you can build a big-endian kernel that switches into big-endian
mode before doing anything else. As I said, I don't think that will
ever be used with UEFI (and ACPI, by extension), since it would
be a ton of work and few users care about big-endian kernels.

    Arnd

Reply via email to