Lines Matching refs:hdr
54 struct minidumphdr hdr; member
97 if (pread(kd->pmfd, &vmst->hdr, in _arm_minidump_initvtop()
98 sizeof(vmst->hdr), 0) != sizeof(vmst->hdr)) { in _arm_minidump_initvtop()
103 if (strncmp(MINIDUMP_MAGIC, vmst->hdr.magic, in _arm_minidump_initvtop()
104 sizeof(vmst->hdr.magic)) != 0) { in _arm_minidump_initvtop()
108 vmst->hdr.version = _kvm32toh(kd, vmst->hdr.version); in _arm_minidump_initvtop()
109 if (vmst->hdr.version != MINIDUMP_VERSION && vmst->hdr.version != 1) { in _arm_minidump_initvtop()
111 "Expected %d got %d", MINIDUMP_VERSION, vmst->hdr.version); in _arm_minidump_initvtop()
114 vmst->hdr.msgbufsize = _kvm32toh(kd, vmst->hdr.msgbufsize); in _arm_minidump_initvtop()
115 vmst->hdr.bitmapsize = _kvm32toh(kd, vmst->hdr.bitmapsize); in _arm_minidump_initvtop()
116 vmst->hdr.ptesize = _kvm32toh(kd, vmst->hdr.ptesize); in _arm_minidump_initvtop()
117 vmst->hdr.kernbase = _kvm32toh(kd, vmst->hdr.kernbase); in _arm_minidump_initvtop()
118 vmst->hdr.arch = _kvm32toh(kd, vmst->hdr.arch); in _arm_minidump_initvtop()
119 vmst->hdr.mmuformat = _kvm32toh(kd, vmst->hdr.mmuformat); in _arm_minidump_initvtop()
120 if (vmst->hdr.mmuformat == MINIDUMP_MMU_FORMAT_UNKNOWN) { in _arm_minidump_initvtop()
122 vmst->hdr.mmuformat = MINIDUMP_MMU_FORMAT_V6; in _arm_minidump_initvtop()
124 vmst->hdr.dumpavailsize = vmst->hdr.version == MINIDUMP_VERSION ? in _arm_minidump_initvtop()
125 _kvm32toh(kd, vmst->hdr.dumpavailsize) : 0; in _arm_minidump_initvtop()
128 dump_avail_off = ARM_PAGE_SIZE + arm_round_page(vmst->hdr.msgbufsize); in _arm_minidump_initvtop()
131 off = dump_avail_off + arm_round_page(vmst->hdr.dumpavailsize); in _arm_minidump_initvtop()
133 sparse_off = off + arm_round_page(vmst->hdr.bitmapsize) + in _arm_minidump_initvtop()
134 arm_round_page(vmst->hdr.ptesize); in _arm_minidump_initvtop()
135 if (_kvm_pt_init(kd, vmst->hdr.dumpavailsize, dump_avail_off, in _arm_minidump_initvtop()
136 vmst->hdr.bitmapsize, off, sparse_off, ARM_PAGE_SIZE) == -1) { in _arm_minidump_initvtop()
139 off += arm_round_page(vmst->hdr.bitmapsize); in _arm_minidump_initvtop()
141 if (_kvm_pmap_init(kd, vmst->hdr.ptesize, off) == -1) { in _arm_minidump_initvtop()
144 off += arm_round_page(vmst->hdr.ptesize); in _arm_minidump_initvtop()
165 if (va >= vm->hdr.kernbase) { in _arm_minidump_kvatop()
166 pteindex = (va - vm->hdr.kernbase) >> ARM_PAGE_SHIFT; in _arm_minidump_kvatop()
167 if (pteindex >= vm->hdr.ptesize / sizeof(pte)) in _arm_minidump_kvatop()
181 if (kd->vmst->hdr.mmuformat == MINIDUMP_MMU_FORMAT_V4 && in _arm_minidump_kvatop()
218 if (vm->hdr.mmuformat == MINIDUMP_MMU_FORMAT_V4) { in _arm_entry_to_prot()
236 u_long nptes = vm->hdr.ptesize / sizeof(arm_pt_entry_t); in _arm_minidump_walk_pages()
245 va = vm->hdr.kernbase + (pteindex << ARM_PAGE_SHIFT); in _arm_minidump_walk_pages()
251 if (vm->hdr.mmuformat == MINIDUMP_MMU_FORMAT_V4 && in _arm_minidump_walk_pages()