2 #ifndef _DRIVERS_FIRMWARE_EFI_EFISTUB_H
3 #define _DRIVERS_FIRMWARE_EFI_EFISTUB_H
5 /* error code which can't be mistaken for valid address */
6 #define EFI_ERROR (~0UL)
8 void efi_char16_printk(efi_system_table_t
*, efi_char16_t
*);
10 efi_status_t
efi_open_volume(efi_system_table_t
*sys_table_arg
, void *__image
,
13 efi_status_t
efi_file_size(efi_system_table_t
*sys_table_arg
, void *__fh
,
14 efi_char16_t
*filename_16
, void **handle
,
17 efi_status_t
efi_file_read(void *handle
, unsigned long *size
, void *addr
);
19 efi_status_t
efi_file_close(void *handle
);
21 unsigned long get_dram_base(efi_system_table_t
*sys_table_arg
);
23 efi_status_t
update_fdt(efi_system_table_t
*sys_table
, void *orig_fdt
,
24 unsigned long orig_fdt_size
,
25 void *fdt
, int new_fdt_size
, char *cmdline_ptr
,
26 u64 initrd_addr
, u64 initrd_size
,
27 efi_memory_desc_t
*memory_map
,
28 unsigned long map_size
, unsigned long desc_size
,
31 efi_status_t
allocate_new_fdt_and_exit_boot(efi_system_table_t
*sys_table
,
33 unsigned long *new_fdt_addr
,
34 unsigned long max_addr
,
35 u64 initrd_addr
, u64 initrd_size
,
37 unsigned long fdt_addr
,
38 unsigned long fdt_size
);
40 void *get_fdt(efi_system_table_t
*sys_table
, unsigned long *fdt_size
);
42 void efi_get_virtmap(efi_memory_desc_t
*memory_map
, unsigned long map_size
,
43 unsigned long desc_size
, efi_memory_desc_t
*runtime_map
,