Provide explicit 64-bit and 32-bit types for compatibility with sparc
userland.
This commit is contained in:
parent
f429a45407
commit
7b60d6a0ed
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cpu.h,v 1.13 1999/10/11 01:57:44 eeh Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.14 1999/11/06 20:13:49 eeh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -85,7 +85,7 @@
|
||||
*/
|
||||
extern int eintstack[];
|
||||
struct clockframe {
|
||||
struct trapframe t;
|
||||
struct trapframe64 t;
|
||||
};
|
||||
|
||||
#define CLKF_USERMODE(framep) (((framep)->t.tf_tstate & TSTATE_PRIV) == 0)
|
||||
@ -171,9 +171,9 @@ int tickintr __P((void *)); /* level 10 (tick) interrupt code */
|
||||
int clockintr __P((void *));/* level 10 (clock) interrupt code */
|
||||
int statintr __P((void *)); /* level 14 (statclock) interrupt code */
|
||||
/* locore.s */
|
||||
struct fpstate;
|
||||
void savefpstate __P((struct fpstate *));
|
||||
void loadfpstate __P((struct fpstate *));
|
||||
struct fpstate64;
|
||||
void savefpstate __P((struct fpstate64 *));
|
||||
void loadfpstate __P((struct fpstate64 *));
|
||||
int probeget __P((paddr_t, int, int));
|
||||
int probeset __P((paddr_t, int, int, u_int64_t));
|
||||
#if 0
|
||||
@ -216,8 +216,8 @@ void kgdb_connect __P((int));
|
||||
void kgdb_panic __P((void));
|
||||
#endif
|
||||
/* emul.c */
|
||||
int fixalign __P((struct proc *, struct trapframe *));
|
||||
int emulinstr __P((vaddr_t, struct trapframe *));
|
||||
int fixalign __P((struct proc *, struct trapframe64 *));
|
||||
int emulinstr __P((vaddr_t, struct trapframe64 *));
|
||||
|
||||
/*
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: db_machdep.h,v 1.7 1999/01/31 09:21:19 mrg Exp $ */
|
||||
/* $NetBSD: db_machdep.h,v 1.8 1999/11/06 20:13:50 eeh Exp $ */
|
||||
|
||||
/*
|
||||
* Mach Operating System
|
||||
@ -47,7 +47,7 @@ typedef long db_expr_t; /* expression - signed */
|
||||
|
||||
#if 1
|
||||
typedef struct {
|
||||
struct trapframe ddb_tf;
|
||||
struct trapframe64 ddb_tf;
|
||||
struct frame64 ddb_fr;
|
||||
} db_regs_t;
|
||||
#else
|
||||
@ -112,7 +112,7 @@ db_regs_t ddb_regs; /* register state */
|
||||
#define DB_MACHINE_COMMANDS
|
||||
|
||||
void db_machine_init __P((void));
|
||||
int kdb_trap __P((int, struct trapframe *));
|
||||
int kdb_trap __P((int, struct trapframe64 *));
|
||||
|
||||
/*
|
||||
* We will use elf symbols in DDB when they work.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pcb.h,v 1.2 1999/10/11 01:57:45 eeh Exp $ */
|
||||
/* $NetBSD: pcb.h,v 1.3 1999/11/06 20:13:50 eeh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -150,9 +150,45 @@ struct pcb {
|
||||
* from the top of the kernel stack (included here so that the kernel
|
||||
* stack itself need not be dumped).
|
||||
*/
|
||||
struct md_coredump {
|
||||
struct md_coredump32 {
|
||||
struct trapframe32 md_tf;
|
||||
struct fpstate md_fpstate;
|
||||
struct fpstate32 md_fpstate;
|
||||
};
|
||||
|
||||
struct md_coredump {
|
||||
struct trapframe64 md_tf;
|
||||
struct fpstate64 md_fpstate;
|
||||
};
|
||||
|
||||
/*
|
||||
* A core file consists of a header followed by a number of segments.
|
||||
* Each segment is preceeded by a `coreseg' structure giving the
|
||||
* segment's type, the virtual address where the bits resided in
|
||||
* process address space and the size of the segment.
|
||||
*
|
||||
* The core header specifies the lengths of the core header itself and
|
||||
* each of the following core segment headers to allow for any machine
|
||||
* dependent alignment requirements.
|
||||
*/
|
||||
|
||||
struct core32 {
|
||||
u_int32_t c_midmag; /* magic, id, flags */
|
||||
u_int16_t c_hdrsize; /* Size of this header (machdep algn) */
|
||||
u_int16_t c_seghdrsize; /* Size of a segment header */
|
||||
u_int32_t c_nseg; /* # of core segments */
|
||||
char c_name[MAXCOMLEN+1]; /* Copy of p->p_comm */
|
||||
u_int32_t c_signo; /* Killing signal */
|
||||
u_int c_ucode; /* Hmm ? */
|
||||
u_int c_cpusize; /* Size of machine dependent segment */
|
||||
u_int c_tsize; /* Size of traditional text segment */
|
||||
u_int c_dsize; /* Size of traditional data segment */
|
||||
u_int c_ssize; /* Size of traditional stack segment */
|
||||
};
|
||||
|
||||
struct coreseg32 {
|
||||
u_int32_t c_midmag; /* magic, id, flags */
|
||||
u_int c_addr; /* Virtual address of segment */
|
||||
u_int c_size; /* Size of this segment */
|
||||
};
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: proc.h,v 1.1.1.1 1998/06/20 04:58:52 eeh Exp $ */
|
||||
/* $NetBSD: proc.h,v 1.2 1999/11/06 20:13:50 eeh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -48,8 +48,8 @@
|
||||
* Machine-dependent part of the proc structure for SPARC.
|
||||
*/
|
||||
struct mdproc {
|
||||
struct trapframe *md_tf; /* trap/syscall registers */
|
||||
struct fpstate *md_fpstate; /* fpu state, if any; always resident */
|
||||
struct trapframe64 *md_tf; /* trap/syscall registers */
|
||||
struct fpstate64 *md_fpstate; /* fpu state, if any; always resident */
|
||||
u_long md_flags;
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: reg.h,v 1.3 1999/10/11 01:57:45 eeh Exp $ */
|
||||
/* $NetBSD: reg.h,v 1.4 1999/11/06 20:13:50 eeh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -144,19 +144,30 @@ struct reg64 {
|
||||
* need to malloc these.
|
||||
*/
|
||||
#define FP_QSIZE 16
|
||||
#define ALIGNFPSTATE(f) ((struct fpstate *)(((long)(f))&(~BLOCK_ALIGN)))
|
||||
#define ALIGNFPSTATE(f) ((struct fpstate64 *)(((long)(f))&(~BLOCK_ALIGN)))
|
||||
|
||||
struct fp_qentry {
|
||||
int *fq_addr; /* the instruction's address */
|
||||
int fq_instr; /* the instruction itself */
|
||||
};
|
||||
struct fpstate {
|
||||
|
||||
struct fpstate64 {
|
||||
u_int fs_regs[64]; /* our view is 64 32-bit registers */
|
||||
int64_t fs_fsr; /* %fsr */
|
||||
int fs_qsize; /* actual queue depth */
|
||||
struct fp_qentry fs_queue[FP_QSIZE]; /* queue contents */
|
||||
};
|
||||
|
||||
/*
|
||||
* For 32-bit emulations.
|
||||
*/
|
||||
struct fpstate32 {
|
||||
u_int fs_regs[32]; /* our view is 32 32-bit registers */
|
||||
int fs_fsr; /* %fsr */
|
||||
int fs_qsize; /* actual queue depth */
|
||||
struct fp_qentry fs_queue[FP_QSIZE]; /* queue contents */
|
||||
};
|
||||
|
||||
/*
|
||||
* Clone fpstate into an fpreg structure to satisfy <kern/sys_process.c>
|
||||
*/
|
||||
@ -177,7 +188,7 @@ struct fpreg32 {
|
||||
struct fp_qentry fr_queue[FP_QSIZE]; /* queue contents */
|
||||
};
|
||||
|
||||
#if defined(_KERNEL) || defined(__arch64__)
|
||||
#if defined(__arch64__)
|
||||
/* Here we gotta do naughty things to let gdb work on 32-bit binaries */
|
||||
#define reg reg64
|
||||
#define fpreg fpreg64
|
||||
@ -187,7 +198,7 @@ struct fpreg32 {
|
||||
#define reg reg32
|
||||
#define fpreg fpreg32
|
||||
#define trapframe trapframe32
|
||||
#define rwindow rwindow64
|
||||
#define rwindow rwindow32
|
||||
#endif
|
||||
|
||||
#endif /* _MACHINE_REG_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user