[PATCH 2/8] arm64/kernel: reuse boot_args array to get to __fdt_pointer
Ard Biesheuvel
ard.biesheuvel at linaro.org
Mon Apr 4 08:19:15 PDT 2016
On 4 April 2016 at 17:13, James Morse <james.morse at arm.com> wrote:
> Hi Ard,
>
> On 04/04/16 15:52, Ard Biesheuvel wrote:
>> Since we record the boot_args [x0 .. x3] early at boot anyway, there is
>> no need to keep the FDT address in a callee saved register with file scope
>> in head.S. So simply refer to boot_args[0] directly in the call to
>> setup_machine(), and drop the handling of x21 from head.S entirely.
>
> Won't this break Big Endian?
> (or more accurately: bootloader-endian != kernel-endian)
>
> The stores in preserve_boot_args happen before the EE/E0E bits have been
> set/cleared by el2_setup(), so they happen with boot-loader:endianness. The
> loads after el2_setup() happen with kernel:endianness.
>
That is a very good point.
More information about the linux-arm-kernel
mailing list