Commit Graph

19 Commits

Author SHA1 Message Date
matt 0deb66dfa6 Add missing __RCSID("$NetBSD$"); 2014-01-27 21:00:01 +00:00
jym 962a341df6 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:

http://mail-index.netbsd.org/current-users/2010/09/07/msg014249.html
2010-09-20 23:23:16 +00:00
jym 6dc46b923b Ansify and KNF all functions within kvm(3). No objection on current-users@.
Used as ground for u_long => vaddr_t/paddr_t replacements in kvm(3)
private functions.

Compile tested for all arches. See also:

http://mail-index.netbsd.org/current-users/2010/09/07/msg014249.html
2010-09-19 02:07:00 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
fredette f82a63dfb7 Added support for sun2 kernel cores. 2001-05-21 14:56:29 +00:00
veego f37e7bc569 Never ever commit changes without comiling it, even if you only change a
comment.
1998-01-17 15:14:03 +00:00
gwr 04e1e909fe Use <m68k/kcore.h> rather than <machine/kcore.h> to ensure
machine independence.
1997-10-28 16:52:25 +00:00
gwr f638574915 Add _kvm_mdopen() 1997-08-12 16:34:07 +00:00
thorpej b6c0c9a270 Update for new m68k/kcore.h. We use dispatch information provided
by the crash dump itself to facilitate cross-analysis.  The m68k_cmn
for Utah pmaps reads MMU configuration from the crash dump to that
this works on 4k and 8k h/w page size systems.
1997-04-09 21:15:50 +00:00
gwr 95883471d5 Build the same libkvm.* on all m68k machines. (Well... except for the
stragglers that still use libkvm.old )  The m68k machines now dispatch
based on the machine name to the appropriate libkvm implementation.
1997-03-21 18:44:21 +00:00
leo 287a3d660a Fix small typo in last commit. 1996-05-07 06:09:11 +00:00
gwr 82118b75d6 Allow more flexibility in the format of cpu_kcore_hdr_t and isolate
the knowledge of that struct in the machine-dependent module.
1996-05-05 04:31:59 +00:00
thorpej 346e67f879 RCS id police. 1996-03-18 22:33:07 +00:00
leo 9c2128ecdd New libkvm/savecore implementation. With the following differences:
1) savecore will not access the dump or live-kernel directly. It
        will always use the kvm-functions. Allowing it to work on kernels
        that don't have a 1-1 PA-VA mapping.
     2) the kvm-lib has some additional functions to accomplish 1
          - kvm_dump_mkheader()
          - kvm_dump_wrtheader()
          - kvm_dump_inval()
     3) the file formats of the dump generated by the kernel and the dump
        generated by savecore have been changed. The file format now looks
        like the format produced for 'normal' core dumps.
Ports not yet supporting the new kvm-format will be using libkvm.old/
savecore.old for the time being.
1996-03-16 10:23:29 +00:00
briggs bc09c2e1b0 Take out cpu040 case for mac68k. 1995-07-01 19:26:03 +00:00
chopps b331e63615 should work without specialization now. 1995-04-02 20:45:26 +00:00
mycroft c304971439 Eliminate _kvm_uvatop(), in favor of using the machine-independent VM structures. 1995-01-09 08:59:25 +00:00
mycroft 96e437894b Merge the m68k files. The code itself should be merged. 1994-09-18 03:32:50 +00:00
cgd 54774f9293 m68k-ify the hp300 kvm file; use MACHINE_ARCH to pick files up 1994-05-09 04:09:21 +00:00