grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] arm: Align section alignment with manual relocation offset c


From: Julien ROBIN
Subject: Re: [PATCH] arm: Align section alignment with manual relocation offset code
Date: Mon, 29 Apr 2019 19:35:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Seems that this patch is a step forward for arm-efi (32 bits), and doesn't affect others EFI targets (arm64-efi, i386-efi and x86_64-efi are still working fine, including the aarch64-laptop). So it's definitely better than nothing. However, for arm-efi (32 bits), as opposed to the previously suggested revert, this patch fails with some QEMU firmwares :

  • --target=aarch64-linux-gnu  --with-platform=efi
    • fine with QEMU
    • fine with Asus NovaGo TP370QL (Qualcomm Snapdragon 835)
  • --target=i386  --with-platform=efi
    • fine with QEMU
  • --target=x86_64  --with-platform=efi
    • fine with QEMU
    • fine with an Asus R510JK-DM086H (Intel Core-i5 4200H)

Screencap of the arm-efi error is attached, with a "Debug" firmware, in case it's possible to learn something from the displayed error.
Instructions I followed to create the efi files, and to run QEMU against an USB stick image containing those files, are attached too.
I can confirm that the previously suggested revert works fine with arm-efi and the same firmware, so the failure is linked to the new alignment.

May be something more in the code should be changed somewhere else to follow the new alignment ? Or some differences between firmwares involved in the test ?

Best regards,
Julien


On 4/29/19 11:07 AM, Daniel Kiper wrote:
On Sun, Apr 28, 2019 at 12:55:42AM +0200, Alexander Graf wrote:
The arm relocation code has a manual special case for EFI binaries to
add the natural alignment to its own relocation awareness.

Since commit a51f953f4ee87 ("mkimage: Align efi sections on 4k
boundary") we changed that alignment from 0x400 to 0x1000 bytes. Reflect
the change in that branch that we forgot as well.

This fixes running 32bit arm grub efi binaries for me again.

Fixes: a51f953f4ee87 ("mkimage: Align efi sections on 4k boundary")
Reported-by: Heinrich Schuchardt <address@hidden>
Reported-by: Steve McIntyre <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
Reviewed-by: Daniel Kiper <address@hidden>

However, I will apply this patch if I get some Tested-by and I am sure
that other EFI targets are not affected.

Daniel

PS FYI, I am on vacation this week. So, I will take care about
   urgent stuff only. Sorry about that.

Attachment: Screenshot from 2019-04-29 19-01-41.png
Description: PNG image

Attachment: grub-efi-esp-arm-intel-32-64-test.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]