[PATCH v4 19/20] multiboot2: Support TXT Secure Launch

2025-04-30 Thread Sergii Dmytruk
| 146 ++ grub-core/loader/slaunch/x86_dlstub.c | 2 +- include/grub/multiboot2.h | 3 + include/grub/slaunch.h| 1 + include/grub/slr_table.h | 2 + 7 files changed, 254 insertions(+), 2 deletions(-) diff --git a/grub-core

[RFC PATCH v2 7/7] multiboot2: Support SKINIT Secure Launch

2025-04-30 Thread Sergii Dmytruk
grub_skl_setup_module (slparams); + if (err != GRUB_ERR_NONE) +return grub_error (err, "Failed to setup SKL for Multiboot2"); + + err = grub_skl_prepare_bootloader_data (slparams); + if (err != GRUB_ERR_NONE) +return grub_error (err, "SKL preparations have

[PATCH] multiboot2: preparation to add RISC-V (64-bit) support

2024-12-19 Thread Yuri Zaporozhets
In preparation of adding RISC-V (64-bit) support to multiboot2: * new file include/grub/riscv64/multiboot.h added * MULTIBOOT2_ARCHITECTURE_RISCV64 definition added Signed-off-by: Yuri Zaporozhets --- include/grub/riscv64/multiboot.h | 24 include/multiboot2.h

[RFC PATCH 7/7] multiboot2: Support SKINIT Secure Launch

2024-12-18 Thread Sergii Dmytruk
rr = grub_skl_setup_module (slparams); + if (err != GRUB_ERR_NONE) +return grub_error (err, "Failed to setup SKL for Multiboot2"); + + err = grub_skl_prepare_bootloader_data (slparams); + if (err != GRUB_ERR_NONE) +return grub_error (err, "SKL pre

[PATCH v3 19/19] multiboot2: Support TXT Secure Launch

2024-12-12 Thread Sergii Dmytruk
/grub/i386/txt.h| 2 + include/grub/multiboot2.h | 3 + include/grub/slaunch.h | 1 + include/grub/slr_table.h | 2 + 8 files changed, 241 insertions(+), 2 deletions(-) diff --git a/grub-core/loader/multiboot.c b/grub-core/loader/multiboot.c index

[PATCH v2 18/19] multiboot2: Support AMD SKINIT

2024-11-01 Thread Sergii Dmytruk
/multiboot_mbi2.c | 52 +++--- include/grub/multiboot2.h | 4 +-- 4 files changed, 55 insertions(+), 34 deletions(-) diff --git a/grub-core/loader/multiboot.c b/grub-core/loader/multiboot.c index 561523a2b..1d1d6a2e9 100644 --- a/grub-core/loader/multiboot.c +++ b

[PATCH v2 15/19] multiboot2: Implement TXT slaunch support

2024-11-01 Thread Sergii Dmytruk
-off-by: Krystian Hebel Signed-off-by: Sergii Dmytruk --- grub-core/loader/multiboot.c | 23 ++- grub-core/loader/multiboot_elfxx.c | 88 ++- grub-core/loader/multiboot_mbi2.c | 96 ++ include/grub/multiboot2.h | 2 + 4 files

[PATCH 20/24] multiboot2: Implement TXT slaunch support

2024-08-26 Thread Sergii Dmytruk
-core/loader/multiboot_elfxx.c | 88 ++- grub-core/loader/multiboot_mbi2.c | 96 ++ include/grub/multiboot2.h | 2 + 4 files changed, 207 insertions(+), 2 deletions(-) diff --git a/grub-core/loader/multiboot.c b/grub-core/loader

[PATCH 23/24] multiboot2: Support AMD SKINIT

2024-08-26 Thread Sergii Dmytruk
From: Krystian Hebel Signed-off-by: Krystian Hebel Signed-off-by: Sergii Dmytruk --- grub-core/loader/multiboot.c | 11 +-- grub-core/loader/multiboot_elfxx.c | 22 ++--- grub-core/loader/multiboot_mbi2.c | 52 +++--- include/grub/multiboot2.h

Re: [PATCH v2 2/3] multiboot2: Add PE load support

2024-04-01 Thread avnish
Date: Thu, 28 Mar 2024 15:13:01 + From: Ross Lagerwall To: grub-devel@gnu.org Cc: xen-de...@lists.xenproject.org, Ross Lagerwall , Daniel Kiper , Daniel Kiper , Andrew Cooper , Roger Pau Monné Subject: [PATCH v2 2/3] multiboot2: Add PE load support Message-ID

Re: [PATCH 2/7] multiboot2: Allow 64-bit entry tags

2024-03-28 Thread Roger Pau Monné via Grub-devel
gt; > > relocate them below 4G, it should be possible for the binary to specify > > > those entry points. Therefore, extend the multiboot2 protocol such that > > > 64 bit addresses are allowed for entry points. The extension is done in > > > a backwar

[PATCH v2 2/3] multiboot2: Add PE load support

2024-03-28 Thread Ross Lagerwall via Grub-devel
/multiboot_pe.c | 702 ++ include/grub/efi/pe32.h | 64 +++ include/grub/multiboot.h | 3 + include/grub/multiboot2.h | 9 + 7 files changed, 796 insertions(+), 1 deletion(-) create mode 100644 grub-core/loader/multiboot_pe.c diff --git a

[PATCH v2 1/3] multiboot2: Add support for the PE binary type

2024-03-28 Thread Ross Lagerwall via Grub-devel
Currently, multiboot2-compatible bootloaders can load ELF binaries and a.out binaries. The presence of the address header tag determines how the bootloader tries to interpret the binary (a.out if the address tag is present else ELF). In addition to the existing address and ELF load types, specify

Re: [PATCH 2/7] multiboot2: Allow 64-bit entry tags

2024-03-28 Thread Ross Lagerwall via Grub-devel
fy > > those entry points. Therefore, extend the multiboot2 protocol such that > > 64 bit addresses are allowed for entry points. The extension is done in > > a backwards-compatible way. > > > > Signed-off-by: Ross Lagerwall > > --- > > doc/multiboot.texi | 32 +

Re: [PATCH 3/7] multiboot2: Add support for the load type header tag

2024-03-28 Thread Ross Lagerwall via Grub-devel
On Fri, Mar 15, 2024 at 7:31 AM Vladimir 'phcoder' Serbinenko wrote: > > Not a full review. Just one blocking problem > >> >> >> } >> + case MULTIBOOT_LOAD_TYPE_PE: >> + grub_fatal ("Unsupported load type: %u\n", mld.load_type); >> + default: >> +/* should be impossible */ >> +

Re: [PATCH 1/7] multiboot2: Add load type header and support for the PE binary type

2024-03-20 Thread Roger Pau Monné via Grub-devel
On Tue, Mar 19, 2024 at 02:46:59PM +, Ross Lagerwall wrote: > On Tue, Mar 19, 2024 at 1:18 PM Roger Pau Monné wrote: > > > > On Wed, Mar 13, 2024 at 03:07:42PM +, Ross Lagerwall wrote: > > > Currently, multiboot2-compatible bootloaders can load ELF binaries and &

Re: [PATCH 1/7] multiboot2: Add load type header and support for the PE binary type

2024-03-19 Thread Ross Lagerwall via Grub-devel
On Tue, Mar 19, 2024 at 1:18 PM Roger Pau Monné wrote: > > On Wed, Mar 13, 2024 at 03:07:42PM +, Ross Lagerwall wrote: > > Currently, multiboot2-compatible bootloaders can load ELF binaries and > > a.out binaries. The presence of the address header tag determines > >

Re: [PATCH 1/7] multiboot2: Add load type header and support for the PE binary type

2024-03-19 Thread Roger Pau Monné via Grub-devel
On Wed, Mar 13, 2024 at 03:07:42PM +, Ross Lagerwall wrote: > Currently, multiboot2-compatible bootloaders can load ELF binaries and > a.out binaries. The presence of the address header tag determines > how the bootloader tries to interpret the binary (a.out if the address > ta

Re: [PATCH 1/7] multiboot2: Add load type header and support for the PE binary type

2024-03-19 Thread Roger Pau Monné via Grub-devel
On Thu, Mar 14, 2024 at 02:24:31PM +, Ross Lagerwall wrote: > On Thu, Mar 14, 2024 at 1:37 PM Jan Beulich wrote: > > > > On 14.03.2024 10:30, Ross Lagerwall wrote: > > > On Thu, Mar 14, 2024 at 7:24 AM Jan Beulich wrote: > > >> > > >> On 13.03.2024 16:07, Ross Lagerwall wrote: > > >>> In addi

Re: [PATCH 2/7] multiboot2: Allow 64-bit entry tags

2024-03-19 Thread Roger Pau Monné via Grub-devel
On Wed, Mar 13, 2024 at 03:07:43PM +, Ross Lagerwall wrote: > Binaries may be built with entry points above 4G. While bootloaders may > relocate them below 4G, it should be possible for the binary to specify > those entry points. Therefore, extend the multiboot2 protocol such that

Re: [PATCH 3/7] multiboot2: Add support for the load type header tag

2024-03-15 Thread Vladimir 'phcoder' Serbinenko
Not a full review. Just one blocking problem > > } > + case MULTIBOOT_LOAD_TYPE_PE: > + grub_fatal ("Unsupported load type: %u\n", mld.load_type); > + default: > +/* should be impossible */ > +grub_fatal ("Unknown load type: %u\n", mld.load_type); > Don't use grub_fatal for th

Re: [PATCH 1/7] multiboot2: Add load type header and support for the PE binary type

2024-03-14 Thread Jan Beulich via Grub-devel
On 14.03.2024 15:24, Ross Lagerwall wrote: > On Thu, Mar 14, 2024 at 1:37 PM Jan Beulich wrote: >> On 14.03.2024 10:30, Ross Lagerwall wrote: >>> On Thu, Mar 14, 2024 at 7:24 AM Jan Beulich wrote: On 13.03.2024 16:07, Ross Lagerwall wrote: > In addition to the existing address and ELF lo

Re: [PATCH 1/7] multiboot2: Add load type header and support for the PE binary type

2024-03-14 Thread Ross Lagerwall via Grub-devel
On Thu, Mar 14, 2024 at 1:37 PM Jan Beulich wrote: > > On 14.03.2024 10:30, Ross Lagerwall wrote: > > On Thu, Mar 14, 2024 at 7:24 AM Jan Beulich wrote: > >> > >> On 13.03.2024 16:07, Ross Lagerwall wrote: > >>> In addition to the existing address and ELF load types, specify a new > >>> optional

Re: [PATCH 1/7] multiboot2: Add load type header and support for the PE binary type

2024-03-14 Thread Jan Beulich via Grub-devel
On 14.03.2024 10:30, Ross Lagerwall wrote: > On Thu, Mar 14, 2024 at 7:24 AM Jan Beulich wrote: >> >> On 13.03.2024 16:07, Ross Lagerwall wrote: >>> In addition to the existing address and ELF load types, specify a new >>> optional PE binary load type. This new type is a useful addition since >>>

Re: [PATCH 1/7] multiboot2: Add load type header and support for the PE binary type

2024-03-14 Thread Ross Lagerwall via Grub-devel
On Thu, Mar 14, 2024 at 7:24 AM Jan Beulich wrote: > > On 13.03.2024 16:07, Ross Lagerwall wrote: > > In addition to the existing address and ELF load types, specify a new > > optional PE binary load type. This new type is a useful addition since > > PE binaries can be signed and verified (i.e. us

Re: [PATCH 1/7] multiboot2: Add load type header and support for the PE binary type

2024-03-14 Thread Vladimir 'phcoder' Serbinenko
Please take this discussion to a separate thread. In this thread it's pure offtopic On Thu, Mar 14, 2024 at 10:25 AM Jan Beulich via Grub-devel wrote: > > On 13.03.2024 16:07, Ross Lagerwall wrote: > > In addition to the existing address and ELF load types, specify a new > > optional PE binary lo

Re: [PATCH 1/7] multiboot2: Add load type header and support for the PE binary type

2024-03-14 Thread Damien Zammit via Grub-devel
Hi, I saw this on the list and have concerns: Original Message On 14 Mar 2024, 6:24 pm, Jan Beulich via Grub-devel < grub-devel@gnu.org> wrote: On 13.03.2024 16:07, Ross Lagerwall wrote: >> In addition to the existing address and ELF load types, specify a new >> optional PE binar

Re: [PATCH 1/7] multiboot2: Add load type header and support for the PE binary type

2024-03-14 Thread Jan Beulich via Grub-devel
On 13.03.2024 16:07, Ross Lagerwall wrote: > In addition to the existing address and ELF load types, specify a new > optional PE binary load type. This new type is a useful addition since > PE binaries can be signed and verified (i.e. used with Secure Boot). And the consideration to have ELF signa

[PATCH 2/7] multiboot2: Allow 64-bit entry tags

2024-03-13 Thread Ross Lagerwall via Grub-devel
Binaries may be built with entry points above 4G. While bootloaders may relocate them below 4G, it should be possible for the binary to specify those entry points. Therefore, extend the multiboot2 protocol such that 64 bit addresses are allowed for entry points. The extension is done in a

[PATCH 1/7] multiboot2: Add load type header and support for the PE binary type

2024-03-13 Thread Ross Lagerwall via Grub-devel
Currently, multiboot2-compatible bootloaders can load ELF binaries and a.out binaries. The presence of the address header tag determines how the bootloader tries to interpret the binary (a.out if the address tag is present else ELF). Add a new load type header tag that explicitly states the type

[PATCH 3/7] multiboot2: Add support for the load type header tag

2024-03-13 Thread Ross Lagerwall via Grub-devel
The binary may expose its type using the load type header tag. Implement it according to the specification. Signed-off-by: Ross Lagerwall --- grub-core/loader/multiboot_mbi2.c | 45 --- include/grub/multiboot2.h | 1 + include/multiboot2.h | 13

[PATCH 5/7] multiboot2: Add support for 64-bit entry addresses

2024-03-13 Thread Ross Lagerwall via Grub-devel
Add support for entry addresses that may be either 32 bits or 64 bits in size. This may be necessary if the binary is built with an entry address above 4G. Signed-off-by: Ross Lagerwall --- grub-core/loader/multiboot_mbi2.c | 10 -- include/multiboot2.h | 6 +- 2 files

[PATCH 4/7] multiboot2: Add PE load support

2024-03-13 Thread Ross Lagerwall via Grub-devel
++ include/grub/efi/pe32.h | 64 +++ include/grub/multiboot2.h | 3 + 5 files changed, 775 insertions(+), 2 deletions(-) create mode 100644 grub-core/loader/multiboot_pe.c diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def index 1571421d7e84

Re: [EXTERNAL] Re: grub-2.06 fails to load 64bit Multiboot2 ELF with regions above 4GiB

2023-06-28 Thread Daniel Kiper
e image above 4 GiB? The Multiboot2 spec clearly states the machine has to be in 32-bit mode during transition from the bootloader to the kernel. I think it would be very helpful if you describe your use case in details. Daniel ___ Grub-devel mailing list

RE: [EXTERNAL] Re: grub-2.06 fails to load 64bit Multiboot2 ELF with regions above 4GiB

2023-06-23 Thread Baksik, Fred [USA] via Grub-devel
images was interjected as a side effect. Refer to multiboot2: Add support for relocatable images * rhboot/grub2@a620876 * GitHub<https://github.com/rhboot/grub2/commit/a620876e3b32e4ea0c9a7b3541fcb9a4dd4fb9eb> -- Fred Baksik Senior Principal Software Engineer Mercury Systems Office: +1 (97

Re: grub-2.06 fails to load 64bit Multiboot2 ELF with regions above 4GiB

2023-06-23 Thread Daniel Kiper
Hi, On Fri, Jun 16, 2023 at 10:50:14AM +, Baksik, Fred [USA] via Grub-devel wrote: > > I tried report this issue to the bug-grub mailing list but didn’t see the Bug > Tracker get updated. > I’d like to get this reported so anyone else using multiboot2 to boot and > embedde

grub-2.06 fails to load 64bit Multiboot2 ELF with regions above 4GiB

2023-06-16 Thread Baksik, Fred [USA] via Grub-devel
I tried report this issue to the bug-grub mailing list but didn't see the Bug Tracker get updated. I'd like to get this reported so anyone else using multiboot2 to boot and embedded RTOS knows of this problem. I also supplied a patch that fixes the issue. Regards, Fred Baksik Sr Pri

Re: multiboot2 and module2 boot issues via GRUB2

2022-07-19 Thread Bruno via Grub-devel
Hello folks. Thank you for this. I a incurring the same problem, can’t boot into Xen. Did anyone implement the grub2 patch? Is there any way around this? I have posted it on stackexchange with more details and the config files: https://unix.stackexchange.com/q/710400/375983 __

Re: [PATCH v3] multiboot2: Implement the new module load and preferences tag

2021-12-06 Thread Łukasz Hawryłko
_addr_t entry = 0, efi_entry = 0; > >    grub_uint32_t console_required = 0; > > @@ -123,6 +125,7 @@ > > > >    mld.mbi_ver = 2; > >    mld.relocatable = 0; > > +  grub_multiboot2_mlp.relocatable = 0; > > I would prefer if you use mld for this. Of course yo

Re: [PATCH v3] multiboot2: Implement the new module load and preferences tag

2021-09-09 Thread Daniel Kiper
On Mon, Aug 16, 2021 at 04:34:31PM +0200, Lukasz Hawrylko wrote: > In contrast to Mulitboot, in Mulitboot2, there is currently no way to > control where to load the modules to. This could be a problem, e.g., the > OS loaded by Multiboot2 needs to reserve low address for some particular &

Re: [PATCH] [MULTIBOOT2 SPEC PATCH V3] multiboot2: Add module load and preference tag

2021-09-02 Thread Daniel Kiper
On Mon, Aug 16, 2021 at 04:35:12PM +0200, Lukasz Hawrylko wrote: > In the cases of users have preferences over Multiboot2 module load > addresses, currently GRUB has no way to achieve it. > > Similar to the relocatable header tag, this new tag allows users to > specify the minimum a

[PATCH] [MULTIBOOT2 SPEC PATCH V3] multiboot2: Add module load and preference tag

2021-08-16 Thread Lukasz Hawrylko
In the cases of users have preferences over Multiboot2 module load addresses, currently GRUB has no way to achieve it. Similar to the relocatable header tag, this new tag allows users to specify the minimum and maximum load addresses, and other load preferences on Multiboot2 modules. Bump

[PATCH v3] multiboot2: Implement the new module load and preferences tag

2021-08-16 Thread Lukasz Hawrylko
In contrast to Mulitboot, in Mulitboot2, there is currently no way to control where to load the modules to. This could be a problem, e.g., the OS loaded by Multiboot2 needs to reserve low address for some particular purposes and not for loading modules. This new tag gives it flexibility to

Re: multiboot2 and module2 boot issues via GRUB2

2021-04-08 Thread Daniel Kiper
ents separately. > > Looking at the grub manual, this behaviour of the `initrd` command isn't > even documented.  Perhaps that should be fixed first, and then maybe > `module2_multi` added too? I am OK with additional Multiboot2 command. Tho

Re: multiboot2 and module2 boot issues via GRUB2

2021-04-07 Thread Glenn Washburn
On Thu, 1 Apr 2021 20:43:46 +0100 Andrew Cooper via Grub-devel wrote: > On 01/04/2021 09:44, Roger Pau Monné wrote: > > On Thu, Apr 01, 2021 at 09:31:07AM +0200, Jan Beulich wrote: > >> On 01.04.2021 03:06, Roman Shaposhnik wrote: > >>> And the obvious next question: is my EVE usecase esoteric en

Re: multiboot2 and module2 boot issues via GRUB2

2021-04-06 Thread Andrew Cooper via Grub-devel
On 06/04/2021 19:03, Roman Shaposhnik wrote: > On Tue, Apr 6, 2021 at 10:51 AM Andrew Cooper > mailto:andrew.coop...@citrix.com>> wrote: > > On 06/04/2021 09:19, Jan Beulich wrote: > > On 01.04.2021 21:43, Andrew Cooper wrote: > >> On 01/04/2021 09:44, Roger Pau Monné wrote: > >>> O

Re: multiboot2 and module2 boot issues via GRUB2

2021-04-06 Thread Roman Shaposhnik
On Tue, Apr 6, 2021 at 10:51 AM Andrew Cooper wrote: > On 06/04/2021 09:19, Jan Beulich wrote: > > On 01.04.2021 21:43, Andrew Cooper wrote: > >> On 01/04/2021 09:44, Roger Pau Monné wrote: > >>> On Thu, Apr 01, 2021 at 09:31:07AM +0200, Jan Beulich wrote: > On 01.04.2021 03:06, Roman Shapos

Re: multiboot2 and module2 boot issues via GRUB2

2021-04-06 Thread Andrew Cooper via Grub-devel
On 06/04/2021 09:19, Jan Beulich wrote: > On 01.04.2021 21:43, Andrew Cooper wrote: >> On 01/04/2021 09:44, Roger Pau Monné wrote: >>> On Thu, Apr 01, 2021 at 09:31:07AM +0200, Jan Beulich wrote: On 01.04.2021 03:06, Roman Shaposhnik wrote: > And the obvious next question: is my EVE usecas

Re: multiboot2 and module2 boot issues via GRUB2

2021-04-06 Thread Roman Shaposhnik
On Tue, Apr 6, 2021 at 1:19 AM Jan Beulich wrote: > On 01.04.2021 21:43, Andrew Cooper wrote: > > On 01/04/2021 09:44, Roger Pau Monné wrote: > >> On Thu, Apr 01, 2021 at 09:31:07AM +0200, Jan Beulich wrote: > >>> On 01.04.2021 03:06, Roman Shaposhnik wrote: > And the obvious next question:

Re: multiboot2 and module2 boot issues via GRUB2

2021-04-06 Thread Jan Beulich via Grub-devel
On 01.04.2021 21:43, Andrew Cooper wrote: > On 01/04/2021 09:44, Roger Pau Monné wrote: >> On Thu, Apr 01, 2021 at 09:31:07AM +0200, Jan Beulich wrote: >>> On 01.04.2021 03:06, Roman Shaposhnik wrote: And the obvious next question: is my EVE usecase esoteric enough that I should just go a

Re: multiboot2 and module2 boot issues via GRUB2

2021-04-01 Thread Andrew Cooper via Grub-devel
On 01/04/2021 09:44, Roger Pau Monné wrote: > On Thu, Apr 01, 2021 at 09:31:07AM +0200, Jan Beulich wrote: >> On 01.04.2021 03:06, Roman Shaposhnik wrote: >>> And the obvious next question: is my EVE usecase esoteric enough that >>> I should just go ahead and do a custom GRUB patch or is there a mo

Re: multiboot2 and module2 boot issues via GRUB2

2021-04-01 Thread Krystian Hebel
don't think Xen should have any knowledge about it. Keep in mind that loader is loading Xen, using multiboot2 which is kind of generic boot protocol, not Linux with its specific protocol. There may be other multiboot2 kernels that depend on modules being _not_ concatenated, such change would m

Re: multiboot2 and module2 boot issues via GRUB2

2021-04-01 Thread Roger Pau Monné via Grub-devel
On Thu, Apr 01, 2021 at 09:31:07AM +0200, Jan Beulich wrote: > On 01.04.2021 03:06, Roman Shaposhnik wrote: > > And the obvious next question: is my EVE usecase esoteric enough that > > I should just go ahead and do a custom GRUB patch or is there a more > > general interest in this? > > Not sure

Re: multiboot2 and module2 boot issues via GRUB2

2021-04-01 Thread Jan Beulich via Grub-devel
On 01.04.2021 03:06, Roman Shaposhnik wrote: > And the obvious next question: is my EVE usecase esoteric enough that > I should just go ahead and do a custom GRUB patch or is there a more > general interest in this? Not sure if it ought to be a grub patch - the issue could as well be dealt with in

Re: multiboot2 and module2 boot issues via GRUB2

2021-03-31 Thread Roman Shaposhnik
Hi Andrew! first of all -- thanks for pointing me in the right direction. So after reading relevant sources: comments inline. On Tue, Mar 30, 2021 at 12:08 PM Andrew Cooper wrote: > On 30/03/2021 19:28, Roman Shaposhnik wrote: > > Hi! > > > > seems like I've run int

Re: multiboot2 and module2 boot issues via GRUB2

2021-03-30 Thread Andrew Cooper via Grub-devel
On 30/03/2021 19:28, Roman Shaposhnik wrote: > Hi! > > seems like I've run into an issue with multiboot2 and module2 > commands that I can't quite explain. Since it may be something > super simply and silly -- I wanted to reach out here before I do > a GRUB/Xen/LK so

[PATCH 02/05] Enable multiboot2 support on arm64-efi target

2020-10-28 Thread Chris Plant
Add ARM64 relocator code to support multiboot2 loader Signed-off-by: Chris plant --- grub-core/lib/arm64/relocator.c | 267 grub-core/lib/arm64/relocator_asm.S | 57 ++ include/grub/arm64/relocator.h | 52 ++ 3 files changed, 376 insertions

[PATCH 05/05] Enable multiboot2 support on arm64-efi target

2020-10-28 Thread Chris Plant
Enable multiboot2 support for arm64-efi target Signed-off-by: Chris Plant --- grub-core/Makefile.core.def | 6 ++ 1 file changed, 6 insertions(+) diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def index b5f47fc41..2c0bec83d 100644 --- a/grub-core/Makefile.core.def

[PATCH 04/05] Enable multiboot2 support on arm64-efi target

2020-10-28 Thread Chris Plant
Enable ARM64/aarch64 support in multiboot2 loader Signed-off-by: Chris Plant --- grub-core/loader/multiboot.c | 2 +- grub-core/loader/multiboot_elfxx.c | 2 +- grub-core/loader/multiboot_mbi2.c | 34 +++--- include/grub/arm64/multiboot.h | 56

[PATCH 03/05] Enable multiboot2 support on arm64-efi target

2020-10-28 Thread Chris Plant
Add ARM64 versions of the mmap functions to generate memory map for multiboot2 Signed-off-by: Chris Plant --- grub-core/mmap/arm64/uppermem.c | 72 + include/grub/arm64/memory.h | 60 +++ 2 files changed, 132 insertions(+) create

[PATCH 01/05] Enable multiboot2 support on arm64-efi target

2020-10-28 Thread Chris Plant
/multiboot2.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/multiboot2.h b/include/multiboot2.h index 5693923c0..e5071f6f6 100644 --- a/include/multiboot2.h +++ b/include/multiboot2.h @@ -63,6 +63,7 @@ #define MULTIBOOT_TAG_TYPE_EFI32_IH 19 #define

[PATCH] Enable multiboot2 support on arm64-efi target

2020-10-28 Thread Chris Plant
Hello, As you may have guessed from my musings on the mailing list to date, I've been creating a patch to enable the multiboot2 loader on ARM64/aarch64. Why? I am playing with GNU Mach (not sure why - blame COVID-19) on Raspberry PI. I guess the key driver for why it's interesting

Re: Multiboot2 on aarch64: Alignment of ELF Headers

2020-09-26 Thread Chris Plant
+0100 > > > > Chris Plant via Grub-devel wrote: > > > > > > > > > On Sat, 2020-05-23 at 12:43 +0200, Hans Ulrich Niedermann > > > > > wrote: > > > > > > On Fri, 22 May 2020 17:23:35 +0100 > > > > > >

Re: Multiboot2 on aarch64: Alignment of ELF Headers

2020-09-21 Thread Chris Plant
> > > On Sat, 2020-05-23 at 12:43 +0200, Hans Ulrich Niedermann > > > > wrote: > > > > > On Fri, 22 May 2020 17:23:35 +0100 > > > > > Chris Plant via Grub-devel wrote: > > > > > > > > > > > I'm continuing t

Re: Multiboot2 on aarch64: Alignment of ELF Headers

2020-09-21 Thread Krystian Hebel
Grub-devel wrote: I'm continuing to work on Multiboot2 support on aarch64, and I'm looking at the alignment of the ELF headers which are passed through MB2. At the risk of me sounding stupid... Having read the MB2 specs quite thoroughly in the past few months, I still have no idea

Re: Multiboot2 on aarch64: Alignment of ELF Headers

2020-09-21 Thread Chris Plant
Chris Plant via Grub-devel wrote: > > > > > > > I'm continuing to work on Multiboot2 support on aarch64, and > > > > I'm > > > > looking at the alignment of the ELF headers which are passed > > > > through > > > > MB2.

[SECURITY PATCH 14/28] multiboot2: Fix memory leak if grub_create_loader_cmdline() fails

2020-07-29 Thread Daniel Kiper
From: Konrad Rzeszutek Wilk Fixes: CID 292468 Signed-off-by: Konrad Rzeszutek Wilk Reviewed-by: Daniel Kiper --- grub-core/loader/multiboot_mbi2.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/grub-core/loader/multiboot_mbi2.c b/grub-core/loader/multiboot_mbi2.c in

[PATCH V3] multiboot2: Implement the new module load and preferences tag

2020-07-14 Thread Zide Chen
In contrast to Mulitboot, in Mulitboot2, there is currently no way to control where to load the modules to. This could be a problem, e.g., the OS loaded by Multiboot2 needs to reserve low address for some particular purposes and not for loading modules. This new tag gives it flexibility to

Re: Multiboot2 on aarch64: Alignment of ELF Headers

2020-05-23 Thread Hans Ulrich Niedermann
On Sat, 23 May 2020 12:21:27 +0100 Chris Plant via Grub-devel wrote: > On Sat, 2020-05-23 at 12:43 +0200, Hans Ulrich Niedermann wrote: > > On Fri, 22 May 2020 17:23:35 +0100 > > Chris Plant via Grub-devel wrote: > > > > > I'm continuing to work on Mul

Re: Multiboot2 on aarch64: Alignment of ELF Headers

2020-05-23 Thread Chris Plant via Grub-devel
On Sat, 2020-05-23 at 12:43 +0200, Hans Ulrich Niedermann wrote: > On Fri, 22 May 2020 17:23:35 +0100 > Chris Plant via Grub-devel wrote: > > > I'm continuing to work on Multiboot2 support on aarch64, and I'm > > looking at the alignment of the ELF headers which

Re: Multiboot2 on aarch64: Alignment of ELF Headers

2020-05-23 Thread Hans Ulrich Niedermann
On Fri, 22 May 2020 17:23:35 +0100 Chris Plant via Grub-devel wrote: > I'm continuing to work on Multiboot2 support on aarch64, and I'm > looking at the alignment of the ELF headers which are passed through > MB2. At the risk of me sounding stupid... Having read the MB2 spe

Multiboot2 Header Tags: Unclear definition of type

2020-05-23 Thread Hans Ulrich Niedermann
Quoting the Multiboot2 specification: > 3.1.3 General tag structure > --- > > Tags constitutes a buffer of structures following each other padded > when necessary in order for each tag to start at 8-bytes aligned > address. Tags are terminated by a t

Multiboot2 on aarch64: Alignment of ELF Headers

2020-05-22 Thread Chris Plant via Grub-devel
Hi, I'm continuing to work on Multiboot2 support on aarch64, and I'm looking at the alignment of the ELF headers which are passed through MB2. The alignment of the MB2 header's isn't the problem, the problem is in the ELF headers which are linked through. Some of th

Re: [MULTIBOOT2 SPEC PATCH v4 23/27] multiboot2: Generate per object file listings

2020-05-15 Thread Hans Ulrich Niedermann
I have just noticed that when running the multiboot2 build with "configure CC=clang" instead of going with the default gcc, clang10 will not recognize the "-Wa,-adhlns=$(@:.o=.lst)" argument and abort. Ist clang support for the multiboot2 example kernel important? If so, I c

[MULTIBOOT2 SPEC PATCH v4 26/27] multiboot2: Generate symbol lists and disassembly file

2020-05-14 Thread Hans Ulrich Niedermann
t -u program]) +# we are too lazy to figure out whether 'sort -u' works +SORT_U="\${SORT} | \${UNIQ}" +AC_SUBST([SORT_U]) +AC_MSG_CHECKING([for sort -u]) +AC_MSG_RESULT([${SORT_U} (lazy)]) + dnl Build the example Multiboot2 kernel (if possible on this host) kernel_boot_arch=uns

[MULTIBOOT2 SPEC PATCH v4 25/27] multiboot2: Generate gcc temp files (*.i and *.s)

2020-05-14 Thread Hans Ulrich Niedermann
Generate gcc temporary files for each object file, showing the intermediate steps after the C preprocessor and immediately before assembly. This helps with examining how the example kernel code is generated, making the example kernel more educational. Signed-off-by: Hans Ulrich Niedermann diff

[MULTIBOOT2 SPEC PATCH v4 21/27] multiboot2: "make distcheck" with example kernel enabled

2020-05-14 Thread Hans Ulrich Niedermann
Even if no one ever does a tarball release of the Multiboot2 spec, "make distcheck" is a good way of checking the build system's integrity. Signed-off-by: Hans Ulrich Niedermann diff --git a/Makefile.am b/Makefile.am index 70eec9cd0..38e797aa7 100644 --- a/Makefile.am +++ b/Make

[MULTIBOOT2 SPEC PATCH v4 19/27] multiboot2: Set -nostdlib before AC_PROG_CC for x-compile

2020-05-14 Thread Hans Ulrich Niedermann
) + AC_PROG_CC AM_PROG_AS dnl Build the example Multiboot2 kernel (if possible on this host) -AC_CANONICAL_HOST kernel_boot_arch=unsupported kernel_ccasflags= kernel_cflags= @@ -57,8 +64,6 @@ AM_CONDITIONAL([BUILD_EXAMPLE_KERNEL], [test "x$enable_example_kernel" =

[MULTIBOOT2 SPEC PATCH v4 22/27] multiboot2: Always define the kernel_* vars

2020-05-14 Thread Hans Ulrich Niedermann
le.am @@ -9,12 +9,13 @@ pkginclude_HEADERS = multiboot2.h # The example kernel is built if you specify --enable-example-kernel. if BUILD_EXAMPLE_KERNEL noinst_PROGRAMS = kernel +endif + kernel_SOURCES = boot_$(kernel_boot_arch).S kernel.c multiboot2.h kernel_CCASFLAGS = $(kernel_ccasf

[MULTIBOOT2 SPEC PATCH v4 23/27] multiboot2: Generate per object file listings

2020-05-14 Thread Hans Ulrich Niedermann
ch_sources = boot_i386.S boot_mips.S multiboot_TEXINFOS = boot_i386.S.texi boot_mips.S.texi kernel.c.texi multiboot2.h.texi @@ -17,6 +18,10 @@ kernel_CFLAGS = $(kernel_cflags) -fno-builtin -nostdinc -O -g -Wall \ -imacros $(top_builddir)/config.h kernel_LDFLAGS = -nostdlib -Wl,-N -Wl,

[MULTIBOOT2 SPEC PATCH v4 20/27] multiboot2: mips build wants __start symbol

2020-05-14 Thread Hans Ulrich Niedermann
When building the example kernel for mips, there is a warning about __start being undefined and some default address being chosen as start address. As this does not inspire confidence, we add a __start symbol at the same place where start and _start are already defined. Now the mips build builds

[MULTIBOOT2 SPEC PATCH v4 12/27] multiboot2: Add boot_mips.S example code to docs

2020-05-14 Thread Hans Ulrich Niedermann
Ulrich Niedermann diff --git a/doc/Makefile.am b/doc/Makefile.am index e88f4d271..08fdbf342 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,6 +1,6 @@ info_TEXINFOS = multiboot.texi arch_sources = boot_i386.S boot_mips.S -multiboot_TEXINFOS = boot_i386.S.texi kernel.c.texi multiboot2.h.texi

[MULTIBOOT2 SPEC PATCH v4 14/27] multiboot2: Fix example kernel header tag alignment

2020-05-14 Thread Hans Ulrich Niedermann
Properly align all Multiboot2 header tags to 8 byte boundaries as per the Multiboot2 specification. Note that the assembler directive ".align 8" is machine dependent: On i386, it means "align to 8 byte boundary". On mips, it means that the lower 8 bits of address must be

[MULTIBOOT2 SPEC PATCH v4 27/27] multiboot2: Add labels around the termination tag

2020-05-14 Thread Hans Ulrich Niedermann
For code consistency and more clarity as to what these .short and .long values actually are, use the same system for labeling the terminator header tag as for labeling all other header tags. This improves the readability of the code, without changing the actual output. Signed-off-by: Hans Ulrich

[MULTIBOOT2 SPEC PATCH v4 18/27] multiboot2: Use predefined #ifdef __ASSEMBLER__

2020-05-14 Thread Hans Ulrich Niedermann
e3fd6a 100644 --- a/doc/boot_mips.S +++ b/doc/boot_mips.S @@ -15,7 +15,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#define ASM_FILE 1 #include /* C symbol format. HAVE_ASM_USCORE is defined by configure. */ diff --git a/doc/multiboot2.h b/doc/

[MULTIBOOT2 SPEC PATCH v4 17/27] multiboot2: Clean up stack (cdecl calling conventions)

2020-05-14 Thread Hans Ulrich Niedermann
Clean up the stack after calling C functions according to the i386 cdecl calling conventions. Signed-off-by: Hans Ulrich Niedermann diff --git a/doc/boot_i386.S b/doc/boot_i386.S index 20a600a6e..14dc14660 100644 --- a/doc/boot_i386.S +++ b/doc/boot_i386.S @@ -101,10 +101,12 @@ multiboot_entry:

[MULTIBOOT2 SPEC PATCH v4 10/27] multiboot2: Rename boot.S to boot_i386.S

2020-05-14 Thread Hans Ulrich Niedermann
dex dc7816d9f..d9efe8116 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,6 +1,6 @@ info_TEXINFOS = multiboot.texi EXAMPLES = boot_mips.S kernel.c multiboot2.h -multiboot_TEXINFOS = boot.S.texi kernel.c.texi multiboot2.h.texi +multiboot_TEXINFOS = boot_i386.S.texi kernel.c.texi multibo

[MULTIBOOT2 SPEC PATCH v4 15/27] multiboot2: Remove unreferenced AOUT_KLUDGE

2020-05-14 Thread Hans Ulrich Niedermann
Remove unreferenced AOUT_KLUDGE from both boot_i386.S and boot_mips.S. There is no reference in the example kernel to AOUT_KLUDGE or MULTIBOOT_AOUT_KLUDGE, so this has never had a function in the Multiboot 2 example kernel. I presume this was something left over from the Multiboot 1 specification

[MULTIBOOT2 SPEC PATCH v4 13/27] multiboot2: Build arch specific boot code

2020-05-14 Thread Hans Ulrich Niedermann
+25,37 @@ AM_INIT_AUTOMAKE([1.10.1]) AC_PROG_CC AM_PROG_AS -dnl Build the example Multiboot2 kernel. +dnl Build the example Multiboot2 kernel (if possible on this host) +AC_CANONICAL_HOST +kernel_boot_arch=unsupported +kernel_ccasflags= +kernel_cflags= +case "$host_cpu" in #( + i

[MULTIBOOT2 SPEC PATCH v4 24/27] multiboot2: Generate a kernel.map map file

2020-05-14 Thread Hans Ulrich Niedermann
Generate a kernel.map map file for the example kernel. This helps with examining the generated machine code, making the example kernel more educational. Signed-off-by: Hans Ulrich Niedermann diff --git a/.gitignore b/.gitignore index 7a035c267..889e17f69 100644 --- a/.gitignore +++ b/.gitignore

[MULTIBOOT2 SPEC PATCH v4 06/27] multiboot2: Remove unnecessary definition of CC

2020-05-14 Thread Hans Ulrich Niedermann
Remove the unnecessary separate definition of CC by AC_CHECK_TOOL. AC_CHECK_TOOL(CC, gcc) might have been necessary back in 1999 when this line has been written, but AC_PROG_CC has since taken over defining CC so we do not need AC_CHECK_TOOL for this any more. Signed-off-by: Hans Ulrich Niederman

[MULTIBOOT2 SPEC PATCH v4 09/27] multiboot2: Use the constants by their proper names

2020-05-14 Thread Hans Ulrich Niedermann
In the i386 boot.S file, use the constants with the names multiboot2.h actually defines them as, and which boot_mips.S has been using already. Signed-off-by: Hans Ulrich Niedermann diff --git a/doc/boot.S b/doc/boot.S index 8f6f66fcc..9ab016612 100644 --- a/doc/boot.S +++ b/doc/boot.S @@ -50,11

[MULTIBOOT2 SPEC PATCH v4 11/27] multiboot2: Add boot_i386.S to shipped files

2020-05-14 Thread Hans Ulrich Niedermann
= multiboot.texi -EXAMPLES = boot_mips.S kernel.c multiboot2.h +arch_sources = boot_i386.S boot_mips.S multiboot_TEXINFOS = boot_i386.S.texi kernel.c.texi multiboot2.h.texi SRC2TEXI = src2texi noinst_SCRIPTS = $(SRC2TEXI) @@ -9,14 +9,14 @@ pkginclude_HEADERS = multiboot2.h # The example kernel is built if you

[MULTIBOOT2 SPEC PATCH v4 00/27] multiboot2: Clean up the example kernel

2020-05-14 Thread Hans Ulrich Niedermann
This patch series cleans up the Multiboot2 build system and example kernel: * Fix initializing the source tree with autogen.sh when using current gnulib. * Change from obsolete .bzrignore to .gitignore. * Fix the Multiboot2 header tag alignment in the assembly language boot_*.S

[MULTIBOOT2 SPEC PATCH v4 08/27] multiboot2: Automake cleans built programs automatically

2020-05-14 Thread Hans Ulrich Niedermann
The "CLEANFILES = $(noinst_PROGRAMS)" definition is from 2001-01, and Automake has learned to clean up generated files automatically since, so we can remove this. Signed-off-by: Hans Ulrich Niedermann diff --git a/doc/Makefile.am b/doc/Makefile.am index a65b452cf..dc7816d9f 100644 --- a/doc/Make

[MULTIBOOT2 SPEC PATCH v4 04/27] multiboot2: Remove obsolete compat code for ancient Autoconf

2020-05-14 Thread Hans Ulrich Niedermann
The remark about "older versions of Autoconf" was added in 2001. We already AC_PREREQ(2.63) which is from 2008, so we need not worry about pre-2008 versions of Autoconf, much less about pre-2001 versions. Signed-off-by: Hans Ulrich Niedermann diff --git a/configure.ac b/configure.ac index 5bfc0

[MULTIBOOT2 SPEC PATCH v4 16/27] multiboot2: Change "Multiboot" in comments to "Multiboot2"

2020-05-14 Thread Hans Ulrich Niedermann
In source code comments, change "Multiboot" to "Multiboot2". This forced us to touch the completely wrongly placed comment on the 'flags' in multiboot2.h, so we have moved that comment where it belongs and added comments for the groups of macro definitions wh

[MULTIBOOT2 SPEC PATCH v4 03/27] multiboot2: Use m4 quoting and AS_HELP_STRING

2020-05-14 Thread Hans Ulrich Niedermann
l" = xyes) +dnl Build the example Multiboot2 kernel. +AC_ARG_ENABLE([example-kernel], [dnl +AS_HELP_STRING([--enable-example-kernel], + [build the example Multiboot2 kernel])]) + +AM_CONDITIONAL([BUILD_EXAMPLE_KERNEL], + [test "x$enable_example_kernel"

[MULTIBOOT2 SPEC PATCH v4 05/27] multiboot2: Remove CCAS workarounds for pre-2005 Automake

2020-05-14 Thread Hans Ulrich Niedermann
iboot.texi]) AC_CONFIG_HEADER([config.h]) -AM_INIT_AUTOMAKE +AM_INIT_AUTOMAKE([1.10.1]) # # Programs @@ -26,10 +26,6 @@ AC_CHECK_TOOL([CC], [gcc]) AC_PROG_CC AM_PROG_AS -dnl Because recent automake complains about AS, set it here. -CCAS="$CC" -AC_SUBST([CCAS]) - dnl Build the examp

[MULTIBOOT2 SPEC PATCH v4 07/27] multiboot2: Automake generates dependencies automatically

2020-05-14 Thread Hans Ulrich Niedermann
$(top_builddir)/config.h kernel_LDFLAGS = -nostdlib -Wl,-N -Wl,-Ttext -Wl,8010 -Wl,--build-id=none - -boot.o: multiboot2.h endif EXTRA_DIST = $(man_MANS) $(noinst_SCRIPTS) \ -- 2.26.2 ___ Grub-devel mailing list Grub-devel@gnu.org https

  1   2   3   4   5   6   7   >