Home | History | Annotate | Download | only in qemu

Lines Matching refs:hdr

357 static void bswap_uboot_header(uboot_image_header_t *hdr)
360 bswap32s(&hdr->ih_magic);
361 bswap32s(&hdr->ih_hcrc);
362 bswap32s(&hdr->ih_time);
363 bswap32s(&hdr->ih_size);
364 bswap32s(&hdr->ih_load);
365 bswap32s(&hdr->ih_ep);
366 bswap32s(&hdr->ih_dcrc);
462 uboot_image_header_t *hdr = &h;
470 size = read(fd, hdr, sizeof(uboot_image_header_t));
474 bswap_uboot_header(hdr);
476 if (hdr->ih_magic != IH_MAGIC)
480 if (hdr->ih_type != IH_TYPE_KERNEL) {
485 switch (hdr->ih_comp) {
492 hdr->ih_comp);
498 if (hdr->ih_os == IH_OS_LINUX)
504 *ep = hdr->ih_ep;
505 data = qemu_malloc(hdr->ih_size);
507 if (read(fd, data, hdr->ih_size) != hdr->ih_size) {
512 if (hdr->ih_comp == IH_COMP_GZIP) {
521 bytes = gunzip(data, max_bytes, compressed_data, hdr->ih_size);
527 hdr->ih_size = bytes;
530 cpu_physical_memory_write_rom(hdr->ih_load, data, hdr->ih_size);
533 *loadaddr = hdr->ih_load;
535 ret = hdr->ih_size;