1 /* 2 * Kernel image loading. 3 * 4 * Copyright (C) 2011 Citrix Systems, Inc. 5 */ 6 #ifndef __ARCH_ARM_KERNEL_H__ 7 #define __ARCH_ARM_KERNEL_H__ 8 9 #include <xen/device_tree.h> 10 #include <asm/setup.h> 11 12 struct kernel_info { 13 #ifdef CONFIG_ARM_64 14 enum domain_type type; 15 #endif 16 17 struct domain *d; 18 19 void *fdt; /* flat device tree */ 20 paddr_t unassigned_mem; /* RAM not (yet) assigned to a bank */ 21 struct meminfo mem; 22 23 /* kernel entry point */ 24 paddr_t entry; 25 26 /* grant table region */ 27 paddr_t gnttab_start; 28 paddr_t gnttab_size; 29 30 /* boot blob load addresses */ 31 const struct bootmodule *kernel_bootmodule, *initrd_bootmodule, *dtb_bootmodule; 32 const char* cmdline; 33 paddr_t dtb_paddr; 34 paddr_t initrd_paddr; 35 36 /* Enable pl011 emulation */ 37 bool vpl011; 38 39 /* GIC phandle */ 40 uint32_t phandle_gic; 41 42 /* loader to use for this kernel */ 43 void (*load)(struct kernel_info *info); 44 /* loader specific state */ 45 union { 46 struct { 47 paddr_t kernel_addr; 48 paddr_t len; 49 #ifdef CONFIG_ARM_64 50 paddr_t text_offset; /* 64-bit Image only */ 51 #endif 52 paddr_t start; /* 32-bit zImage only */ 53 } zimage; 54 }; 55 }; 56 57 /* 58 * Probe the kernel to detemine its type and select a loader. 59 * 60 * Sets in info: 61 * ->type 62 * ->load hook, and sets loader specific variables ->zimage 63 */ 64 int kernel_probe(struct kernel_info *info, const struct dt_device_node *domain); 65 66 /* 67 * Loads the kernel into guest RAM. 68 * 69 * Expects to be set in info when called: 70 * ->mem 71 * ->fdt 72 * 73 * Sets in info: 74 * ->entry 75 * ->dtb_paddr 76 * ->initrd_paddr 77 */ 78 void kernel_load(struct kernel_info *info); 79 80 #endif /* #ifdef __ARCH_ARM_KERNEL_H__ */ 81 82 /* 83 * Local variables: 84 * mode: C 85 * c-file-style: "BSD" 86 * c-basic-offset: 4 87 * indent-tabs-mode: nil 88 * End: 89 */ 90