efi: Enable CMOS on x86 EFI platforms

The CMOS actually exists on most EFI platforms and in some cases is used to
store useful data that makes it justifiable for GRUB to read/write it.

As for date and time keep using EFI API and not CMOS one.

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Vladimir 'phcoder' Serbinenko authored and Daniel Kiper committed 2024-04-11 15:48:25 +02:00
1 parent aa80270154
commit 52e039e00b
3 files changed
+8 -3

No files matched your search

+4
View File
@@ -714,12 +714,16 @@ module = {
name = cmostest; name = cmostest;
common = commands/i386/cmostest.c; common = commands/i386/cmostest.c;
enable = cmos; enable = cmos;
enable = i386_efi;
enable = x86_64_efi;
}; };
module = { module = {
name = cmosdump; name = cmosdump;
common = commands/i386/cmosdump.c; common = commands/i386/cmosdump.c;
enable = cmos; enable = cmos;
enable = i386_efi;
enable = x86_64_efi;
}; };
module = { module = {
+3 -3
View File
@@ -104,13 +104,13 @@ static grub_command_t cmd, cmd_clean, cmd_set;
GRUB_MOD_INIT(cmostest) GRUB_MOD_INIT(cmostest)
{ {
cmd = grub_register_command ("cmostest", grub_cmd_cmostest, cmd = grub_register_command_lockdown ("cmostest", grub_cmd_cmostest,
N_("BYTE:BIT"), N_("BYTE:BIT"),
N_("Test bit at BYTE:BIT in CMOS.")); N_("Test bit at BYTE:BIT in CMOS."));
cmd_clean = grub_register_command ("cmosclean", grub_cmd_cmosclean, cmd_clean = grub_register_command_lockdown ("cmosclean", grub_cmd_cmosclean,
N_("BYTE:BIT"), N_("BYTE:BIT"),
N_("Clear bit at BYTE:BIT in CMOS.")); N_("Clear bit at BYTE:BIT in CMOS."));
cmd_set = grub_register_command ("cmosset", grub_cmd_cmosset, cmd_set = grub_register_command_lockdown ("cmosset", grub_cmd_cmosset,
N_("BYTE:BIT"), N_("BYTE:BIT"),
/* TRANSLATORS: A bit may be either set (1) or clear (0). */ /* TRANSLATORS: A bit may be either set (1) or clear (0). */
N_("Set bit at BYTE:BIT in CMOS.")); N_("Set bit at BYTE:BIT in CMOS."));
+1
View File
@@ -0,0 +1 @@
#include <grub/i386/cmos.h>