]> git.sur5r.net Git - u-boot/blobdiff - include/efi_api.h
efi_loader: Install ACPI configuration tables
[u-boot] / include / efi_api.h
index d9a69dbc005f4ad0405af6724a5a04e2f78c7600..0c3dd3cdd49c609c8006e5bd4d4b3c11de8f2ebd 100644 (file)
@@ -214,15 +214,15 @@ struct efi_runtime_services {
                        uint32_t descriptor_version,
                        struct efi_mem_desc *virtmap);
        efi_status_t (*convert_pointer)(unsigned long dbg, void **address);
-       efi_status_t (EFIAPI *get_variable)(s16 *variable_name,
-                       efi_guid_t *vendor, u32 *attributes,
-                       unsigned long *data_size, void *data);
-       efi_status_t (EFIAPI *get_next_variable)(
-                       unsigned long *variable_name_size,
-                       s16 *variable_name, efi_guid_t *vendor);
-       efi_status_t (EFIAPI *set_variable)(s16 *variable_name,
-                       efi_guid_t *vendor, u32 attributes,
-                       unsigned long data_size, void *data);
+       efi_status_t (EFIAPI *get_variable)(u16 *variable_name,
+                                           efi_guid_t *vendor, u32 *attributes,
+                                           efi_uintn_t *data_size, void *data);
+       efi_status_t (EFIAPI *get_next_variable_name)(
+                       efi_uintn_t *variable_name_size,
+                       u16 *variable_name, efi_guid_t *vendor);
+       efi_status_t (EFIAPI *set_variable)(u16 *variable_name,
+                                           efi_guid_t *vendor, u32 attributes,
+                                           efi_uintn_t data_size, void *data);
        efi_status_t (EFIAPI *get_next_high_mono_count)(
                        uint32_t *high_count);
        void (EFIAPI *reset_system)(enum efi_reset_type reset_type,
@@ -239,9 +239,9 @@ struct efi_runtime_services {
                        u32 reset_type);
        efi_status_t (EFIAPI *query_variable_info)(
                        u32 attributes,
-                       u64 maximum_variable_storage_size,
-                       u64 remaining_variable_storage_size,
-                       u64 maximum_variable_size);
+                       u64 *maximum_variable_storage_size,
+                       u64 *remaining_variable_storage_size,
+                       u64 *maximum_variable_size);
 };
 
 /* EFI event group GUID definitions */
@@ -282,6 +282,10 @@ struct efi_runtime_services {
        EFI_GUID(0xb1b621d5, 0xf19c, 0x41a5, \
                 0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0)
 
+#define EFI_ACPI_TABLE_GUID \
+       EFI_GUID(0x8868e871, 0xe4f1, 0x11d3, \
+                0xbc, 0x22, 0x00, 0x80, 0xc7, 0x3c, 0x88, 0x81)
+
 #define SMBIOS_TABLE_GUID \
        EFI_GUID(0xeb9d2d31, 0x2d88, 0x11d3,  \
                 0x9a, 0x16, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d)
@@ -318,8 +322,8 @@ struct efi_loaded_image {
        u32 revision;
        void *parent_handle;
        struct efi_system_table *system_table;
-       void *device_handle;
-       void *file_path;
+       efi_handle_t device_handle;
+       struct efi_device_path *file_path;
        void *reserved;
        u32 load_options_size;
        void *load_options;
@@ -331,6 +335,8 @@ struct efi_loaded_image {
 
        /* Below are efi loader private fields */
 #ifdef CONFIG_EFI_LOADER
+       void *reloc_base;
+       aligned_u64 reloc_size;
        efi_status_t exit_status;
        struct jmp_buf_data exit_jmp;
 #endif
@@ -341,6 +347,7 @@ struct efi_loaded_image {
                 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b )
 
 #define DEVICE_PATH_TYPE_END                   0x7f
+#  define DEVICE_PATH_SUB_TYPE_INSTANCE_END    0x01
 #  define DEVICE_PATH_SUB_TYPE_END             0xff
 
 struct efi_device_path {
@@ -856,17 +863,19 @@ struct efi_file_handle {
        efi_status_t (EFIAPI *close)(struct efi_file_handle *file);
        efi_status_t (EFIAPI *delete)(struct efi_file_handle *file);
        efi_status_t (EFIAPI *read)(struct efi_file_handle *file,
-                       u64 *buffer_size, void *buffer);
+                       efi_uintn_t *buffer_size, void *buffer);
        efi_status_t (EFIAPI *write)(struct efi_file_handle *file,
-                       u64 *buffer_size, void *buffer);
+                       efi_uintn_t *buffer_size, void *buffer);
        efi_status_t (EFIAPI *getpos)(struct efi_file_handle *file,
-                       u64 *pos);
+                       efi_uintn_t *pos);
        efi_status_t (EFIAPI *setpos)(struct efi_file_handle *file,
-                       u64 pos);
+                       efi_uintn_t pos);
        efi_status_t (EFIAPI *getinfo)(struct efi_file_handle *file,
-                       efi_guid_t *info_type, u64 *buffer_size, void *buffer);
+                       const efi_guid_t *info_type, efi_uintn_t *buffer_size,
+                       void *buffer);
        efi_status_t (EFIAPI *setinfo)(struct efi_file_handle *file,
-                       efi_guid_t *info_type, u64 buffer_size, void *buffer);
+                       const efi_guid_t *info_type, efi_uintn_t buffer_size,
+                       void *buffer);
        efi_status_t (EFIAPI *flush)(struct efi_file_handle *file);
 };
 
@@ -885,6 +894,10 @@ struct efi_simple_file_system_protocol {
        EFI_GUID(0x9576e92, 0x6d3f, 0x11d2, \
                 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b)
 
+#define EFI_FILE_SYSTEM_INFO_GUID \
+       EFI_GUID(0x09576e93, 0x6d3f, 0x11d2, \
+                0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b)
+
 #define EFI_FILE_MODE_READ     0x0000000000000001
 #define EFI_FILE_MODE_WRITE    0x0000000000000002
 #define EFI_FILE_MODE_CREATE   0x8000000000000000
@@ -908,6 +921,15 @@ struct efi_file_info {
        s16 file_name[0];
 };
 
+struct efi_file_system_info {
+       u64 size;
+       u8 read_only;
+       u64 volume_size;
+       u64 free_space;
+       u32 block_size;
+       u16 volume_label[0];
+};
+
 #define EFI_DRIVER_BINDING_PROTOCOL_GUID \
        EFI_GUID(0x18a031ab, 0xb443, 0x4d1a,\
                 0xa5, 0xc0, 0x0c, 0x09, 0x26, 0x1e, 0x9f, 0x71)