* ========== Copyright Header Begin ==========================================
* OpenSPARC T2 Processor File: checkpoint_replay.s
* Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved
* 4150 Network Circle, Santa Clara, California 95054, U.S.A.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
* This 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 program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* For the avoidance of doubt, and except that if any non-GPL license
* choice is available it will apply instead, Sun elects to use only
* the General Public License version 2 (GPLv2) at this time for any
* software where a choice of GPL license versions is made
* available with the language indicating that GPLv2 or any later version
* may be used, or where a choice of which version of the GPL is applied is
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* ========== Copyright Header End ============================================
#define PART_0_BASE 0x100000000
#define CREGS_L2_CTL_REG 0x000000
#define KERNEL_BASE_DATA_VA 0x1f0c34000
#define KERNEL_BASE_DATA_RA 0x0f0c34000
#define KERNEL_BASE_TEXT_VA 0x1f1834000
#define KERNEL_BASE_TEXT_RA 0x0f1834000
#define MAIN_BASE_BSS_VA 0x1e0400000
#define MAIN_BASE_BSS_RA 0x0e0400000
#define MAIN_BASE_TEXT_VA 0x1e0200000
#define MAIN_BASE_TEXT_RA 0x0e0200000
#define MAIN_BASE_DATA_VA 0x1e0300000
#define MAIN_BASE_DATA_RA 0x0e0300000
/*put htrap code out of the way of the checkpoint memimage */
#define HV_RED_TEXT_PA 0x1f0040000
#define HV_RED_DATA_PA 0x1f004c000
#define HV_TRAP_BASE_PA 0x1f0080000
#define HV_TRAP_DATA_PA 0x1f008c000
#define PART0_Z_ADDR_0 0x1f0100000
#define PART0_NZ_ADDR_0 0x1f0200000
#define PART_0_LINK_AREA_BASE_ADDR 0x1f0300000
#define USER_HEAP_DATA_RA 0x0f0400000
#define PART7_D_NZ_PS1_ADDR 0x1f4000000
#define PART0_D_NZ_PS0_ADDR 0x1f0600000
#define PART0_D_Z_PS0_ADDR 0x1f0500000
#define PART0_I_NZ_PS1_ADDR 0x1f0400000
#define PART0_I_Z_PS1_ADDR 0x1f0300000
#define PART0_I_NZ_PS0_ADDR 0x1f0200000
#define PART0_I_Z_PS0_ADDR 0x1f0100000
!no interrupts until after checkpointing so we can warm up the int pending regs correctly
#define CREGS_TSTATE_PSTATE_IE 0
! This is a generated diag. for 3des encription checking.
setx 0x8300000000, %g2, %g4
stx %g3, [%g4] !clear change bit in ccu
ldxa [%g0]ASI_INTR_ID, %g3
!work around axis dram init problem. Not l2 miss while writing RAs bits
setx 0x9700000008, %g1, %g2
!dram_ras_addr_width_reg <- e
setx 0x8000010020, %g1, %g2
setx 0x8000010080, %g1, %g2
#include "system_regs.h.new.2"
#define HV_UART 0xfff0c2c000
! PRINT("##### Reset/Config start #####\r\n");
! PRINT("Reset status ...\r\n");
setx 0x800e602040, %g3, %g5
setx 0x9800000a00, %g3, %g5
setx 0x9800001820, %g3, %g2
setx 0x8, %g2, %g1 ; setx 0x9800001800, %g3, %g2; stx %g1, [%g2]
setx 0x100, %g2, %g1 ; setx 0x9800002000, %g3, %g2; stx %g1, [%g2]
setx 0x10000, %g2, %g1 ; setx 0x9800002100, %g3, %g2; stx %g1, [%g2]
setx 0x3000ffffffff, %g2, %g1; setx 0x9800002140, %g3, %g2; stx %g1, [%g2]
setx 0x0000ffffffff, %g2, %g1; setx 0x9800002148, %g3, %g2; stx %g1, [%g2]
setx 0x3000ffffffff, %g2, %g1; setx 0x9800002180, %g3, %g2; stx %g1, [%g2]
setx 0x0000ffffffff, %g2, %g1; setx 0x9800002188, %g3, %g2; stx %g1, [%g2]
setx 0x6105ff, %g2, %g1 ; setx 0x8000004100, %g3, %g2; stx %g1, [%g2]
!enable dbg port for bank 0
setx 0xa900000000, %g1, %g4
!only replay 1 thread per core for now
ldxa [%g0]ASI_INTR_ID, %g3
!poke uart control addr so that write fifo will appear empty
! setx 0x1f10002005, %g1, %g2
! setx 0x0000000000101148, %g2, %g1
setx 0x0000000100801148, %g2, %g1
ldxa [%g0]ASI_INTR_ID, %g3
********************************
********************************