Lines Matching refs:hdr

92 static int kernel_magic_ok(struct setup_header *hdr)
94 if (KERNEL_MAGIC != hdr->boot_flag) {
97 hdr->boot_flag, KERNEL_MAGIC);
105 static int get_boot_protocol(struct setup_header *hdr, bool verbose)
107 if (hdr->header == KERNEL_V2_MAGIC) {
110 return hdr->version;
119 static int setup_device_tree(struct setup_header *hdr, const void *fdt_blob)
121 int bootproto = get_boot_protocol(hdr, false);
142 sd->next = hdr->setup_data;
146 hdr->setup_data = (unsigned long)sd;
154 struct setup_header *hdr = &params->hdr;
158 bootproto = get_boot_protocol(hdr, false);
159 log_debug("bootproto %x, hdr->setup_sects %x\n", bootproto,
160 hdr->setup_sects);
161 if (bootproto < 0x0200 || hdr->setup_sects < 15)
165 log_debug("hdr->kernel_version %x, str at %p\n", hdr->kernel_version,
166 kernel_base + hdr->kernel_version + 0x200);
167 for (s = kernel_base + hdr->kernel_version + 0x200, end = s + 0x100; *s;
173 return kernel_base + hdr->kernel_version + 0x200;
186 struct setup_header *hdr = &params->hdr;
191 if (!kernel_magic_ok(hdr))
195 if (0 == hdr->setup_sects) {
199 setup_size = (hdr->setup_sects + 1) * 512;
208 bootproto = get_boot_protocol(hdr, true);
221 (hdr->loadflags & BIG_KERNEL_FLAG);
231 setup_base->hdr = params->hdr;
234 kernel_size = hdr->syssize * 16;
285 struct setup_header *hdr = &setup_base->hdr;
286 int bootproto = get_boot_protocol(hdr, false);
302 hdr->type_of_loader = 0x80; /* U-Boot version 0 */
308 hdr->ramdisk_image = initrd_addr;
309 hdr->ramdisk_size = initrd_size;
314 hdr->heap_end_ptr = HEAP_END_OFFSET;
315 hdr->loadflags |= HEAP_FLAG;
324 max_size = hdr->cmdline_size;
326 hdr->cmd_line_ptr = (uintptr_t)cmd_line;
332 hdr->setup_move_size = 0x9100;
355 hdr->hardware_subarch = X86_SUBARCH_INTEL_MID;
361 setup_device_tree(hdr, (const void *)env_get_hex("fdtaddr", 0));
382 base_ptr->hdr = from->hdr;
419 struct setup_header *hdr = &params->hdr;
429 (hdr->xloadflags & XLF_KERNEL_64)) {
533 static void show_loader(struct setup_header *hdr)
539 type = hdr->type_of_loader >> 4;
540 version = hdr->type_of_loader & 0xf;
542 type = 0x10 + hdr->ext_loader_type;
543 version |= hdr->ext_loader_ver << 4;
544 if (!hdr->type_of_loader) {
546 } else if (hdr->type_of_loader == 0xff) {
562 struct setup_header *hdr;
582 hdr = &base_ptr->hdr;
583 print_num("Setup sectors", hdr->setup_sects);
584 print_num("Root flags", hdr->root_flags);
585 print_num("Sys size", hdr->syssize);
586 print_num("RAM size", hdr->ram_size);
587 print_num("Video mode", hdr->vid_mode);
588 print_num("Root dev", hdr->root_dev);
589 print_num("Boot flag", hdr->boot_flag);
590 print_num("Jump", hdr->jump);
591 print_num("Header", hdr->header);
592 if (hdr->header == KERNEL_V2_MAGIC)
596 print_num("Version", hdr->version);
597 print_num("Real mode switch", hdr->realmode_swtch);
598 print_num("Start sys seg", hdr->start_sys_seg);
599 print_num("Kernel version", hdr->kernel_version);
604 print_num("Type of loader", hdr->type_of_loader);
605 show_loader(hdr);
606 print_num("Load flags", hdr->loadflags);
607 print_flags(load_flags, ARRAY_SIZE(load_flags), hdr->loadflags);
608 print_num("Setup move size", hdr->setup_move_size);
609 print_num("Code32 start", hdr->code32_start);
610 print_num("Ramdisk image", hdr->ramdisk_image);
611 print_num("Ramdisk size", hdr->ramdisk_size);
612 print_num("Bootsect kludge", hdr->bootsect_kludge);
613 print_num("Heap end ptr", hdr->heap_end_ptr);
614 print_num("Ext loader ver", hdr->ext_loader_ver);
615 print_num("Ext loader type", hdr->ext_loader_type);
616 print_num("Command line ptr", hdr->cmd_line_ptr);
617 if (show_cmdline && hdr->cmd_line_ptr) {
620 puts((char *)(ulong)hdr->cmd_line_ptr);
623 print_num("Initrd addr max", hdr->initrd_addr_max);
624 print_num("Kernel alignment", hdr->kernel_alignment);
625 print_num("Relocatable kernel", hdr->relocatable_kernel);
626 print_num("Min alignment", hdr->min_alignment);
627 if (hdr->min_alignment)
628 printf("%-20s: %x\n", "", 1 << hdr->min_alignment);
629 print_num("Xload flags", hdr->xloadflags);
630 print_flags(xload_flags, ARRAY_SIZE(xload_flags), hdr->xloadflags);
631 print_num("Cmdline size", hdr->cmdline_size);
632 print_num("Hardware subarch", hdr->hardware_subarch);
633 print_num64("HW subarch data", hdr->hardware_subarch_data);
634 print_num("Payload offset", hdr->payload_offset);
635 print_num("Payload length", hdr->payload_length);
636 print_num64("Setup data", hdr->setup_data);
637 print_num64("Pref address", hdr->pref_address);
638 print_num("Init size", hdr->init_size);
639 print_num("Handover offset", hdr->handover_offset);
640 if (get_boot_protocol(hdr, false) >= 0x215)
641 print_num("Kernel info offset", hdr->kernel_info_offset);