Lines Matching full:hdr

52 	struct minidumphdr hdr;  member
92 if (pread(kd->pmfd, &vmst->hdr, sizeof(vmst->hdr), 0) != in _riscv_minidump_initvtop()
93 sizeof(vmst->hdr)) { in _riscv_minidump_initvtop()
97 if (strncmp(MINIDUMP_MAGIC, vmst->hdr.magic, in _riscv_minidump_initvtop()
98 sizeof(vmst->hdr.magic)) != 0) { in _riscv_minidump_initvtop()
103 vmst->hdr.version = le32toh(vmst->hdr.version); in _riscv_minidump_initvtop()
104 if (vmst->hdr.version != MINIDUMP_VERSION && vmst->hdr.version != 1) { in _riscv_minidump_initvtop()
106 "Expected %d got %d", MINIDUMP_VERSION, vmst->hdr.version); in _riscv_minidump_initvtop()
109 vmst->hdr.msgbufsize = le32toh(vmst->hdr.msgbufsize); in _riscv_minidump_initvtop()
110 vmst->hdr.bitmapsize = le32toh(vmst->hdr.bitmapsize); in _riscv_minidump_initvtop()
111 vmst->hdr.pmapsize = le32toh(vmst->hdr.pmapsize); in _riscv_minidump_initvtop()
112 vmst->hdr.kernbase = le64toh(vmst->hdr.kernbase); in _riscv_minidump_initvtop()
113 vmst->hdr.dmapphys = le64toh(vmst->hdr.dmapphys); in _riscv_minidump_initvtop()
114 vmst->hdr.dmapbase = le64toh(vmst->hdr.dmapbase); in _riscv_minidump_initvtop()
115 vmst->hdr.dmapend = le64toh(vmst->hdr.dmapend); in _riscv_minidump_initvtop()
116 vmst->hdr.dumpavailsize = vmst->hdr.version == MINIDUMP_VERSION ? in _riscv_minidump_initvtop()
117 le32toh(vmst->hdr.dumpavailsize) : 0; in _riscv_minidump_initvtop()
120 dump_avail_off = RISCV_PAGE_SIZE + riscv_round_page(vmst->hdr.msgbufsize); in _riscv_minidump_initvtop()
123 off = dump_avail_off + riscv_round_page(vmst->hdr.dumpavailsize); in _riscv_minidump_initvtop()
126 sparse_off = off + riscv_round_page(vmst->hdr.bitmapsize) + in _riscv_minidump_initvtop()
127 riscv_round_page(vmst->hdr.pmapsize); in _riscv_minidump_initvtop()
128 if (_kvm_pt_init(kd, vmst->hdr.dumpavailsize, dump_avail_off, in _riscv_minidump_initvtop()
129 vmst->hdr.bitmapsize, off, sparse_off, RISCV_PAGE_SIZE) == -1) { in _riscv_minidump_initvtop()
132 off += riscv_round_page(vmst->hdr.bitmapsize); in _riscv_minidump_initvtop()
134 if (_kvm_pmap_init(kd, vmst->hdr.pmapsize, off) == -1) { in _riscv_minidump_initvtop()
137 off += riscv_round_page(vmst->hdr.pmapsize); in _riscv_minidump_initvtop()
155 if (va >= vm->hdr.dmapbase && va < vm->hdr.dmapend) { in _riscv_minidump_vatop()
156 a = (va - vm->hdr.dmapbase + vm->hdr.dmapphys) & in _riscv_minidump_vatop()
167 } else if (va >= vm->hdr.kernbase) { in _riscv_minidump_vatop()
168 l3_index = (va - vm->hdr.kernbase) >> RISCV_L3_SHIFT; in _riscv_minidump_vatop()
169 if (l3_index >= vm->hdr.pmapsize / sizeof(l3)) in _riscv_minidump_vatop()
238 u_long nptes = vm->hdr.pmapsize / sizeof(riscv_pt_entry_t); in _riscv_minidump_walk_pages()
244 if (!_kvm_bitmap_init(&bm, vm->hdr.bitmapsize, &bmindex)) in _riscv_minidump_walk_pages()
254 va = vm->hdr.kernbase + (pteindex << RISCV_L3_SHIFT); in _riscv_minidump_walk_pages()
256 dva = vm->hdr.dmapbase + pa; in _riscv_minidump_walk_pages()
267 dva = vm->hdr.dmapbase + pa; in _riscv_minidump_walk_pages()
268 if (vm->hdr.dmapend < (dva + RISCV_PAGE_SIZE)) in _riscv_minidump_walk_pages()