Lines Matching refs:efi
3 * efi.c - EFI subsystem
9 * This code registers /sys/firmware/efi{,/efivars} when EFI is supported,
11 * The existance of /sys/firmware/efi may also be used by userspace to
22 #include <linux/efi.h>
38 struct efi __read_mostly efi = {
57 EXPORT_SYMBOL(efi);
105 set_bit(EFI_DBG, &efi.flags);
114 set_bit(EFI_MEM_NO_SOFT_RESERVE, &efi.flags);
118 early_param("efi", parse_efi_cmdline);
136 if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
137 str += sprintf(str, "ACPI20=0x%lx\n", efi.acpi20);
138 if (efi.acpi != EFI_INVALID_TABLE_ADDR)
139 str += sprintf(str, "ACPI=0x%lx\n", efi.acpi);
145 if (efi.smbios3 != EFI_INVALID_TABLE_ADDR)
146 str += sprintf(str, "SMBIOS3=0x%lx\n", efi.smbios3);
147 if (efi.smbios != EFI_INVALID_TABLE_ADDR)
148 str += sprintf(str, "SMBIOS=0x%lx\n", efi.smbios);
202 status = efi.get_next_variable(&name_size, &name, &guid);
214 generic_ops.get_variable = efi.get_variable;
215 generic_ops.get_next_variable = efi.get_next_variable;
217 generic_ops.query_variable_info = efi.query_variable_info;
220 generic_ops.set_variable = efi.set_variable;
221 generic_ops.set_variable_nonblocking = efi.set_variable_nonblocking;
272 status = efi.get_next_variable(&name_size, name, &guid);
293 status = efi.get_variable(name, &guid, NULL, &data_size, NULL);
301 status = efi.get_variable(name, &guid, NULL, &data_size, data);
333 efi_debugfs = debugfs_create_dir("efi", NULL);
373 * We register the efi subsystem with the firmware subsystem and the
374 * efivars subsystem with the efi subsystem, if the system was booted with
382 efi.runtime_supported_mask = 0;
387 if (efi.runtime_supported_mask) {
396 clear_bit(EFI_RUNTIME_SERVICES, &efi.flags);
397 efi.runtime_supported_mask = 0;
403 platform_device_register_simple("rtc-efi", 0, NULL, 0);
405 /* We register the efi directory at /sys/firmware/efi */
406 efi_kobj = kobject_create_and_add("efi", firmware_kobj);
408 pr_err("efi: Firmware registration failed.\n");
424 pr_err("efi: Sysfs attribute export failed with error %d.\n",
440 if (efi.coco_secret != EFI_INVALID_TABLE_ADDR)
488 * Find the efi memory descriptor for a given physical address. Given a
531 * Calculate the highest address of an efi memory descriptor.
574 {ACPI_20_TABLE_GUID, &efi.acpi20, "ACPI 2.0" },
575 {ACPI_TABLE_GUID, &efi.acpi, "ACPI" },
576 {SMBIOS_TABLE_GUID, &efi.smbios, "SMBIOS" },
577 {SMBIOS3_TABLE_GUID, &efi.smbios3, "SMBIOS 3.0" },
578 {EFI_SYSTEM_RESOURCE_TABLE_GUID, &efi.esrt, "ESRT" },
581 {LINUX_EFI_TPM_EVENT_LOG_GUID, &efi.tpm_log, "TPMEventLog" },
582 {LINUX_EFI_TPM_FINAL_LOG_GUID, &efi.tpm_final_log, "TPMFinalLog" },
590 {LINUX_EFI_MOK_VARIABLE_TABLE_GUID, &efi.mokvar_table, "MOKvar" },
593 {LINUX_EFI_COCO_SECRET_AREA_GUID, &efi.coco_secret, "CocoSecret" },
596 {LINUX_EFI_UNACCEPTED_MEM_TABLE_GUID, &efi.unaccepted, "Unaccepted" },
651 start = PAGE_ALIGN_DOWN(efi.unaccepted);
692 set_bit(EFI_CONFIG_TABLES, &efi.flags);
763 efi.runtime_supported_mask &= tbl->runtime_services_supported;
781 efi.unaccepted != EFI_INVALID_TABLE_ADDR) {
784 unaccepted = early_memremap(efi.unaccepted, sizeof(*unaccepted));
790 efi.unaccepted = EFI_INVALID_TABLE_ADDR;
861 efi.runtime_version = EFI_1_10_SYSTEM_TABLE_REVISION;