1 /* SPDX-License-Identifier: GPL-2.0-only */
6 #include <Uefi/UefiBaseType.h>
10 static const EFI_GUID EficorebootNvDataGuid
= {
11 0xceae4c1d, 0x335b, 0x4685, { 0xa4, 0xa0, 0xfc, 0x4a, 0x94, 0xee, 0xa0, 0x85 } };
13 unsigned int get_uint_option(const char *name
, const unsigned int fallback
)
15 struct region_device rdev
;
20 if (smmstore_lookup_region(&rdev
))
25 ret
= efi_fv_get_option(&rdev
, &EficorebootNvDataGuid
, name
, &var
, &size
);
26 if (ret
!= CB_SUCCESS
)
32 enum cb_err
set_uint_option(const char *name
, unsigned int value
)
34 struct region_device rdev
;
37 if (smmstore_lookup_region(&rdev
))
38 return CB_CMOS_OTABLE_DISABLED
;
40 return efi_fv_set_option(&rdev
, &EficorebootNvDataGuid
, name
, &var
, sizeof(var
));