Lines Matching refs:kd

77 hpt_insert(kvm_t *kd, uint64_t pa, int64_t off)
87 hpte->next = kd->vmst->hpt_head[fnv];
88 kd->vmst->hpt_head[fnv] = hpte;
92 hpt_find(kvm_t *kd, uint64_t pa)
99 for (hpte = kd->vmst->hpt_head[fnv]; hpte != NULL; hpte = hpte->next)
107 inithash(kvm_t *kd, uint32_t *base, int len, off_t off)
118 hpt_insert(kd, pa, off);
126 _kvm_minidump_freevtop(kvm_t *kd)
128 struct vmstate *vm = kd->vmst;
135 kd->vmst = NULL;
139 _kvm_minidump_initvtop(kvm_t *kd)
144 vmst = _kvm_malloc(kd, sizeof(*vmst));
146 _kvm_err(kd, kd->program, "cannot allocate vm");
150 kd->vmst = vmst;
153 if (pread(kd->pmfd, &vmst->hdr,
155 _kvm_err(kd, kd->program, "cannot read dump header");
161 _kvm_err(kd, kd->program, "not a minidump for this platform");
165 _kvm_err(kd, kd->program, "wrong minidump version. "
173 vmst->bitmap = _kvm_malloc(kd, vmst->hdr.bitmapsize);
175 _kvm_err(kd, kd->program, "cannot allocate %d bytes for "
180 if (pread(kd->pmfd, vmst->bitmap, vmst->hdr.bitmapsize, off) !=
182 _kvm_err(kd, kd->program, "cannot read %d bytes for page bitmap",
188 vmst->ptemap = _kvm_malloc(kd, vmst->hdr.ptesize);
190 _kvm_err(kd, kd->program, "cannot allocate %d bytes for "
195 if (pread(kd->pmfd, vmst->ptemap, vmst->hdr.ptesize, off) !=
197 _kvm_err(kd, kd->program, "cannot read %d bytes for ptemap",
205 inithash(kd, vmst->bitmap, vmst->hdr.bitmapsize, off);
211 _kvm_minidump_kvatop(kvm_t *kd, u_long va, off_t *pa)
219 if (ISALIVE(kd)) {
220 _kvm_err(kd, 0, "kvm_kvatop called in live kernel!");
224 vm = kd->vmst;
231 _kvm_err(kd, kd->program, "_kvm_vatop: pte not valid");
243 ofs = hpt_find(kd, a);
245 _kvm_err(kd, kd->program, "_kvm_vatop: physical "
254 _kvm_err(kd, kd->program, "_kvm_vatop: virtual address 0x%lx "
258 _kvm_err(kd, 0, "invalid address (0x%lx)", va);