Reorder to be somewhat more "top-down" (cosmetic).
Fix copyright.
This commit is contained in:
parent
e22c9eba99
commit
65e048e41c
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: db_machdep.c,v 1.9 1996/12/17 21:11:19 gwr Exp $ */
|
||||
/* $NetBSD: db_machdep.c,v 1.10 1997/01/27 17:04:12 gwr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -26,8 +26,8 @@
|
|||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
|
@ -47,19 +47,76 @@
|
|||
|
||||
#include <machine/control.h>
|
||||
#include <machine/db_machdep.h>
|
||||
#include <machine/pte.h>
|
||||
|
||||
#include <ddb/db_command.h>
|
||||
#include <ddb/db_output.h>
|
||||
|
||||
#include <machine/pte.h>
|
||||
#include "machdep.h"
|
||||
#include <sun3/sun3/sunmon.h>
|
||||
|
||||
static void db_mach_pagemap __P((db_expr_t, int, db_expr_t, char *));
|
||||
static void db_mach_abort __P((db_expr_t, int, db_expr_t, char *));
|
||||
static void db_mach_halt __P((db_expr_t, int, db_expr_t, char *));
|
||||
static void db_mach_reboot __P((db_expr_t, int, db_expr_t, char *));
|
||||
static void db_mach_pagemap __P((db_expr_t, int, db_expr_t, char *));
|
||||
|
||||
struct db_command db_machine_cmds[] = {
|
||||
{ "abort", db_mach_abort, 0, 0 },
|
||||
{ "halt", db_mach_halt, 0, 0 },
|
||||
{ "reboot", db_mach_reboot, 0, 0 },
|
||||
{ "pgmap", db_mach_pagemap, CS_SET_DOT, 0 },
|
||||
{ (char *)0, }
|
||||
};
|
||||
|
||||
/*
|
||||
* This is called before ddb_init() to install the
|
||||
* machine-specific command table. (see machdep.c)
|
||||
*/
|
||||
void
|
||||
db_machine_init()
|
||||
{
|
||||
db_machine_commands_install(db_machine_cmds);
|
||||
}
|
||||
|
||||
/*
|
||||
* Machine-specific ddb commands for the sun3:
|
||||
* abort: Drop into monitor via abort (allows continue)
|
||||
* halt: Exit to monitor as in halt(8)
|
||||
* reboot: Reboot the machine as in reboot(8)
|
||||
* pgmap: Given addr, Print addr, segmap, pagemap, pte
|
||||
*/
|
||||
|
||||
static void
|
||||
db_mach_abort(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
char * modif;
|
||||
{
|
||||
sunmon_abort();
|
||||
}
|
||||
|
||||
static void
|
||||
db_mach_halt(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
char * modif;
|
||||
{
|
||||
sunmon_halt();
|
||||
}
|
||||
|
||||
static void
|
||||
db_mach_reboot(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
char * modif;
|
||||
{
|
||||
sunmon_reboot("");
|
||||
}
|
||||
|
||||
|
||||
static void pte_print __P((int));
|
||||
|
||||
static char *pgt_names[] = {
|
||||
"MEM", "OBIO", "VMES", "VMEL" };
|
||||
|
||||
|
@ -106,59 +163,3 @@ db_mach_pagemap(addr, have_addr, count, modif)
|
|||
pte_print(pte);
|
||||
db_next = addr + NBPG;
|
||||
}
|
||||
|
||||
/*
|
||||
* Machine-specific ddb commands for the sun3:
|
||||
* abort: Drop into monitor via abort (allows continue)
|
||||
* halt: Exit to monitor as in halt(8)
|
||||
* reboot: Reboot the machine as in reboot(8)
|
||||
* pgmap: Given addr, Print addr, segmap, pagemap, pte
|
||||
*/
|
||||
|
||||
static void
|
||||
db_mach_abort(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
char * modif;
|
||||
{
|
||||
sun3_mon_abort();
|
||||
}
|
||||
|
||||
static void
|
||||
db_mach_halt(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
char * modif;
|
||||
{
|
||||
sun3_mon_halt();
|
||||
}
|
||||
|
||||
static void
|
||||
db_mach_reboot(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
char * modif;
|
||||
{
|
||||
sun3_mon_reboot("");
|
||||
}
|
||||
|
||||
struct db_command db_machine_cmds[] = {
|
||||
{ "abort", db_mach_abort, 0, 0 },
|
||||
{ "halt", db_mach_halt, 0, 0 },
|
||||
{ "reboot", db_mach_reboot, 0, 0 },
|
||||
{ "pgmap", db_mach_pagemap, CS_SET_DOT, 0 },
|
||||
{ (char *)0, }
|
||||
};
|
||||
|
||||
/*
|
||||
* This is called before ddb_init() to install the
|
||||
* machine-specific command table. (see machdep.c)
|
||||
*/
|
||||
void
|
||||
db_machine_init()
|
||||
{
|
||||
db_machine_commands_install(db_machine_cmds);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue