2005-01-07 02:29:27 +00:00
|
|
|
/*-
|
2001-09-03 22:27:23 +00:00
|
|
|
* Mach Operating System
|
|
|
|
* Copyright (c) 1991,1990 Carnegie Mellon University
|
|
|
|
* All Rights Reserved.
|
Add skeleton machine dependent headers and c files for a port of freebsd
to a new architecture. This is the base of the sparc64 port, but contains
limited machine dependent code, and can be used a base for ports. Included
are:
- standard machine dependent headers, tweaked for a 64 bit, big endian
architecture, including empty versions of all the machine dependent
structures
- a machine independent atomic.h, which can be used until a port has
support for interrupts and the operations really need to be atomic
- stub versions of all the machine dependent functions, which panic
when called and print out the name of the function that needs to
be implemented. functions which are normally in assembly files are
not included, but this should reduce the number of different undefined
references on the first few compiles from hundreds to 5 or 6
Given minimal startup code and console support it should be trivial to
make this compile and run the first few sysinits on almost any architecture.
Requested by: alfred, imp, jhb
2001-07-31 05:45:16 +00:00
|
|
|
*
|
2001-09-03 22:27:23 +00:00
|
|
|
* Permission to use, copy, modify and distribute this software and its
|
|
|
|
* documentation is hereby granted, provided that both the copyright
|
|
|
|
* notice and this permission notice appear in all copies of the
|
|
|
|
* software, derivative works or modified versions, and any portions
|
|
|
|
* thereof, and that both notices appear in supporting documentation.
|
Add skeleton machine dependent headers and c files for a port of freebsd
to a new architecture. This is the base of the sparc64 port, but contains
limited machine dependent code, and can be used a base for ports. Included
are:
- standard machine dependent headers, tweaked for a 64 bit, big endian
architecture, including empty versions of all the machine dependent
structures
- a machine independent atomic.h, which can be used until a port has
support for interrupts and the operations really need to be atomic
- stub versions of all the machine dependent functions, which panic
when called and print out the name of the function that needs to
be implemented. functions which are normally in assembly files are
not included, but this should reduce the number of different undefined
references on the first few compiles from hundreds to 5 or 6
Given minimal startup code and console support it should be trivial to
make this compile and run the first few sysinits on almost any architecture.
Requested by: alfred, imp, jhb
2001-07-31 05:45:16 +00:00
|
|
|
*
|
2001-09-03 22:27:23 +00:00
|
|
|
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
|
|
|
|
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
|
|
|
|
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
|
Add skeleton machine dependent headers and c files for a port of freebsd
to a new architecture. This is the base of the sparc64 port, but contains
limited machine dependent code, and can be used a base for ports. Included
are:
- standard machine dependent headers, tweaked for a 64 bit, big endian
architecture, including empty versions of all the machine dependent
structures
- a machine independent atomic.h, which can be used until a port has
support for interrupts and the operations really need to be atomic
- stub versions of all the machine dependent functions, which panic
when called and print out the name of the function that needs to
be implemented. functions which are normally in assembly files are
not included, but this should reduce the number of different undefined
references on the first few compiles from hundreds to 5 or 6
Given minimal startup code and console support it should be trivial to
make this compile and run the first few sysinits on almost any architecture.
Requested by: alfred, imp, jhb
2001-07-31 05:45:16 +00:00
|
|
|
*
|
2001-09-03 22:27:23 +00:00
|
|
|
* Carnegie Mellon requests users of this software to return to
|
|
|
|
*
|
|
|
|
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
|
|
|
|
* School of Computer Science
|
|
|
|
* Carnegie Mellon University
|
|
|
|
* Pittsburgh PA 15213-3890
|
|
|
|
*
|
|
|
|
* any improvements or extensions that they make and grant Carnegie Mellon
|
|
|
|
* the rights to redistribute these changes.
|
|
|
|
*
|
|
|
|
* from: FreeBSD: src/sys/i386/include/db_machdep.h,v 1.16 1999/10/04
|
Add skeleton machine dependent headers and c files for a port of freebsd
to a new architecture. This is the base of the sparc64 port, but contains
limited machine dependent code, and can be used a base for ports. Included
are:
- standard machine dependent headers, tweaked for a 64 bit, big endian
architecture, including empty versions of all the machine dependent
structures
- a machine independent atomic.h, which can be used until a port has
support for interrupts and the operations really need to be atomic
- stub versions of all the machine dependent functions, which panic
when called and print out the name of the function that needs to
be implemented. functions which are normally in assembly files are
not included, but this should reduce the number of different undefined
references on the first few compiles from hundreds to 5 or 6
Given minimal startup code and console support it should be trivial to
make this compile and run the first few sysinits on almost any architecture.
Requested by: alfred, imp, jhb
2001-07-31 05:45:16 +00:00
|
|
|
* $FreeBSD$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _MACHINE_DB_MACHDEP_H_
|
|
|
|
#define _MACHINE_DB_MACHDEP_H_
|
|
|
|
|
2001-07-31 06:05:05 +00:00
|
|
|
#include <machine/frame.h>
|
|
|
|
#include <machine/trap.h>
|
|
|
|
|
|
|
|
#define BYTE_MSF (1)
|
|
|
|
|
|
|
|
typedef vm_offset_t db_addr_t;
|
2001-08-20 23:35:15 +00:00
|
|
|
typedef long db_expr_t;
|
2001-07-31 06:05:05 +00:00
|
|
|
|
2004-07-10 23:47:20 +00:00
|
|
|
#define PC_REGS() ((db_addr_t)kdb_thrctx->pcb_pc)
|
2001-07-31 06:05:05 +00:00
|
|
|
|
2003-06-07 18:24:37 +00:00
|
|
|
#define BKPT_INST (0x91d03001)
|
2001-07-31 06:05:05 +00:00
|
|
|
#define BKPT_SIZE (4)
|
|
|
|
#define BKPT_SET(inst) (BKPT_INST)
|
|
|
|
|
2001-11-18 03:41:12 +00:00
|
|
|
#define BKPT_SKIP do { \
|
2004-07-10 23:47:20 +00:00
|
|
|
kdb_frame->tf_tpc = kdb_frame->tf_tnpc + 4; \
|
|
|
|
kdb_frame->tf_tnpc += 8; \
|
2001-11-18 03:41:12 +00:00
|
|
|
} while (0)
|
2001-07-31 06:05:05 +00:00
|
|
|
|
2004-07-10 23:47:20 +00:00
|
|
|
#define db_clear_single_step kdb_cpu_clear_singlestep
|
|
|
|
#define db_set_single_step kdb_cpu_set_singlestep
|
2001-07-31 06:05:05 +00:00
|
|
|
|
|
|
|
#define IS_BREAKPOINT_TRAP(type, code) (type == T_BREAKPOINT)
|
|
|
|
#define IS_WATCHPOINT_TRAP(type, code) (0)
|
|
|
|
|
|
|
|
#define inst_trap_return(ins) (0)
|
|
|
|
#define inst_return(ins) (0)
|
|
|
|
#define inst_call(ins) (0)
|
|
|
|
#define inst_load(ins) (0)
|
|
|
|
#define inst_store(ins) (0)
|
|
|
|
|
|
|
|
#define DB_SMALL_VALUE_MAX (0x7fffffff)
|
|
|
|
#define DB_SMALL_VALUE_MIN (-0x40001)
|
|
|
|
|
|
|
|
#define DB_ELFSIZE 64
|
|
|
|
|
Add skeleton machine dependent headers and c files for a port of freebsd
to a new architecture. This is the base of the sparc64 port, but contains
limited machine dependent code, and can be used a base for ports. Included
are:
- standard machine dependent headers, tweaked for a 64 bit, big endian
architecture, including empty versions of all the machine dependent
structures
- a machine independent atomic.h, which can be used until a port has
support for interrupts and the operations really need to be atomic
- stub versions of all the machine dependent functions, which panic
when called and print out the name of the function that needs to
be implemented. functions which are normally in assembly files are
not included, but this should reduce the number of different undefined
references on the first few compiles from hundreds to 5 or 6
Given minimal startup code and console support it should be trivial to
make this compile and run the first few sysinits on almost any architecture.
Requested by: alfred, imp, jhb
2001-07-31 05:45:16 +00:00
|
|
|
#endif /* !_MACHINE_DB_MACHDEP_H_ */
|