* ========== Copyright Header Begin ==========================================
* OpenSPARC T2 Processor File: err_sbapp_cp_diag.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 MY_HP_TEXT_PA 0x1050000000
#define MY_HP_DATA_PA 0x1050001000
#define ASI_PRIMARY_CONTEXT_0 0x21
#define ASI_ITLB_DATA_IN_REG 0x54
#define ASI_DMMU_TAG_ACCESS 0x58
#define ASI_DTLB_DATA_IN_REG 0x5c
#define ASI_DMMU_SFAR 0x58
#define PART0_NZ_RANOTPA_2 0
#define MY_USER_TEXT_VA000 0x7a000000
#define MY_USER_TEXT_RA000 0x7b000000
#define MY_USER_TEXT_PA000 0x107b000000
#define MY_USER_TEXT_VA001 0x7a010000
#define MY_USER_TEXT_RA001 0x7b010000
#define MY_USER_TEXT_PA001 0x107b010000
#define MY_USER_TEXT_VA002 0x7a020000
#define MY_USER_TEXT_RA002 0x7b020000
#define MY_USER_TEXT_PA002 0x107b020000
#define MY_USER_TEXT_VA003 0x7a030000
#define MY_USER_TEXT_RA003 0x7b030000
#define MY_USER_TEXT_PA003 0x107b030000
#define MY_USER_TEXT_VA004 0x7a040000
#define MY_USER_TEXT_RA004 0x7b040000
#define MY_USER_TEXT_PA004 0x107b040000
#define MY_USER_TEXT_VA005 0x7a050000
#define MY_USER_TEXT_RA005 0x7b050000
#define MY_USER_TEXT_PA005 0x107b050000
#define MY_USER_TEXT_VA006 0x7a060000
#define MY_USER_TEXT_RA006 0x7b060000
#define MY_USER_TEXT_PA006 0x107b060000
#define MY_USER_TEXT_VA007 0x7a070000
#define MY_USER_TEXT_RA007 0x7b070000
#define MY_USER_TEXT_PA007 0x107b070000
#define MY_USER_TEXT_VA008 0x7a080000
#define MY_USER_TEXT_RA008 0x7b080000
#define MY_USER_TEXT_PA008 0x107b080000
#define MY_USER_DATA_VA000 0x6a000000
#define MY_nc_DATA_RA000 0xb06b000000
#define MY_nc_DATA_PA000 0xc06b000000
#define MY_USER_DATA_RA000 0x6b000000
#define MY_USER_DATA_PA000 0x106b000000
#define MY_USER_DATA_VA001 0x6a010000
#define MY_USER_DATA_RA001 0x6b010000
#define MY_USER_DATA_PA001 0x106b010000
#define MY_nc_DATA_RA001 0xb06b0a0000
#define MY_nc_DATA_PA001 0xc06b0a0000
#define MY_USER_DATA_VA002 0x6a020000
#define MY_USER_DATA_RA002 0x6b020000
#define MY_USER_DATA_PA002 0x106b020000
#define MY_USER_DATA_VA003 0x6a030000
#define MY_USER_DATA_RA003 0x6b030000
#define MY_USER_DATA_PA003 0x106b030000
#define MY_USER_DATA_VA004 0x6a040000
#define MY_USER_DATA_RA004 0x6b040000
#define MY_USER_DATA_PA004 0x106b040000
#define MY_USER_DATA_VA005 0x6a050000
#define MY_USER_DATA_RA005 0x6b050000
#define MY_USER_DATA_PA005 0x106b050000
#define MY_USER_DATA_VA006 0x6a060000
#define MY_USER_DATA_RA006 0x6b060000
#define MY_USER_DATA_PA006 0x106b060000
#define MY_USER_DATA_VA007 0x6a070000
#define MY_USER_DATA_RA007 0x6b070000
#define MY_USER_DATA_PA007 0x106b070000
#define MY_USER_DATA_VA008 0x6a080000
#define MY_USER_DATA_RA008 0x6b080000
#define MY_USER_DATA_PA008 0x106b080000
#define MY_USER_DATA_VA009 0x6a090000
#define MY_USER_DATA_RA009 0x6b090000
#define MY_USER_DATA_PA009 0x106b090000
#define IMDU_ERR_EN 0xa0000000
#define IMTU_ERR_EN 0x90000000
#define DMDU_ERR_EN 0x88000000
#define DMTU_ERR_EN 0x84000000
#define IRCU_ERR_EN 0x82000000
#define FRCU_ERR_EN 0x81000000
#define SCAU_ERR_EN 0x80800000
#define TCCU_ERR_EN 0x80400000
#define TSAU_ERR_EN 0x80200000
#define MRAU_ERR_EN 0x80100000
#define STAU_ERR_EN 0x80080000
#define STDU_ERR_EN 0x80020000
#define CERER_SBDPC 0x400
#define CETER_DHCCE 0x1000000000000000
#define CETER_DE 0x2000000000000000
#define CETER_PSCCE 0x4000000000000000
#define DCVP_ERR_TYPE 0x5
#define SBDPC_ERR_TYPE 0x5
#define SBDPU_ERR_TYPE 0x6
#define MAIN_PAGE_HV_ALSO
#define H_HT0_Mem_Address_Not_Aligned_0x34
#define My_HT0_Mem_Address_Not_Aligned_0x34 \
nop;nop;nop;nop;nop;nop;nop
#define H_HT0_Data_Access_MMU_Error_0x72
#define SUN_H_HT0_Data_Access_MMU_Error_0x72 \
ba DATA_ACCESS_ERROR_HANDLER; \
nop;nop;nop;nop;nop;nop;nop
#define H_HT0_Instruction_Access_MMU_Error_0x71
#define SUN_H_HT0_Instruction_Access_MMU_Error_0x71 \
ba INST_ACCESS_ERROR_HANDLER; \
nop;nop;nop;nop;nop;nop;nop
#define H_HT0_Hw_Corrected_Error_0x63
#define SUN_H_HT0_Hw_Corrected_Error_0x63 \
ba HW_CORR_ERROR_HANDLER; \
nop;nop;nop;nop;nop;nop;nop
#define H_HT0_DAE_invalid_asi_0x14
#define SUN_H_HT0_DAE_invalid_asi_0x14 \
ba INVALID_ASI_HANDLER; \
nop;nop;nop;nop;nop;nop;nop
#define H_HT0_DAE_nc_page_0x16
#define SUN_H_HT0_DAE_nc_page_0x16 \
stxa %g0, [%g3]ASI_CERER;\
#define H_HT0_Privileged_Action_0x37
#define My_HT0_Privileged_Action_0x37 \
stxa %g1, [%g3]ASI_CERER;\
!! i4 =1 . turn on ceter.de
!! l4 =0 . turn off ceter.e
#define H_HT0_Lddf_Mem_Address_Not_Aligned_0x35
#define My_HT0_Lddf_Mem_Address_Not_Aligned_0x35 \
setx CETER_DE, %g2, %g1;\
add %g0, CETER_VA, %g3; \
stxa %g1, [%g3]ASI_CETER; \
stxa %g0, [%g3]ASI_CETER; \
#define H_HT0_Stdf_Mem_Address_Not_Aligned_0x36
#define My_HT0_Stdf_Mem_Address_Not_Aligned_0x36 \
stxa %g1, [%g0]ASI_ERR_INJ ;\
stxa %g0, [%g0]ASI_ERR_INJ ;\
#define H_HT0_Sw_Recoverable_Error_0x40
#define SUN_H_HT0_Sw_Recoverable_Error_0x40 \
ba RECOVERABLE_ERR_HANDLER; \
nop;nop;nop;nop;nop;nop;nop
#define H_HT0_Store_Error_0x07
#define SUN_H_HT0_Store_Error_0x07 \
nop;nop;nop;nop;nop;nop;nop
/************************************************************************
************************************************************************/
setx 0x1111111111111111, %o1, %o2
set 0x0800000, %o2 !! enable sbapp errs
add %g0, CERER_VA, %g3 !!g3 has cerer va
mov %g0, %o6 !! start with user mode
setx user_code_begin_000, %g2, %g3
!setx HPRIV_MODE, %g2, %g3
/************************************************************************
************************************************************************/
!#***********************************************************************
SECTION .My_User_Section_4v000 TEXT_VA=MY_USER_TEXT_VA000, DATA_VA=MY_USER_DATA_VA000
Name = .My_User_Section_4v000,
part_0_ctx_nonzero_tsb_config_2,
NAME = .My_User_Section_4v000,
.global user_code_begin_000
setx user_data_begin_000, %g1, %g2
setx original_data, %g1, %g3
setx st_address, %g1, %g4
setx st_address_1, %g1, %g5
mov %g0, %l2 !! stb expected index is in l2
add %g0, 0x5, %l3 !! mask
add %g0, 1, %i3 !! enable err_injection
std %d0, [%g2 + 0x4] !stdf_not_aligned to set err_inject
ldxa [%g2]0xE4, %g1 !! invalid asi trap to set the stb ptr to 0
add %g0, 1, %g6 !! start with 1 entries in stb
add %l2, %g6, %l2 !!the stb entry in which data will be stored next
add %l2, 2, %l2 !! three stores, turn off and on err_inject
add %g0, 1, %i3 !! enable err_injection
std %d0, [%g2 + 0x4] !Turn on err_inject, err_injection turned off
!! For hp mode load vas which pt to nc range.
setx 0x2222222222222222, %g1, %g2
setx user_data_begin_003, %g1, %g2
setx original_data_hp, %g1, %g3
setx st_address_hp, %g1, %g4
setx st_address_1_hp, %g1, %g5
setx user_code_begin_001, %g2, %g3
Name = .My_User_Section_4v000,
part_0_ctx_nonzero_tsb_config_1,
NAME = .My_User_Section_4v000,
.global user_data_begin_000
.xword 0x06d2d7f29e76397c
.xword 0x234c366110eddd38
.xword 0xa80656d4288044bc
.xword 0x12e763fbd8e2970d
.xword 0x7320217fab3eae0e
.xword 0x38683cebedefb5af
.xword 0xefc4e1f1b35853fc
.xword 0xe790a0c1689eb683
.xword 0x88c650f170c41710
.xword 0x614126cf9fc8dca3
.xword 0xe0066361bd9fcb86
.xword 0xea22901c101f6f52
.xword 0x806faa2171350467
.xword 0xff54f2cd06a0d342
.xword 0x566bff718cddb905
.xword 0x6d367bc4d165d37a
.xword 0x5efc42b18f920522
.xword 0x584c92dec4bc66de
.xword 0xed9efe0d05896ce1
.xword 0xf9d45b94972117c8
.xword 0xd0c647618c9e43f3
.xword 0xfe04ead3b77c2d11
.xword 0x4be2f60911e465ce
.xword 0x4e22352a0c29c95c
.xword 0xf18efdf01ce79e24
original_data: !! copy of the data at the st_address location. St location
!! shd not be overwritten
.xword 0x294aaa56144d7cf1
.xword 0xe0066361bd9fcb86
.xword 0xea22901c101f6f52
.xword 0x806faa2171350467
.xword 0xff54f2cd06a0d342
.xword 0x566bff718cddb905
.xword 0x6d367bc4d165d37a
.xword 0x5efc42b18f920522
.xword 0x584c92dec4bc66de
.xword 0xefc4e1f1b35853fc
.xword 0xe790a0c1689eb683
.xword 0x88c650f170c41710
.xword 0x614126cf9fc8dca3
.xword 0x5efc42b18f920522
.xword 0x584c92dec4bc66de
.xword 0xed9efe0d05896ce1
.xword 0xf9d45b94972117c8
.xword 0xd0c647618c9e43f3
.xword 0xfe04ead3b77c2d11
.xword 0x06d2d7f29e76397c
.xword 0x234c366110eddd38
.xword 0xa80656d4288044bc
.xword 0x12e763fbd8e2970d
.xword 0x7320217fab3eae0e
.xword 0x38683cebedefb5af
.xword 0x294aaa56144d7cf1
.xword 0xe0066361bd9fcb86
.xword 0xea22901c101f6f52
.xword 0x806faa2171350467
.xword 0xff54f2cd06a0d342
.xword 0x566bff718cddb905
.xword 0x6d367bc4d165d37a
.xword 0x5efc42b18f920522
.xword 0x584c92dec4bc66de
.xword 0xefc4e1f1b35853fc
.xword 0xe790a0c1689eb683
.xword 0x88c650f170c41710
.xword 0x614126cf9fc8dca3
.xword 0x5efc42b18f920522
.xword 0x584c92dec4bc66de
.xword 0xed9efe0d05896ce1
.xword 0xf9d45b94972117c8
.xword 0xd0c647618c9e43f3
.xword 0xfe04ead3b77c2d11
.xword 0x06d2d7f29e76397c
.xword 0x234c366110eddd38
.xword 0xa80656d4288044bc
.xword 0x12e763fbd8e2970d
.xword 0x7320217fab3eae0e
.xword 0x38683cebedefb5af
.xword 0xefc4e1f1b35853fc
.xword 0xe790a0c1689eb683
.xword 0x88c650f170c41710
.xword 0x294aaa56144d7cf1
.xword 0xe0066361bd9fcb86
.xword 0xea22901c101f6f52
.xword 0x806faa2171350467
.xword 0xff54f2cd06a0d342
.xword 0x566bff718cddb905
.xword 0x6d367bc4d165d37a
.xword 0x5efc42b18f920522
.xword 0x584c92dec4bc66de
.xword 0xefc4e1f1b35853fc
.xword 0xe790a0c1689eb683
.xword 0x88c650f170c41710
.xword 0x614126cf9fc8dca3
.xword 0x5efc42b18f920522
.xword 0x584c92dec4bc66de
.xword 0xed9efe0d05896ce1
.xword 0xf9d45b94972117c8
.xword 0xd0c647618c9e43f3
.xword 0xfe04ead3b77c2d11
.xword 0x38683cebedefb5af
.xword 0xefc4e1f1b35853fc
.xword 0xe790a0c1689eb683
.xword 0x88c650f170c41710
.xword 0xed9efe0d05896ce1
.xword 0xf9d45b94972117c8
.xword 0xd0c647618c9e43f3
.xword 0xfe04ead3b77c2d11
SECTION .My_User_Section_4v001 TEXT_VA=MY_USER_TEXT_VA001, DATA_VA=MY_USER_DATA_VA001
Name = .My_User_Section_4v001,
part_0_ctx_nonzero_tsb_config_2,
NAME = .My_User_Section_4v001,
! Check, uncorrectable errors are detected for blk stores also.
.global user_code_begin_001
mov %g0, %l2 !! In case of address parity the addr parity err is reported when
!! the blk store is written in the STB.
add %g0, 0x30, %l3 !! double bit err
setx user_data_begin_001, %g1, %g2
setx original_data, %g1, %g3
setx st_address, %g1, %g4
add %g0, 1, %i3 !! Enable err_injection
ldxa [%g2]0xE4, %g1 !! invalid asi trap to set to stb ptr to 0
setx user_code_begin_002, %g2, %g3
Name = .My_User_Section_4v001,
part_0_ctx_nonzero_tsb_config_1,
NAME = .My_User_Section_4v001,
.global user_data_begin_001
.xword 0xfa474991f13e3460
.xword 0x1446415baecf3609
.xword 0xe3215e901114ad4b
.xword 0xf91d897e92d1ee95
.xword 0x33458a48805d888b
.xword 0x7f5a3ddb7d8e3c23
.xword 0xaa80311fb1e17e79
.xword 0x0f59d0e1ac35dbd4
.xword 0x4b1896677e83abae
.xword 0xc2e35a285574f037
.xword 0x2e42eb5835020e2e
.xword 0x90775b99929f43cc
.xword 0xd0c647618c9e43f3
.xword 0xfe04ead3b77c2d11
.xword 0x06d2d7f29e76397c
.xword 0x234c366110eddd38
.xword 0xa80656d4288044bc
.xword 0x12e763fbd8e2970d
.xword 0x7320217fab3eae0e
.xword 0x38683cebedefb5af
.xword 0xefc4e1f1b35853fc
.xword 0xe790a0c1689eb683
.xword 0x9fac4ae85a4ecd4e
.xword 0x4b1896677e83abae
.xword 0xc2e35a285574f037
.xword 0x2e42eb5835020e2e
.xword 0x90775b99929f43cc
.xword 0xd0c647618c9e43f3
.xword 0xfe04ead3b77c2d11
.xword 0x06d2d7f29e76397c
.xword 0x234c366110eddd38
.xword 0xa80656d4288044bc
.xword 0x12e763fbd8e2970d
.xword 0x7320217fab3eae0e
.xword 0x38683cebedefb5af
SECTION .My_User_Section_4v002 TEXT_VA=MY_USER_TEXT_VA002, DATA_VA=MY_USER_DATA_VA002
Name = .My_User_Section_4v002,
part_0_ctx_nonzero_tsb_config_2,
NAME = .My_User_Section_4v002,
! Chk that asi writes are squashed too in case of uncorrectable errors.
! The testcase runs in a loop and in each iteration the stb pts to next entry.
! 6 asi stores are squashed.
! For first iteration, stb pts to entry 0. 6 asi stores are written that move the ptr to 5.
! Trap is taken. 2 stores occur in trap handler:1st to disable err
! injection and 2nd to clear dsfsr. That moves the stb ptr to 0. The test case then
! uses 1 stb entry to enable err injection. Which moves teh ptr to 1 for
! next iteration of loop. So, 9 stores happen in each iteration which move the stb ptr
! to next entry for each iteration.
! the loop runs for 8 iterations correpsonding to stb entry 0,1,2,3, 4...to 7.
! So the testcase checks that squashing can occur from every entry in STB.
! The test runs in HP mode too.
.global user_code_begin_002
mov %g0, %o6 !! priv mode
setx user_data_begin_000, %g1, %g2
!! Init the scratchpad array
setx new_store_loc, %g1, %g4
add %g0, 0x6, %l3 !! mask
add %g0, 1, %i3 !! enable err_injection
std %d0, [%g2 + 0x4] !stdf_not_aligned to set err_inject
ldxa [%g4]0xE4, %g1 !! invalid asi trap to set the stb ptr to 0
!!now do 6 asi stores. These will have err injected
!! Chk that the stores were squashed
!! 5 stores are required to advance the ptr from 0 to 1 and so on.
!! now chk that these stores were not squashed
add %g0, 1, %i3 !! enable err_injection
!! do a dummy store to advance store ptr.
!! since the store_error handler no longer has a wr to to clear the dsfsr, I had
!!to add a dummy store here to make the diag work
std %d0, [%g2 + 0x4] !stdf_not_aligned to set err_inject
setx 0x3333333333333333, %g6, %g7
setx user_code_begin_003, %g2, %g3
Name = .My_User_Section_4v002,
part_0_ctx_nonzero_tsb_config_1,
NAME = .My_User_Section_4v002,
.global user_data_begin_002
.xword 0x050a211e918857f3
.xword 0x7980bbbf09b95bba
.xword 0x55f410e2b57433f6
.xword 0x106c3aa95e2aa3c3
.xword 0xbcb980bc1bb072d8
.xword 0x63da435c10b717dd
.xword 0x375d99be87bef073
.xword 0x03a5206ac6d08fd2
.xword 0xfa474991f13e3460
.xword 0x1446415baecf3609
.xword 0xe3215e901114ad4b
.xword 0xf91d897e92d1ee95
.xword 0x33458a48805d888b
.xword 0x7f5a3ddb7d8e3c23
.xword 0xaa80311fb1e17e79
.xword 0x0f59d0e1ac35dbd4
.xword 0xca12fd23b5b1b1d6
.xword 0x3428a18f797bd42a
.xword 0x0d0630dd16ca2db5
.xword 0x281c49cf3f51a83f
.xword 0x8fc66b8940c55c03
.xword 0xfd6f2a2b60aee94c
.xword 0xec72846b0261894e
.xword 0xf1bd6c544120f822
.xword 0xefc4e1f1b35853fc
.xword 0xe790a0c1689eb683
.xword 0x88c650f170c41710
.xword 0x614126cf9fc8dca3
.xword 0x4be2f60911e465ce
.xword 0x4e22352a0c29c95c
.xword 0xf18efdf01ce79e24
.xword 0x294aaa56144d7cf1
.xword 0xefc4e1f1b35853fc
.xword 0xe790a0c1689eb683
.xword 0x88c650f170c41710
.xword 0x614126cf9fc8dca3
.xword 0x4be2f60911e465ce
.xword 0x4e22352a0c29c95c
.xword 0xf18efdf01ce79e24
.xword 0x294aaa56144d7cf1
.xword 0xe0066361bd9fcb86
.xword 0xea22901c101f6f52
.xword 0x806faa2171350467
.xword 0xff54f2cd06a0d342
.xword 0x566bff718cddb905
.xword 0x6d367bc4d165d37a
.xword 0x5efc42b18f920522
.xword 0x4be2f60911e465ce
.xword 0x4e22352a0c29c95c
.xword 0xf18efdf01ce79e24
SECTION .My_User_Section_4v003 TEXT_VA=MY_USER_TEXT_VA003, DATA_VA=MY_USER_DATA_VA003
Name = .My_User_Section_4v003,
part_0_ctx_nonzero_tsb_config_2,
NAME = .My_User_Section_4v003,
! same as case 2 uses hp stores.
.global user_code_begin_003
add %g0, 0x30, %l3 !! double bit err
setx user_data_begin_003, %g1, %g2
add %g0, 1, %i3 !! Enable err_injection
ldxa [%g2]0xE4, %g1 !! invalid asi trap to set to stb ptr to 0
setx st_address_hp, %g1, %g2
setx user_code_begin_004, %g2, %g3
Name = .My_User_Section_4v003,
part_0_ctx_nonzero_tsb_config_1,
NAME = .My_User_Section_4v003,
.global user_data_begin_003
.xword 0xca12fd23b5b1b1d6
.xword 0x3428a18f797bd42a
.xword 0x0d0630dd16ca2db5
.xword 0x281c49cf3f51a83f
.xword 0x8fc66b8940c55c03
.xword 0xfd6f2a2b60aee94c
.xword 0xec72846b0261894e
.xword 0xf1bd6c544120f822
.xword 0xefc4e1f1b35853fc
.xword 0xe790a0c1689eb683
.xword 0x88c650f170c41710
.xword 0x614126cf9fc8dca3
.xword 0x4be2f60911e465ce
.xword 0x4e22352a0c29c95c
.xword 0xf18efdf01ce79e24
.xword 0x294aaa56144d7cf1
original_data_hp: !! copy of the data at the st_address location. St location
!! shd not be overwritten
.xword 0x234c366110eddd38
.xword 0xa80656d4288044bc
.xword 0x12e763fbd8e2970d
.xword 0x7320217fab3eae0e
.xword 0x38683cebedefb5af
.xword 0xefc4e1f1b35853fc
.xword 0xe790a0c1689eb683
.xword 0x88c650f170c41710
.xword 0x614126cf9fc8dca3
.xword 0xe0066361bd9fcb86
.xword 0xea22901c101f6f52
.xword 0x806faa2171350467
.xword 0xff54f2cd06a0d342
.xword 0x566bff718cddb905
.xword 0x6d367bc4d165d37a
.xword 0x5efc42b18f920522
.xword 0x294aaa56144d7cf1
.xword 0xe0066361bd9fcb86
.xword 0xea22901c101f6f52
.xword 0x806faa2171350467
.xword 0xff54f2cd06a0d342
.xword 0x566bff718cddb905
.xword 0x6d367bc4d165d37a
.xword 0x5efc42b18f920522
.xword 0x584c92dec4bc66de
.xword 0xefc4e1f1b35853fc
.xword 0x234c366110eddd38
.xword 0xa80656d4288044bc
.xword 0x12e763fbd8e2970d
.xword 0x7320217fab3eae0e
.xword 0x38683cebedefb5af
.xword 0xefc4e1f1b35853fc
.xword 0xe790a0c1689eb683
.xword 0x88c650f170c41710
.xword 0x614126cf9fc8dca3
.xword 0xe0066361bd9fcb86
.xword 0xea22901c101f6f52
.xword 0x806faa2171350467
.xword 0xff54f2cd06a0d342
.xword 0x566bff718cddb905
.xword 0x6d367bc4d165d37a
.xword 0x5efc42b18f920522
.xword 0x294aaa56144d7cf1
.xword 0xe0066361bd9fcb86
.xword 0xea22901c101f6f52
.xword 0x806faa2171350467
.xword 0xff54f2cd06a0d342
.xword 0x566bff718cddb905
.xword 0x6d367bc4d165d37a
.xword 0x5efc42b18f920522
.xword 0x584c92dec4bc66de
.xword 0xefc4e1f1b35853fc
.xword 0xefc4e1f1b35853fc
.xword 0xe790a0c1689eb683
.xword 0x88c650f170c41710
.xword 0x614126cf9fc8dca3
.xword 0x5efc42b18f920522
.xword 0x584c92dec4bc66de
.xword 0xed9efe0d05896ce1
.xword 0xf9d45b94972117c8
.xword 0xd0c647618c9e43f3
.xword 0xfe04ead3b77c2d11
.xword 0x06d2d7f29e76397c
.xword 0x234c366110eddd38
.xword 0xa80656d4288044bc
.xword 0x12e763fbd8e2970d
.xword 0x7320217fab3eae0e
.xword 0x38683cebedefb5af
.xword 0xefc4e1f1b35853fc
.xword 0xe790a0c1689eb683
.xword 0x88c650f170c41710
.xword 0x294aaa56144d7cf1
.xword 0xe0066361bd9fcb86
.xword 0xea22901c101f6f52
.xword 0x806faa2171350467
.xword 0xff54f2cd06a0d342
.xword 0x566bff718cddb905
.xword 0x6d367bc4d165d37a
.xword 0x5efc42b18f920522
.xword 0x584c92dec4bc66de
.xword 0xefc4e1f1b35853fc
.xword 0xe790a0c1689eb683
.xword 0x88c650f170c41710
.xword 0x614126cf9fc8dca3
.xword 0x5efc42b18f920522
.xword 0x584c92dec4bc66de
.xword 0xed9efe0d05896ce1
.xword 0xf9d45b94972117c8
SECTION .My_User_Section_4v004 TEXT_VA=MY_USER_TEXT_VA004, DATA_VA=MY_USER_DATA_VA004
Name = .My_User_Section_4v004,
part_0_ctx_nonzero_tsb_config_2,
NAME = .My_User_Section_4v004,
.global user_code_begin_004
add %g0, 0x30, %l3 !! double bit err
setx user_data_begin_004, %g1, %g2
add %g0, 1, %i3 !! Enable err_injection
ldxa [%g2]0xE4, %g1 !! invalid asi trap to set to stb ptr to 0
setx st_address_hp, %g1, %g2
setx user_code_begin_005, %g2, %g3
Name = .My_User_Section_4v004,
part_0_ctx_nonzero_tsb_config_1,
NAME = .My_User_Section_4v004,
.global user_data_begin_004
.xword 0xefc4e1f1b35853fc
.xword 0xe790a0c1689eb683
.xword 0x88c650f170c41710
.xword 0x614126cf9fc8dca3
.xword 0x4be2f60911e465ce
.xword 0x4e22352a0c29c95c
.xword 0xf18efdf01ce79e24
.xword 0x294aaa56144d7cf1
.xword 0xe0066361bd9fcb86
.xword 0xea22901c101f6f52
.xword 0x806faa2171350467
.xword 0xff54f2cd06a0d342
.xword 0x566bff718cddb905
.xword 0x6d367bc4d165d37a
.xword 0x5efc42b18f920522
.xword 0x584c92dec4bc66de
.xword 0xefc4e1f1b35853fc
.xword 0xe790a0c1689eb683
.xword 0x88c650f170c41710
.xword 0x614126cf9fc8dca3
.xword 0x4be2f60911e465ce
.xword 0x4e22352a0c29c95c
.xword 0xf18efdf01ce79e24
.xword 0x294aaa56144d7cf1
.xword 0xe0066361bd9fcb86
.xword 0xea22901c101f6f52
.xword 0xff54f2cd06a0d342
.xword 0x566bff718cddb905
.xword 0x6d367bc4d165d37a
.xword 0x5efc42b18f920522
.xword 0x584c92dec4bc66de
.xword 0xe0066361bd9fcb86
.xword 0xea22901c101f6f52
.xword 0x806faa2171350467
.xword 0x566bff718cddb905
.xword 0x6d367bc4d165d37a
SECTION .My_User_Section_4v005 TEXT_VA=MY_USER_TEXT_VA005, DATA_VA=MY_USER_DATA_VA005
Name = .My_User_Section_4v005,
part_0_ctx_nonzero_tsb_config_3,
NAME = .My_User_Section_4v005,
!! inject error into all the scratchpad entries.
.global user_code_begin_005
add %g0, 0x30, %l3 !! double bit err
setx user_data_begin_005, %g1, %g2
add %g0, 1, %i3 !! Enable err_injection
ldxa [%g2]0xE4, %g1 !! invalid asi trap to set to stb ptr to 0
setx st_address_hp, %g1, %g2
Name = .My_User_Section_4v005,
part_0_ctx_nonzero_tsb_config_1,
NAME = .My_User_Section_4v005,
.global user_data_begin_005
.xword 0xefc4e1f1b35853fc
.xword 0xe790a0c1689eb683
.xword 0x88c650f170c41710
.xword 0x614126cf9fc8dca3
.xword 0x4be2f60911e465ce
.xword 0x4e22352a0c29c95c
.xword 0xf18efdf01ce79e24
.xword 0x294aaa56144d7cf1
.xword 0xe0066361bd9fcb86
.xword 0xea22901c101f6f52
.xword 0x806faa2171350467
.xword 0xff54f2cd06a0d342
.xword 0x566bff718cddb905
.xword 0x6d367bc4d165d37a
.xword 0x5efc42b18f920522
.xword 0x4be2f60911e465ce
.xword 0x4e22352a0c29c95c
.xword 0xf18efdf01ce79e24
SECTION .My_User_Section_4v006 TEXT_VA=MY_USER_TEXT_VA006, DATA_VA=MY_USER_DATA_VA006
Name = .My_User_Section_4v006,
part_0_ctx_nonzero_tsb_config_3,
NAME = .My_User_Section_4v006,
.global user_code_begin_006
Name = .My_User_Section_4v006,
part_0_ctx_nonzero_tsb_config_1,
NAME = .My_User_Section_4v006,
.global user_data_begin_006
SECTION .My_User_Section_4v007 TEXT_VA=MY_USER_TEXT_VA007, DATA_VA=MY_USER_DATA_VA007
Name = .My_User_Section_4v007,
part_0_ctx_nonzero_tsb_config_3,
NAME = .My_User_Section_4v007,
!! inject error in all the 4 ways and do special memops and chk the effect.
.global user_code_begin_007
Name = .My_User_Section_4v007,
part_0_ctx_nonzero_tsb_config_1,
NAME = .My_User_Section_4v007,
.global user_data_begin_007
SECTION .My_User_Section_4v008 TEXT_VA=MY_USER_TEXT_VA008, DATA_VA=MY_USER_DATA_VA008
Name = .My_User_Section_4v008,
part_0_ctx_nonzero_tsb_config_3,
NAME = .My_User_Section_4v008,
.global user_code_begin_008
Name = .My_User_Section_4v008,
part_0_ctx_nonzero_tsb_config_1,
NAME = .My_User_Section_4v008,
.global user_data_begin_008
.global DATA_ACCESS_ERROR_HANDLER
.global INST_ACCESS_ERROR_HANDLER
.global RECOVERABLE_ERR_HANDLER
.global STORE_ERR_HANDLER
DATA_ACCESS_ERROR_HANDLER:
ldxa [%g5]ASI_DSFSR, %o1 !
add %g0, SFAR_VA, %g6 !!g6 has sfar va
stxa %g0, [%o1] ASI_DMMU_DEMAP
INST_ACCESS_ERROR_HANDLER:
!!ldxa [%g5]ASI_ISFSR, %o1 !
add %g0, SFAR_VA, %g6 !!g6 has sfar va
cmp %o1, %l4 !! cmp pc matches the expected pc
stxa %g0, [%o1] ASI_IMMU_DEMAP
ldxa [%g0]0x4c, %g1 !! read the DESR
ldxa [%g0]0x4c, %g2 !! g2 shd be 0.
add %g0, 0x100, %g3 !! read the stb ptr
ldxa [%g3]ASI_STB_ACCESS, %g2
stxa %g1, [%g0]ASI_ERR_INJ ! no err injected on wr to err inj
stxa %g1, [%g0]ASI_ERR_INJ ! no err injected on wr to err inj
stxa %g1, [%g0]ASI_ERR_INJ ! no err injected on wr to err inj
stxa %g1, [%g0]ASI_ERR_INJ ! no err injected on wr to err inj
stxa %g1, [%g0]ASI_ERR_INJ ! no err injected on wr to err inj
stxa %g1, [%g0]ASI_ERR_INJ ! no err injected on wr to err inj
stxa %g1, [%g0]ASI_ERR_INJ ! no err injected on wr to err inj
ldxa [%g0]0x4c, %g1 !! read the DESR
ldxa [%g0]0x4c, %g2 !! g2 shd be 0.
srlx %g1, 56, %g2 !! chk the err_type
srlx %g2, 5, %g2 !! chk s bit
srlx %g2, 1, %g2 !! chk M bit bit
srlx %g2, 1, %g3 !! chk F bit set
and %g1, 0x7, %g2 !! SB index
sllx %g2, 3, %g3 !! g3 has the addr to read data
or %g3, 0x40, %g4 !! g4 has the addr to read ecc
or %g3, 0xC0, %g5 !! g5 has the addr to diag read stb pa
ldxa [%g3]ASI_STB_ACCESS, %g6
ldxa [%g4]ASI_STB_ACCESS, %g6 !! ecc data
brz %o6, CMP_PA !! lsu flips the ecc for upper 32 bits only.
xor %o3, %l3, %g1 !! o3 has the ecc withour err, l3 has the mask.
ldxa [%g5]ASI_STB_ACCESS, %g6 !! pa
cmp %g7, %l7 !! cmp asi, byte mask
sllx %g6, 24, %g6 !! shift the mask
or %g3, 0x80, %g7 !! g7 has the addr for the control read
ldxa [%g7]ASI_STB_ACCESS, %g6 !! chk priv
ldxa [%g1]0x4c, %g2 !! read the DFESR
!!reading dfesr clears it now
ldxa [%g1]0x4c, %g3 !! read the DFESR
stxa %g0, [%g0]ASI_ERR_INJ