Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/lib/libkvm

Module Name:    src
Committed By:   jym
Date:           Mon Sep 20 23:23:16 UTC 2010

Modified Files:
        src/lib/libkvm: kvm.c kvm_alpha.c kvm_arm.c kvm_hppa.c kvm_i386.c
            kvm_m68k.c kvm_m68k.h kvm_m68k_cmn.c kvm_mips.c kvm_powerpc.c
            kvm_powerpc64.c kvm_private.h kvm_proc.c kvm_sh3.c kvm_sparc.c
            kvm_sparc64.c kvm_sun2.c kvm_sun3.c kvm_sun3x.c kvm_vax.c

Log Message:
Change kvm_pa2off() and kvm_kvatop() prototypes (private to kvm(3)):

-int     _kvm_kvatop(kvm_t *, u_long, u_long *);
-off_t   _kvm_pa2off(kvm_t *, u_long);
+int     _kvm_kvatop(kvm_t *, vaddr_t, paddr_t *);
+off_t   _kvm_pa2off(kvm_t *, paddr_t);

Basically, use vaddr_t for VA and paddr_t for PA. In addition, for variables
representing addresses, use paddr_t or vaddr_t, depending on the context.

For most arches, vaddr_t and paddr_t are equivalent to unsigned long. However,
the change was needed for exotic situations, like i386 PAE, were unsigned long
is not suitable for PA which are 64 bits long. As this required a complete
change of the function prototypes, all arches had to be adapted accordingly.

Core files from before this commit should still work with the new code; I did
not see any direct dependency between core's structure and kvatop/pa2off.

The change was compile tested for all arches, as it impacts all of them.

See also:

To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/lib/libkvm/kvm.c
cvs rdiff -u -r1.24 -r1.25 src/lib/libkvm/kvm_alpha.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libkvm/kvm_arm.c src/lib/libkvm/kvm_hppa.c \
cvs rdiff -u -r1.27 -r1.28 src/lib/libkvm/kvm_i386.c
cvs rdiff -u -r1.17 -r1.18 src/lib/libkvm/kvm_m68k.c \
    src/lib/libkvm/kvm_private.h src/lib/libkvm/kvm_vax.c
cvs rdiff -u -r1.14 -r1.15 src/lib/libkvm/kvm_m68k_cmn.c \
cvs rdiff -u -r1.19 -r1.20 src/lib/libkvm/kvm_mips.c
cvs rdiff -u -r1.11 -r1.12 src/lib/libkvm/kvm_powerpc.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libkvm/kvm_powerpc64.c
cvs rdiff -u -r1.85 -r1.86 src/lib/libkvm/kvm_proc.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libkvm/kvm_sh3.c src/lib/libkvm/kvm_x86_64.c
cvs rdiff -u -r1.31 -r1.32 src/lib/libkvm/kvm_sparc.c
cvs rdiff -u -r1.4 -r1.5 src/lib/libkvm/kvm_sun2.c
cvs rdiff -u -r1.13 -r1.14 src/lib/libkvm/kvm_sun3.c
cvs rdiff -u -r1.10 -r1.11 src/lib/libkvm/kvm_sun3x.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Home | Main Index | Thread Index | Old Index