Ard Biesheuvel | bd66947 | 2014-07-02 14:54:42 +0200 | [diff] [blame] | 1 | |
| 2 | #ifndef _DRIVERS_FIRMWARE_EFI_EFISTUB_H |
| 3 | #define _DRIVERS_FIRMWARE_EFI_EFISTUB_H |
| 4 | |
| 5 | /* error code which can't be mistaken for valid address */ |
| 6 | #define EFI_ERROR (~0UL) |
| 7 | |
Andrey Ryabinin | 393f203 | 2015-02-13 14:39:56 -0800 | [diff] [blame] | 8 | #undef memcpy |
| 9 | #undef memset |
| 10 | #undef memmove |
| 11 | |
Ard Biesheuvel | bd66947 | 2014-07-02 14:54:42 +0200 | [diff] [blame] | 12 | void efi_char16_printk(efi_system_table_t *, efi_char16_t *); |
| 13 | |
| 14 | efi_status_t efi_open_volume(efi_system_table_t *sys_table_arg, void *__image, |
| 15 | void **__fh); |
| 16 | |
| 17 | efi_status_t efi_file_size(efi_system_table_t *sys_table_arg, void *__fh, |
| 18 | efi_char16_t *filename_16, void **handle, |
| 19 | u64 *file_sz); |
| 20 | |
| 21 | efi_status_t efi_file_read(void *handle, unsigned long *size, void *addr); |
| 22 | |
| 23 | efi_status_t efi_file_close(void *handle); |
| 24 | |
| 25 | unsigned long get_dram_base(efi_system_table_t *sys_table_arg); |
| 26 | |
| 27 | efi_status_t update_fdt(efi_system_table_t *sys_table, void *orig_fdt, |
| 28 | unsigned long orig_fdt_size, |
| 29 | void *fdt, int new_fdt_size, char *cmdline_ptr, |
| 30 | u64 initrd_addr, u64 initrd_size, |
| 31 | efi_memory_desc_t *memory_map, |
| 32 | unsigned long map_size, unsigned long desc_size, |
| 33 | u32 desc_ver); |
| 34 | |
| 35 | efi_status_t allocate_new_fdt_and_exit_boot(efi_system_table_t *sys_table, |
| 36 | void *handle, |
| 37 | unsigned long *new_fdt_addr, |
| 38 | unsigned long max_addr, |
| 39 | u64 initrd_addr, u64 initrd_size, |
| 40 | char *cmdline_ptr, |
| 41 | unsigned long fdt_addr, |
| 42 | unsigned long fdt_size); |
| 43 | |
Ard Biesheuvel | a643375 | 2015-03-04 13:02:29 +0100 | [diff] [blame] | 44 | void *get_fdt(efi_system_table_t *sys_table, unsigned long *fdt_size); |
Ard Biesheuvel | bd66947 | 2014-07-02 14:54:42 +0200 | [diff] [blame] | 45 | |
Ard Biesheuvel | f3cdfd2 | 2014-10-20 16:27:26 +0200 | [diff] [blame] | 46 | void efi_get_virtmap(efi_memory_desc_t *memory_map, unsigned long map_size, |
| 47 | unsigned long desc_size, efi_memory_desc_t *runtime_map, |
| 48 | int *count); |
| 49 | |
Ard Biesheuvel | bd66947 | 2014-07-02 14:54:42 +0200 | [diff] [blame] | 50 | #endif |