Lines Matching refs:hdr
777 static void handover_boot(struct linux_header *hdr, struct boot_params *bp)
779 unsigned long address = hdr->code32_start + hdr->handover_offset;
790 if (!valid_pecoff_image((char *)hdr))
793 if (hdr->version >= 0x20c) {
794 if (hdr->xloadflags & XLF_EFI_HANDOVER_32)
797 if (hdr->xloadflags & XLF_EFI_HANDOVER_64)
805 static int check_linux_header(struct linux_header *hdr)
807 if (hdr->version < 0x205)
808 hdr->relocatable_kernel = 0;
811 if (hdr->boot_flag != BOOT_SIGNATURE) {
812 printf("Invalid Boot signature 0x%x, bailing out\n", hdr->boot_flag);
885 static int handle_ramdisks(struct linux_header *hdr,
894 hdr->ramdisk_image = 0;
895 hdr->ramdisk_size = 0;
900 * <= hdr->initrd_addr_max, which fits the entire initramfs.
907 find_addr(NULL, &last, 0x1000, hdr->initrd_addr_max,
917 hdr->ramdisk_image = (uint32_t)last;
918 hdr->ramdisk_size = irf_size;
1063 struct linux_header *hdr;
1087 hdr = (struct linux_header *)bp;
1089 setup_sz = (hdr->setup_sects + 1) * 512;
1090 if (hdr->version >= 0x20a) {
1091 pref_address = hdr->pref_address;
1092 init_size = hdr->init_size;
1103 hdr->type_of_loader = SYSLINUX_EFILDR; /* SYSLINUX boot loader module */
1108 hdr->cmd_line_ptr = (UINT32)(UINTN)_cmdline;
1118 if (!hdr->relocatable_kernel) {
1123 status = emalloc(init_size, hdr->kernel_alignment, &addr);
1136 hdr->code32_start = (UINT32)((UINT64)kernel_start);
1141 if (handle_ramdisks(hdr, initramfs))
1145 if (hdr->version >= 0x20b && hdr->handover_offset)
1146 handover_boot(hdr, bp);
1153 dprintf("efi_boot_linux: setup_sects %d kernel_size %d\n", hdr->setup_sects, kernel_size);
1178 if (hdr->ramdisk_size)
1179 free_addr(hdr->ramdisk_image, hdr->ramdisk_size);