Lines Matching refs:hdr
561 write_out_header(FILE *outfile, struct zyn_rombin_hdr *hdr)
573 t.addr = HOST_TO_BE32(hdr->addr);
575 t.type = hdr->type;
576 t.flags = hdr->flags;
577 t.osize = HOST_TO_BE32(hdr->osize);
578 t.csize = HOST_TO_BE32(hdr->csize);
579 t.ocsum = HOST_TO_BE16(hdr->ocsum);
580 t.ccsum = HOST_TO_BE16(hdr->ccsum);
581 t.mmap_addr = HOST_TO_BE32(hdr->mmap_addr);
583 DBG(2, "hdr.addr = 0x%08x", hdr->addr);
584 DBG(2, "hdr.type = 0x%02x", hdr->type);
585 DBG(2, "hdr.osize = 0x%08x", hdr->osize);
586 DBG(2, "hdr.csize = 0x%08x", hdr->csize);
587 DBG(2, "hdr.flags = 0x%02x", hdr->flags);
588 DBG(2, "hdr.ocsum = 0x%04x", hdr->ocsum);
589 DBG(2, "hdr.ccsum = 0x%04x", hdr->ccsum);
590 DBG(2, "hdr.mmap_addr = 0x%08x", hdr->mmap_addr);
750 struct zyn_rombin_hdr hdr;
759 memset(&hdr, 0, sizeof(hdr));
760 hdr.addr = board->code_start;
761 hdr.type = OBJECT_TYPE_BOOTEXT;
762 hdr.flags = ROMBIN_FLAG_OCSUM;
766 res = write_out_header(outfile, &hdr);
770 offset += sizeof(hdr);
832 hdr.mmap_addr = mmap.addr;
833 hdr.osize = 2;
835 res = read_magic(&hdr.ocsum);
838 hdr.ocsum = BE16_TO_HOST(hdr.ocsum);
840 if (csum <= hdr.ocsum)
841 t = hdr.ocsum - csum;
843 t = hdr.ocsum - csum - 1;
845 DBG(2, "ocsum=%04x, csum=%04x, fix=%04x", hdr.ocsum, csum, t);
853 res = write_out_header(outfile, &hdr);