summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-08-21 13:15:21 -0400
committerTom Rini <trini@konsulko.com>2018-08-21 13:15:21 -0400
commit26699998e9f4adb8c0ac8b36a2c3089fa8f05283 (patch)
treeed77d69574a9ff67aa7a8ff6bb7de03306900005 /include
parentb71d9e8b3805305ea4116733f515061710ad7081 (diff)
parentdbb148b22cbf242156edf53cca6d661cd320cb83 (diff)
Merge tag 'signed-efi-2018.09' of git://github.com/agraf/u-boot
Patch queue for efi - 2018-08-21 A few fixes for 2018.09. Most noticable are: - unbreak x86 target (-fdata-section fallout) - fix undefined behavior in a few corner cases - make Jetson TX1 boot again - RTS fixes - implement reset for simple output
Diffstat (limited to 'include')
-rw-r--r--include/efi.h28
-rw-r--r--include/efi_loader.h3
2 files changed, 17 insertions, 14 deletions
diff --git a/include/efi.h b/include/efi.h
index 41530a7537..7e7c1cafc2 100644
--- a/include/efi.h
+++ b/include/efi.h
@@ -170,20 +170,20 @@ enum efi_mem_type {
};
/* Attribute values */
-enum {
- EFI_MEMORY_UC_SHIFT = 0, /* uncached */
- EFI_MEMORY_WC_SHIFT = 1, /* write-coalescing */
- EFI_MEMORY_WT_SHIFT = 2, /* write-through */
- EFI_MEMORY_WB_SHIFT = 3, /* write-back */
- EFI_MEMORY_UCE_SHIFT = 4, /* uncached, exported */
- EFI_MEMORY_WP_SHIFT = 12, /* write-protect */
- EFI_MEMORY_RP_SHIFT = 13, /* read-protect */
- EFI_MEMORY_XP_SHIFT = 14, /* execute-protect */
- EFI_MEMORY_RUNTIME_SHIFT = 63, /* range requires runtime mapping */
-
- EFI_MEMORY_RUNTIME = 1ULL << EFI_MEMORY_RUNTIME_SHIFT,
- EFI_MEM_DESC_VERSION = 1,
-};
+#define EFI_MEMORY_UC ((u64)0x0000000000000001ULL) /* uncached */
+#define EFI_MEMORY_WC ((u64)0x0000000000000002ULL) /* write-coalescing */
+#define EFI_MEMORY_WT ((u64)0x0000000000000004ULL) /* write-through */
+#define EFI_MEMORY_WB ((u64)0x0000000000000008ULL) /* write-back */
+#define EFI_MEMORY_UCE ((u64)0x0000000000000010ULL) /* uncached, exported */
+#define EFI_MEMORY_WP ((u64)0x0000000000001000ULL) /* write-protect */
+#define EFI_MEMORY_RP ((u64)0x0000000000002000ULL) /* read-protect */
+#define EFI_MEMORY_XP ((u64)0x0000000000004000ULL) /* execute-protect */
+#define EFI_MEMORY_NV ((u64)0x0000000000008000ULL) /* non-volatile */
+#define EFI_MEMORY_MORE_RELIABLE \
+ ((u64)0x0000000000010000ULL) /* higher reliability */
+#define EFI_MEMORY_RO ((u64)0x0000000000020000ULL) /* read-only */
+#define EFI_MEMORY_RUNTIME ((u64)0x8000000000000000ULL) /* range requires runtime mapping */
+#define EFI_MEM_DESC_VERSION 1
#define EFI_PAGE_SHIFT 12
#define EFI_PAGE_SIZE (1UL << EFI_PAGE_SHIFT)
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 57ca550272..f162adfff7 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -417,6 +417,9 @@ static inline int guidcmp(const efi_guid_t *g1, const efi_guid_t *g2)
#define __efi_runtime_data __attribute__ ((section (".data.efi_runtime")))
#define __efi_runtime __attribute__ ((section (".text.efi_runtime")))
+/* Update CRC32 in table header */
+void __efi_runtime efi_update_table_header_crc32(struct efi_table_hdr *table);
+
/* Call this with mmio_ptr as the _pointer_ to a pointer to an MMIO region
* to make it available at runtime */
efi_status_t efi_add_runtime_mmio(void *mmio_ptr, u64 len);