* ========== Copyright Header Begin ==========================================
* OpenSPARC T2 Processor File: tsparcv9.h
* Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
* The above named program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License version 2 as published by the Free Software Foundation.
* The above named program is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
* You should have received a copy of the GNU General Public
* License along with this work; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
* ========== Copyright Header End ============================================
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
#pragma ident "@(#)tsparcv9.h 1.22 07/05/30 SMI"
/* Target SPARC v9 definitions */
/* interface functions and data structs */
/* MANDATORY SPARC V9 ASIs */
/* RW Implicit Address Space, nucleus context, TL>0 */
/* RW Implicit Address Space, nucleus context, TL>0 (LE) */
V9_ASI_NUCLEUS_LITTLE
= 0xc,
/* RW Primary Address Space, user privilege */
V9_ASI_AS_IF_USER_PRIMARY
= 0x10,
/* RW Secondary Address Space, user privilege */
V9_ASI_AS_IF_USER_SECONDARY
= 0x11,
/* RW Primary Address Space, user privilege (LE) */
V9_ASI_AS_IF_USER_PRIMARY_LITTLE
= 0x18,
/* RW Secondary Address Space, user privilege (LE) */
V9_ASI_AS_IF_USER_SECONDARY_LITTLE
= 0x19,
/* RW Implicit Primary Address space */
/* RW Implicit Secondary Address space */
/* R Primary Address space, no fault */
V9_ASI_PRIMARY_NO_FAULT
= 0x82,
/* R Secondary Address space, no fault */
V9_ASI_SECONDARY_NO_FAULT
= 0x83,
/* RW Implicit Primary Address space (LE) */
V9_ASI_PRIMARY_LITTLE
= 0x88,
/* RW Implicit Secondary Address space (LE) */
V9_ASI_SECONDARY_LITTLE
= 0x89,
/* R Primary Address space, no fault (LE) */
V9_ASI_PRIMARY_NO_FAULT_LITTLE
= 0x8A,
/* R Secondary Address space, no fault (LE) */
V9_ASI_SECONDARY_NO_FAULT_LITTLE
= 0x8B
#define V9_ASI_IMPLICIT ((uint_t)-1)
typedef struct SPARCV9_CPU sparcv9_cpu_t
;
extern sparcv9_cpu_t
*sparcv9_cpu_alloc(
config_proc_t
*config_procp
,
bool_t
sparcv9_regread(sparcv9_cpu_t
*v9p
, uint_t regnum
, uint64_t *valp
);
bool_t
sparcv9_regwrite(sparcv9_cpu_t
*v9p
, uint_t regnum
, uint64_t val
);
void sparcv9_set_break(sparcv9_cpu_t
*v9p
, tvaddr_t addr
);
void sparcv9_set_break_next(sparcv9_cpu_t
*v9p
);
void sparcv9_clear_break_next(sparcv9_cpu_t
*v9p
);
bool_t
sparcv9_hit_break(sparcv9_cpu_t
*v9p
, tvaddr_t addr
);
void sparcv9_clear_break(sparcv9_cpu_t
*v9p
, tvaddr_t addr
);
void sparcv9_print_break(sparcv9_cpu_t
*v9p
);
void sparcv9_dump_break(sparcv9_cpu_t
*v9p
, FILE *fp
);
void sparcv9_restore_break(FILE *fp
);
void sparcv9_active_window(simcpu_t
*sp
, uint_t new_window
);
void sparcv9_active_globals(simcpu_t
*sp
, uint_t new_global
);
void sparcv9_perf_dump(void *v9p
);
void sparcv9_decode_me(simcpu_t
*sp
, xicache_instn_t
*xcip
);
extern reg_map_t sparcv9_reg_map
[];
extern void sparcv9_idis(char *bufp
, uint_t size
, uint32_t instn
,
extern void sparcv9_trace_output(simcpu_t
*sp
, uint32_t instn
);
extern void sparcv9_dump_stack(simcpu_t
*sp
);
extern void v9_set_fsr_fp_op(simcpu_t
*, uint64_t);
extern uint64_t v9_get_fsr(simcpu_t
*);
extern void v9_set_fsr(simcpu_t
*, uint64_t);
#endif /* _TSPARCV9_H_ */