1 #ifndef __ARM_SETUP_H_ 2 #define __ARM_SETUP_H_ 3 4 #include <public/version.h> 5 6 #define MIN_FDT_ALIGN 8 7 #define MAX_FDT_SIZE SZ_2M 8 9 #define NR_MEM_BANKS 64 10 11 #define MAX_MODULES 5 /* Current maximum useful modules */ 12 13 typedef enum { 14 BOOTMOD_XEN, 15 BOOTMOD_FDT, 16 BOOTMOD_KERNEL, 17 BOOTMOD_RAMDISK, 18 BOOTMOD_XSM, 19 BOOTMOD_UNKNOWN 20 } bootmodule_kind; 21 22 23 struct membank { 24 paddr_t start; 25 paddr_t size; 26 }; 27 28 struct meminfo { 29 int nr_banks; 30 struct membank bank[NR_MEM_BANKS]; 31 }; 32 33 #define BOOTMOD_MAX_CMDLINE 1024 34 struct bootmodule { 35 bootmodule_kind kind; 36 paddr_t start; 37 paddr_t size; 38 char cmdline[BOOTMOD_MAX_CMDLINE]; 39 }; 40 41 struct bootmodules { 42 int nr_mods; 43 struct bootmodule module[MAX_MODULES]; 44 }; 45 46 struct bootinfo { 47 struct meminfo mem; 48 struct bootmodules modules; 49 #ifdef CONFIG_ACPI 50 struct meminfo acpi; 51 #endif 52 }; 53 54 extern struct bootinfo bootinfo; 55 56 void arch_init_memory(void); 57 58 void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len); 59 60 size_t estimate_efi_size(int mem_nr_banks); 61 62 void acpi_create_efi_system_table(struct domain *d, 63 struct membank tbl_add[]); 64 65 void acpi_create_efi_mmap_table(struct domain *d, 66 const struct meminfo *mem, 67 struct membank tbl_add[]); 68 69 int acpi_make_efi_nodes(void *fdt, struct membank tbl_add[]); 70 71 int construct_dom0(struct domain *d); 72 73 void discard_initial_modules(void); 74 void dt_unreserved_regions(paddr_t s, paddr_t e, 75 void (*cb)(paddr_t, paddr_t), int first); 76 77 size_t __init boot_fdt_info(const void *fdt, paddr_t paddr); 78 const char __init *boot_fdt_cmdline(const void *fdt); 79 80 struct bootmodule *add_boot_module(bootmodule_kind kind, 81 paddr_t start, paddr_t size, 82 const char *cmdline); 83 struct bootmodule *boot_module_find_by_kind(bootmodule_kind kind); 84 const char * __init boot_module_kind_as_string(bootmodule_kind kind); 85 86 #endif 87 /* 88 * Local variables: 89 * mode: C 90 * c-file-style: "BSD" 91 * c-basic-offset: 4 92 * indent-tabs-mode: nil 93 * End: 94 */ 95