// ========== Copyright Header Begin ==========================================
// OpenSPARC T2 Processor File: N2_VirtualCpu.cc
// 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 ============================================
#include "SS_VirtualCpu.h"
static SS_Model
* n2_model()/*{{{*/
static void* n2_create( Sam::VCPU_Config
* config
, Sam::VCPU_ImpIntf
* interface
)/*{{{*/
(Sam::VCPU_Type
)(Sam::VCPU_IMPL_VER_N2
| Sam::VCPU_IMPL_SIM_VONK
);
return SS_VirtualCpu::create(n2_model
,config
,interface
);
static int n2_destroy()/*{{{*/
SS_VirtualCpu::remove(n2
);
static int n2_reset( uint64_t pc
)/*{{{*/
static int n2_config( char* cmd
, char* reply
, int reply_size
)/*{{{*/
static int n2_snapshot( char* dir_name
, bool load
)/*{{{*/
return SS_VirtualCpu::snapshot(n2
,dir_name
,"/n2cpu.ss",load
);
static int n2_save( char* dir_name
)/*{{{*/
return n2_snapshot(dir_name
,false);
static int n2_restore( char* dir_name
)/*{{{*/
return n2_snapshot(dir_name
,true);
static int n2_cycle ( uint64_t nn
)
return SS_VirtualCpu::cycle(nn
);
static Sam::VCPU_ExInterface n2_sam_interface
=/*{{{*/
extern "C" int get_ex_interface( Sam::VCPU_ExInterface
* interface
)/*{{{*/
*interface
= n2_sam_interface
;
// global methods to access system info
extern "C" uint_t
vcpu_get_sys_type()/*{{{*/
return Sam::VCPU_IMPL_VER_N2
;
extern "C" uint_t
vcpu_get_sys_size()/*{{{*/
extern "C" void* vcpu_get_sys_pntr( uint_t i
)/*{{{*/