Translate

Archives

Accessing UEFI Global Variables from User Space

UEFI is a follow on to the original EFI specification developed by Intel in the late 1990s. UEFI uses GPT (GUID Partition Table) instead of MBR (Master Boot Record) to enable support for partitions greater than 2Tb. Many BIOSes available today support GPT but a platform without UEFI support cannot boot an operating system from a GPT partition larger than 2TB. Until recently, UEFI was restricted to high-end servers but is now becoming more commonplace on commodity servers and desktops.

I have a UEFI-enabled Intel motherboard and can boot Fedora 12 and 64-bit versions of Microsoft Vista and Windows 7 via UEFI. While there are still some issues with the UEFI-support in Fedora 12, in general it works. However the only UEFI-aware utility that I am aware of for Fedora 12 is Matt Domsch’s efibootmgr which is a Linux user-space application which can create, modify or destroy UEFI globally defined variables relating to booting.

However the Fedora 12 kernel is aware of more UEFI globally-defined variables than those displayed by efibootmgr and these can be accessed via /sys/firmware/efi as shown below.

# ls -al /sys/firmware/efi/vars
drwxr-xr-x.  2 root root 0 2010-01-22 16:25 Boot0000-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x.  2 root root 0 2010-01-22 16:25 Boot0001-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x.  2 root root 0 2010-01-22 16:25 BootCurrent-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x.  2 root root 0 2010-01-22 23:59 BootOptionSupport-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x.  2 root root 0 2010-01-22 16:25 BootOrder-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x.  2 root root 0 2010-01-22 23:59 ConIn-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x.  2 root root 0 2010-01-22 23:59 ConInDev-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x.  2 root root 0 2010-01-22 23:59 ConOut-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x.  2 root root 0 2010-01-22 23:59 ConOutDev-8be4df61-93ca-11d2-aa0d-00e098032b8c
--w-------.  1 root root 0 2010-01-22 23:59 del_var
drwxr-xr-x.  2 root root 0 2010-01-22 23:59 ErrOut-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x.  2 root root 0 2010-01-22 23:59 ErrOutDev-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x.  2 root root 0 2010-01-22 23:59 Lang-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x.  2 root root 0 2010-01-22 23:59 LangCodes-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x.  2 root root 0 2010-01-22 23:59 MTC-eb704011-1402-11d3-8e77-00a0c969723b
--w-------.  1 root root 0 2010-01-22 23:59 new_var
drwxr-xr-x.  2 root root 0 2010-01-22 23:59 PerfDataMemAddr-59d1c24f-50f1-401a-b101-f33e0daed443
drwxr-xr-x.  2 root root 0 2010-01-22 23:59 PlatformLang-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x.  2 root root 0 2010-01-22 23:59 PlatformLangCodes-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x.  2 root root 0 2010-01-22 16:25 Timeout-8be4df61-93ca-11d2-aa0d-00e098032b8c


Here is what is in the Boot-0000 -8be4df61-93ca-11d2-aa0d-00e098032b8c subdirectory:

# ls -al /sys/firmware/efi/vars/Boot0000-8be4df61-93ca-11d2-aa0d-00e098032b8c]# ls -al
-r--------.  1 root root 4096 2010-01-23 00:02 attributes
-r--------.  1 root root 4096 2010-01-23 00:02 data
-r--------.  1 root root 4096 2010-01-23 00:02 guid
-rw-------.  1 root root 4096 2010-01-22 16:25 raw_var
-r--------.  1 root root 4096 2010-01-23 00:02 size


The other subdirectories contain similar entries. Some of these subdirectories (those with a GUID of 8be4df61-93ca-11d2-aa0d-00e098032b8c – see below) contain data relating to global defined variables (conceptually similar to environmental variables) documented in the UEFI specification. Here is a table of the globally defined variables in V3.2 of the UEFI specification.

[table "20" seems to be empty /]


In UEFI, globally defined variables have architecturally defined meanings. As well as the defined data content each globally defined variable has an architecturally defined
attribute that indicates when the data variable may be accessed.

#define EFI_VARIABLE_NON_VOLATILE 0x0000000000000001
#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x0000000000000002
#define EFI_VARIABLE_RUNTIME_ACCESS 0x0000000000000004


Variables with the non-volatile (NV) attribute set persist across reboots. Variables with the boot-service (BS) attribute set are only available for use in the pre-boot environment. Variables with the run-time (RT) attribute set are available to both the preboot environment and the operating system. All architecturally defined variables use the EFI_GLOBAL_VARIABLE GUID 0x8BE4DF61, 0x93CA, 0x11D2, 0xAA, 0xOD, 0x00, 0XE0, 0x98, 0x03, 0x2B, 0x8C.

I decided to write a utility which I called uefivars to list details about all the globally defined variables that the Fedora 12 kernel is aware of. Rather than reinvent the wheel, I used the source code for efibootmgr as my starting point since it contained many of the routines that I needed to parse the binary data in the raw_var files. Parsing the EFI_DEVICE_PATH_PROTOCOL descriptor used by ConIn, ConInDev and their cousins proved more problematic as there are numerous Device Path nodes defined by the UEFI specification and these nodes are all byte-packed data structures that may appear on any byte boundary. Fortunately, the source code for the GRUB legacy boot loader contained debugging code to parse device path nodes. By the way, EFI and UEFI are fairly difficult subjects to get your head around. The current UEFI specification (Version 2.3 Errata A) is over 2100 A4 pages in length. The concepts are fairly simple but the implementation details are quite complex.

Here is the source code for uefivars.c

#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <getopt.h>

#include "list.h"
#include "efi.h"
#include "efichar.h"
#include "unparse_path.h"
#include "efibootmgr.h"

typedef struct _var_entry {
    struct dirent *name;
    uint16_t       num;
    efi_variable_t var_data;
    list_t         list;
} var_entry_t;

static LIST_HEAD(list_head);

void
free_vars(list_t *head)
{
    list_t *pos, *n;
    var_entry_t *boot;

    list_for_each_safe(pos, n, head) {
        boot = list_entry(pos, var_entry_t, list);
        list_del(&(boot->list));
        free(boot);
    }
}

void
read_vars(struct dirent **namelist,
          int num_boot_names,
          list_t *head)
{
    efi_status_t status;
    var_entry_t *entry;
    int i;

    if (!namelist) return;

    for (i=0; i < num_boot_names; i++) {
        if (namelist[i]) {
            entry = malloc(sizeof(var_entry_t));
            if (!entry) return;
            memset(entry, 0, sizeof(var_entry_t));

            status = read_variable(namelist[i]->d_name, &entry->var_data);
            if (status == EFI_SUCCESS) { 
                entry->name = namelist[i];
                list_add_tail(&entry->list, head);
            } else  free(entry);
        }
    }
}

void
free_dirents(struct dirent **ptr, 
             int num_dirents)
{
    int i;
    if (!ptr) return;
    for (i=0; i < num_dirents; i++) {
        if (ptr[i]) {
            free(ptr[i]);
            ptr[i] = NULL;
        }
    }
    free(ptr);
}


void
usage()
{
    printf("usage: uefivars [-v | --version]\n");
    printf("       uefivars [-u | --unknown]\n");
}


int
main(int argc, 
     char **argv)
{
    int c, i, first, unknownvar = 0;
    int option_index = 0;
    int num_all = 0;
    list_t *pos;
    var_entry_t *var;
    char desc[1032];
    char attributes[12];
    struct dirent  **all = NULL;

    static struct option long_options[] = {
        {"help", no_argument, 0, 'h'},
        {"unknown", no_argument, 0, 'u'},
        {"version", no_argument, 0, 'v'},
        {0, 0, 0, 0}
    };

    while ((c = getopt_long(argc, argv, "huv", long_options, &option_index)) != -1) {
        switch (c) {
            case 'h':
                 usage();
                 exit(EXIT_SUCCESS);
             case 'u':
                 unknownvar = 1;
                 break;
             case 'v':
                 fprintf(stdout, "version %s\n", EFIVARS_VERSION);
                 exit(EXIT_SUCCESS);
             default: /* '?' */
                 usage();
                 exit(EXIT_FAILURE);
        }
    }
        
    set_fs_kernel_calls();

    /* retrieve all entries */
    num_all = read_all_var_names(&all);
    read_vars(all, num_all, &list_head);

    /* loop through each entry and parse */
    list_for_each(pos, &list_head) {
        var = list_entry(pos, var_entry_t, list);
        efichar_to_char(desc, var->var_data.VariableName , sizeof(desc));

        /* parse attributes and build attributes text string */
        memset(attributes,0,12);
        first = 1;
        if (var->var_data.Attributes & EFI_VARIABLE_NON_VOLATILE) {
            if (first) {
               strcpy(attributes, "(");
               first = 0;
            } else strcat(attributes, ","); 
            strcat(attributes, "NV");
        }
        if (var->var_data.Attributes & EFI_VARIABLE_BOOTSERVICE_ACCESS) {
            if (first) {
                strcpy(attributes, "(");
                first = 0;
            } else strcat(attributes, ","); 
            strcat(attributes, "BS");
        }
        if (var->var_data.Attributes & EFI_VARIABLE_RUNTIME_ACCESS) {   
            if (first) {
                strcpy(attributes, "(");
                first = 0;
            } else strcat(attributes, ","); 
            strcat(attributes, "RT");
        }
        if (!first) strcat(attributes, ")");

        /* parse boot entries - only handles first 4 at present */
        if (!strcmp(desc, "Boot0000") || !strcmp(desc, "Boot0001") ||
            !strcmp(desc, "Boot0002") || !strcmp(desc, "Boot0003")) { 

            char description[80];
            EFI_LOAD_OPTION *load_option;
            EFI_DEVICE_PATH *path;
            char text_path[1024], *p;
            unsigned long optional_data_len=0;

            load_option = (EFI_LOAD_OPTION *) var->var_data.Data;
            efichar_to_char(description, load_option->description, sizeof(description));
            memset(text_path, 0, sizeof(text_path));
            path = load_option_path(load_option);

            if (var->name) 
                 printf("%.8s %s:", var->name->d_name, attributes);
            else printf("Boot%04X %s:", var->num, attributes);
            if (load_option->attributes & LOAD_OPTION_ACTIVE)
                printf("* ");
            else  printf("  ");
            printf("%s", description);

            unparse_path(text_path, path, load_option->file_path_list_length);
            optional_data_len = var->var_data.DataSize - load_option->file_path_list_length -
                                ((char *)path - (char *)load_option);
            if (optional_data_len) {
                 p = text_path;
                 p += strlen(text_path);
                 unparse_raw_text(p, ((uint8_t *)path) + load_option->file_path_list_length, optional_data_len);
            }
            printf("\t%s\n", text_path);
        } else if (!strcmp(desc, "BootCurrent")) {
            uint16_t *n = (uint16_t *)(var->var_data.Data);
            printf("BootCurrent %s: %04X\n", attributes, (unsigned int)*n);
        } else if (!strcmp(desc, "BootNext")) {
            uint16_t *n = (uint16_t *)(var->var_data.Data);
            printf("BootNext %s: %04X\n", attributes, (unsigned int)*n);
        } else if (!strcmp(desc, "BootOptionSupport")) {
            uint16_t *n = (uint16_t *)(var->var_data.Data);
            printf("BootOptionSupport %s: %04X\n", attributes, (unsigned int)*n);
        } else if (!strcmp(desc, "BootOrder")) {
            uint16_t *data = (uint16_t *)&(var->var_data.Data);
            int *datasize = (int *)&(var->var_data.DataSize);
            int len = *datasize/sizeof(uint16_t);
            printf("BootOrder %s: ", attributes);
            for (i = 0; i < len; i++) {
                printf("%04X", data[i]);
                if (i < ( len - 1)) printf(",");
            }
            printf("\n");
        } else if (!strcmp(desc, "ConIn")) {
            printf("ConIn %s:\n", attributes);
            efi_print_device_path(var->var_data.Data);
        } else if (!strcmp(desc, "ConInDev")) {
            printf("ConInDev %s:\n", attributes);
            efi_print_device_path(var->var_data.Data);
        } else if (!strcmp(desc, "ConOut")) {
            printf("ConOut %s:\n", attributes);
            efi_print_device_path(var->var_data.Data);
        } else if (!strcmp(desc, "ConOutDev")) {
            printf("ConOutDev %s:\n", attributes);
            efi_print_device_path(var->var_data.Data);
        } else if (!strcmp(desc, "ErrOut")) {
            printf("ErrOut %s:\n", attributes);
            efi_print_device_path(var->var_data.Data);
        } else if (!strcmp(desc, "ErrOutDev")) {
            printf("ErrOutDev %s:\n", attributes);
            efi_print_device_path(var->var_data.Data);
        } else if (!strcmp(desc, "Lang")) {
            uint8_t *data = (uint8_t *)&(var->var_data.Data);
            printf("Lang %s: ", attributes);
            for (i = 0; i < 3; i++) 
                printf("%c", data[i]);
            printf("\n");
        } else if (!strcmp(desc, "LangCodes")) {
            uint8_t *data = (uint8_t *)&(var->var_data.Data);
            printf("LangCodes %s: ", attributes);
            while (1) {
               for (i = 0; i < 3; i++)
                   printf("%c", *data++);
               if (*data < 32) break;
               printf(",");
            }
            printf("\n");
        } else if (!strcmp(desc, "PlatformLang")) {
            uint8_t *data = (uint8_t *)&(var->var_data.Data);
            printf("PlatformLang %s: ", attributes);
            for (i = 0; i < 5; i++) 
                printf("%c", data[i]);
            printf("\n");
        } else if (!strcmp(desc, "PlatformLangCodes")) {
            uint8_t *data = (uint8_t *)&(var->var_data.Data);
            printf("PlatformLangCodes %s: ", attributes);
            while (1) {
               for (i = 0; i < 5; i++) 
                   printf("%c", *data++);
               if (*data < 32) break;
               if (*data == ';') {
                   printf(",");
                   data++;
               }
            }
            printf("\n");
        } else if (!strcmp(desc, "Timeout")) {
            uint16_t *n = (uint16_t *)(var->var_data.Data);
            printf("Timeout %s: %d secs\n", attributes, (int)*n);
        } else if (unknownvar) {
            printf("%s %s: UNKNOWN\n", desc, attributes);
        }
    }

    free_dirents(all, num_all);
    free_vars(&list_head);
    exit(EXIT_SUCCESS);
}


Here is what uefivars outputs for 64-bit Fedora 12. Note that I booted this instance of Fedora 12 from a USB key using DUET (Developers UEFI Emulation) – hence the Boot0000 USB entry.

# uefivars
Boot0000 (NV,BS,RT):* EFI USB Device	ACPI(a0841d0,0)PCI(1d,7)USB(2,0)
Boot0001 (NV,BS,RT):* EFI DVD/CDROM	ACPI(a0841d0,0)PCI(1f,2)ATAPI(0,0,0)
BootCurrent (BS,RT): 003D
BootOptionSupport (BS,RT): 0303
BootOrder (NV,BS,RT): 0000,0001
ConIn (NV,BS,RT):
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(30341d0,0)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(11d2f9be-0c9a-9000-273f-c14d7f010400)
/USBClass(ffff,ffff,3,1,1)
ConInDev (BS,RT):
/USBClass(ffff,ffff,3,1,1)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(11d2f9be-0c9a-9000-273f-c14d7f010400)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(11d3b419-2d9a-9000-273f-c14d7f010400)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(4c7657e0-878e-9e2f-2808-83437f010400)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(4acf8bec-73a0-1dd0-e77e-2d887f010400)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(30341d0,0)
ConOut (NV,BS,RT):
/ACPI(a0841d0,0)/PCI(0,1)/PCI(0,0)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(11d2f9be-0c9a-9000-273f-c14d7fff0400)
ConOutDev (BS,RT):
/ACPI(a0841d0,0)/PCI(0,1)/PCI(0,0)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(11d2f9be-0c9a-9000-273f-c14d7f010400)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(11d3b419-2d9a-9000-273f-c14d7f010400)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(4c7657e0-878e-9e2f-2808-83437f010400)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(4acf8bec-73a0-1dd0-e77e-2d887fff0400)
ErrOut (NV,BS,RT):
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(11d2f9be-0c9a-9000-273f-c14d7fff0400)
ErrOutDev (BS,RT):
/ACPI(a0841d0,0)/PCI(0,1)/PCI(0,0)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(11d2f9be-0c9a-9000-273f-c14d7f010400)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(11d3b419-2d9a-9000-273f-c14d7f010400)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(4c7657e0-878e-9e2f-2808-83437f010400)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(4acf8bec-73a0-1dd0-e77e-2d887fff0400)
Lang (NV,BS,RT): eng
LangCodes (BS,RT): eng,fra
PlatformLang (NV,BS,RT): en-US
PlatformLangCodes (BS,RT): en-US,fr-FR
Timeout (NV,BS,RT): 3 secs
# 
root@ultra uefivars]# ./uefivars
Boot0000 (NV,BS,RT):* EFI USB Device	ACPI(a0841d0,0)PCI(1d,7)USB(2,0)
Boot0001 (NV,BS,RT):* EFI DVD/CDROM	ACPI(a0841d0,0)PCI(1f,2)ATAPI(0,0,0)
BootCurrent (BS,RT): 003D
BootOptionSupport (BS,RT): 0303
BootOrder (NV,BS,RT): 0000,0001
ConIn (NV,BS,RT):
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(30341d0,0)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(11d2f9be-0c9a-9000-273f-c14d7f010400)
/USBClass(ffff,ffff,3,1,1)
ConInDev (BS,RT):
/USBClass(ffff,ffff,3,1,1)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(11d2f9be-0c9a-9000-273f-c14d7f010400)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(11d3b419-2d9a-9000-273f-c14d7f010400)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(4c7657e0-878e-9e2f-2808-83437f010400)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(4acf8bec-73a0-1dd0-e77e-2d887f010400)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(30341d0,0)
ConOut (NV,BS,RT):
/ACPI(a0841d0,0)/PCI(0,1)/PCI(0,0)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(11d2f9be-0c9a-9000-273f-c14d7fff0400)
ConOutDev (BS,RT):
/ACPI(a0841d0,0)/PCI(0,1)/PCI(0,0)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(11d2f9be-0c9a-9000-273f-c14d7f010400)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(11d3b419-2d9a-9000-273f-c14d7f010400)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(4c7657e0-878e-9e2f-2808-83437f010400)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(4acf8bec-73a0-1dd0-e77e-2d887fff0400)
ErrOut (NV,BS,RT):
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(11d2f9be-0c9a-9000-273f-c14d7fff0400)
ErrOutDev (BS,RT):
/ACPI(a0841d0,0)/PCI(0,1)/PCI(0,0)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(11d2f9be-0c9a-9000-273f-c14d7f010400)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(11d3b419-2d9a-9000-273f-c14d7f010400)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(4c7657e0-878e-9e2f-2808-83437f010400)
/ACPI(a0841d0,0)/PCI(0,1f)/ACPI(50141d0,1)/UART(115200,8,1,1)/Vendor(4acf8bec-73a0-1dd0-e77e-2d887fff0400)
Lang (NV,BS,RT): eng
LangCodes (BS,RT): eng,fra
PlatformLang (NV,BS,RT): en-US
PlatformLangCodes (BS,RT): en-US,fr-FR
Timeout (NV,BS,RT): 3 secs
[root@ultra uefivars]# 


I have created a SourceForge project for uefivars. There you can download and build the executable for your own system. Note that, of the date of this post, I have only tested this release on 64-bit Fedora 12. There may be 32-bit issues in the source code or it may not run on 32-bit architectures for whatever reason. BTW, I finally made the big leap and used Git for source code control instead of Subversion. I may be in the minority but it seems to me that the Git syntax is not intuitive and hence I have been slow to make the changeover.

As computer vendors move away from BIOS and MBR partitions towards GPT partitioning and UEFI booting, I believe that there will be a need for more utilities like uefivars that assist users in understanding and modifying their UEFI configuration.

As always, enjoy!
 

3 comments to Accessing UEFI Global Variables from User Space in Fedora 12

  • I’m glad you found efibootmgr so useful. If it would help, I built efibootmgr such that most of the functionality, except for the actual front-end command line interface, to be used as a library. The library part could be split out into its own package (or subpackage), such that you could then simply call into it as needed, rather than copying the library bits to your own program.

    • Matt,

      Good idea. Perhaps, however, it is time to develop an more general purpose UEFI
      library which would include routines to walk device path nodes and more.

      – Finn

  • […] P. Murphy (fpmurphy) posted on his blog yesterday about his new project, uefivars, to retrieve and display information about UEFI […]