* ========== Copyright Header Begin ==========================================
* OpenSPARC T2 Processor File: cpu_interface.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 (C) 2005 Sun Microsystems, Inc.
// This file contains interface for the cpu shared
// Cpu module may have a few cpu, each cpu may have
// a few cores, each core may have a few strands.
// Cpu cores could run on separate threads
extern Vcpu
*g_vcpu
[NCPU_MAX
];
extern int g_nvcpu
; // total number of vcpu's
extern int g_vcpu_id_max
; // max vcpu index
extern VCPU_ExInterface g_cpu_ex_intf
;
// cofiguration parameters
int set_param ( int cpu_id
, char *param_name
);
int set_param ( char *name_value
, VCPU_Config
*config
);
char *get_param ( int cpu_id
, char *param_name
);
void set_default ( VCPU_Config
&config
);
extern int volatile cpu_enabled
[];
// Vcpu constructor routines
char *path
, // library path
char *pconfig
, // config line with name=value pairs
VCPU_ImpIntf
*intf
, // cpu imported interface
int version
= 1 // cpu lib version number
char *path
, // library path
VCPU_Config
&config_info
, // cpu config params
VCPU_ImpIntf
*intf
, // cpu imported interface
int version
= 1 // cpu lib version number
extern int cpu_set_breakpoint ( int cpu_id
, VCPU_BpType type
, uint64_t addr
);
extern int cpu_remove_breakpoint ( int cpu_id
, VCPU_BpType type
, uint64_t addr
);
extern int cpu_read_register_name( char *cmd
);
extern int disassemble ( uint32_t iw
, uint64_t addr
, char *line
, int line_size
);
extern char *get_pr_name (uint_t i
);
extern char *get_hpr_name (uint_t i
);
extern char *get_asr_name (uint_t i
);
extern char *get_ireg_name (uint_t i
);
inline Vcpu
* get_vcpu(int id
)
#endif // _CPU_INTERFACE_H