Lines Matching refs:kd

78 hpt_insert(kvm_t *kd, uint64_t pa, int64_t off)
88 hpte->next = kd->vmst->hpt_head[fnv];
89 kd->vmst->hpt_head[fnv] = hpte;
93 hpt_find(kvm_t *kd, uint64_t pa)
100 for (hpte = kd->vmst->hpt_head[fnv]; hpte != NULL; hpte = hpte->next)
108 inithash(kvm_t *kd, uint32_t *base, int len, off_t off)
119 hpt_insert(kd, pa, off);
128 _kvm_minidump_freevtop(kvm_t *kd)
130 struct vmstate *vm = kd->vmst;
137 kd->vmst = NULL;
141 _kvm_minidump_initvtop(kvm_t *kd)
146 vmst = _kvm_malloc(kd, sizeof(*vmst));
148 _kvm_err(kd, kd->program, "cannot allocate vm");
152 kd->vmst = vmst;
155 off = lseek(kd->pmfd, 0, SEEK_CUR);
156 if (pread(kd->pmfd, &vmst->hdr,
158 _kvm_err(kd, kd->program, "cannot read dump header");
164 _kvm_err(kd, kd->program, "not a minidump for this platform");
168 _kvm_err(kd, kd->program, "wrong minidump version. "
176 vmst->bitmap = _kvm_malloc(kd, vmst->hdr.bitmapsize);
178 _kvm_err(kd, kd->program, "cannot allocate %d bytes for "
183 if (pread(kd->pmfd, vmst->bitmap, vmst->hdr.bitmapsize, off) !=
185 _kvm_err(kd, kd->program, "cannot read %d bytes for page bitmap",
191 vmst->ptemap = _kvm_malloc(kd, vmst->hdr.ptesize);
193 _kvm_err(kd, kd->program, "cannot allocate %d bytes for "
198 if (pread(kd->pmfd, vmst->ptemap, vmst->hdr.ptesize, off) !=
200 _kvm_err(kd, kd->program, "cannot read %d bytes for ptemap",
208 inithash(kd, vmst->bitmap, vmst->hdr.bitmapsize, off);
214 _kvm_minidump_kvatop(kvm_t *kd, u_long va, off_t *pa)
222 if (ISALIVE(kd)) {
223 _kvm_err(kd, 0, "kvm_kvatop called in live kernel!");
231 vm = kd->vmst;
247 _kvm_err(kd, kd->program, "_kvm_vatop: pte not valid");
254 _kvm_err(kd, kd->program, "_kvm_vatop: virtual address 0x%lx "
259 ofs = hpt_find(kd, a);
261 _kvm_err(kd, kd->program, "_kvm_vatop: physical "
271 _kvm_err(kd, 0, "invalid address (0x%lx)", va);