]> git.sur5r.net Git - u-boot/blobdiff - include/efi.h
types.h: move and redefine resource_size_t
[u-boot] / include / efi.h
index f0097017b3ccac06972c4deb3eb98d58b01ed5d4..1dbc3b77b42f6429e2a73ca23798a36d0e7f83a4 100644 (file)
 #include <linux/string.h>
 #include <linux/types.h>
 
+#ifdef CONFIG_EFI_STUB_64BIT
+/* EFI uses the Microsoft ABI which is not the default for GCC */
+#define EFIAPI __attribute__((ms_abi))
+#else
+#define EFIAPI
+#endif
+
 struct efi_device_path;
 
 #define EFI_SUCCESS            0
@@ -31,6 +38,7 @@ struct efi_device_path;
 #define EFI_WRITE_PROTECTED    (8 | (1UL << (BITS_PER_LONG - 1)))
 #define EFI_OUT_OF_RESOURCES   (9 | (1UL << (BITS_PER_LONG - 1)))
 #define EFI_NOT_FOUND          (14 | (1UL << (BITS_PER_LONG - 1)))
+#define EFI_ACCESS_DENIED      (15 | (1UL << (BITS_PER_LONG - 1)))
 #define EFI_SECURITY_VIOLATION (26 | (1UL << (BITS_PER_LONG - 1)))
 
 typedef unsigned long efi_status_t;
@@ -132,6 +140,7 @@ enum {
 
 #define EFI_PAGE_SHIFT         12
 #define EFI_PAGE_SIZE          (1UL << EFI_PAGE_SHIFT)
+#define EFI_PAGE_MASK          (EFI_PAGE_SIZE - 1)
 
 struct efi_mem_desc {
        u32 type;
@@ -268,11 +277,15 @@ struct efi_priv {
 /* Base address of the EFI image */
 extern char image_base[];
 
+/* Start and end of U-Boot image (for payload) */
+extern char _binary_u_boot_dtb_bin_start[], _binary_u_boot_dtb_bin_end[];
+
 /**
  * efi_get_sys_table() - Get access to the main EFI system table
  *
  * @return pointer to EFI system table
  */
+
 struct efi_system_table *efi_get_sys_table(void);
 
 /**