Lines Matching full:hdr

52 	struct minidumphdr hdr;  member
94 if (pread(kd->pmfd, &vmst->hdr, sizeof(vmst->hdr), 0) != in _aarch64_minidump_initvtop()
95 sizeof(vmst->hdr)) { in _aarch64_minidump_initvtop()
99 if (strncmp(MINIDUMP_MAGIC, vmst->hdr.magic, in _aarch64_minidump_initvtop()
100 sizeof(vmst->hdr.magic)) != 0) { in _aarch64_minidump_initvtop()
105 vmst->hdr.version = le32toh(vmst->hdr.version); in _aarch64_minidump_initvtop()
106 if (vmst->hdr.version > MINIDUMP_VERSION || vmst->hdr.version < 1) { in _aarch64_minidump_initvtop()
108 "Expected %d got %d", MINIDUMP_VERSION, vmst->hdr.version); in _aarch64_minidump_initvtop()
111 vmst->hdr.msgbufsize = le32toh(vmst->hdr.msgbufsize); in _aarch64_minidump_initvtop()
112 vmst->hdr.bitmapsize = le32toh(vmst->hdr.bitmapsize); in _aarch64_minidump_initvtop()
113 vmst->hdr.pmapsize = le32toh(vmst->hdr.pmapsize); in _aarch64_minidump_initvtop()
114 vmst->hdr.kernbase = le64toh(vmst->hdr.kernbase); in _aarch64_minidump_initvtop()
115 vmst->hdr.dmapphys = le64toh(vmst->hdr.dmapphys); in _aarch64_minidump_initvtop()
116 vmst->hdr.dmapbase = le64toh(vmst->hdr.dmapbase); in _aarch64_minidump_initvtop()
117 vmst->hdr.dmapend = le64toh(vmst->hdr.dmapend); in _aarch64_minidump_initvtop()
119 if (vmst->hdr.version >= 2) { in _aarch64_minidump_initvtop()
120 vmst->hdr.dumpavailsize = le32toh(vmst->hdr.dumpavailsize); in _aarch64_minidump_initvtop()
122 vmst->hdr.dumpavailsize = 0; in _aarch64_minidump_initvtop()
125 if (vmst->hdr.version >= 3) { in _aarch64_minidump_initvtop()
126 vmst->hdr.flags = le32toh(vmst->hdr.flags); in _aarch64_minidump_initvtop()
128 vmst->hdr.flags = MINIDUMP_FLAG_PS_4K; in _aarch64_minidump_initvtop()
131 switch (vmst->hdr.flags & MINIDUMP_FLAG_PS_MASK) { in _aarch64_minidump_initvtop()
142 vmst->hdr.flags & MINIDUMP_FLAG_PS_MASK); in _aarch64_minidump_initvtop()
148 aarch64_round_page(vmst->hdr.msgbufsize, vmst->page_size); in _aarch64_minidump_initvtop()
152 aarch64_round_page(vmst->hdr.dumpavailsize, vmst->page_size); in _aarch64_minidump_initvtop()
156 aarch64_round_page(vmst->hdr.bitmapsize, vmst->page_size) + in _aarch64_minidump_initvtop()
157 aarch64_round_page(vmst->hdr.pmapsize, vmst->page_size); in _aarch64_minidump_initvtop()
158 if (_kvm_pt_init(kd, vmst->hdr.dumpavailsize, dump_avail_off, in _aarch64_minidump_initvtop()
159 vmst->hdr.bitmapsize, off, sparse_off, vmst->page_size) == -1) { in _aarch64_minidump_initvtop()
162 off += aarch64_round_page(vmst->hdr.bitmapsize, vmst->page_size); in _aarch64_minidump_initvtop()
164 if (_kvm_pmap_init(kd, vmst->hdr.pmapsize, off) == -1) { in _aarch64_minidump_initvtop()
167 off += aarch64_round_page(vmst->hdr.pmapsize, vmst->page_size); in _aarch64_minidump_initvtop()
185 if (va >= vm->hdr.dmapbase && va < vm->hdr.dmapend) { in _aarch64_minidump_vatop()
186 a = aarch64_trunc_page(va - vm->hdr.dmapbase + vm->hdr.dmapphys, in _aarch64_minidump_vatop()
197 } else if (va >= vm->hdr.kernbase) { in _aarch64_minidump_vatop()
198 l3_index = (va - vm->hdr.kernbase) >> kd->vmst->l3_shift; in _aarch64_minidump_vatop()
199 if (l3_index >= vm->hdr.pmapsize / sizeof(l3)) in _aarch64_minidump_vatop()
269 u_long nptes = vm->hdr.pmapsize / sizeof(aarch64_pte_t); in _aarch64_minidump_walk_pages()
275 if (!_kvm_bitmap_init(&bm, vm->hdr.bitmapsize, &bmindex)) in _aarch64_minidump_walk_pages()
284 va = vm->hdr.kernbase + (pteindex << kd->vmst->l3_shift); in _aarch64_minidump_walk_pages()
286 dva = vm->hdr.dmapbase + pa; in _aarch64_minidump_walk_pages()
297 dva = vm->hdr.dmapbase + pa; in _aarch64_minidump_walk_pages()
298 if (vm->hdr.dmapend < (dva + kd->vmst->page_size)) in _aarch64_minidump_walk_pages()