GNU bug report logs - #55343
Add support for 32bit UEFI

Previous Next

Package: guix-patches;

Reported by: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>

Date: Mon, 9 May 2022 23:18:02 UTC

Severity: normal

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 55343 <at> debbugs.gnu.org
Subject: [bug#55343] [PATCH 2/2] image: Add new efi32-raw format for 32bit UEFI on 64bit systems
Date: Wed, 11 May 2022 19:35:50 +0200
[Message part 1 (text/plain, inline)]
On Wed, 11 May 2022 11:07:22 +0200
Maxime Devos <maximedevos <at> telenet.be> wrote:

> Ok, --target looks like a better fit in this case.
Sorry for the previous mail, I saw this one after finishing sending the
one with a report on tests with (list #:target "i686-linux").

> Though now I'm wondering if on i686-linux we might need a grub-efi64
> variant on some setups ...
Good question.

It would require to have a computer where the UEFI implementation is
only able to launch 64bit PE files on computers with a CPU that also
support 32bit OS.

For ARM I'm not sure if we can boot 32bit kernels on 64bit CPUs: In
theory many ARM computers hardware is capable of that. However in
practice we'd need to make that kernel configurations works for that,
and platform drivers that only work for aarch64 are probably required
anyway. Maybe in case of emulation that doesn't apply though.

For x86 I didn't ear of 64bit-only UEFI with CPUs that still
support 32bit OS, but it could exist.

And according to the official GRUB documentation, it is possible to
boot 32bit OS when the UEFI is 64bit and vice versa[1]:
|                                | ia32 EFI | amd64 EFI |
| BIOS chainloading              | no (1)   | no (1)    |
| [...]                          | [...]    | [...]     |
| FreeDOS                        | no (1)   | no (1)    |
| Multiboot                      | yes      | yes       |
| Multiboot2                     | yes      | yes       |
| 32-bit Linux (legacy protocol) | no (1)   | no (1)    |
| 64-bit Linux (legacy protocol) | no (1)   | no (1)    |
| 32-bit Linux (modern protocol) | yes      | yes       |
| 64-bit Linux (modern protocol) | yes      | yes       |
| [...]                          | [...]    | [...]     |
| 32-bit EFI chainloader         | yes      | no (3)    |
| 64-bit EFI chainloader         | no (3)   | yes       |
| [...]                          | [...]    | [...]     |
1. Requires BIOS 

So there might be a use case here if such machines exist. I'll try to
look for infos on that.

References:
[1]https://www.gnu.org/software/grub/manual/grub/grub.html#Supported-boot-targets

Denis.
[Message part 2 (application/pgp-signature, inline)]

This bug report was last modified 2 years and 335 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.