Lines Matching full:hdr

50 #define	VM_IS_V1(vm)		(vm->hdr.version == 1)
55 struct minidumphdr hdr; member
132 if (pread(kd->pmfd, &vmst->hdr, sizeof(vmst->hdr), 0) != in _amd64_minidump_initvtop()
133 sizeof(vmst->hdr)) { in _amd64_minidump_initvtop()
137 if (strncmp(MINIDUMP_MAGIC, vmst->hdr.magic, sizeof(vmst->hdr.magic)) != 0) { in _amd64_minidump_initvtop()
146 vmst->hdr.version = le32toh(vmst->hdr.version); in _amd64_minidump_initvtop()
147 if (vmst->hdr.version > MINIDUMP_VERSION || vmst->hdr.version < 1) { in _amd64_minidump_initvtop()
149 MINIDUMP_VERSION, vmst->hdr.version); in _amd64_minidump_initvtop()
152 vmst->hdr.msgbufsize = le32toh(vmst->hdr.msgbufsize); in _amd64_minidump_initvtop()
153 vmst->hdr.bitmapsize = le32toh(vmst->hdr.bitmapsize); in _amd64_minidump_initvtop()
154 vmst->hdr.pmapsize = le32toh(vmst->hdr.pmapsize); in _amd64_minidump_initvtop()
155 vmst->hdr.kernbase = le64toh(vmst->hdr.kernbase); in _amd64_minidump_initvtop()
156 vmst->hdr.dmapbase = le64toh(vmst->hdr.dmapbase); in _amd64_minidump_initvtop()
157 vmst->hdr.dmapend = le64toh(vmst->hdr.dmapend); in _amd64_minidump_initvtop()
158 vmst->hdr.dumpavailsize = vmst->hdr.version == MINIDUMP_VERSION ? in _amd64_minidump_initvtop()
159 le32toh(vmst->hdr.dumpavailsize) : 0; in _amd64_minidump_initvtop()
162 dump_avail_off = AMD64_PAGE_SIZE + amd64_round_page(vmst->hdr.msgbufsize); in _amd64_minidump_initvtop()
165 off = dump_avail_off + amd64_round_page(vmst->hdr.dumpavailsize); in _amd64_minidump_initvtop()
167 sparse_off = off + amd64_round_page(vmst->hdr.bitmapsize) + in _amd64_minidump_initvtop()
168 amd64_round_page(vmst->hdr.pmapsize); in _amd64_minidump_initvtop()
169 if (_kvm_pt_init(kd, vmst->hdr.dumpavailsize, dump_avail_off, in _amd64_minidump_initvtop()
170 vmst->hdr.bitmapsize, off, sparse_off, AMD64_PAGE_SIZE) == -1) { in _amd64_minidump_initvtop()
173 off += amd64_round_page(vmst->hdr.bitmapsize); in _amd64_minidump_initvtop()
175 if (_kvm_pmap_init(kd, vmst->hdr.pmapsize, off) == -1) { in _amd64_minidump_initvtop()
178 off += amd64_round_page(vmst->hdr.pmapsize); in _amd64_minidump_initvtop()
196 if (va >= vm->hdr.kernbase) { in _amd64_minidump_vatop_v1()
197 pteindex = (va - vm->hdr.kernbase) >> AMD64_PAGE_SHIFT; in _amd64_minidump_vatop_v1()
198 if (pteindex >= vm->hdr.pmapsize / sizeof(pte)) in _amd64_minidump_vatop_v1()
216 } else if (va >= vm->hdr.dmapbase && va < vm->hdr.dmapend) { in _amd64_minidump_vatop_v1()
217 a = (va - vm->hdr.dmapbase) & ~AMD64_PAGE_MASK; in _amd64_minidump_vatop_v1()
255 if (va >= vm->hdr.kernbase) { in _amd64_minidump_vatop()
256 pdeindex = (va - vm->hdr.kernbase) >> AMD64_PDRSHIFT; in _amd64_minidump_vatop()
257 if (pdeindex >= vm->hdr.pmapsize / sizeof(pde)) in _amd64_minidump_vatop()
304 } else if (va >= vm->hdr.dmapbase && va < vm->hdr.dmapend) { in _amd64_minidump_vatop()
305 a = (va - vm->hdr.dmapbase) & ~AMD64_PAGE_MASK; in _amd64_minidump_vatop()
336 if (((struct vmstate *)kd->vmst)->hdr.version == 1) in _amd64_minidump_kvatop()
346 u_long npdes = vm->hdr.pmapsize / sizeof(amd64_pde_t); in _amd64_minidump_walk_pages()
353 if (vm->hdr.version < 2) in _amd64_minidump_walk_pages()
356 if (!_kvm_bitmap_init(&bm, vm->hdr.bitmapsize, &bmindex)) in _amd64_minidump_walk_pages()
364 va = vm->hdr.kernbase + (pdeindex << AMD64_PDRSHIFT); in _amd64_minidump_walk_pages()
377 dva = vm->hdr.dmapbase + pa; in _amd64_minidump_walk_pages()
396 dva = vm->hdr.dmapbase + pa; in _amd64_minidump_walk_pages()
413 dva = vm->hdr.dmapbase + pa; in _amd64_minidump_walk_pages()
414 if (vm->hdr.dmapend < (dva + pgsz)) in _amd64_minidump_walk_pages()