Convert CONFIG_SYS_LOAD_ADDR to Kconfig
[platform/kernel/u-boot.git] / include / efi_api.h
index 48e48a6..c8f959b 100644 (file)
 #include <charset.h>
 #include <pe.h>
 
-#ifdef CONFIG_EFI_LOADER
-#include <asm/setjmp.h>
-#endif
-
 /* UEFI spec version 2.8 */
 #define EFI_SPECIFICATION_VERSION (2 << 16 | 80)
 
@@ -253,7 +249,7 @@ struct efi_memory_range {
 struct efi_memory_range_capsule {
        struct efi_capsule_header *header;
        /* EFI_MEMORY_TYPE: 0x80000000-0xFFFFFFFF */
-       enum efi_mem_type os_requested_memory_type;
+       enum efi_memory_type os_requested_memory_type;
        u64 number_of_memory_ranges;
        struct efi_memory_range memory_ranges[];
 } __packed;
@@ -523,9 +519,11 @@ struct efi_device_path_acpi_path {
 #  define DEVICE_PATH_SUB_TYPE_MSG_SCSI                0x02
 #  define DEVICE_PATH_SUB_TYPE_MSG_USB         0x05
 #  define DEVICE_PATH_SUB_TYPE_MSG_MAC_ADDR    0x0b
+#  define DEVICE_PATH_SUB_TYPE_MSG_UART                0x0e
 #  define DEVICE_PATH_SUB_TYPE_MSG_USB_CLASS   0x0f
 #  define DEVICE_PATH_SUB_TYPE_MSG_SATA                0x12
 #  define DEVICE_PATH_SUB_TYPE_MSG_NVME                0x17
+#  define DEVICE_PATH_SUB_TYPE_MSG_URI         0x18
 #  define DEVICE_PATH_SUB_TYPE_MSG_SD          0x1a
 #  define DEVICE_PATH_SUB_TYPE_MSG_MMC         0x1d
 
@@ -542,6 +540,15 @@ struct efi_device_path_scsi {
        u16 logical_unit_number;
 } __packed;
 
+struct efi_device_path_uart {
+       struct efi_device_path dp;
+       u32 reserved;
+       u64 baud_rate;
+       u8 data_bits;
+       u8 parity;
+       u8 stop_bits;
+} __packed;
+
 struct efi_device_path_usb {
        struct efi_device_path dp;
        u8 parent_port_number;
@@ -581,6 +588,11 @@ struct efi_device_path_nvme {
        u8 eui64[8];
 } __packed;
 
+struct efi_device_path_uri {
+       struct efi_device_path dp;
+       u8 uri[];
+} __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
@@ -1722,6 +1734,23 @@ struct efi_load_file_protocol {
                                         void *buffer);
 };
 
+struct efi_system_resource_entry {
+       efi_guid_t fw_class;
+       u32 fw_type;
+       u32 fw_version;
+       u32 lowest_supported_fw_version;
+       u32 capsule_flags;
+       u32 last_attempt_version;
+       u32 last_attempt_status;
+} __packed;
+
+struct efi_system_resource_table {
+       u32 fw_resource_count;
+       u32 fw_resource_count_max;
+       u64 fw_resource_version;
+       struct efi_system_resource_entry entries[];
+} __packed;
+
 /* Boot manager load options */
 #define LOAD_OPTION_ACTIVE             0x00000001
 #define LOAD_OPTION_FORCE_RECONNECT    0x00000002
@@ -1740,6 +1769,10 @@ struct efi_load_file_protocol {
 #define ESRT_FW_TYPE_DEVICEFIRMWARE    0x00000002
 #define ESRT_FW_TYPE_UEFIDRIVER                0x00000003
 
+#define EFI_SYSTEM_RESOURCE_TABLE_GUID\
+       EFI_GUID(0xb122a263, 0x3661, 0x4f68,\
+               0x99, 0x29, 0x78, 0xf8, 0xb0, 0xd6, 0x21, 0x80)
+
 /* Last Attempt Status Values */
 #define LAST_ATTEMPT_STATUS_SUCCESS                    0x00000000
 #define LAST_ATTEMPT_STATUS_ERROR_UNSUCCESSFUL         0x00000001