// ========== Copyright Header Begin ==========================================
// OpenSPARC T2 Processor File: N2_ResetGen.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 ============================================
N2_ResetGen::N2_ResetGen( N2_Model
* _model
, SS_AddressMap
* map
, SS_Paddr lo
, SS_Paddr hi
)/*{{{*/
// N2 RESET_GEN, 0x89_0000_0808, 8-byte
if ((lo
!= 0x8900000808) || (hi
!= 0x8900000808+7))
cerr
<< "ERROR: N2_ResetGen (0x89_0000_0808) being given wrong range, lo=0x" << hex
<< lo
<< " hi=0x" << hi
<< endl
;
map
->add(lo
,hi
,this,SS_AddressMap::REL
,N2_ResetGen::access
);
N2_ResetGen::~N2_ResetGen()/*{{{*/
void N2_ResetGen::access( void* obj
, uint_t sid
, SS_Access::Type type
, SS_Paddr pa
, uint_t size
, uint64_t* data
)/*{{{*/
N2_ResetGen
* self
= (N2_ResetGen
*)obj
;
// reset_gen is always reset to 0 after the corresponding reset action
// reset_gen[3] : dbr_gen
// reset_gen[1] : xir_gen
// reset_gen[0] : wmr_gen
// behavior is undefined if more than one bit is written 1
self
->model
->warm_reset();
// xir_gen, xir strands in ASI_XIR_STEERING
self
->model
->xtrn_reset();
self
->model
->warm_reset();