Use ANSI function decls and static.
This commit is contained in:
parent
cfc755477e
commit
605050704a
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: compat_13_machdep.c,v 1.6 2003/08/07 16:28:16 agc Exp $ */
|
||||
/* $NetBSD: compat_13_machdep.c,v 1.7 2004/08/28 22:06:28 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
@ -75,7 +75,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.6 2003/08/07 16:28:16 agc Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.7 2004/08/28 22:06:28 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -94,7 +94,7 @@ __KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.6 2003/08/07 16:28:16 agc Ex
|
||||
|
||||
extern int fputype;
|
||||
extern short exframesize[];
|
||||
void m68881_restore __P((struct fpframe *));
|
||||
void m68881_restore(struct fpframe *);
|
||||
|
||||
/*
|
||||
* System call to cleanup state after a signal
|
||||
@ -107,10 +107,7 @@ void m68881_restore __P((struct fpframe *));
|
||||
* a machine fault.
|
||||
*/
|
||||
int
|
||||
compat_13_sys_sigreturn(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
compat_13_sys_sigreturn(struct lwp *l, void *v, register_t *retval)
|
||||
{
|
||||
struct compat_13_sys_sigreturn_args /* {
|
||||
syscallarg(struct sigcontext13 *) sigcntxp;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: compat_16_machdep.c,v 1.3 2003/10/08 00:28:41 thorpej Exp $ */
|
||||
/* $NetBSD: compat_16_machdep.c,v 1.4 2004/08/28 22:06:28 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
@ -75,7 +75,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.3 2003/10/08 00:28:41 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.4 2004/08/28 22:06:28 thorpej Exp $");
|
||||
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
||||
@ -102,8 +102,8 @@ __KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.3 2003/10/08 00:28:41 thorpe
|
||||
|
||||
extern short exframesize[];
|
||||
int compat_16_sys___sigreturn14(struct lwp *, void *, register_t *);
|
||||
void m68881_save __P((struct fpframe *));
|
||||
void m68881_restore __P((struct fpframe *));
|
||||
void m68881_save(struct fpframe *);
|
||||
void m68881_restore(struct fpframe *);
|
||||
|
||||
#ifdef DEBUG
|
||||
extern int sigdebug;
|
||||
@ -276,10 +276,7 @@ sendsig_sigcontext(const ksiginfo_t *ksi, const sigset_t *mask)
|
||||
* a machine fault.
|
||||
*/
|
||||
int
|
||||
compat_16_sys___sigreturn14(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
compat_16_sys___sigreturn14(struct lwp *l, void *v, register_t *retval)
|
||||
{
|
||||
struct compat_16_sys___sigreturn14_args /* {
|
||||
syscallarg(struct sigcontext *) sigcntxp;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: db_disasm.c,v 1.29 2003/07/15 02:43:12 lukem Exp $ */
|
||||
/* $NetBSD: db_disasm.c,v 1.30 2004/08/28 22:06:28 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christian E. Hopps
|
||||
@ -63,7 +63,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.29 2003/07/15 02:43:12 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.30 2004/08/28 22:06:28 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -74,91 +74,100 @@ __KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.29 2003/07/15 02:43:12 lukem Exp $")
|
||||
#include <ddb/db_output.h>
|
||||
#include <m68k/m68k/db_disasm.h>
|
||||
|
||||
void get_modregstr __P((dis_buffer_t *, int, int, int, int));
|
||||
void get_immed __P((dis_buffer_t *, int));
|
||||
void get_fpustdGEN __P((dis_buffer_t *, u_short, const char *));
|
||||
void addstr __P((dis_buffer_t *, const char *s));
|
||||
void prints __P((dis_buffer_t *, int, int));
|
||||
void printu __P((dis_buffer_t *, u_int, int));
|
||||
void prints_wb __P((dis_buffer_t *, int, int, int));
|
||||
void printu_wb __P((dis_buffer_t *, u_int, int, int));
|
||||
void prints_bf __P((dis_buffer_t *, int, int, int));
|
||||
void printu_bf __P((dis_buffer_t *, u_int, int, int));
|
||||
void iaddstr __P((dis_buffer_t *, const char *s));
|
||||
void iprints __P((dis_buffer_t *, int, int));
|
||||
void iprintu __P((dis_buffer_t *, u_int, int));
|
||||
void iprints_wb __P((dis_buffer_t *, int, int, int));
|
||||
void iprintu_wb __P((dis_buffer_t *, u_int, int, int));
|
||||
void make_cond __P((dis_buffer_t *, int , char *));
|
||||
void print_fcond __P((dis_buffer_t *, char));
|
||||
void print_mcond __P((dis_buffer_t *, char));
|
||||
void print_disp __P((dis_buffer_t *, int, int, int));
|
||||
void print_addr __P((dis_buffer_t *, u_long));
|
||||
void print_reglist __P((dis_buffer_t *, int, u_short));
|
||||
void print_freglist __P((dis_buffer_t *, int, u_short, int));
|
||||
void print_fcode __P((dis_buffer_t *, u_short));
|
||||
static void get_modregstr(dis_buffer_t *, int, int, int, int);
|
||||
static void get_modregstr_moto(dis_buffer_t *, int, int, int, int);
|
||||
static void get_modregstr_mit(dis_buffer_t *, int, int, int, int);
|
||||
#if 0
|
||||
static u_long get_areg_val(int reg);
|
||||
#endif
|
||||
static void get_immed(dis_buffer_t *, int);
|
||||
static void get_fpustdGEN(dis_buffer_t *, u_short, const char *);
|
||||
static void addstr(dis_buffer_t *, const char *s);
|
||||
static void prints(dis_buffer_t *, int, int);
|
||||
static void printu(dis_buffer_t *, u_int, int);
|
||||
static void prints_wb(dis_buffer_t *, int, int, int);
|
||||
static void printu_wb(dis_buffer_t *, u_int, int, int);
|
||||
static void prints_bf(dis_buffer_t *, int, int, int);
|
||||
static void printu_bf(dis_buffer_t *, u_int, int, int);
|
||||
static void iaddstr(dis_buffer_t *, const char *s);
|
||||
#if 0
|
||||
static void iprints(dis_buffer_t *, int, int);
|
||||
#endif
|
||||
static void iprintu(dis_buffer_t *, u_int, int);
|
||||
#if 0
|
||||
static void iprints_wb(dis_buffer_t *, int, int, int);
|
||||
#endif
|
||||
static void iprintu_wb(dis_buffer_t *, u_int, int, int);
|
||||
static void make_cond(dis_buffer_t *, int , char *);
|
||||
static void print_fcond(dis_buffer_t *, char);
|
||||
static void print_mcond(dis_buffer_t *, char);
|
||||
static void print_disp(dis_buffer_t *, int, int, int);
|
||||
static void print_addr(dis_buffer_t *, u_long);
|
||||
static void print_reglist(dis_buffer_t *, int, u_short);
|
||||
static void print_freglist(dis_buffer_t *, int, u_short, int);
|
||||
static void print_fcode(dis_buffer_t *, u_short);
|
||||
|
||||
/* groups */
|
||||
void opcode_bitmanip __P((dis_buffer_t *, u_short));
|
||||
void opcode_move __P((dis_buffer_t *, u_short));
|
||||
void opcode_misc __P((dis_buffer_t *, u_short));
|
||||
void opcode_branch __P((dis_buffer_t *, u_short));
|
||||
void opcode_coproc __P((dis_buffer_t *, u_short));
|
||||
void opcode_0101 __P((dis_buffer_t *, u_short));
|
||||
void opcode_1000 __P((dis_buffer_t *, u_short));
|
||||
void opcode_addsub __P((dis_buffer_t *, u_short));
|
||||
void opcode_1010 __P((dis_buffer_t *, u_short));
|
||||
void opcode_1011 __P((dis_buffer_t *, u_short));
|
||||
void opcode_1100 __P((dis_buffer_t *, u_short));
|
||||
void opcode_1110 __P((dis_buffer_t *, u_short));
|
||||
void opcode_fpu __P((dis_buffer_t *, u_short));
|
||||
void opcode_mmu __P((dis_buffer_t *, u_short));
|
||||
void opcode_mmu040 __P((dis_buffer_t *, u_short));
|
||||
void opcode_move16 __P((dis_buffer_t *, u_short));
|
||||
static void opcode_bitmanip(dis_buffer_t *, u_short);
|
||||
static void opcode_move(dis_buffer_t *, u_short);
|
||||
static void opcode_misc(dis_buffer_t *, u_short);
|
||||
static void opcode_branch(dis_buffer_t *, u_short);
|
||||
static void opcode_coproc(dis_buffer_t *, u_short);
|
||||
static void opcode_0101(dis_buffer_t *, u_short);
|
||||
static void opcode_1000(dis_buffer_t *, u_short);
|
||||
static void opcode_addsub(dis_buffer_t *, u_short);
|
||||
static void opcode_1010(dis_buffer_t *, u_short);
|
||||
static void opcode_1011(dis_buffer_t *, u_short);
|
||||
static void opcode_1100(dis_buffer_t *, u_short);
|
||||
static void opcode_1110(dis_buffer_t *, u_short);
|
||||
static void opcode_fpu(dis_buffer_t *, u_short);
|
||||
static void opcode_mmu(dis_buffer_t *, u_short);
|
||||
static void opcode_mmu040(dis_buffer_t *, u_short);
|
||||
static void opcode_move16(dis_buffer_t *, u_short);
|
||||
|
||||
/* subs of groups */
|
||||
void opcode_movec __P((dis_buffer_t *, u_short));
|
||||
void opcode_divmul __P((dis_buffer_t *, u_short));
|
||||
void opcode_movem __P((dis_buffer_t *, u_short));
|
||||
void opcode_fmove_ext __P((dis_buffer_t *, u_short, u_short));
|
||||
void opcode_pmove __P((dis_buffer_t *, u_short, u_short));
|
||||
void opcode_pflush __P((dis_buffer_t *, u_short, u_short));
|
||||
static void opcode_movec(dis_buffer_t *, u_short);
|
||||
static void opcode_divmul(dis_buffer_t *, u_short);
|
||||
static void opcode_movem(dis_buffer_t *, u_short);
|
||||
static void opcode_fmove_ext(dis_buffer_t *, u_short, u_short);
|
||||
static void opcode_pmove(dis_buffer_t *, u_short, u_short);
|
||||
static void opcode_pflush(dis_buffer_t *, u_short, u_short);
|
||||
|
||||
#define addchar(ch) (*dbuf->casm++ = ch)
|
||||
#define iaddchar(ch) (*dbuf->cinfo++ = ch)
|
||||
|
||||
typedef void dis_func_t __P((dis_buffer_t *, u_short));
|
||||
typedef void dis_func_t(dis_buffer_t *, u_short);
|
||||
|
||||
dis_func_t *const opcode_map[16] = {
|
||||
static dis_func_t *const opcode_map[16] = {
|
||||
opcode_bitmanip, opcode_move, opcode_move, opcode_move,
|
||||
opcode_misc, opcode_0101, opcode_branch, opcode_move,
|
||||
opcode_1000, opcode_addsub, opcode_1010, opcode_1011,
|
||||
opcode_1100, opcode_addsub, opcode_1110, opcode_coproc
|
||||
};
|
||||
|
||||
const char *const cc_table[16] = {
|
||||
static const char *const cc_table[16] = {
|
||||
"t", "f", "hi", "ls",
|
||||
"cc", "cs", "ne", "eq",
|
||||
"vc", "vs", "pl", "mi",
|
||||
"ge", "lt", "gt", "le"
|
||||
};
|
||||
|
||||
const char *const fpcc_table[32] = {
|
||||
static const char *const fpcc_table[32] = {
|
||||
"f", "eq", "ogt", "oge", "olt", "ole", "ogl", "or",
|
||||
"un", "ueq", "ugt", "uge", "ult", "ule", "ne", "t",
|
||||
"sf", "seq", "gt", "ge", "lt", "le", "gl", "gle",
|
||||
"ngle", "ngl", "nle", "nlt", "nge", "ngt", "sne", "st" };
|
||||
|
||||
const char *const mmcc_table[16] = {
|
||||
static const char *const mmcc_table[16] = {
|
||||
"bs", "bc", "ls", "lc", "ss", "sc", "as", "sc",
|
||||
"ws", "wc", "is", "ic", "gs", "gc", "cs", "cc" };
|
||||
|
||||
|
||||
const char *const aregs[8] = {"a0","a1","a2","a3","a4","a5","a6","sp"};
|
||||
const char *const dregs[8] = {"d0","d1","d2","d3","d4","d5","d6","d7"};
|
||||
const char *const fpregs[8] = {
|
||||
static const char *const aregs[8] = {"a0","a1","a2","a3","a4","a5","a6","sp"};
|
||||
static const char *const dregs[8] = {"d0","d1","d2","d3","d4","d5","d6","d7"};
|
||||
static const char *const fpregs[8] = {
|
||||
"fp0","fp1","fp2","fp3","fp4","fp5","fp6","fp7" };
|
||||
const char *const fpcregs[3] = { "fpiar", "fpsr", "fpcr" };
|
||||
static const char *const fpcregs[3] = { "fpiar", "fpsr", "fpcr" };
|
||||
|
||||
/*
|
||||
* Disassemble intruction at location ``loc''.
|
||||
@ -169,9 +178,7 @@ static char asm_buffer[256];
|
||||
static char info_buffer[256];
|
||||
|
||||
db_addr_t
|
||||
db_disasm(loc, moto_syntax)
|
||||
db_addr_t loc;
|
||||
boolean_t moto_syntax;
|
||||
db_disasm(db_addr_t loc, boolean_t moto_syntax)
|
||||
{
|
||||
u_short opc;
|
||||
dis_func_t *func;
|
||||
@ -202,10 +209,8 @@ db_disasm(loc, moto_syntax)
|
||||
/*
|
||||
* Bit manipulation/MOVEP/Immediate.
|
||||
*/
|
||||
void
|
||||
opcode_bitmanip(dbuf, opc)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc;
|
||||
static void
|
||||
opcode_bitmanip(dis_buffer_t *dbuf, u_short opc)
|
||||
{
|
||||
char *tmp;
|
||||
u_short ext;
|
||||
@ -502,10 +507,8 @@ opcode_bitmanip(dbuf, opc)
|
||||
* move byte/word/long and q
|
||||
* 00xx (01==.b 10==.l 11==.w) and 0111(Q)
|
||||
*/
|
||||
void
|
||||
opcode_move(dbuf, opc)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc;
|
||||
static void
|
||||
opcode_move(dis_buffer_t *dbuf, u_short opc)
|
||||
{
|
||||
int sz, lused;
|
||||
|
||||
@ -549,10 +552,8 @@ opcode_move(dbuf, opc)
|
||||
/*
|
||||
* misc opcodes.
|
||||
*/
|
||||
void
|
||||
opcode_misc(dbuf, opc)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc;
|
||||
static void
|
||||
opcode_misc(dis_buffer_t *dbuf, u_short opc)
|
||||
{
|
||||
char *tmp;
|
||||
int sz;
|
||||
@ -775,10 +776,8 @@ opcode_misc(dbuf, opc)
|
||||
/*
|
||||
* ADDQ/SUBQ/Scc/DBcc/TRAPcc
|
||||
*/
|
||||
void
|
||||
opcode_0101(dbuf, opc)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc;
|
||||
static void
|
||||
opcode_0101(dis_buffer_t *dbuf, u_short opc)
|
||||
{
|
||||
int data;
|
||||
|
||||
@ -842,10 +841,8 @@ opcode_0101(dbuf, opc)
|
||||
/*
|
||||
* Bcc/BSR/BRA
|
||||
*/
|
||||
void
|
||||
opcode_branch(dbuf, opc)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc;
|
||||
static void
|
||||
opcode_branch(dis_buffer_t *dbuf, u_short opc)
|
||||
{
|
||||
int disp, sz;
|
||||
|
||||
@ -884,10 +881,8 @@ opcode_branch(dbuf, opc)
|
||||
/*
|
||||
* ADD/ADDA/ADDX/SUB/SUBA/SUBX
|
||||
*/
|
||||
void
|
||||
opcode_addsub(dbuf, opc)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc;
|
||||
static void
|
||||
opcode_addsub(dis_buffer_t *dbuf, u_short opc)
|
||||
{
|
||||
int sz, ch, amode;
|
||||
|
||||
@ -966,10 +961,8 @@ opcode_addsub(dbuf, opc)
|
||||
/*
|
||||
* Shift/Rotate/Bit Field
|
||||
*/
|
||||
void
|
||||
opcode_1110(dbuf, opc)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc;
|
||||
static void
|
||||
opcode_1110(dis_buffer_t *dbuf, u_short opc)
|
||||
{
|
||||
char *tmp;
|
||||
u_short ext;
|
||||
@ -1111,10 +1104,8 @@ opcode_1110(dbuf, opc)
|
||||
/*
|
||||
* CMP/CMPA/EOR
|
||||
*/
|
||||
void
|
||||
opcode_1011(dbuf, opc)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc;
|
||||
static void
|
||||
opcode_1011(dis_buffer_t *dbuf, u_short opc)
|
||||
{
|
||||
int sz;
|
||||
|
||||
@ -1171,10 +1162,8 @@ opcode_1011(dbuf, opc)
|
||||
/*
|
||||
* OR/DIV/SBCD
|
||||
*/
|
||||
void
|
||||
opcode_1000(dbuf, opc)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc;
|
||||
static void
|
||||
opcode_1000(dis_buffer_t *dbuf, u_short opc)
|
||||
{
|
||||
int sz;
|
||||
|
||||
@ -1245,10 +1234,8 @@ opcode_1000(dbuf, opc)
|
||||
/*
|
||||
* AND/MUL/ABCD/EXG (1100)
|
||||
*/
|
||||
void
|
||||
opcode_1100(dbuf, opc)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc;
|
||||
static void
|
||||
opcode_1100(dis_buffer_t *dbuf, u_short opc)
|
||||
{
|
||||
int sz;
|
||||
|
||||
@ -1321,10 +1308,8 @@ opcode_1100(dbuf, opc)
|
||||
/*
|
||||
* Coprocessor instruction
|
||||
*/
|
||||
void
|
||||
opcode_coproc(dbuf, opc)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc;
|
||||
static void
|
||||
opcode_coproc(dis_buffer_t *dbuf, u_short opc)
|
||||
{
|
||||
switch (BITFIELD(*dbuf->val,11,9)) {
|
||||
case 1:
|
||||
@ -1364,19 +1349,15 @@ opcode_coproc(dbuf, opc)
|
||||
/*
|
||||
* Resvd
|
||||
*/
|
||||
void
|
||||
opcode_1010(dbuf, opc)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc;
|
||||
static void
|
||||
opcode_1010(dis_buffer_t *dbuf, u_short opc)
|
||||
{
|
||||
addstr(dbuf, "RSVD");
|
||||
dbuf->used++;
|
||||
}
|
||||
|
||||
void
|
||||
opcode_fpu(dbuf, opc)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc;
|
||||
static void
|
||||
opcode_fpu(dis_buffer_t *dbuf, u_short opc)
|
||||
{
|
||||
u_short ext;
|
||||
int type, opmode;
|
||||
@ -1586,10 +1567,8 @@ opcode_fpu(dbuf, opc)
|
||||
/*
|
||||
* XXX - This screws up on: fmovem a0@(312),fpcr/fpsr/fpi
|
||||
*/
|
||||
void
|
||||
opcode_fmove_ext(dbuf, opc, ext)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc, ext;
|
||||
static void
|
||||
opcode_fmove_ext(dis_buffer_t *dbuf, u_short opc, u_short ext)
|
||||
{
|
||||
int sz;
|
||||
|
||||
@ -1690,10 +1669,8 @@ opcode_fmove_ext(dbuf, opc, ext)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
opcode_mmu(dbuf, opc)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc;
|
||||
static void
|
||||
opcode_mmu(dis_buffer_t *dbuf, u_short opc)
|
||||
{
|
||||
u_short ext;
|
||||
int type;
|
||||
@ -1800,10 +1777,8 @@ opcode_mmu(dbuf, opc)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
opcode_pflush(dbuf, opc, ext)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc, ext;
|
||||
static void
|
||||
opcode_pflush(dis_buffer_t *dbuf, u_short opc, u_short ext)
|
||||
{
|
||||
u_short mode, mask, fc;
|
||||
|
||||
@ -1851,10 +1826,8 @@ opcode_pflush(dbuf, opc, ext)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
opcode_pmove(dbuf, opc, ext)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc, ext;
|
||||
static void
|
||||
opcode_pmove(dis_buffer_t *dbuf, u_short opc, u_short ext)
|
||||
{
|
||||
const char *reg;
|
||||
int rtom, sz, preg;
|
||||
@ -1964,10 +1937,8 @@ opcode_pmove(dbuf, opc, ext)
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
print_fcode(dbuf, fc)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short fc;
|
||||
static void
|
||||
print_fcode(dis_buffer_t *dbuf, u_short fc)
|
||||
{
|
||||
if (ISBITSET(fc, 4))
|
||||
printu_bf(dbuf, fc, 3, 0);
|
||||
@ -1978,10 +1949,9 @@ print_fcode(dbuf, fc)
|
||||
else
|
||||
addstr(dbuf, "dfc");
|
||||
}
|
||||
void
|
||||
opcode_mmu040(dbuf, opc)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc;
|
||||
|
||||
static void
|
||||
opcode_mmu040(dis_buffer_t *dbuf, u_short opc)
|
||||
{
|
||||
if (ISBITSET(opc, 6)) {
|
||||
addstr(dbuf, "ptest");
|
||||
@ -2015,15 +1985,12 @@ opcode_mmu040(dbuf, opc)
|
||||
*dbuf->casm = 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* disassemble long format (64b) divs/muls divu/mulu opcode.
|
||||
* Note: opcode's dbuf->used already accounted for.
|
||||
*/
|
||||
void
|
||||
opcode_divmul(dbuf, opc)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc;
|
||||
static void
|
||||
opcode_divmul(dis_buffer_t *dbuf, u_short opc)
|
||||
{
|
||||
u_short ext;
|
||||
int iq, hr;
|
||||
@ -2062,11 +2029,8 @@ opcode_divmul(dbuf, opc)
|
||||
PRINT_DREG(dbuf, iq);
|
||||
}
|
||||
|
||||
void
|
||||
print_reglist(dbuf, mod, rl)
|
||||
dis_buffer_t *dbuf;
|
||||
int mod;
|
||||
u_short rl;
|
||||
static void
|
||||
print_reglist(dis_buffer_t *dbuf, int mod, u_short rl)
|
||||
{
|
||||
static const char *const regs[16] = {
|
||||
"d0","d1","d2","d3","d4","d5","d6","d7",
|
||||
@ -2111,11 +2075,8 @@ print_reglist(dbuf, mod, rl)
|
||||
*dbuf->casm = 0;
|
||||
}
|
||||
|
||||
void
|
||||
print_freglist(dbuf, mod, rl, cntl)
|
||||
dis_buffer_t *dbuf;
|
||||
int mod, cntl;
|
||||
u_short rl;
|
||||
static void
|
||||
print_freglist(dis_buffer_t *dbuf, int mod, u_short rl, int cntl)
|
||||
{
|
||||
const char *const * regs;
|
||||
int bit, list, upper;
|
||||
@ -2163,10 +2124,8 @@ print_freglist(dbuf, mod, rl, cntl)
|
||||
/*
|
||||
* disassemble movem opcode.
|
||||
*/
|
||||
void
|
||||
opcode_movem(dbuf, opc)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc;
|
||||
static void
|
||||
opcode_movem(dis_buffer_t *dbuf, u_short opc)
|
||||
{
|
||||
u_short rl;
|
||||
|
||||
@ -2191,10 +2150,8 @@ opcode_movem(dbuf, opc)
|
||||
/*
|
||||
* disassemble movec opcode.
|
||||
*/
|
||||
void
|
||||
opcode_movec(dbuf, opc)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc;
|
||||
static void
|
||||
opcode_movec(dis_buffer_t *dbuf, u_short opc)
|
||||
{
|
||||
char *tmp;
|
||||
u_short ext;
|
||||
@ -2294,10 +2251,8 @@ opcode_movec(dbuf, opc)
|
||||
/*
|
||||
* disassemble move16 opcode.
|
||||
*/
|
||||
void
|
||||
opcode_move16(dbuf, opc)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short opc;
|
||||
static void
|
||||
opcode_move16(dis_buffer_t *dbuf, u_short opc)
|
||||
{
|
||||
u_short ext;
|
||||
|
||||
@ -2341,10 +2296,8 @@ dis_buffer_t *dbuf;
|
||||
/*
|
||||
* copy const string 's' into ``dbuf''->casm
|
||||
*/
|
||||
void
|
||||
addstr(dbuf, s)
|
||||
dis_buffer_t *dbuf;
|
||||
const char *s;
|
||||
static void
|
||||
addstr(dis_buffer_t *dbuf, const char *s)
|
||||
{
|
||||
while ((*dbuf->casm++ = *s++))
|
||||
;
|
||||
@ -2354,20 +2307,16 @@ addstr(dbuf, s)
|
||||
/*
|
||||
* copy const string 's' into ``dbuf''->cinfo
|
||||
*/
|
||||
void
|
||||
iaddstr(dbuf, s)
|
||||
dis_buffer_t *dbuf;
|
||||
const char *s;
|
||||
static void
|
||||
iaddstr(dis_buffer_t *dbuf, const char *s)
|
||||
{
|
||||
while ((*dbuf->cinfo++ = *s++))
|
||||
;
|
||||
dbuf->cinfo--;
|
||||
}
|
||||
|
||||
void
|
||||
get_modregstr_moto(dbuf, bit, mod, sz, dd)
|
||||
dis_buffer_t *dbuf;
|
||||
int bit, mod, sz, dd;
|
||||
static void
|
||||
get_modregstr_moto(dis_buffer_t *dbuf, int bit, int mod, int sz, int dd)
|
||||
{
|
||||
u_char scale, idx;
|
||||
const short *nval;
|
||||
@ -2571,10 +2520,8 @@ get_modregstr_moto(dbuf, bit, mod, sz, dd)
|
||||
}
|
||||
|
||||
/* mit syntax makes for spaghetti parses */
|
||||
void
|
||||
get_modregstr_mit(dbuf, bit, mod, sz, dd)
|
||||
dis_buffer_t *dbuf;
|
||||
int bit, mod, sz, dd;
|
||||
static void
|
||||
get_modregstr_mit(dis_buffer_t *dbuf, int bit, int mod, int sz, int dd)
|
||||
{
|
||||
u_char scale, idx;
|
||||
const short *nval;
|
||||
@ -2807,9 +2754,8 @@ get_modregstr_mit(dbuf, bit, mod, sz, dd)
|
||||
* GETMOD_BEFORE or GETMOD_AFTER), disassemble and write into ``dbuf''
|
||||
* the mod|reg pair.
|
||||
*/
|
||||
void get_modregstr(dbuf, bit, mod, sz, dispdisp)
|
||||
dis_buffer_t *dbuf;
|
||||
int bit, mod, sz, dispdisp;
|
||||
static void
|
||||
get_modregstr(dis_buffer_t *dbuf, int bit, int mod, int sz, int dispdisp)
|
||||
{
|
||||
if (dbuf->mit)
|
||||
get_modregstr_mit(dbuf,bit,mod,sz,dispdisp);
|
||||
@ -2822,11 +2768,8 @@ void get_modregstr(dbuf, bit, mod, sz, dispdisp)
|
||||
* and the ``base'' string of the opcode, append the full
|
||||
* opcode name including condition found at ``bit''.
|
||||
*/
|
||||
void
|
||||
make_cond(dbuf, bit, base)
|
||||
dis_buffer_t *dbuf;
|
||||
int bit;
|
||||
char *base;
|
||||
static void
|
||||
make_cond(dis_buffer_t *dbuf, int bit, char *base)
|
||||
{
|
||||
int cc;
|
||||
const char *ccs;
|
||||
@ -2838,18 +2781,14 @@ make_cond(dbuf, bit, base)
|
||||
addstr(dbuf, ccs);
|
||||
}
|
||||
|
||||
void
|
||||
print_fcond(dbuf, cp)
|
||||
dis_buffer_t *dbuf;
|
||||
char cp;
|
||||
static void
|
||||
print_fcond(dis_buffer_t *dbuf, char cp)
|
||||
{
|
||||
addstr(dbuf,fpcc_table[cp&31]); /* XXX - not 63 ?*/
|
||||
}
|
||||
|
||||
void
|
||||
print_mcond(dbuf, cp)
|
||||
dis_buffer_t *dbuf;
|
||||
char cp;
|
||||
static void
|
||||
print_mcond(dis_buffer_t *dbuf, char cp)
|
||||
{
|
||||
addstr(dbuf,mmcc_table[cp&15]);
|
||||
}
|
||||
@ -2860,10 +2799,8 @@ print_mcond(dbuf, cp)
|
||||
* hash (``#'') sign and the value. Increment the ``dbuf''->used
|
||||
* field accordingly.
|
||||
*/
|
||||
void
|
||||
get_immed(dbuf,sz)
|
||||
dis_buffer_t *dbuf;
|
||||
int sz;
|
||||
static void
|
||||
get_immed(dis_buffer_t *dbuf,int sz)
|
||||
{
|
||||
addchar('#');
|
||||
switch (sz) {
|
||||
@ -2883,11 +2820,8 @@ get_immed(dbuf,sz)
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
get_fpustdGEN(dbuf,ext,name)
|
||||
dis_buffer_t *dbuf;
|
||||
u_short ext;
|
||||
const char *name;
|
||||
static void
|
||||
get_fpustdGEN(dis_buffer_t *dbuf, u_short ext, const char *name)
|
||||
{
|
||||
int sz;
|
||||
|
||||
@ -2965,22 +2899,21 @@ get_fpustdGEN(dbuf,ext,name)
|
||||
}
|
||||
}
|
||||
|
||||
u_long
|
||||
get_areg_val(reg)
|
||||
int reg;
|
||||
#if 0
|
||||
static u_long
|
||||
get_areg_val(int reg)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* given value ``disp'' print it to ``dbuf''->buf. ``rel'' is a
|
||||
* register number 0-7 (a0-a7), or -1 (pc). Thus possible extra info
|
||||
* could be output to the ``dbuf''->info buffer.
|
||||
*/
|
||||
void
|
||||
print_disp(dbuf, disp, sz, rel)
|
||||
dis_buffer_t *dbuf;
|
||||
int disp, sz, rel;
|
||||
static void
|
||||
print_disp(dis_buffer_t *dbuf, int disp, int sz, int rel)
|
||||
{
|
||||
db_expr_t diff;
|
||||
db_sym_t sym;
|
||||
@ -3010,10 +2943,8 @@ print_disp(dbuf, disp, sz, rel)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
print_addr(dbuf, addr)
|
||||
dis_buffer_t *dbuf;
|
||||
u_long addr;
|
||||
static void
|
||||
print_addr(dis_buffer_t *dbuf, u_long addr)
|
||||
{
|
||||
db_expr_t diff;
|
||||
db_sym_t sym;
|
||||
@ -3044,11 +2975,8 @@ print_addr(dbuf, addr)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
prints(dbuf, val, sz)
|
||||
dis_buffer_t *dbuf;
|
||||
int val;
|
||||
int sz;
|
||||
static void
|
||||
prints(dis_buffer_t *dbuf, int val, int sz)
|
||||
{
|
||||
extern int db_radix;
|
||||
|
||||
@ -3065,11 +2993,9 @@ prints(dbuf, val, sz)
|
||||
dbuf->casm = &dbuf->casm[strlen(dbuf->casm)];
|
||||
}
|
||||
|
||||
void
|
||||
iprints(dbuf, val, sz)
|
||||
dis_buffer_t *dbuf;
|
||||
int val;
|
||||
int sz;
|
||||
#if 0
|
||||
static void
|
||||
iprints(dis_buffer_t *dbuf, int val, int sz)
|
||||
{
|
||||
extern int db_radix;
|
||||
|
||||
@ -3085,12 +3011,10 @@ iprints(dbuf, val, sz)
|
||||
|
||||
dbuf->cinfo = &dbuf->cinfo[strlen(dbuf->cinfo)];
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
printu(dbuf, val, sz)
|
||||
dis_buffer_t *dbuf;
|
||||
u_int val;
|
||||
int sz;
|
||||
static void
|
||||
printu(dis_buffer_t *dbuf, u_int val, int sz)
|
||||
{
|
||||
extern int db_radix;
|
||||
|
||||
@ -3106,11 +3030,8 @@ printu(dbuf, val, sz)
|
||||
dbuf->casm = &dbuf->casm[strlen(dbuf->casm)];
|
||||
}
|
||||
|
||||
void
|
||||
iprintu(dbuf, val, sz)
|
||||
dis_buffer_t *dbuf;
|
||||
u_int val;
|
||||
int sz;
|
||||
static void
|
||||
iprintu(dis_buffer_t *dbuf, u_int val, int sz)
|
||||
{
|
||||
extern int db_radix;
|
||||
|
||||
@ -3126,11 +3047,8 @@ iprintu(dbuf, val, sz)
|
||||
dbuf->cinfo = &dbuf->cinfo[strlen(dbuf->cinfo)];
|
||||
}
|
||||
|
||||
void
|
||||
printu_wb(dbuf, val, sz, base)
|
||||
dis_buffer_t *dbuf;
|
||||
u_int val;
|
||||
int sz, base;
|
||||
static void
|
||||
printu_wb(dis_buffer_t *dbuf, u_int val, int sz, int base)
|
||||
{
|
||||
static char buf[sizeof(long) * NBBY / 3 + 2];
|
||||
char *p, ch;
|
||||
@ -3154,11 +3072,8 @@ printu_wb(dbuf, val, sz, base)
|
||||
*dbuf->casm = 0;
|
||||
}
|
||||
|
||||
void
|
||||
prints_wb(dbuf, val, sz, base)
|
||||
dis_buffer_t *dbuf;
|
||||
int val;
|
||||
int sz, base;
|
||||
static void
|
||||
prints_wb(dis_buffer_t *dbuf, int val, int sz, int base)
|
||||
{
|
||||
if (val < 0) {
|
||||
addchar('-');
|
||||
@ -3167,11 +3082,8 @@ prints_wb(dbuf, val, sz, base)
|
||||
printu_wb(dbuf, val, sz, base);
|
||||
}
|
||||
|
||||
void
|
||||
iprintu_wb(dbuf, val, sz, base)
|
||||
dis_buffer_t *dbuf;
|
||||
u_int val;
|
||||
int sz, base;
|
||||
static void
|
||||
iprintu_wb(dis_buffer_t *dbuf, u_int val, int sz, int base)
|
||||
{
|
||||
static char buf[sizeof(long) * NBBY / 3 + 2];
|
||||
char *p, ch;
|
||||
@ -3195,11 +3107,9 @@ iprintu_wb(dbuf, val, sz, base)
|
||||
*dbuf->cinfo = 0;
|
||||
}
|
||||
|
||||
void
|
||||
iprints_wb(dbuf, val, sz, base)
|
||||
dis_buffer_t *dbuf;
|
||||
int val;
|
||||
int sz, base;
|
||||
#if 0
|
||||
static void
|
||||
iprints_wb(dis_buffer_t *dbuf, int val, int sz, int base)
|
||||
{
|
||||
if (val < 0) {
|
||||
iaddchar('-');
|
||||
@ -3207,12 +3117,10 @@ iprints_wb(dbuf, val, sz, base)
|
||||
}
|
||||
iprintu_wb(dbuf, val, sz, base);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void
|
||||
prints_bf(dbuf, val, sb, eb)
|
||||
dis_buffer_t *dbuf;
|
||||
int val, sb, eb;
|
||||
static void
|
||||
prints_bf(dis_buffer_t *dbuf, int val, int sb, int eb)
|
||||
{
|
||||
if (ISBITSET(val,sb))
|
||||
val = (~0 & ~BITFIELD(~0, sb, eb)) | BITFIELD(val, sb, eb);
|
||||
@ -3222,11 +3130,8 @@ prints_bf(dbuf, val, sb, eb)
|
||||
prints(dbuf, val, SIZE_LONG);
|
||||
}
|
||||
|
||||
void
|
||||
printu_bf(dbuf, val, sb, eb)
|
||||
dis_buffer_t *dbuf;
|
||||
u_int val;
|
||||
int sb, eb;
|
||||
static void
|
||||
printu_bf(dis_buffer_t *dbuf, u_int val, int sb, int eb)
|
||||
{
|
||||
printu(dbuf,BITFIELD(val,sb,eb),SIZE_LONG);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: db_disasm.h,v 1.5 1999/09/25 21:11:55 is Exp $ */
|
||||
/* $NetBSD: db_disasm.h,v 1.6 2004/08/28 22:06:28 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christian E. Hopps
|
||||
@ -426,6 +426,3 @@ typedef struct dis_buffer dis_buffer_t;
|
||||
#define PRINT_AREG(dbuf, reg) addstr(dbuf, aregs[reg])
|
||||
|
||||
db_addr_t db_disasm __P((db_addr_t loc, boolean_t moto_syntax));
|
||||
void get_modregstr_moto __P((dis_buffer_t *dbuf, int bit, int mod, int sz, int dd));
|
||||
void get_modregstr_mit __P((dis_buffer_t *dbuf, int bit, int mod, int sz, int dd));
|
||||
u_long get_areg_val __P((int reg));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: db_interface.c,v 1.29 2003/07/15 02:43:12 lukem Exp $ */
|
||||
/* $NetBSD: db_interface.c,v 1.30 2004/08/28 22:06:28 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Mach Operating System
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.29 2003/07/15 02:43:12 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.30 2004/08/28 22:06:28 thorpej Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
@ -55,14 +55,13 @@ __KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.29 2003/07/15 02:43:12 lukem Exp
|
||||
int db_active = 0;
|
||||
db_regs_t ddb_regs;
|
||||
|
||||
static void kdbprinttrap __P((int, int));
|
||||
static void kdbprinttrap(int, int);
|
||||
|
||||
/*
|
||||
* Received keyboard interrupt sequence.
|
||||
*/
|
||||
void
|
||||
kdb_kintr(regs)
|
||||
register db_regs_t *regs;
|
||||
kdb_kintr(db_regs_t *regs)
|
||||
{
|
||||
if (db_active == 0 && (boothowto & RB_KDB)) {
|
||||
printf("\n\nkernel: keyboard interrupt\n");
|
||||
@ -75,9 +74,7 @@ kdb_kintr(regs)
|
||||
* Return non-zero if we "handled" the trap.
|
||||
*/
|
||||
int
|
||||
kdb_trap(type, regs)
|
||||
int type;
|
||||
register db_regs_t *regs;
|
||||
kdb_trap(int type, db_regs_t *regs)
|
||||
{
|
||||
|
||||
switch (type) {
|
||||
@ -140,8 +137,7 @@ extern int trap_types;
|
||||
* Print trap reason.
|
||||
*/
|
||||
static void
|
||||
kdbprinttrap(type, code)
|
||||
int type, code;
|
||||
kdbprinttrap(int type, int code)
|
||||
{
|
||||
printf("kernel: ");
|
||||
if (type >= trap_types || type < 0)
|
||||
@ -152,8 +148,7 @@ kdbprinttrap(type, code)
|
||||
}
|
||||
|
||||
void
|
||||
cpu_Debugger()
|
||||
cpu_Debugger(void)
|
||||
{
|
||||
asm ("trap #15");
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: db_trace.c,v 1.39 2003/07/15 02:43:12 lukem Exp $ */
|
||||
/* $NetBSD: db_trace.c,v 1.40 2004/08/28 22:06:28 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Mach Operating System
|
||||
@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.39 2003/07/15 02:43:12 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.40 2004/08/28 22:06:28 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/proc.h>
|
||||
@ -46,7 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.39 2003/07/15 02:43:12 lukem Exp $");
|
||||
/*
|
||||
* Register list
|
||||
*/
|
||||
static int db_var_short __P((const struct db_variable *, db_expr_t *, int));
|
||||
static int db_var_short(const struct db_variable *, db_expr_t *, int);
|
||||
|
||||
const struct db_variable db_regs[] = {
|
||||
/* D0-D7 */
|
||||
@ -74,10 +74,7 @@ const struct db_variable db_regs[] = {
|
||||
const struct db_variable * const db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]);
|
||||
|
||||
static int
|
||||
db_var_short(varp, valp, op)
|
||||
const struct db_variable *varp;
|
||||
db_expr_t *valp;
|
||||
int op;
|
||||
db_var_short(const struct db_variable *varp, db_expr_t *valp, int op)
|
||||
{
|
||||
if (op == DB_VAR_GET)
|
||||
*valp = (db_expr_t) *((short*)varp->valuep);
|
||||
@ -109,22 +106,19 @@ struct stackpos {
|
||||
int k_regloc[NREGISTERS];
|
||||
};
|
||||
|
||||
static void findentry __P((struct stackpos *, void (*)(const char *, ...)));
|
||||
static void findregs __P((struct stackpos *, db_addr_t));
|
||||
static int nextframe __P((struct stackpos *, struct pcb *, int,
|
||||
void (*)(const char *, ...)));
|
||||
static void stacktop __P((db_regs_t *, struct stackpos *,
|
||||
void (*)(const char *, ...)));
|
||||
static void findentry(struct stackpos *, void (*)(const char *, ...));
|
||||
static void findregs(struct stackpos *, db_addr_t);
|
||||
static int nextframe(struct stackpos *, struct pcb *, int,
|
||||
void (*)(const char *, ...));
|
||||
static void stacktop(db_regs_t *, struct stackpos *,
|
||||
void (*)(const char *, ...));
|
||||
|
||||
|
||||
#define FR_SAVFP 0
|
||||
#define FR_SAVPC 4
|
||||
|
||||
static void
|
||||
stacktop(regs, sp, pr)
|
||||
db_regs_t *regs;
|
||||
struct stackpos *sp;
|
||||
void (*pr) __P((const char *, ...));
|
||||
stacktop(db_regs_t *regs, struct stackpos *sp, void (*pr)(const char *, ...))
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -175,15 +169,14 @@ stacktop(regs, sp, pr)
|
||||
#define ADDQSP 0x508f0000 /* addql #x,sp */
|
||||
#define ADDQWSP 0x504f0000 /* addqw #x,sp */
|
||||
|
||||
struct nlist * trampsym = 0;
|
||||
struct nlist * funcsym = 0;
|
||||
#if 0
|
||||
static struct nlist * trampsym = 0;
|
||||
static struct nlist * funcsym = 0;
|
||||
#endif
|
||||
|
||||
static int
|
||||
nextframe(sp, pcb, kerneltrace, pr)
|
||||
struct stackpos *sp;
|
||||
struct pcb *pcb;
|
||||
int kerneltrace;
|
||||
void (*pr) __P((const char *, ...));
|
||||
nextframe(struct stackpos *sp, struct pcb *pcb, int kerneltrace,
|
||||
void (*pr)(const char *, ...))
|
||||
{
|
||||
int i;
|
||||
db_addr_t addr;
|
||||
@ -235,9 +228,7 @@ nextframe(sp, pcb, kerneltrace, pr)
|
||||
}
|
||||
|
||||
static void
|
||||
findentry(sp, pr)
|
||||
struct stackpos *sp;
|
||||
void (*pr) __P((const char *, ...));
|
||||
findentry(struct stackpos *sp, void (*pr)(const char *, ...))
|
||||
{
|
||||
/*
|
||||
* Set the k_nargs and k_entry fields in the stackpos structure. This
|
||||
@ -342,9 +333,7 @@ findentry(sp, pr)
|
||||
* Figure out which registers we saved, and where they are
|
||||
*/
|
||||
static void
|
||||
findregs(sp, addr)
|
||||
struct stackpos *sp;
|
||||
db_addr_t addr;
|
||||
findregs(struct stackpos *sp, db_addr_t addr)
|
||||
{
|
||||
long instruc, val, i;
|
||||
int regp;
|
||||
@ -406,12 +395,8 @@ findregs(sp, addr)
|
||||
* Frame tracing.
|
||||
*/
|
||||
void
|
||||
db_stack_trace_print(addr, have_addr, count, modif, pr)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
char *modif;
|
||||
void (*pr) __P((const char *, ...));
|
||||
db_stack_trace_print(db_expr_t addr, int have_addr, db_expr_t count,
|
||||
char *modif, void (*pr)(const char *, ...))
|
||||
{
|
||||
int i, nargs;
|
||||
long val;
|
||||
@ -570,4 +555,3 @@ db_stack_trace_print(addr, have_addr, count, modif, pr)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: in_cksum.c,v 1.8 2003/08/07 16:28:16 agc Exp $ */
|
||||
/* $NetBSD: in_cksum.c,v 1.9 2004/08/28 22:06:28 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1990 Regents of the University of California.
|
||||
@ -38,14 +38,14 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: in_cksum.c,v 1.8 2003/08/07 16:28:16 agc Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: in_cksum.c,v 1.9 2004/08/28 22:06:28 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_systm.h>
|
||||
|
||||
extern int oc_cksum __P((char *buffer, int length, int startingval));
|
||||
extern int oc_cksum(char *buffer, int length, int startingval);
|
||||
|
||||
/*
|
||||
* Checksum routine for the Internet Protocol family.
|
||||
@ -59,9 +59,7 @@ extern int oc_cksum __P((char *buffer, int length, int startingval));
|
||||
* their job, we should never do the hairy code inside the "if".
|
||||
*/
|
||||
int
|
||||
in_cksum(m, len)
|
||||
register struct mbuf *m;
|
||||
register int len;
|
||||
in_cksum(struct mbuf *m, int len)
|
||||
{
|
||||
register int sum = 0;
|
||||
register int i;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: m68k_syscall.c,v 1.13 2003/10/31 03:28:13 simonb Exp $ */
|
||||
/* $NetBSD: m68k_syscall.c,v 1.14 2004/08/28 22:06:28 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Portions Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
@ -110,7 +110,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: m68k_syscall.c,v 1.13 2003/10/31 03:28:13 simonb Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: m68k_syscall.c,v 1.14 2004/08/28 22:06:28 thorpej Exp $");
|
||||
|
||||
#include "opt_syscall_debug.h"
|
||||
#include "opt_execfmt.h"
|
||||
@ -163,9 +163,7 @@ static void syscall_fancy(register_t, struct lwp *, struct frame *);
|
||||
* Process a system call.
|
||||
*/
|
||||
void
|
||||
syscall(code, frame)
|
||||
register_t code;
|
||||
struct frame frame;
|
||||
syscall(register_t code, struct frame frame)
|
||||
{
|
||||
struct lwp *l;
|
||||
struct proc *p;
|
||||
@ -472,8 +470,7 @@ syscall_fancy(register_t code, struct lwp *l, struct frame *frame)
|
||||
#endif /* KTRACE || SYSTRACE */
|
||||
|
||||
void
|
||||
child_return(arg)
|
||||
void *arg;
|
||||
child_return(void *arg)
|
||||
{
|
||||
struct lwp *l = arg;
|
||||
/* See cpu_fork() */
|
||||
@ -494,8 +491,7 @@ child_return(arg)
|
||||
* Start a new LWP
|
||||
*/
|
||||
void
|
||||
startlwp(arg)
|
||||
void *arg;
|
||||
startlwp(void *arg)
|
||||
{
|
||||
int err;
|
||||
ucontext_t *uc = arg;
|
||||
@ -521,8 +517,7 @@ startlwp(arg)
|
||||
* XXX This is a terrible name.
|
||||
*/
|
||||
void
|
||||
upcallret(l)
|
||||
struct lwp *l;
|
||||
upcallret(struct lwp *l)
|
||||
{
|
||||
struct frame *f = (struct frame *)l->l_md.md_regs;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: process_machdep.c,v 1.21 2003/07/15 02:43:14 lukem Exp $ */
|
||||
/* $NetBSD: process_machdep.c,v 1.22 2004/08/28 22:06:28 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 Christopher G. Demetriou
|
||||
@ -53,7 +53,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.21 2003/07/15 02:43:14 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.22 2004/08/28 22:06:28 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -65,12 +65,8 @@ __KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.21 2003/07/15 02:43:14 lukem E
|
||||
#include <machine/psl.h>
|
||||
#include <machine/reg.h>
|
||||
|
||||
static inline struct frame *process_frame __P((struct lwp *l));
|
||||
static inline struct fpframe *process_fpframe __P((struct lwp *l));
|
||||
|
||||
static inline struct frame *
|
||||
process_frame(l)
|
||||
struct lwp *l;
|
||||
static __inline struct frame *
|
||||
process_frame(struct lwp *l)
|
||||
{
|
||||
void *ptr;
|
||||
|
||||
@ -78,18 +74,15 @@ process_frame(l)
|
||||
return (ptr);
|
||||
}
|
||||
|
||||
static inline struct fpframe *
|
||||
process_fpframe(l)
|
||||
struct lwp *l;
|
||||
static __inline struct fpframe *
|
||||
process_fpframe(struct lwp *l)
|
||||
{
|
||||
|
||||
return (&l->l_addr->u_pcb.pcb_fpregs);
|
||||
}
|
||||
|
||||
int
|
||||
process_read_regs(l, regs)
|
||||
struct lwp *l;
|
||||
struct reg *regs;
|
||||
process_read_regs(struct lwp *l, struct reg *regs)
|
||||
{
|
||||
struct frame *frame = process_frame(l);
|
||||
|
||||
@ -101,9 +94,7 @@ process_read_regs(l, regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_read_fpregs(l, regs)
|
||||
struct lwp *l;
|
||||
struct fpreg *regs;
|
||||
process_read_fpregs(struct lwp *l, struct fpreg *regs)
|
||||
{
|
||||
struct fpframe *frame = process_fpframe(l);
|
||||
|
||||
@ -116,9 +107,7 @@ process_read_fpregs(l, regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_regs(l, regs)
|
||||
struct lwp *l;
|
||||
struct reg *regs;
|
||||
process_write_regs(struct lwp *l, struct reg *regs)
|
||||
{
|
||||
struct frame *frame = process_frame(l);
|
||||
|
||||
@ -149,9 +138,7 @@ process_write_regs(l, regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_fpregs(l, regs)
|
||||
struct lwp *l;
|
||||
struct fpreg *regs;
|
||||
process_write_fpregs(struct lwp *l, struct fpreg *regs)
|
||||
{
|
||||
struct fpframe *frame = process_fpframe(l);
|
||||
|
||||
@ -164,9 +151,7 @@ process_write_fpregs(l, regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_sstep(l, sstep)
|
||||
struct lwp *l;
|
||||
int sstep;
|
||||
process_sstep(struct lwp *l, int sstep)
|
||||
{
|
||||
struct frame *frame = process_frame(l);
|
||||
|
||||
@ -179,9 +164,7 @@ process_sstep(l, sstep)
|
||||
}
|
||||
|
||||
int
|
||||
process_set_pc(l, addr)
|
||||
struct lwp *l;
|
||||
caddr_t addr;
|
||||
process_set_pc(struct lwp *l, caddr_t addr)
|
||||
{
|
||||
struct frame *frame = process_frame(l);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: regdump.c,v 1.7 2003/09/27 19:34:17 mhitch Exp $ */
|
||||
/* $NetBSD: regdump.c,v 1.8 2004/08/28 22:06:28 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
@ -75,7 +75,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: regdump.c,v 1.7 2003/09/27 19:34:17 mhitch Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: regdump.c,v 1.8 2004/08/28 22:06:28 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -89,16 +89,14 @@ __KERNEL_RCSID(0, "$NetBSD: regdump.c,v 1.7 2003/09/27 19:34:17 mhitch Exp $");
|
||||
|
||||
#include <machine/psl.h>
|
||||
|
||||
static void dumpmem __P((int *, int, int));
|
||||
static char *hexstr __P((int, int));
|
||||
static void dumpmem(int *, int, int);
|
||||
static char *hexstr(int, int);
|
||||
|
||||
/*
|
||||
* Print a register and stack dump.
|
||||
*/
|
||||
void
|
||||
regdump(tf, sbytes)
|
||||
struct trapframe *tf; /* must not be register */
|
||||
int sbytes;
|
||||
regdump(struct trapframe *tf, int sbytes)
|
||||
{
|
||||
static int doingdump = 0;
|
||||
register int i;
|
||||
@ -138,9 +136,7 @@ regdump(tf, sbytes)
|
||||
}
|
||||
|
||||
static void
|
||||
dumpmem(ptr, sz, ustack)
|
||||
register int *ptr;
|
||||
int sz, ustack;
|
||||
dumpmem(int *ptr, int sz, int ustack)
|
||||
{
|
||||
register int i, val;
|
||||
register int limit;
|
||||
@ -167,9 +163,7 @@ dumpmem(ptr, sz, ustack)
|
||||
}
|
||||
|
||||
static char *
|
||||
hexstr(val, len)
|
||||
register int val;
|
||||
int len;
|
||||
hexstr(int val, int len)
|
||||
{
|
||||
static char nbuf[9];
|
||||
register int x, i;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sig_machdep.c,v 1.27 2004/02/13 11:36:14 wiz Exp $ */
|
||||
/* $NetBSD: sig_machdep.c,v 1.28 2004/08/28 22:06:28 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
@ -75,7 +75,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.27 2004/02/13 11:36:14 wiz Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.28 2004/08/28 22:06:28 thorpej Exp $");
|
||||
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
||||
@ -106,8 +106,8 @@ __KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.27 2004/02/13 11:36:14 wiz Exp $")
|
||||
extern int fputype;
|
||||
extern short exframesize[];
|
||||
struct fpframe m68k_cached_fpu_idle_frame;
|
||||
void m68881_save __P((struct fpframe *));
|
||||
void m68881_restore __P((struct fpframe *));
|
||||
void m68881_save(struct fpframe *);
|
||||
void m68881_restore(struct fpframe *);
|
||||
|
||||
#ifdef DEBUG
|
||||
int sigdebug = 0;
|
||||
@ -238,11 +238,8 @@ sendsig(const ksiginfo_t *ksi, const sigset_t *mask)
|
||||
}
|
||||
|
||||
void
|
||||
cpu_upcall(l, type, nevents, ninterrupted, sas, ap, sp, upcall)
|
||||
struct lwp *l;
|
||||
int type, nevents, ninterrupted;
|
||||
void *sas, *ap, *sp;
|
||||
sa_upcall_t upcall;
|
||||
cpu_upcall(struct lwp *l, int type, int nevents, int ninterrupted, void *sas,
|
||||
void *ap, void *sp, sa_upcall_t upcall)
|
||||
{
|
||||
struct saframe *sfp, sf;
|
||||
struct frame *frame;
|
||||
@ -271,10 +268,7 @@ cpu_upcall(l, type, nevents, ninterrupted, sas, ap, sp, upcall)
|
||||
}
|
||||
|
||||
void
|
||||
cpu_getmcontext(l, mcp, flags)
|
||||
struct lwp *l;
|
||||
mcontext_t *mcp;
|
||||
unsigned int *flags;
|
||||
cpu_getmcontext(struct lwp *l, mcontext_t *mcp, u_int *flags)
|
||||
{
|
||||
__greg_t *gr = mcp->__gregs;
|
||||
struct frame *frame = (struct frame *)l->l_md.md_regs;
|
||||
@ -347,10 +341,7 @@ cpu_getmcontext(l, mcp, flags)
|
||||
}
|
||||
|
||||
int
|
||||
cpu_setmcontext(l, mcp, flags)
|
||||
struct lwp *l;
|
||||
const mcontext_t *mcp;
|
||||
unsigned int flags;
|
||||
cpu_setmcontext(struct lwp *l, const mcontext_t *mcp, u_int flags)
|
||||
{
|
||||
__greg_t *gr = mcp->__gregs;
|
||||
struct frame *frame = (struct frame *)l->l_md.md_regs;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sunos_machdep.c,v 1.27 2003/10/08 00:28:41 thorpej Exp $ */
|
||||
/* $NetBSD: sunos_machdep.c,v 1.28 2004/08/28 22:06:28 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
|
||||
@ -77,7 +77,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sunos_machdep.c,v 1.27 2003/10/08 00:28:41 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sunos_machdep.c,v 1.28 2004/08/28 22:06:28 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -227,10 +227,7 @@ sunos_sendsig(const ksiginfo_t *ksi, const sigset_t *mask)
|
||||
* a machine fault.
|
||||
*/
|
||||
int
|
||||
sunos_sys_sigreturn(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
sunos_sys_sigreturn(struct lwp *l, void *v, register_t *retval)
|
||||
{
|
||||
struct proc *p = l->l_proc;
|
||||
struct sunos_sys_sigreturn_args *uap = v;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: svr4_machdep.c,v 1.16 2003/12/04 19:38:21 atatat Exp $ */
|
||||
/* $NetBSD: svr4_machdep.c,v 1.17 2004/08/28 22:06:28 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_machdep.c,v 1.16 2003/12/04 19:38:21 atatat Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_machdep.c,v 1.17 2004/08/28 22:06:28 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -68,16 +68,13 @@ __KERNEL_RCSID(0, "$NetBSD: svr4_machdep.c,v 1.16 2003/12/04 19:38:21 atatat Exp
|
||||
#include <machine/vmparam.h>
|
||||
|
||||
extern short exframesize[];
|
||||
extern void m68881_restore __P((struct fpframe *));
|
||||
extern void m68881_save __P((struct fpframe *));
|
||||
static void svr4_getsiginfo __P((union svr4_siginfo *, int, unsigned long,
|
||||
caddr_t));
|
||||
extern void m68881_restore(struct fpframe *);
|
||||
extern void m68881_save(struct fpframe *);
|
||||
static void svr4_getsiginfo(union svr4_siginfo *, int, unsigned long,
|
||||
caddr_t);
|
||||
|
||||
void
|
||||
svr4_setregs(l, epp, stack)
|
||||
struct lwp *l;
|
||||
struct exec_package *epp;
|
||||
unsigned long stack;
|
||||
svr4_setregs(struct lwp *l, struct exec_package *epp, u_long stack)
|
||||
{
|
||||
struct frame *frame = (struct frame *)l->l_md.md_regs;
|
||||
|
||||
@ -86,10 +83,7 @@ svr4_setregs(l, epp, stack)
|
||||
}
|
||||
|
||||
void *
|
||||
svr4_getmcontext(l, mc, flags)
|
||||
struct lwp *l;
|
||||
svr4_mcontext_t *mc;
|
||||
unsigned long *flags;
|
||||
svr4_getmcontext(struct lwp *l, svr4_mcontext_t *mc, u_long *flags)
|
||||
{
|
||||
struct frame *frame = (struct frame *)l->l_md.md_regs;
|
||||
unsigned int format = frame->f_format;
|
||||
@ -147,10 +141,7 @@ svr4_getmcontext(l, mc, flags)
|
||||
}
|
||||
|
||||
int
|
||||
svr4_setmcontext(l, mc, flags)
|
||||
struct lwp *l;
|
||||
svr4_mcontext_t *mc;
|
||||
unsigned long flags;
|
||||
svr4_setmcontext(struct lwp *l, svr4_mcontext_t *mc, u_long flags)
|
||||
{
|
||||
struct frame *frame = (struct frame *)l->l_md.md_regs;
|
||||
unsigned int format = mc->mc_pad.frame.format;
|
||||
@ -223,11 +214,7 @@ svr4_setmcontext(l, mc, flags)
|
||||
}
|
||||
|
||||
static void
|
||||
svr4_getsiginfo(sip, sig, code, addr)
|
||||
union svr4_siginfo * sip;
|
||||
int sig;
|
||||
unsigned long code;
|
||||
caddr_t addr;
|
||||
svr4_getsiginfo(union svr4_siginfo *sip, int sig, u_long code, caddr_t addr)
|
||||
{
|
||||
|
||||
/*
|
||||
@ -295,10 +282,7 @@ svr4_sendsig(const ksiginfo_t *ksi, const sigset_t *mask)
|
||||
* sysm68k()
|
||||
*/
|
||||
int
|
||||
svr4_sys_sysarch(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
svr4_sys_sysarch(struct lwp *l, void *v, register_t *retval)
|
||||
{
|
||||
struct svr4_sys_sysarch_args /* {
|
||||
syscallarg(int) op;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sys_machdep.c,v 1.4 2003/08/07 16:28:19 agc Exp $ */
|
||||
/* $NetBSD: sys_machdep.c,v 1.5 2004/08/28 22:06:28 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
@ -67,11 +67,7 @@ __KERNEL_RCSID(0, "$NetBSD");
|
||||
*/
|
||||
/*ARGSUSED1*/
|
||||
int
|
||||
cachectl1(req, addr, len, p)
|
||||
unsigned long req;
|
||||
vaddr_t addr;
|
||||
size_t len;
|
||||
struct proc *p;
|
||||
cachectl1(u_long req, vaddr_t addr, size_t len, struct proc *p)
|
||||
{
|
||||
int error = 0;
|
||||
|
||||
@ -198,10 +194,7 @@ cachectl1(req, addr, len, p)
|
||||
}
|
||||
|
||||
int
|
||||
sys_sysarch(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
sys_sysarch(struct lwp *l, void *v, register_t *retval)
|
||||
{
|
||||
|
||||
return (ENOSYS);
|
||||
@ -215,9 +208,7 @@ sys_sysarch(l, v, retval)
|
||||
|
||||
/*ARGSUSED1*/
|
||||
int
|
||||
dma_cachectl(addr, len)
|
||||
caddr_t addr;
|
||||
int len;
|
||||
dma_cachectl(caddr_t addr, int len)
|
||||
{
|
||||
#if defined(M68040) || defined(M68060)
|
||||
int inc = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.7 2004/01/04 11:33:30 jdolecek Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.8 2004/08/28 22:06:28 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
@ -77,7 +77,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.7 2004/01/04 11:33:30 jdolecek Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.8 2004/08/28 22:06:28 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -97,8 +97,7 @@ __KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.7 2004/01/04 11:33:30 jdolecek Exp
|
||||
#include <uvm/uvm_extern.h>
|
||||
|
||||
void
|
||||
cpu_proc_fork(p1, p2)
|
||||
struct proc *p1, *p2;
|
||||
cpu_proc_fork(struct proc *p1, struct proc *p2)
|
||||
{
|
||||
|
||||
p2->p_md.mdp_flags = p1->p_md.mdp_flags;
|
||||
@ -123,12 +122,8 @@ cpu_proc_fork(p1, p2)
|
||||
* accordingly.
|
||||
*/
|
||||
void
|
||||
cpu_lwp_fork(l1, l2, stack, stacksize, func, arg)
|
||||
struct lwp *l1, *l2;
|
||||
void *stack;
|
||||
size_t stacksize;
|
||||
void (*func) __P((void *));
|
||||
void *arg;
|
||||
cpu_lwp_fork(struct lwp *l1, struct lwp *l2, void *stack, size_t stacksize,
|
||||
void (*func)(void *), void *arg)
|
||||
{
|
||||
struct pcb *pcb = &l2->l_addr->u_pcb;
|
||||
struct trapframe *tf;
|
||||
@ -169,10 +164,7 @@ cpu_lwp_fork(l1, l2, stack, stacksize, func, arg)
|
||||
}
|
||||
|
||||
void
|
||||
cpu_setfunc(l, func, arg)
|
||||
struct lwp *l;
|
||||
void (*func) __P((void *));
|
||||
void *arg;
|
||||
cpu_setfunc(struct lwp *l, void (*func)(void *), void *arg)
|
||||
{
|
||||
struct pcb *pcb = &l->l_addr->u_pcb;
|
||||
struct trapframe *tf = (struct trapframe *)l->l_md.md_regs;
|
||||
@ -199,8 +191,7 @@ cpu_lwp_free(struct lwp *l, int proc)
|
||||
* switch to another process thus we never return.
|
||||
*/
|
||||
void
|
||||
cpu_exit(l)
|
||||
struct lwp *l;
|
||||
cpu_exit(struct lwp *l)
|
||||
{
|
||||
|
||||
(void) splhigh();
|
||||
@ -215,12 +206,10 @@ struct md_core {
|
||||
struct reg intreg;
|
||||
struct fpreg freg;
|
||||
};
|
||||
|
||||
int
|
||||
cpu_coredump(l, vp, cred, chdr)
|
||||
struct lwp *l;
|
||||
struct vnode *vp;
|
||||
struct ucred *cred;
|
||||
struct core *chdr;
|
||||
cpu_coredump(struct lwp *l, struct vnode *vp, struct ucred *cred,
|
||||
struct core *chdr)
|
||||
{
|
||||
struct proc *p = l->l_proc;
|
||||
struct md_core md_core;
|
||||
@ -273,9 +262,7 @@ cpu_coredump(l, vp, cred, chdr)
|
||||
* and size must be a multiple of PAGE_SIZE.
|
||||
*/
|
||||
void
|
||||
pagemove(from, to, size)
|
||||
caddr_t from, to;
|
||||
size_t size;
|
||||
pagemove(caddr_t from, caddr_t to, size_t size)
|
||||
{
|
||||
paddr_t pa;
|
||||
boolean_t rv;
|
||||
@ -307,9 +294,7 @@ pagemove(from, to, size)
|
||||
* do not need to pass an access_type to pmap_enter().
|
||||
*/
|
||||
void
|
||||
vmapbuf(bp, len)
|
||||
struct buf *bp;
|
||||
vsize_t len;
|
||||
vmapbuf(struct buf *bp, vsize_t len)
|
||||
{
|
||||
struct pmap *upmap, *kpmap;
|
||||
vaddr_t uva; /* User VA (map from) */
|
||||
@ -348,9 +333,7 @@ vmapbuf(bp, len)
|
||||
* Unmap a previously-mapped user I/O request.
|
||||
*/
|
||||
void
|
||||
vunmapbuf(bp, len)
|
||||
struct buf *bp;
|
||||
vsize_t len;
|
||||
vunmapbuf(struct buf *bp, vsize_t len)
|
||||
{
|
||||
vaddr_t kva;
|
||||
vsize_t off;
|
||||
@ -384,9 +367,7 @@ vunmapbuf(bp, len)
|
||||
* are specified by `prot'.
|
||||
*/
|
||||
void
|
||||
physaccess(vaddr, paddr, size, prot)
|
||||
caddr_t vaddr, paddr;
|
||||
int size, prot;
|
||||
physaccess(caddr_t vaddr, caddr_t paddr, int size, int prot)
|
||||
{
|
||||
pt_entry_t *pte;
|
||||
u_int page;
|
||||
@ -401,9 +382,7 @@ physaccess(vaddr, paddr, size, prot)
|
||||
}
|
||||
|
||||
void
|
||||
physunaccess(vaddr, size)
|
||||
caddr_t vaddr;
|
||||
int size;
|
||||
physunaccess(caddr_t vaddr, int size)
|
||||
{
|
||||
pt_entry_t *pte;
|
||||
|
||||
@ -417,8 +396,7 @@ physunaccess(vaddr, size)
|
||||
* Convert kernel VA to physical address
|
||||
*/
|
||||
int
|
||||
kvtop(addr)
|
||||
caddr_t addr;
|
||||
kvtop(caddr_t addr)
|
||||
{
|
||||
paddr_t pa;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user