[PATCH 1/1] commands/efi/lsefisystab: Short text for EFI_CONFORMANCE_PROFILES_TABLE

2022-09-02 Thread Heinrich Schuchardt
The EFI_CONFORMANCE_PROFILES_TABLE_GUID is used for a table of GUIDs for conformance profiles (cf. UEFI specification 2.10, 4.6.5 EFI_CONFORMANCE_PROFILE_TABLE). The lsefisystab command is used to display installed EFI configuration tables. Currently it only shows the GUID but not a short text for

Re: [PATCH v3 7/8] efi: implement LoadFile2 initrd loading protocol for Linux

2022-09-02 Thread Heinrich Schuchardt
On 8/18/22 16:51, Ard Biesheuvel wrote: Recent Linux kernels will invoke the LoadFile2 protocol installed on a well-known vendor media path to load the initrd if it is exposed by the firmware. Using this method is preferred for two reasons: - the Linux kernel is in charge of allocating the memory

Re: [PATCH v3 6/8] efi/efinet: Don't close connections at fini_hw() time

2022-09-02 Thread Heinrich Schuchardt
On 8/18/22 16:51, Ard Biesheuvel wrote: When GRUB runs on top of EFI firmware, it only has access to block and network device abstractions exposed by the firmware, and it is up to the firmware to quiesce the underlying hardware when handing over to the OS. I guess you refer to ExitBootServices(

Re: [PATCH v3 5/8] linux/arm: account for COFF headers appearing at unexpected offsets

2022-09-02 Thread Heinrich Schuchardt
On 8/18/22 16:51, Ard Biesheuvel wrote: The way we load the Linux and PE/COFF image headers depends on a fixed placement of the COFF header at offset 0x40 into the file. This is a reasonable default, given that this is where Linux emits it today. However, in order to comply with the PE/COFF spec,

[PATCH v11 09/11] LoongArch: Support new relocation types in v2.00 ABI

2022-09-02 Thread Xiaotian Wu
Link: https://github.com/loongson/LoongArch-Documentation/pull/57 Signed-off-by: Xiaotian Wu --- configure.ac | 17 grub-core/kern/loongarch64/dl.c| 54 +-- grub-core/kern/loongarch64/dl_helper.c | 59 ++ inclu

[PATCH v11 11/11] tests: add support for LoongArch

2022-09-02 Thread Xiaotian Wu
Signed-off-by: Xiaotian Wu --- tests/ahci_test.in | 2 +- tests/ehci_test.in | 2 +- tests/ohci_test.in | 2 +- tests/pata_test.in | 2 +- tests/uhci_test.in | 2 +- tests/util/grub-shell.in | 14 ++ 6 files changed, 19 insertions(+), 5 deletions(-)

[PATCH v11 10/11] LoongArch: add efistub kernel support

2022-09-02 Thread Xiaotian Wu
Signed-off-by: Xiaotian Wu Signed-off-by: Sun Haiyong --- gentpl.py| 2 +- grub-core/loader/loongarch64/linux.c | 329 ++- include/grub/loongarch64/linux.h | 15 +- 3 files changed, 335 insertions(+), 11 deletions(-) diff --git a/gentpl

[PATCH v11 05/11] LoongArch: Add stubs for Linux loading commands

2022-09-02 Thread Xiaotian Wu
Signed-off-by: Xiaotian Wu --- grub-core/loader/loongarch64/linux.c | 59 include/grub/loongarch64/linux.h | 31 +++ 2 files changed, 90 insertions(+) create mode 100644 grub-core/loader/loongarch64/linux.c create mode 100644 include/grub/loongarch64

[PATCH v11 06/11] LoongArch: Add awareness for LoongArch relocations

2022-09-02 Thread Xiaotian Wu
Signed-off-by: Xiaotian Wu Signed-off-by: Zhou Yang --- grub-core/kern/dl.c| 9 +- grub-core/kern/loongarch64/dl.c| 102 + grub-core/kern/loongarch64/dl_helper.c | 202 + include/grub/dl.h | 1 + include/gru

[PATCH v11 08/11] LoongArch: Add to build system

2022-09-02 Thread Xiaotian Wu
Signed-off-by: Xiaotian Wu Signed-off-by: Zhou Yang --- Makefile.util.def | 1 + configure.ac| 22 - gentpl.py | 25 ++- grub-core/Makefile.am | 6 + grub-core/Makefile.core.def | 16 include/gru

[PATCH v11 07/11] LoongArch: Add auxiliary files

2022-09-02 Thread Xiaotian Wu
Signed-off-by: Xiaotian Wu Signed-off-by: Zhou Yang --- grub-core/kern/efi/mm.c | 3 +- grub-core/kern/loongarch64/cache.c | 39 grub-core/kern/loongarch64/cache_flush.S | 33 ++ grub-core/kern/loongarch64/efi/init.c| 77

[PATCH v11 03/11] LoongArch: Add setjmp implementation

2022-09-02 Thread Xiaotian Wu
Signed-off-by: Xiaotian Wu Signed-off-by: Zhou Yang Signed-off-by: Sun Haiyong --- grub-core/lib/loongarch64/setjmp.S | 69 ++ grub-core/lib/setjmp.S | 2 + include/grub/loongarch64/setjmp.h | 27 3 files changed, 98 insertions(+) create m

[PATCH v11 04/11] LoongArch: Add early startup code

2022-09-02 Thread Xiaotian Wu
Signed-off-by: Xiaotian Wu Signed-off-by: Zhou Yang --- grub-core/kern/loongarch64/efi/startup.S | 34 1 file changed, 34 insertions(+) create mode 100644 grub-core/kern/loongarch64/efi/startup.S diff --git a/grub-core/kern/loongarch64/efi/startup.S b/grub-core/kern/l

[PATCH v11 02/11] Add LoongArch definitions

2022-09-02 Thread Xiaotian Wu
Signed-off-by: Xiaotian Wu Signed-off-by: Zhou Yang --- include/grub/elf.h | 23 +++ 1 file changed, 23 insertions(+) diff --git a/include/grub/elf.h b/include/grub/elf.h index 0e70651d4..beef94512 100644 --- a/include/grub/elf.h +++ b/include/grub/elf.h @@ -252,6 +252,7 @@

[PATCH v11 01/11] PE: Add LoongArch definitions

2022-09-02 Thread Xiaotian Wu
Signed-off-by: Xiaotian Wu Signed-off-by: Zhou Yang --- include/grub/efi/pe32.h | 36 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/include/grub/efi/pe32.h b/include/grub/efi/pe32.h index 0ed8781f0..de56edef6 100644 --- a/include/grub/efi/pe

[PATCH v11 00/11] Add support for LoongArch

2022-09-02 Thread Xiaotian Wu
This patchset adds support for the LoongArch instruction set. I tested it on QEMU, 3A5000 pc and 3C5000L server and it worked fine. Please review the patches and let me know if changes are needed. I hope it can be merged into the 2.12 release, thanks. v1->v2: - rebase on the last commit. - fix

Re: [PATCH v3 0/8] linux: implement LoadFile2 initrd loading

2022-09-02 Thread Heinrich Schuchardt
On 8/18/22 16:51, Ard Biesheuvel wrote: This implements the LoadFile2 initrd loading protocol, which is essentially a callback interface into the bootloader to load the initrd data into a caller provided buffer. This means the bootloader no longer has to contain any policy regarding where to load

Re: [PATCH v3 2/8] efi: move MS-DOS stub out of generic PE header definition

2022-09-02 Thread Heinrich Schuchardt
On 8/18/22 16:51, Ard Biesheuvel wrote: The PE/COFF spec permits the COFF signature and file header to appear anywhere in the file, and the actual offset is recorded in 4 byte little endian field at offset 0x3c of the image. When GRUB is emitted as a PE/COFF binary, we reuse the 128 byte MS-DOS