* @paddr: source physical address
* @len: length to copy
*/
-void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len)
+void __init copy_from_paddr(void *dst, paddr_t paddr, unsigned long len)
{
void *src = (void *)FIXMAP_ADDR(FIXMAP_MISC);
clear_fixmap(FIXMAP_MISC);
}
-static void place_modules(struct kernel_info *info,
- paddr_t kernbase, paddr_t kernend)
+static void __init place_modules(struct kernel_info *info,
+ paddr_t kernbase, paddr_t kernend)
{
/* Align DTB and initrd size to 2Mb. Linux only requires 4 byte alignment */
const struct bootmodule *mod = info->initrd_bootmodule;
info->initrd_paddr = info->dtb_paddr + dtb_len;
}
-static paddr_t kernel_zimage_place(struct kernel_info *info)
+static paddr_t __init kernel_zimage_place(struct kernel_info *info)
{
paddr_t load_addr;
return load_addr;
}
-static void kernel_zimage_load(struct kernel_info *info)
+static void __init kernel_zimage_load(struct kernel_info *info)
{
paddr_t load_addr = kernel_zimage_place(info);
paddr_t paddr = info->zimage.kernel_addr;
/*
* Check if the image is a uImage and setup kernel_info
*/
-static int kernel_uimage_probe(struct kernel_info *info,
- paddr_t addr, paddr_t size)
+static int __init kernel_uimage_probe(struct kernel_info *info,
+ paddr_t addr, paddr_t size)
{
struct {
__be32 magic; /* Image Header Magic Number */
/*
* Check if the image is a 64-bit Image.
*/
-static int kernel_zimage64_probe(struct kernel_info *info,
- paddr_t addr, paddr_t size)
+static int __init kernel_zimage64_probe(struct kernel_info *info,
+ paddr_t addr, paddr_t size)
{
/* linux/Documentation/arm64/booting.txt */
struct {
/*
* Check if the image is a 32-bit zImage and setup kernel_info
*/
-static int kernel_zimage32_probe(struct kernel_info *info,
- paddr_t addr, paddr_t size)
+static int __init kernel_zimage32_probe(struct kernel_info *info,
+ paddr_t addr, paddr_t size)
{
uint32_t zimage[ZIMAGE32_HEADER_LEN/4];
uint32_t start, end;
return 0;
}
-static void kernel_elf_load(struct kernel_info *info)
+static void __init kernel_elf_load(struct kernel_info *info)
{
/*
* TODO: can the ELF header be used to find the physical address
free_xenheap_pages(info->elf.kernel_img, info->elf.kernel_order);
}
-static int kernel_elf_probe(struct kernel_info *info,
- paddr_t addr, paddr_t size)
+static int __init kernel_elf_probe(struct kernel_info *info,
+ paddr_t addr, paddr_t size)
{
int rc;
return rc;
}
-int kernel_probe(struct kernel_info *info)
+int __init kernel_probe(struct kernel_info *info)
{
struct bootmodule *mod = boot_module_find_by_kind(BOOTMOD_KERNEL);
int rc;
return rc;
}
-void kernel_load(struct kernel_info *info)
+void __init kernel_load(struct kernel_info *info)
{
info->load(info);
}