Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libkvm Fix parsing the page tables.
details: https://anonhg.NetBSD.org/src/rev/b0d76224cc20
branches: trunk
changeset: 583393:b0d76224cc20
user: fvdl <fvdl%NetBSD.org@localhost>
date: Thu Aug 04 19:26:02 2005 +0000
description:
Fix parsing the page tables.
diffstat:
lib/libkvm/kvm_x86_64.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r 5be13f367c23 -r b0d76224cc20 lib/libkvm/kvm_x86_64.c
--- a/lib/libkvm/kvm_x86_64.c Thu Aug 04 17:41:35 2005 +0000
+++ b/lib/libkvm/kvm_x86_64.c Thu Aug 04 19:26:02 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kvm_x86_64.c,v 1.4 2003/08/07 16:44:40 agc Exp $ */
+/* $NetBSD: kvm_x86_64.c,v 1.5 2005/08/04 19:26:02 fvdl Exp $ */
/*-
* Copyright (c) 1989, 1992, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)kvm_hp300.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: kvm_x86_64.c,v 1.4 2003/08/07 16:44:40 agc Exp $");
+__RCSID("$NetBSD: kvm_x86_64.c,v 1.5 2005/08/04 19:26:02 fvdl Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -117,7 +117,7 @@
/*
* Level 4.
*/
- pde_pa = cpu_kh->ptdpaddr + (pl4_i(va) * sizeof(pd_entry_t));
+ pde_pa = cpu_kh->ptdpaddr + (pl4_pi(va) * sizeof(pd_entry_t));
if (pread(kd->pmfd, (void *)&pde, sizeof(pde),
_kvm_pa2off(kd, pde_pa)) != sizeof(pde)) {
_kvm_syserr(kd, 0, "could not read PT level 4 entry");
@@ -131,7 +131,7 @@
/*
* Level 3.
*/
- pde_pa = (pde_pa + PG_FRAME) + (pl3_i(va) * sizeof(pd_entry_t));
+ pde_pa = (pde & PG_FRAME) + (pl3_pi(va) * sizeof(pd_entry_t));
if (pread(kd->pmfd, (void *)&pde, sizeof(pde),
_kvm_pa2off(kd, pde_pa)) != sizeof(pde)) {
_kvm_syserr(kd, 0, "could not read PT level 3 entry");
@@ -145,7 +145,7 @@
/*
* Level 2.
*/
- pde_pa = (pde_pa & PG_FRAME) + (pl2_i(va) * sizeof(pd_entry_t));
+ pde_pa = (pde & PG_FRAME) + (pl2_pi(va) * sizeof(pd_entry_t));
if (pread(kd->pmfd, (void *)&pde, sizeof(pde),
_kvm_pa2off(kd, pde_pa)) != sizeof(pde)) {
_kvm_syserr(kd, 0, "could not read PT level 2 entry");
@@ -160,7 +160,7 @@
/*
* Level 1.
*/
- pte_pa = (pde_pa & PG_FRAME) + (pl1_i(va) * sizeof(pt_entry_t));
+ pte_pa = (pde & PG_FRAME) + (pl1_pi(va) * sizeof(pt_entry_t));
if (pread(kd->pmfd, (void *) &pte, sizeof(pte),
_kvm_pa2off(kd, pte_pa)) != sizeof(pte)) {
_kvm_syserr(kd, 0, "could not read PTE");
Home |
Main Index |
Thread Index |
Old Index