lib/hwfeatures-gcry: Enable SSE and AVX for x86_64 EFI

Implement the necessary functions to dynamically enable SSE and AVX
on x86_64 EFI systems when the hardware is capable.

Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Gary Lin authored and Daniel Kiper committed 2025-10-23 19:15:00 +02:00
1 parent 06a5b88baf
commit 8423176f1f
5 files changed
+282

No files matched your search

+9
View File
@@ -19,6 +19,9 @@
#include <grub/dl.h>
#include <grub/hwfeatures-gcry.h>
#if defined (__x86_64__) && defined (GRUB_MACHINE_EFI)
#include <grub/x86_64/efi/hwfeatures-gcry.h>
#endif
GRUB_MOD_LICENSE ("GPLv3+");
@@ -33,11 +36,17 @@ grub_gcry_hwf_enabled (void)
void
grub_enable_gcry_hwf (void)
{
#if defined (__x86_64__) && defined (GRUB_MACHINE_EFI)
grub_enable_gcry_hwf_x86_64_efi ();
#endif
__gcry_use_hwf = true;
}
void
grub_reset_gcry_hwf (void)
{
#if defined (__x86_64__) && defined (GRUB_MACHINE_EFI)
grub_reset_gcry_hwf_x86_64_efi ();
#endif
__gcry_use_hwf = false;
}