diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2006-03-20 15:11:49 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2006-03-20 15:11:49 +0000 |
commit | d54ced695909a8b0c614d60ff3d488254bc0f2d6 (patch) | |
tree | 292b0a2a1cc0b8318f1c445173ec502441a80439 /lib | |
parent | 932b930ec094e69a94d338e483a3339be3d3fbff (diff) |
for some of internal functions use paddr_t where phys addr is intended insteadd of u_long; miod@ ok
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libkvm/kvm.c | 9 | ||||
-rw-r--r-- | lib/libkvm/kvm_alpha.c | 6 | ||||
-rw-r--r-- | lib/libkvm/kvm_amd64.c | 6 | ||||
-rw-r--r-- | lib/libkvm/kvm_arm.c | 6 | ||||
-rw-r--r-- | lib/libkvm/kvm_hppa.c | 6 | ||||
-rw-r--r-- | lib/libkvm/kvm_i386.c | 8 | ||||
-rw-r--r-- | lib/libkvm/kvm_m68k.c | 8 | ||||
-rw-r--r-- | lib/libkvm/kvm_m88k.c | 6 | ||||
-rw-r--r-- | lib/libkvm/kvm_mips64.c | 8 | ||||
-rw-r--r-- | lib/libkvm/kvm_powerpc.c | 6 | ||||
-rw-r--r-- | lib/libkvm/kvm_private.h | 6 | ||||
-rw-r--r-- | lib/libkvm/kvm_sparc.c | 8 | ||||
-rw-r--r-- | lib/libkvm/kvm_sparc64.c | 6 | ||||
-rw-r--r-- | lib/libkvm/kvm_vax.c | 6 |
14 files changed, 48 insertions, 47 deletions
diff --git a/lib/libkvm/kvm.c b/lib/libkvm/kvm.c index 8cec7db34b2..368aa93ebf5 100644 --- a/lib/libkvm/kvm.c +++ b/lib/libkvm/kvm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm.c,v 1.42 2004/09/15 19:31:31 miod Exp $ */ +/* $OpenBSD: kvm.c,v 1.43 2006/03/20 15:11:48 mickey Exp $ */ /* $NetBSD: kvm.c,v 1.43 1996/05/05 04:31:59 gwr Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)kvm.c 8.2 (Berkeley) 2/13/94"; #else -static char *rcsid = "$OpenBSD: kvm.c,v 1.42 2004/09/15 19:31:31 miod Exp $"; +static char *rcsid = "$OpenBSD: kvm.c,v 1.43 2006/03/20 15:11:48 mickey Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -799,7 +799,8 @@ int kvm_dump_inval(kvm_t *kd) { struct nlist nlist[2]; - u_long pa, x; + u_long x; + paddr_t pa; if (ISALIVE(kd)) { _kvm_err(kd, kd->program, "clearing dump on live kernel"); @@ -855,7 +856,7 @@ kvm_read(kvm_t *kd, u_long kva, void *buf, size_t len) } cp = buf; while (len > 0) { - u_long pa; + paddr_t pa; /* In case of error, _kvm_kvatop sets the err string */ cc = _kvm_kvatop(kd, kva, &pa); diff --git a/lib/libkvm/kvm_alpha.c b/lib/libkvm/kvm_alpha.c index fd16f554487..ad2e11848cc 100644 --- a/lib/libkvm/kvm_alpha.c +++ b/lib/libkvm/kvm_alpha.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm_alpha.c,v 1.13 2004/09/15 19:31:31 miod Exp $ */ +/* $OpenBSD: kvm_alpha.c,v 1.14 2006/03/20 15:11:48 mickey Exp $ */ /* $NetBSD: kvm_alpha.c,v 1.5 1996/10/01 21:12:05 cgd Exp $ */ /* @@ -91,7 +91,7 @@ _kvm_initvtop(kvm_t *kd) } int -_kvm_kvatop(kvm_t *kd, u_long va, u_long *pa) +_kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) { cpu_kcore_hdr_t *cpu_kh; struct vmstate *vm; @@ -189,7 +189,7 @@ lose: * Translate a physical address to a file-offset in the crash-dump. */ off_t -_kvm_pa2off(kvm_t *kd, u_long pa) +_kvm_pa2off(kvm_t *kd, paddr_t pa) { cpu_kcore_hdr_t *cpu_kh; phys_ram_seg_t *ramsegs; diff --git a/lib/libkvm/kvm_amd64.c b/lib/libkvm/kvm_amd64.c index f7446c9e62d..5e21ac019c6 100644 --- a/lib/libkvm/kvm_amd64.c +++ b/lib/libkvm/kvm_amd64.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm_amd64.c,v 1.3 2004/06/15 03:52:59 deraadt Exp $ */ +/* $OpenBSD: kvm_amd64.c,v 1.4 2006/03/20 15:11:48 mickey Exp $ */ /* $NetBSD: kvm_x86_64.c,v 1.3 2002/06/05 22:01:55 fvdl Exp $ */ /*- @@ -89,7 +89,7 @@ _kvm_initvtop(kvm_t *kd) * Translate a kernel virtual address to a physical address. */ int -_kvm_kvatop(kvm_t *kd, u_long va, u_long *pa) +_kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) { cpu_kcore_hdr_t *cpu_kh; paddr_t pde_pa, pte_pa; @@ -180,7 +180,7 @@ _kvm_kvatop(kvm_t *kd, u_long va, u_long *pa) * Translate a physical address to a file-offset in the crash dump. */ off_t -_kvm_pa2off(kvm_t *kd, u_long pa) +_kvm_pa2off(kvm_t *kd, paddr_t pa) { cpu_kcore_hdr_t *cpu_kh; phys_ram_seg_t *ramsegs; diff --git a/lib/libkvm/kvm_arm.c b/lib/libkvm/kvm_arm.c index c896e0dd157..a5853bf3469 100644 --- a/lib/libkvm/kvm_arm.c +++ b/lib/libkvm/kvm_arm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm_arm.c,v 1.3 2004/09/15 19:31:31 miod Exp $ */ +/* $OpenBSD: kvm_arm.c,v 1.4 2006/03/20 15:11:48 mickey Exp $ */ /*- * Copyright (C) 1996 Wolfgang Solfrank. @@ -60,14 +60,14 @@ _kvm_initvtop(kvm_t *kd) } int -_kvm_kvatop(kvm_t *kd, u_long va, u_long *pa) +_kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) { _kvm_err(kd, 0, "vatop not yet implemented!"); return (0); } off_t -_kvm_pa2off(kvm_t *kd, u_long pa) +_kvm_pa2off(kvm_t *kd, paddr_t pa) { _kvm_err(kd, 0, "pa2off not yet implemented!"); return (0); diff --git a/lib/libkvm/kvm_hppa.c b/lib/libkvm/kvm_hppa.c index 897f6138eb4..a08e7e5f70c 100644 --- a/lib/libkvm/kvm_hppa.c +++ b/lib/libkvm/kvm_hppa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm_hppa.c,v 1.4 2004/09/15 19:31:31 miod Exp $ */ +/* $OpenBSD: kvm_hppa.c,v 1.5 2006/03/20 15:11:48 mickey Exp $ */ /* * Copyright (c) 2002, Miodrag Vallat. @@ -51,7 +51,7 @@ _kvm_initvtop(kvm_t *kd) } int -_kvm_kvatop(kvm_t *kd, u_long va, u_long *pa) +_kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) { int offset; @@ -68,7 +68,7 @@ _kvm_kvatop(kvm_t *kd, u_long va, u_long *pa) * Translate a physical address to a file offset in the crash dump. */ off_t -_kvm_pa2off(kvm_t *kd, u_long pa) +_kvm_pa2off(kvm_t *kd, paddr_t pa) { /* TODO */ return (0); diff --git a/lib/libkvm/kvm_i386.c b/lib/libkvm/kvm_i386.c index 3d35ed5ed5b..9a1a1e622de 100644 --- a/lib/libkvm/kvm_i386.c +++ b/lib/libkvm/kvm_i386.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm_i386.c,v 1.14 2006/03/14 19:23:52 kettenis Exp $ */ +/* $OpenBSD: kvm_i386.c,v 1.15 2006/03/20 15:11:48 mickey Exp $ */ /* $NetBSD: kvm_i386.c,v 1.9 1996/03/18 22:33:38 thorpej Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)kvm_hp300.c 8.1 (Berkeley) 6/4/93"; #else -static char *rcsid = "$OpenBSD: kvm_i386.c,v 1.14 2006/03/14 19:23:52 kettenis Exp $"; +static char *rcsid = "$OpenBSD: kvm_i386.c,v 1.15 2006/03/20 15:11:48 mickey Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -129,7 +129,7 @@ invalid: * Translate a kernel virtual address to a physical address. */ int -_kvm_kvatop(kvm_t *kd, u_long va, u_long *pa) +_kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) { u_long offset, pte_pa; struct vmstate *vm; @@ -179,7 +179,7 @@ invalid: * Translate a physical address to a file-offset in the crash-dump. */ off_t -_kvm_pa2off(kvm_t *kd, u_long pa) +_kvm_pa2off(kvm_t *kd, paddr_t pa) { return ((off_t)(kd->dump_off + pa)); } diff --git a/lib/libkvm/kvm_m68k.c b/lib/libkvm/kvm_m68k.c index 4f9ab56c382..510debab449 100644 --- a/lib/libkvm/kvm_m68k.c +++ b/lib/libkvm/kvm_m68k.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm_m68k.c,v 1.15 2004/09/15 19:31:31 miod Exp $ */ +/* $OpenBSD: kvm_m68k.c,v 1.16 2006/03/20 15:11:48 mickey Exp $ */ /* $NetBSD: kvm_m68k.c,v 1.9 1996/05/07 06:09:11 leo Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)kvm_hp300.c 8.1 (Berkeley) 6/4/93"; #else -static char *rcsid = "$OpenBSD: kvm_m68k.c,v 1.15 2004/09/15 19:31:31 miod Exp $"; +static char *rcsid = "$OpenBSD: kvm_m68k.c,v 1.16 2006/03/20 15:11:48 mickey Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -192,7 +192,7 @@ invalid: } int -_kvm_kvatop(kvm_t *kd, u_long va, u_long *pa) +_kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) { cpu_kcore_hdr_t *cpu_kh; @@ -204,7 +204,7 @@ _kvm_kvatop(kvm_t *kd, u_long va, u_long *pa) * Translate a physical address to a file-offset in the crash-dump. */ off_t -_kvm_pa2off(kvm_t *kd, u_long pa) +_kvm_pa2off(kvm_t *kd, paddr_t pa) { cpu_kcore_hdr_t *cpu_kh; phys_ram_seg_t *rsp; diff --git a/lib/libkvm/kvm_m88k.c b/lib/libkvm/kvm_m88k.c index a2e715c2eca..f2f46d3ff01 100644 --- a/lib/libkvm/kvm_m88k.c +++ b/lib/libkvm/kvm_m88k.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm_m88k.c,v 1.3 2004/09/15 19:31:31 miod Exp $ */ +/* $OpenBSD: kvm_m88k.c,v 1.4 2006/03/20 15:11:48 mickey Exp $ */ /* $NetBSD: kvm_alpha.c,v 1.2 1995/09/29 03:57:48 cgd Exp $ */ /* @@ -61,7 +61,7 @@ _kvm_initvtop(kvm_t *kd) } int -_kvm_kvatop(kvm_t *kd, u_long va, u_long *pa) +_kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) { /* don't forget k0seg translations! */ @@ -70,7 +70,7 @@ _kvm_kvatop(kvm_t *kd, u_long va, u_long *pa) } off_t -_kvm_pa2off(kvm_t *kd, u_long pa) +_kvm_pa2off(kvm_t *kd, paddr_t pa) { _kvm_err(kd, 0, "pa2off not yet implemented!"); return (0); diff --git a/lib/libkvm/kvm_mips64.c b/lib/libkvm/kvm_mips64.c index ee440679370..1747652664a 100644 --- a/lib/libkvm/kvm_mips64.c +++ b/lib/libkvm/kvm_mips64.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm_mips64.c,v 1.2 2004/09/15 19:31:31 miod Exp $ */ +/* $OpenBSD: kvm_mips64.c,v 1.3 2006/03/20 15:11:48 mickey Exp $ */ /* $NetBSD: kvm_mips.c,v 1.3 1996/03/18 22:33:44 thorpej Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)kvm_mips.c 8.1 (Berkeley) 6/4/93"; #else -static char *rcsid = "$OpenBSD: kvm_mips64.c,v 1.2 2004/09/15 19:31:31 miod Exp $"; +static char *rcsid = "$OpenBSD: kvm_mips64.c,v 1.3 2006/03/20 15:11:48 mickey Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -118,7 +118,7 @@ _kvm_initvtop(kvm_t *kd) * Translate a kernel virtual address to a physical address. */ int -_kvm_kvatop(kvm_t *kd, u_long va, u_long *pa) +_kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) { struct vmstate *vm; u_long pte, addr, offset; @@ -162,7 +162,7 @@ invalid: } off_t -_kvm_pa2off(kvm_t *kd, u_long pa) +_kvm_pa2off(kvm_t *kd, paddr_t pa) { _kvm_err(kd, 0, "pa2off going to be implemented!"); return 0; diff --git a/lib/libkvm/kvm_powerpc.c b/lib/libkvm/kvm_powerpc.c index 369a23a9234..ff3b2fd9c37 100644 --- a/lib/libkvm/kvm_powerpc.c +++ b/lib/libkvm/kvm_powerpc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm_powerpc.c,v 1.4 2005/01/14 15:18:00 kevlo Exp $ */ +/* $OpenBSD: kvm_powerpc.c,v 1.5 2006/03/20 15:11:48 mickey Exp $ */ /*- * Copyright (C) 1996 Wolfgang Solfrank. @@ -61,14 +61,14 @@ _kvm_initvtop(kvm_t *kd) } int -_kvm_kvatop(kvm_t *kd, u_long va, u_long *pa) +_kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) { _kvm_err(kd, 0, "vatop not yet implemented!"); return (0); } off_t -_kvm_pa2off(kvm_t *kd, u_long pa) +_kvm_pa2off(kvm_t *kd, paddr_t pa) { _kvm_err(kd, 0, "pa2off not yet implemented!"); return (0); diff --git a/lib/libkvm/kvm_private.h b/lib/libkvm/kvm_private.h index b05ac34f944..26ae1f46596 100644 --- a/lib/libkvm/kvm_private.h +++ b/lib/libkvm/kvm_private.h @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm_private.h,v 1.9 2004/01/07 02:16:33 millert Exp $ */ +/* $OpenBSD: kvm_private.h,v 1.10 2006/03/20 15:11:48 mickey Exp $ */ /* $NetBSD: kvm_private.h,v 1.7 1996/05/05 04:32:15 gwr Exp $ */ /*- @@ -93,9 +93,9 @@ int _kvm_dump_mkheader(kvm_t *kd_live, kvm_t *kd_dump); void _kvm_freeprocs(kvm_t *kd); void _kvm_freevtop(kvm_t *); int _kvm_initvtop(kvm_t *); -int _kvm_kvatop(kvm_t *, u_long, u_long *); +int _kvm_kvatop(kvm_t *, u_long, paddr_t *); void *_kvm_malloc(kvm_t *kd, size_t); -off_t _kvm_pa2off(kvm_t *, u_long); +off_t _kvm_pa2off(kvm_t *, paddr_t); void *_kvm_realloc(kvm_t *kd, void *, size_t); void _kvm_syserr (kvm_t *kd, const char *program, const char *fmt, ...); diff --git a/lib/libkvm/kvm_sparc.c b/lib/libkvm/kvm_sparc.c index 22e0795b7ef..207cacffe86 100644 --- a/lib/libkvm/kvm_sparc.c +++ b/lib/libkvm/kvm_sparc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm_sparc.c,v 1.10 2004/06/15 03:52:59 deraadt Exp $ */ +/* $OpenBSD: kvm_sparc.c,v 1.11 2006/03/20 15:11:48 mickey Exp $ */ /* $NetBSD: kvm_sparc.c,v 1.9 1996/04/01 19:23:03 cgd Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)kvm_sparc.c 8.1 (Berkeley) 6/4/93"; #else -static char *rcsid = "$OpenBSD: kvm_sparc.c,v 1.10 2004/06/15 03:52:59 deraadt Exp $"; +static char *rcsid = "$OpenBSD: kvm_sparc.c,v 1.11 2006/03/20 15:11:48 mickey Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -124,7 +124,7 @@ _kvm_initvtop(kvm_t *kd) * physical address. This routine is used only for crashdumps. */ int -_kvm_kvatop(kvm_t *kd, u_long va, u_long *pa) +_kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) { if (cputyp == -1) if (_kvm_initvtop(kd) != 0) @@ -229,7 +229,7 @@ err: * Translate a physical address to a file-offset in the crash-dump. */ off_t -_kvm_pa2off(kvm_t *kd, u_long pa) +_kvm_pa2off(kvm_t *kd, paddr_t pa) { cpu_kcore_hdr_t *cpup = kd->cpu_data; phys_ram_seg_t *mp; diff --git a/lib/libkvm/kvm_sparc64.c b/lib/libkvm/kvm_sparc64.c index 59fa0a9ffc9..13953c46916 100644 --- a/lib/libkvm/kvm_sparc64.c +++ b/lib/libkvm/kvm_sparc64.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm_sparc64.c,v 1.5 2004/06/15 03:52:59 deraadt Exp $ */ +/* $OpenBSD: kvm_sparc64.c,v 1.6 2006/03/20 15:11:48 mickey Exp $ */ /* $NetBSD: kvm_sparc64.c,v 1.7 2001/08/05 03:33:15 matt Exp $ */ /*- @@ -96,7 +96,7 @@ _kvm_initvtop(kvm_t *kd) * physical address. This routine is used only for crashdumps. */ int -_kvm_kvatop(kvm_t *kd, u_long va, u_long *pa) +_kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) { cpu_kcore_hdr_t *cpup = kd->cpu_data; u_long kernbase = cpup->kernbase; @@ -186,7 +186,7 @@ lose: * Translate a physical address to a file-offset in the crash-dump. */ off_t -_kvm_pa2off(kvm_t *kd, u_long pa) +_kvm_pa2off(kvm_t *kd, paddr_t pa) { cpu_kcore_hdr_t *cpup = kd->cpu_data; phys_ram_seg_t *mp; diff --git a/lib/libkvm/kvm_vax.c b/lib/libkvm/kvm_vax.c index 3dcf8dc18a8..ad080b0bc76 100644 --- a/lib/libkvm/kvm_vax.c +++ b/lib/libkvm/kvm_vax.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm_vax.c,v 1.11 2004/09/15 19:31:31 miod Exp $ */ +/* $OpenBSD: kvm_vax.c,v 1.12 2006/03/20 15:11:48 mickey Exp $ */ /* $NetBSD: kvm_vax.c,v 1.3 1996/03/18 22:34:06 thorpej Exp $ */ /*- @@ -110,7 +110,7 @@ _kvm_initvtop(kvm_t *kd) * physical address. This routine is used only for crashdumps. */ int -_kvm_kvatop(kvm_t *kd, u_long va, u_long *pa) +_kvm_kvatop(kvm_t *kd, u_long va, paddr_t *pa) { u_long end; @@ -139,7 +139,7 @@ _kvm_kvatop(kvm_t *kd, u_long va, u_long *pa) * XXX crashdumps not working yet anyway */ off_t -_kvm_pa2off(kvm_t *kd, u_long pa) +_kvm_pa2off(kvm_t *kd, paddr_t pa) { return (kd->dump_off+pa); } |