mx6sabreauto: Convert to DM_ETH
[oweals/u-boot.git] / include / efi_api.h
index cb895f31e5eb1f1502eb7b757a54b46659aae66d..3d1a6beeeaca4c0a2a6f429de52a4515f35c51a2 100644 (file)
@@ -228,6 +228,18 @@ struct efi_capsule_header {
 #define EFI_RT_SUPPORTED_QUERY_CAPSULE_CAPABILITIES    0x1000
 #define EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO           0x2000
 
+#define EFI_RT_PROPERTIES_TABLE_GUID \
+       EFI_GUID(0xeb66918a, 0x7eef, 0x402a, 0x84, 0x2e, \
+                0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9)
+
+#define EFI_RT_PROPERTIES_TABLE_VERSION        0x1
+
+struct efi_rt_properties_table {
+       u16 version;
+       u16 length;
+       u32 runtime_services_supported;
+};
+
 struct efi_runtime_services {
        struct efi_table_hdr hdr;
        efi_status_t (EFIAPI *get_time)(struct efi_time *time,
@@ -319,6 +331,14 @@ struct efi_runtime_services {
        EFI_GUID(0xeb9d2d31, 0x2d88, 0x11d3,  \
                 0x9a, 0x16, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d)
 
+#define EFI_LOAD_FILE_PROTOCOL_GUID \
+       EFI_GUID(0x56ec3091, 0x954c, 0x11d2, \
+                0x8e, 0x3f, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b)
+
+#define EFI_LOAD_FILE2_PROTOCOL_GUID \
+       EFI_GUID(0x4006c0c1, 0xfcb3, 0x403e, \
+                0x99, 0x6d, 0x4a, 0x6c, 0x87, 0x24, 0xe0, 0x6d)
+
 struct efi_configuration_table {
        efi_guid_t guid;
        void *table;
@@ -422,6 +442,7 @@ struct efi_device_path_acpi_path {
 #  define DEVICE_PATH_SUB_TYPE_MSG_USB         0x05
 #  define DEVICE_PATH_SUB_TYPE_MSG_MAC_ADDR    0x0b
 #  define DEVICE_PATH_SUB_TYPE_MSG_USB_CLASS   0x0f
+#  define DEVICE_PATH_SUB_TYPE_MSG_NVME                0x17
 #  define DEVICE_PATH_SUB_TYPE_MSG_SD          0x1a
 #  define DEVICE_PATH_SUB_TYPE_MSG_MMC         0x1d
 
@@ -464,9 +485,16 @@ struct efi_device_path_sd_mmc_path {
        u8 slot_number;
 } __packed;
 
+struct efi_device_path_nvme {
+       struct efi_device_path dp;
+       u32 ns_id;
+       u8 eui64[8];
+} __packed;
+
 #define DEVICE_PATH_TYPE_MEDIA_DEVICE          0x04
 #  define DEVICE_PATH_SUB_TYPE_HARD_DRIVE_PATH 0x01
 #  define DEVICE_PATH_SUB_TYPE_CDROM_PATH      0x02
+#  define DEVICE_PATH_SUB_TYPE_VENDOR_PATH     0x03
 #  define DEVICE_PATH_SUB_TYPE_FILE_PATH       0x04
 
 struct efi_device_path_hard_drive_path {
@@ -1461,6 +1489,12 @@ struct efi_pxe_base_code_protocol {
 #define EFI_FILE_PROTOCOL_REVISION2    0x00020000
 #define EFI_FILE_PROTOCOL_LATEST_REVISION EFI_FILE_PROTOCOL_REVISION2
 
+struct efi_file_io_token {
+       struct efi_event *event;
+       efi_status_t status;
+       efi_uintn_t buffer_size;
+       void *buffer;};
+
 struct efi_file_handle {
        u64 rev;
        efi_status_t (EFIAPI *open)(struct efi_file_handle *file,
@@ -1483,10 +1517,16 @@ struct efi_file_handle {
                        const efi_guid_t *info_type, efi_uintn_t buffer_size,
                        void *buffer);
        efi_status_t (EFIAPI *flush)(struct efi_file_handle *file);
-       /*
-        * TODO: We currently only support EFI file protocol revision 0x00010000
-        *       while UEFI specs 2.4 - 2.7 prescribe revision 0x00020000.
-        */
+       efi_status_t (EFIAPI *open_ex)(struct efi_file_handle *file,
+                       struct efi_file_handle **new_handle,
+                       u16 *file_name, u64 open_mode, u64 attributes,
+                       struct efi_file_io_token *token);
+       efi_status_t (EFIAPI *read_ex)(struct efi_file_handle *file,
+                       struct efi_file_io_token *token);
+       efi_status_t (EFIAPI *write_ex)(struct efi_file_handle *file,
+                       struct efi_file_io_token *token);
+       efi_status_t (EFIAPI *flush_ex)(struct efi_file_handle *file,
+                       struct efi_file_io_token *token);
 };
 
 #define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_REVISION 0x00010000
@@ -1505,6 +1545,10 @@ struct efi_simple_file_system_protocol {
        EFI_GUID(0x09576e93, 0x6d3f, 0x11d2, \
                 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b)
 
+#define EFI_FILE_SYSTEM_VOLUME_LABEL_ID \
+       EFI_GUID(0xdb47d7d3, 0xfe81, 0x11d3, \
+                0x9a, 0x35, 0x00, 0x90, 0x27, 0x3f, 0xC1, 0x4d)
+
 #define EFI_FILE_MODE_READ     0x0000000000000001
 #define EFI_FILE_MODE_WRITE    0x0000000000000002
 #define EFI_FILE_MODE_CREATE   0x8000000000000000
@@ -1584,6 +1628,14 @@ struct efi_unicode_collation_protocol {
        char *supported_languages;
 };
 
+struct efi_load_file_protocol {
+       efi_status_t (EFIAPI *load_file)(struct efi_load_file_protocol *this,
+                                        struct efi_device_path *file_path,
+                                        bool boot_policy,
+                                        efi_uintn_t *buffer_size,
+                                        void *buffer);
+};
+
 /* Boot manager load options */
 #define LOAD_OPTION_ACTIVE             0x00000001
 #define LOAD_OPTION_FORCE_RECONNECT    0x00000002