summaryrefslogtreecommitdiff
path: root/include/linux/efi.h
diff options
context:
space:
mode:
authorMatthew Garrett <mjg@redhat.com>2011-06-06 15:36:25 -0400
committerH. Peter Anvin <hpa@linux.intel.com>2011-06-06 13:30:30 -0700
commit3b3702377c576f6624348c7c6fd113bfd934fbd7 (patch)
treec68a394441a4269f37b63858fbd54166256893bb /include/linux/efi.h
parentf7a2d73fe75c71941fb0a6b4d8fe7da8144f2c7b (diff)
x86, efi: Add infrastructure for UEFI 2.0 runtime services
We're currently missing support for any of the runtime service calls introduced with the UEFI 2.0 spec in 2006. Add the infrastructure for supporting them. Signed-off-by: Matthew Garrett <mjg@redhat.com> Link: http://lkml.kernel.org/r/1307388985-7852-2-git-send-email-mjg@redhat.com Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'include/linux/efi.h')
-rw-r--r--include/linux/efi.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 0758753a17a1..ec2572693925 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -101,6 +101,13 @@ typedef struct {
u64 attribute;
} efi_memory_desc_t;
+typedef struct {
+ efi_guid_t guid;
+ u32 headersize;
+ u32 flags;
+ u32 imagesize;
+} efi_capsule_header_t;
+
typedef int (*efi_freemem_callback_t) (u64 start, u64 end, void *arg);
/*
@@ -156,6 +163,9 @@ typedef struct {
unsigned long set_variable;
unsigned long get_next_high_mono_count;
unsigned long reset_system;
+ unsigned long update_capsule;
+ unsigned long query_capsule_caps;
+ unsigned long query_variable_info;
} efi_runtime_services_t;
typedef efi_status_t efi_get_time_t (efi_time_t *tm, efi_time_cap_t *tc);
@@ -177,6 +187,17 @@ typedef efi_status_t efi_set_virtual_address_map_t (unsigned long memory_map_siz
unsigned long descriptor_size,
u32 descriptor_version,
efi_memory_desc_t *virtual_map);
+typedef efi_status_t efi_query_variable_info_t(u32 attr,
+ u64 *storage_space,
+ u64 *remaining_space,
+ u64 *max_variable_size);
+typedef efi_status_t efi_update_capsule_t(efi_capsule_header_t **capsules,
+ unsigned long count,
+ unsigned long sg_list);
+typedef efi_status_t efi_query_capsule_caps_t(efi_capsule_header_t **capsules,
+ unsigned long count,
+ u64 *max_size,
+ int *reset_type);
/*
* EFI Configuration Table and GUID definitions
@@ -218,6 +239,13 @@ typedef struct {
#define EFI_SYSTEM_TABLE_SIGNATURE ((u64)0x5453595320494249ULL)
+#define EFI_2_30_SYSTEM_TABLE_REVISION ((2 << 16) | (30))
+#define EFI_2_20_SYSTEM_TABLE_REVISION ((2 << 16) | (20))
+#define EFI_2_10_SYSTEM_TABLE_REVISION ((2 << 16) | (10))
+#define EFI_2_00_SYSTEM_TABLE_REVISION ((2 << 16) | (00))
+#define EFI_1_10_SYSTEM_TABLE_REVISION ((1 << 16) | (10))
+#define EFI_1_02_SYSTEM_TABLE_REVISION ((1 << 16) | (02))
+
typedef struct {
efi_table_hdr_t hdr;
unsigned long fw_vendor; /* physical addr of CHAR16 vendor string */
@@ -250,6 +278,7 @@ struct efi_memory_map {
*/
extern struct efi {
efi_system_table_t *systab; /* EFI system table */
+ unsigned int runtime_version; /* Runtime services version */
unsigned long mps; /* MPS table */
unsigned long acpi; /* ACPI table (IA64 ext 0.71) */
unsigned long acpi20; /* ACPI table (ACPI 2.0) */
@@ -266,6 +295,9 @@ extern struct efi {
efi_get_variable_t *get_variable;
efi_get_next_variable_t *get_next_variable;
efi_set_variable_t *set_variable;
+ efi_query_variable_info_t *query_variable_info;
+ efi_update_capsule_t *update_capsule;
+ efi_query_capsule_caps_t *query_capsule_caps;
efi_get_next_high_mono_count_t *get_next_high_mono_count;
efi_reset_system_t *reset_system;
efi_set_virtual_address_map_t *set_virtual_address_map;