diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2014-09-14 09:34:38 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2014-09-14 09:35:36 -0400 |
| commit | db985cbd67c45f875ef43cb5febfaa8cbd203c27 (patch) | |
| tree | 63542d05b1c0f730ec1ad5f915dc4eb3c015e616 /include/linux/efi.h | |
| parent | c6f1224573c3b609bd8073b39f496637a16cc06f (diff) | |
| parent | 468a903c0e5147e3f93187f0b808a3ef957fd00e (diff) | |
Merge tag 'irqchip-core-3.18' of git://git.infradead.org/users/jcooper/linux into irq/core
irqchip core changes for v3.18
- renesas: suspend to RAM, runtime PM, cleanups and DT binding docs
- keystone: add new driver
- hip04: add Hisilicon HiP04 driver (without touching irq-gic.c)
- gic: Use defines instead of magic number, preserve v2 bybass bits
- handle_domain_irq: common low level interrupt entry handler
Diffstat (limited to 'include/linux/efi.h')
| -rw-r--r-- | include/linux/efi.h | 82 |
1 files changed, 74 insertions, 8 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h index 41bbf8ba4ba8..45cb4ffdea62 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/ioport.h> | 20 | #include <linux/ioport.h> |
| 21 | #include <linux/pfn.h> | 21 | #include <linux/pfn.h> |
| 22 | #include <linux/pstore.h> | 22 | #include <linux/pstore.h> |
| 23 | #include <linux/reboot.h> | ||
| 23 | 24 | ||
| 24 | #include <asm/page.h> | 25 | #include <asm/page.h> |
| 25 | 26 | ||
| @@ -521,6 +522,8 @@ typedef efi_status_t efi_query_capsule_caps_t(efi_capsule_header_t **capsules, | |||
| 521 | int *reset_type); | 522 | int *reset_type); |
| 522 | typedef efi_status_t efi_query_variable_store_t(u32 attributes, unsigned long size); | 523 | typedef efi_status_t efi_query_variable_store_t(u32 attributes, unsigned long size); |
| 523 | 524 | ||
| 525 | void efi_native_runtime_setup(void); | ||
| 526 | |||
| 524 | /* | 527 | /* |
| 525 | * EFI Configuration Table and GUID definitions | 528 | * EFI Configuration Table and GUID definitions |
| 526 | */ | 529 | */ |
| @@ -870,11 +873,13 @@ extern int __init efi_uart_console_only (void); | |||
| 870 | extern void efi_initialize_iomem_resources(struct resource *code_resource, | 873 | extern void efi_initialize_iomem_resources(struct resource *code_resource, |
| 871 | struct resource *data_resource, struct resource *bss_resource); | 874 | struct resource *data_resource, struct resource *bss_resource); |
| 872 | extern void efi_get_time(struct timespec *now); | 875 | extern void efi_get_time(struct timespec *now); |
| 873 | extern int efi_set_rtc_mmss(const struct timespec *now); | ||
| 874 | extern void efi_reserve_boot_services(void); | 876 | extern void efi_reserve_boot_services(void); |
| 875 | extern int efi_get_fdt_params(struct efi_fdt_params *params, int verbose); | 877 | extern int efi_get_fdt_params(struct efi_fdt_params *params, int verbose); |
| 876 | extern struct efi_memory_map memmap; | 878 | extern struct efi_memory_map memmap; |
| 877 | 879 | ||
| 880 | extern int efi_reboot_quirk_mode; | ||
| 881 | extern bool efi_poweroff_required(void); | ||
| 882 | |||
| 878 | /* Iterate through an efi_memory_map */ | 883 | /* Iterate through an efi_memory_map */ |
| 879 | #define for_each_efi_memory_desc(m, md) \ | 884 | #define for_each_efi_memory_desc(m, md) \ |
| 880 | for ((md) = (m)->map; \ | 885 | for ((md) = (m)->map; \ |
| @@ -916,7 +921,8 @@ extern int __init efi_setup_pcdp_console(char *); | |||
| 916 | #define EFI_RUNTIME_SERVICES 3 /* Can we use runtime services? */ | 921 | #define EFI_RUNTIME_SERVICES 3 /* Can we use runtime services? */ |
| 917 | #define EFI_MEMMAP 4 /* Can we use EFI memory map? */ | 922 | #define EFI_MEMMAP 4 /* Can we use EFI memory map? */ |
| 918 | #define EFI_64BIT 5 /* Is the firmware 64-bit? */ | 923 | #define EFI_64BIT 5 /* Is the firmware 64-bit? */ |
| 919 | #define EFI_ARCH_1 6 /* First arch-specific bit */ | 924 | #define EFI_PARAVIRT 6 /* Access is via a paravirt interface */ |
| 925 | #define EFI_ARCH_1 7 /* First arch-specific bit */ | ||
| 920 | 926 | ||
| 921 | #ifdef CONFIG_EFI | 927 | #ifdef CONFIG_EFI |
| 922 | /* | 928 | /* |
| @@ -926,11 +932,14 @@ static inline bool efi_enabled(int feature) | |||
| 926 | { | 932 | { |
| 927 | return test_bit(feature, &efi.flags) != 0; | 933 | return test_bit(feature, &efi.flags) != 0; |
| 928 | } | 934 | } |
| 935 | extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused); | ||
| 929 | #else | 936 | #else |
| 930 | static inline bool efi_enabled(int feature) | 937 | static inline bool efi_enabled(int feature) |
| 931 | { | 938 | { |
| 932 | return false; | 939 | return false; |
| 933 | } | 940 | } |
| 941 | static inline void | ||
| 942 | efi_reboot(enum reboot_mode reboot_mode, const char *__unused) {} | ||
| 934 | #endif | 943 | #endif |
| 935 | 944 | ||
| 936 | /* | 945 | /* |
| @@ -1031,12 +1040,8 @@ struct efivar_operations { | |||
| 1031 | struct efivars { | 1040 | struct efivars { |
| 1032 | /* | 1041 | /* |
| 1033 | * ->lock protects two things: | 1042 | * ->lock protects two things: |
| 1034 | * 1) ->list - adds, removals, reads, writes | 1043 | * 1) efivarfs_list and efivars_sysfs_list |
| 1035 | * 2) ops.[gs]et_variable() calls. | 1044 | * 2) ->ops calls |
| 1036 | * It must not be held when creating sysfs entries or calling kmalloc. | ||
| 1037 | * ops.get_next_variable() is only called from register_efivars() | ||
| 1038 | * or efivar_update_sysfs_entries(), | ||
| 1039 | * which is protected by the BKL, so that path is safe. | ||
| 1040 | */ | 1045 | */ |
| 1041 | spinlock_t lock; | 1046 | spinlock_t lock; |
| 1042 | struct kset *kset; | 1047 | struct kset *kset; |
| @@ -1151,6 +1156,9 @@ int efivars_sysfs_init(void); | |||
| 1151 | #ifdef CONFIG_EFI_RUNTIME_MAP | 1156 | #ifdef CONFIG_EFI_RUNTIME_MAP |
| 1152 | int efi_runtime_map_init(struct kobject *); | 1157 | int efi_runtime_map_init(struct kobject *); |
| 1153 | void efi_runtime_map_setup(void *, int, u32); | 1158 | void efi_runtime_map_setup(void *, int, u32); |
| 1159 | int efi_get_runtime_map_size(void); | ||
| 1160 | int efi_get_runtime_map_desc_size(void); | ||
| 1161 | int efi_runtime_map_copy(void *buf, size_t bufsz); | ||
| 1154 | #else | 1162 | #else |
| 1155 | static inline int efi_runtime_map_init(struct kobject *kobj) | 1163 | static inline int efi_runtime_map_init(struct kobject *kobj) |
| 1156 | { | 1164 | { |
| @@ -1159,6 +1167,64 @@ static inline int efi_runtime_map_init(struct kobject *kobj) | |||
| 1159 | 1167 | ||
| 1160 | static inline void | 1168 | static inline void |
| 1161 | efi_runtime_map_setup(void *map, int nr_entries, u32 desc_size) {} | 1169 | efi_runtime_map_setup(void *map, int nr_entries, u32 desc_size) {} |
| 1170 | |||
| 1171 | static inline int efi_get_runtime_map_size(void) | ||
| 1172 | { | ||
| 1173 | return 0; | ||
| 1174 | } | ||
| 1175 | |||
| 1176 | static inline int efi_get_runtime_map_desc_size(void) | ||
| 1177 | { | ||
| 1178 | return 0; | ||
| 1179 | } | ||
| 1180 | |||
| 1181 | static inline int efi_runtime_map_copy(void *buf, size_t bufsz) | ||
| 1182 | { | ||
| 1183 | return 0; | ||
| 1184 | } | ||
| 1185 | |||
| 1162 | #endif | 1186 | #endif |
| 1163 | 1187 | ||
| 1188 | /* prototypes shared between arch specific and generic stub code */ | ||
| 1189 | |||
| 1190 | #define pr_efi(sys_table, msg) efi_printk(sys_table, "EFI stub: "msg) | ||
| 1191 | #define pr_efi_err(sys_table, msg) efi_printk(sys_table, "EFI stub: ERROR: "msg) | ||
| 1192 | |||
| 1193 | void efi_printk(efi_system_table_t *sys_table_arg, char *str); | ||
| 1194 | |||
| 1195 | void efi_free(efi_system_table_t *sys_table_arg, unsigned long size, | ||
| 1196 | unsigned long addr); | ||
| 1197 | |||
| 1198 | char *efi_convert_cmdline(efi_system_table_t *sys_table_arg, | ||
| 1199 | efi_loaded_image_t *image, int *cmd_line_len); | ||
| 1200 | |||
| 1201 | efi_status_t efi_get_memory_map(efi_system_table_t *sys_table_arg, | ||
| 1202 | efi_memory_desc_t **map, | ||
| 1203 | unsigned long *map_size, | ||
| 1204 | unsigned long *desc_size, | ||
| 1205 | u32 *desc_ver, | ||
| 1206 | unsigned long *key_ptr); | ||
| 1207 | |||
| 1208 | efi_status_t efi_low_alloc(efi_system_table_t *sys_table_arg, | ||
| 1209 | unsigned long size, unsigned long align, | ||
| 1210 | unsigned long *addr); | ||
| 1211 | |||
| 1212 | efi_status_t efi_high_alloc(efi_system_table_t *sys_table_arg, | ||
| 1213 | unsigned long size, unsigned long align, | ||
| 1214 | unsigned long *addr, unsigned long max); | ||
| 1215 | |||
| 1216 | efi_status_t efi_relocate_kernel(efi_system_table_t *sys_table_arg, | ||
| 1217 | unsigned long *image_addr, | ||
| 1218 | unsigned long image_size, | ||
| 1219 | unsigned long alloc_size, | ||
| 1220 | unsigned long preferred_addr, | ||
| 1221 | unsigned long alignment); | ||
| 1222 | |||
| 1223 | efi_status_t handle_cmdline_files(efi_system_table_t *sys_table_arg, | ||
| 1224 | efi_loaded_image_t *image, | ||
| 1225 | char *cmd_line, char *option_string, | ||
| 1226 | unsigned long max_addr, | ||
| 1227 | unsigned long *load_addr, | ||
| 1228 | unsigned long *load_size); | ||
| 1229 | |||
| 1164 | #endif /* _LINUX_EFI_H */ | 1230 | #endif /* _LINUX_EFI_H */ |
