diff options
Diffstat (limited to 'include/linux/efi.h')
| -rw-r--r-- | include/linux/efi.h | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h index 7f5a58225385..0148a3046b48 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -118,6 +118,15 @@ typedef struct { | |||
| 118 | u32 imagesize; | 118 | u32 imagesize; |
| 119 | } efi_capsule_header_t; | 119 | } efi_capsule_header_t; |
| 120 | 120 | ||
| 121 | struct efi_boot_memmap { | ||
| 122 | efi_memory_desc_t **map; | ||
| 123 | unsigned long *map_size; | ||
| 124 | unsigned long *desc_size; | ||
| 125 | u32 *desc_ver; | ||
| 126 | unsigned long *key_ptr; | ||
| 127 | unsigned long *buff_size; | ||
| 128 | }; | ||
| 129 | |||
| 121 | /* | 130 | /* |
| 122 | * EFI capsule flags | 131 | * EFI capsule flags |
| 123 | */ | 132 | */ |
| @@ -946,7 +955,7 @@ extern int efi_memattr_apply_permissions(struct mm_struct *mm, | |||
| 946 | /* Iterate through an efi_memory_map */ | 955 | /* Iterate through an efi_memory_map */ |
| 947 | #define for_each_efi_memory_desc_in_map(m, md) \ | 956 | #define for_each_efi_memory_desc_in_map(m, md) \ |
| 948 | for ((md) = (m)->map; \ | 957 | for ((md) = (m)->map; \ |
| 949 | ((void *)(md) + (m)->desc_size) <= (m)->map_end; \ | 958 | (md) && ((void *)(md) + (m)->desc_size) <= (m)->map_end; \ |
| 950 | (md) = (void *)(md) + (m)->desc_size) | 959 | (md) = (void *)(md) + (m)->desc_size) |
| 951 | 960 | ||
| 952 | /** | 961 | /** |
| @@ -1371,11 +1380,7 @@ char *efi_convert_cmdline(efi_system_table_t *sys_table_arg, | |||
| 1371 | efi_loaded_image_t *image, int *cmd_line_len); | 1380 | efi_loaded_image_t *image, int *cmd_line_len); |
| 1372 | 1381 | ||
| 1373 | efi_status_t efi_get_memory_map(efi_system_table_t *sys_table_arg, | 1382 | efi_status_t efi_get_memory_map(efi_system_table_t *sys_table_arg, |
| 1374 | efi_memory_desc_t **map, | 1383 | struct efi_boot_memmap *map); |
| 1375 | unsigned long *map_size, | ||
| 1376 | unsigned long *desc_size, | ||
| 1377 | u32 *desc_ver, | ||
| 1378 | unsigned long *key_ptr); | ||
| 1379 | 1384 | ||
| 1380 | efi_status_t efi_low_alloc(efi_system_table_t *sys_table_arg, | 1385 | efi_status_t efi_low_alloc(efi_system_table_t *sys_table_arg, |
| 1381 | unsigned long size, unsigned long align, | 1386 | unsigned long size, unsigned long align, |
| @@ -1457,4 +1462,14 @@ extern void efi_call_virt_check_flags(unsigned long flags, const char *call); | |||
| 1457 | arch_efi_call_virt_teardown(); \ | 1462 | arch_efi_call_virt_teardown(); \ |
| 1458 | }) | 1463 | }) |
| 1459 | 1464 | ||
| 1465 | typedef efi_status_t (*efi_exit_boot_map_processing)( | ||
| 1466 | efi_system_table_t *sys_table_arg, | ||
| 1467 | struct efi_boot_memmap *map, | ||
| 1468 | void *priv); | ||
| 1469 | |||
| 1470 | efi_status_t efi_exit_boot_services(efi_system_table_t *sys_table, | ||
| 1471 | void *handle, | ||
| 1472 | struct efi_boot_memmap *map, | ||
| 1473 | void *priv, | ||
| 1474 | efi_exit_boot_map_processing priv_func); | ||
| 1460 | #endif /* _LINUX_EFI_H */ | 1475 | #endif /* _LINUX_EFI_H */ |
