[PATCH v2 0/7] Fix Yeeloong 2F support

2024-09-03 Thread Vladimir 'phcoder' Serbinenko
v2: Changed how I fix module search: instead of matching alignment, compute the module position explicitly -- Regards Vladimir 'phcoder' Serbinenko ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

[PATCH v2 5/7] gentpl: Put startup_raw.S into beginning of the image

2024-09-03 Thread Vladimir Serbinenko
Otherwise it breaks the decompressors for mips platforms Signed-off-by: Vladimir Serbinenko --- gentpl.py | 4 ++-- grub-core/Makefile.core.def | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gentpl.py b/gentpl.py index 3b12eca6c..d8c6965d8 100644 --- a

[PATCH v2 3/7] xzembed: Silence warning when no BCJ is available

2024-09-03 Thread Vladimir Serbinenko
BCJ is not available for all platforms hence arguments may end up unused Signed-off-by: Vladimir Serbinenko --- grub-core/lib/xzembed/xz_dec_bcj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/lib/xzembed/xz_dec_bcj.c b/grub-core/lib/xzembed/xz_dec_bcj.c index bf

[PATCH v2 6/7] offsets: Set mod_align to 4 on mips

2024-09-03 Thread Vladimir Serbinenko
Module structure has natural alignment of 4. Respect it explicitly rather than relying on the fact that _end is usually aligned Signed-off-by: Vladimir Serbinenko --- include/grub/offsets.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/grub/offsets.h b/include

[PATCH v2 4/7] configure: Add -mno-gpopt option

2024-09-03 Thread Vladimir Serbinenko
Without it compiler generates GPREL16 references which do not work with our memory layout Signed-off-by: Vladimir Serbinenko --- configure.ac | 12 1 file changed, 12 insertions(+) diff --git a/configure.ac b/configure.ac index fe5493246..c3d9398ab 100644 --- a/configure.ac +++ b/c

[PATCH v2 2/7] erofs: Replace 64-bit modulo with bitwise operations

2024-09-03 Thread Vladimir Serbinenko
Otherwise depending on compiler we end up with umoddi3 reference and failed module dependency resolution Signed-off-by: Vladimir Serbinenko --- grub-core/fs/erofs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grub-core/fs/erofs.c b/grub-core/fs/erofs.c index 46cfc2e5c

[PATCH v2 1/7] configure: Look for .otf fonts

2024-09-03 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index d4a14bf93..fe5493246 100644 --- a/configure.ac +++ b/configure.ac @@ -1875,7 +1875,7 @@ AC_ARG_WITH([unifont], if test "x$with_unifont" = x;

[PATCH v2 7/7] mkimage: Explicitly move modules to __bss_start

2024-09-03 Thread Vladimir Serbinenko
Assembly code looks for modules at __bss_start. Make this position explicit rather than matching bss alignment and module alignment. Signed-off-by: Vladimir Serbinenko --- util/grub-mkimagexx.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/util/grub-mkimagexx.c b/util/g

[PATCH v5 5/5] keccak: Disable acceleration with SSE asm

2024-09-03 Thread Vladimir Serbinenko
Libgcrypt code assumes that on x64 all SSE registers are fair game. While it's true that CPUs in question support it, we disable it in our compilation options. Disable the offending optimization. Signed-off-by: Vladimir Serbinenko --- .../lib/libgcrypt-patches/02_keccak_sse.patch | 23 ++

[PATCH v5 3/5] Adjust import script, definitions and API users for libgcrypt 1.10

2024-09-03 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- autogen.sh | 5 + conf/Makefile.common| 4 +- grub-core/Makefile.core.def | 36 ++- grub-core/commands/hashsum.c| 2 +- grub-core/commands/legacycfg.c

[PATCH v5 4/5] Add DSA and RSA SEXP tests

2024-09-03 Thread Vladimir Serbinenko
This allows us to test purely the integration of the implementation of DSA and RSA from libgcrypt without concerning with additional code. Signed-off-by: Vladimir Serbinenko --- grub-core/tests/dsa_sexp_test.c | 125 grub-core/tests/rsa_sexp_test.c | 99

[PATCH v5 2/5] Import b64dec from gpg-error

2024-09-03 Thread Vladimir Serbinenko
Base on libgpg-error 1.49 but with modifications to make it compile in GRUB environment Signed-off-by: Vladimir Serbinenko --- grub-core/lib/b64dec.c | 293 + 1 file changed, 293 insertions(+) create mode 100644 grub-core/lib/b64dec.c diff --git a/grub-c

[PATCH v2 1/2] loader/efi: Reuse len variable

2024-09-03 Thread Frediano Ziglio via Grub-devel
Signed-off-by: Frediano Ziglio --- grub-core/loader/efi/linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- Changes since v1: - split pointer reset. diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c index 803d2541d..cbb480b34 100644 --- a/grub-core/loader

[PATCH v2 2/2] loader/efi: Reset freed pointer

2024-09-03 Thread Frediano Ziglio via Grub-devel
Avoid dangling pointer. Code should not be reached but better safe than sorry. Signed-off-by: Frediano Ziglio --- grub-core/loader/efi/linux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c index cbb480b34..1ffbcf9ce 100644 --- a/g

Re: [PATCH] loader/efi: Update comment

2024-09-03 Thread Vladimir 'phcoder' Serbinenko
Reviewed-by: phco...@gmail.com Le mar. 3 sept. 2024, 11:02, Frediano Ziglio via Grub-devel < grub-devel@gnu.org> a écrit : > The function called is grub_utf8_to_utf16. > > Signed-off-by: Frediano Ziglio > --- > grub-core/loader/efi/linux.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH] relocator: Use .quad instead of .long

2024-09-03 Thread Vladimir 'phcoder' Serbinenko
Reviewed-by: phco...@gmail.com Le mar. 3 sept. 2024, 11:02, Frediano Ziglio via Grub-devel < grub-devel@gnu.org> a écrit : > Used also in other assembly files. > They are single 64-bit values. > > Signed-off-by: Frediano Ziglio > --- > grub-core/lib/x86_64/relocator_asm.S | 12 ++-- > 1

Re: [PATCH] loader/efi: Reuse len variable

2024-09-03 Thread Vladimir 'phcoder' Serbinenko
This also sets a variable at it's end. Can you adjust the commit message? Or even split it? Le mar. 3 sept. 2024, 11:02, Frediano Ziglio via Grub-devel < grub-devel@gnu.org> a écrit : > Signed-off-by: Frediano Ziglio > --- > grub-core/loader/efi/linux.c | 5 +++-- > 1 file changed, 3 insertions

Re: Feedback Request: Creating Minimal Virtio-Net for GRUB/Qemu

2024-09-03 Thread Gerd Hoffmann via Grub-devel
On Mon, Sep 02, 2024 at 09:08:59AM GMT, Andrew Hamilton wrote: > Hello, > > I was attempting to get GRUB to be able to communicate over its > network stack for i386-pc inside Qemu to develop some additional GRUB > network protocol tests. I wasn't able to get this working... it seems > the simulat

[PATCH] relocator: Fix comment in code

2024-09-03 Thread Frediano Ziglio via Grub-devel
The instruction uses a 64 bit immediate. Signed-off-by: Frediano Ziglio --- grub-core/lib/x86_64/relocator_asm.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/lib/x86_64/relocator_asm.S b/grub-core/lib/x86_64/relocator_asm.S index 2ab6d8cb7..fd9b2b44e 100644 ---

[PATCH] loader/efi: Reuse len variable

2024-09-03 Thread Frediano Ziglio via Grub-devel
Signed-off-by: Frediano Ziglio --- grub-core/loader/efi/linux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c index 803d2541d..1ffbcf9ce 100644 --- a/grub-core/loader/efi/linux.c +++ b/grub-core/loader/efi/linu

[PATCH] loader/efi: Update comment

2024-09-03 Thread Frediano Ziglio via Grub-devel
The function called is grub_utf8_to_utf16. Signed-off-by: Frediano Ziglio --- grub-core/loader/efi/linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c index bfbd95aee..803d2541d 100644 --- a/grub-core/loader/efi/

[PATCH] relocator: Use .quad instead of .long

2024-09-03 Thread Frediano Ziglio via Grub-devel
Used also in other assembly files. They are single 64-bit values. Signed-off-by: Frediano Ziglio --- grub-core/lib/x86_64/relocator_asm.S | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/grub-core/lib/x86_64/relocator_asm.S b/grub-core/lib/x86_64/relocator_asm.S