[PATCH] bli: set LoaderTpm2ActivePcrBanks runtime variable

2025-07-18 Thread luca . boccassi
From: Luca Boccassi It turns out checking from userspace is not 100% reliable to figure out whether the firmware had TPM2 support enabled or not. For example with EDK2 arm64, the default upstream build config bundles TPM2 support with SecureBoot support, so if the latter is disabled, TPM2 is also

[PATCH] bli: set LoaderTpm2ActivePcrBanks runtime variable

2025-07-18 Thread luca . boccassi
From: Luca Boccassi It turns out checking from userspace is not 100% reliable to figure out whether the firmware had TPM2 support enabled or not. For example with EDK2 arm64, the default upstream build config bundles TPM2 support with SecureBoot support, so if the latter is disabled, TPM2 is also

[RFC PATCH 5/6] libgcrypt-grub: fix a typo in blake2.c

2025-07-18 Thread Gary Lin via Grub-devel
Fix the typo: USE_AVX -> USE_AVX512 Signed-off-by: Gary Lin --- .../10_fix_blake2_typo.patch | 28 +++ 1 file changed, 28 insertions(+) create mode 100644 grub-core/lib/libgcrypt-patches/10_fix_blake2_typo.patch diff --git a/grub-core/lib/libgcrypt-patches/10_f

[RFC PATCH 1/6] tweak autoconf/automake files to detect x86_64 features

2025-07-18 Thread Gary Lin via Grub-devel
Borrow the code from libgcrypt to check whether the compiler supports the assembly instructions for SSSE3, SHA extensions, SSSE4.1, AVX, AVX2, AVX512, and BMI2. Also tweak _gcry_get_hw_features() in include/grub/crypto.h as the preparation to support the hardware feature detection function from li

[RFC PATCH 0/6] Enable libgcrypt HW Acceleration

2025-07-18 Thread Gary Lin via Grub-devel
Git repo: https://github.com/lcp/grub2/tree/libgcrypt-1.11.0-argon2-hw-accel-upstream This patchset is based on Vladimir's libgcrypt 1.11.0 patches. With the newer libgcrypt code, it's possible to drop the hardware acceleration code into libgcrypt-grub. I managed to build the sha256 and blake2 mo

[RFC PATCH 4/6] Build blake2 and sha256 with x86_64 optimization assembly code

2025-07-18 Thread Gary Lin via Grub-devel
A tentative change to build blake2 and sha256 with x86_64 optimization code from libgcrypt Signed-off-by: Gary Lin --- .../09_build_x86_64_opt_code.patch| 80 +++ 1 file changed, 80 insertions(+) create mode 100644 grub-core/lib/libgcrypt-patches/09_build_x86_64_opt

[RFC PATCH 6/6] libgcrypt-grub: fix missing-prototypes error in sha256-intel-shaext.c

2025-07-18 Thread Gary Lin via Grub-devel
Signed-off-by: Gary Lin --- .../11_fix_build_shaext.patch | 30 +++ 1 file changed, 30 insertions(+) create mode 100644 grub-core/lib/libgcrypt-patches/11_fix_build_shaext.patch diff --git a/grub-core/lib/libgcrypt-patches/11_fix_build_shaext.patch b/grub-core/l

[RFC PATCH 3/6] libgcrypt-grub: implement _gcry_get_hw_features()

2025-07-18 Thread Gary Lin via Grub-devel
Implement _gcry_get_hw_features() with the hardware features detection function from libgcryt. Signed-off-by: Gary Lin --- .../libgcrypt-patches/08_add_hwfeatures.patch | 51 +++ 1 file changed, 51 insertions(+) create mode 100644 grub-core/lib/libgcrypt-patches/08_add_hwfeature

[RFC PATCH 2/6] Copy the x86_64 optimization files

2025-07-18 Thread Gary Lin via Grub-devel
Signed-off-by: Gary Lin --- autogen.sh | 7 +++ 1 file changed, 7 insertions(+) diff --git a/autogen.sh b/autogen.sh index fbdb33879..dcc57d180 100755 --- a/autogen.sh +++ b/autogen.sh @@ -52,6 +52,13 @@ for x in mpi-asm-defs.h mpih-add1.c mpih-sub1.c mpih-mul1.c mpih-mul2.c mpih-mul c