18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
38c2ecf20Sopenharmony_ci */
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#ifndef __ASM_HARDWARE_CP14_H
68c2ecf20Sopenharmony_ci#define __ASM_HARDWARE_CP14_H
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#include <linux/types.h>
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci/* Accessors for CP14 registers */
118c2ecf20Sopenharmony_ci#define dbg_read(reg)			RCP14_##reg()
128c2ecf20Sopenharmony_ci#define dbg_write(val, reg)		WCP14_##reg(val)
138c2ecf20Sopenharmony_ci#define etm_read(reg)			RCP14_##reg()
148c2ecf20Sopenharmony_ci#define etm_write(val, reg)		WCP14_##reg(val)
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci/* MRC14 and MCR14 */
178c2ecf20Sopenharmony_ci#define MRC14(op1, crn, crm, op2)					\
188c2ecf20Sopenharmony_ci({									\
198c2ecf20Sopenharmony_ciu32 val;								\
208c2ecf20Sopenharmony_ciasm volatile("mrc p14, "#op1", %0, "#crn", "#crm", "#op2 : "=r" (val));	\
218c2ecf20Sopenharmony_cival;									\
228c2ecf20Sopenharmony_ci})
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci#define MCR14(val, op1, crn, crm, op2)					\
258c2ecf20Sopenharmony_ci({									\
268c2ecf20Sopenharmony_ciasm volatile("mcr p14, "#op1", %0, "#crn", "#crm", "#op2 : : "r" (val));\
278c2ecf20Sopenharmony_ci})
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci/*
308c2ecf20Sopenharmony_ci * Debug Registers
318c2ecf20Sopenharmony_ci *
328c2ecf20Sopenharmony_ci * Available only in DBGv7
338c2ecf20Sopenharmony_ci * DBGECR, DBGDSCCR, DBGDSMCR, DBGDRCR
348c2ecf20Sopenharmony_ci *
358c2ecf20Sopenharmony_ci * Available only in DBGv7.1
368c2ecf20Sopenharmony_ci * DBGBXVRm, DBGOSDLR, DBGDEVID2, DBGDEVID1
378c2ecf20Sopenharmony_ci *
388c2ecf20Sopenharmony_ci * Read only
398c2ecf20Sopenharmony_ci * DBGDIDR, DBGDSCRint, DBGDTRRXint, DBGDRAR, DBGOSLSR, DBGOSSRR, DBGPRSR,
408c2ecf20Sopenharmony_ci * DBGPRSR, DBGDSAR, DBGAUTHSTATUS, DBGDEVID2, DBGDEVID1, DBGDEVID
418c2ecf20Sopenharmony_ci *
428c2ecf20Sopenharmony_ci * Write only
438c2ecf20Sopenharmony_ci * DBGDTRTXint, DBGOSLAR
448c2ecf20Sopenharmony_ci */
458c2ecf20Sopenharmony_ci#define RCP14_DBGDIDR()			MRC14(0, c0, c0, 0)
468c2ecf20Sopenharmony_ci#define RCP14_DBGDSCRint()		MRC14(0, c0, c1, 0)
478c2ecf20Sopenharmony_ci#define RCP14_DBGDTRRXint()		MRC14(0, c0, c5, 0)
488c2ecf20Sopenharmony_ci#define RCP14_DBGWFAR()			MRC14(0, c0, c6, 0)
498c2ecf20Sopenharmony_ci#define RCP14_DBGVCR()			MRC14(0, c0, c7, 0)
508c2ecf20Sopenharmony_ci#define RCP14_DBGECR()			MRC14(0, c0, c9, 0)
518c2ecf20Sopenharmony_ci#define RCP14_DBGDSCCR()		MRC14(0, c0, c10, 0)
528c2ecf20Sopenharmony_ci#define RCP14_DBGDSMCR()		MRC14(0, c0, c11, 0)
538c2ecf20Sopenharmony_ci#define RCP14_DBGDTRRXext()		MRC14(0, c0, c0, 2)
548c2ecf20Sopenharmony_ci#define RCP14_DBGDSCRext()		MRC14(0, c0, c2, 2)
558c2ecf20Sopenharmony_ci#define RCP14_DBGDTRTXext()		MRC14(0, c0, c3, 2)
568c2ecf20Sopenharmony_ci#define RCP14_DBGDRCR()			MRC14(0, c0, c4, 2)
578c2ecf20Sopenharmony_ci#define RCP14_DBGBVR0()			MRC14(0, c0, c0, 4)
588c2ecf20Sopenharmony_ci#define RCP14_DBGBVR1()			MRC14(0, c0, c1, 4)
598c2ecf20Sopenharmony_ci#define RCP14_DBGBVR2()			MRC14(0, c0, c2, 4)
608c2ecf20Sopenharmony_ci#define RCP14_DBGBVR3()			MRC14(0, c0, c3, 4)
618c2ecf20Sopenharmony_ci#define RCP14_DBGBVR4()			MRC14(0, c0, c4, 4)
628c2ecf20Sopenharmony_ci#define RCP14_DBGBVR5()			MRC14(0, c0, c5, 4)
638c2ecf20Sopenharmony_ci#define RCP14_DBGBVR6()			MRC14(0, c0, c6, 4)
648c2ecf20Sopenharmony_ci#define RCP14_DBGBVR7()			MRC14(0, c0, c7, 4)
658c2ecf20Sopenharmony_ci#define RCP14_DBGBVR8()			MRC14(0, c0, c8, 4)
668c2ecf20Sopenharmony_ci#define RCP14_DBGBVR9()			MRC14(0, c0, c9, 4)
678c2ecf20Sopenharmony_ci#define RCP14_DBGBVR10()		MRC14(0, c0, c10, 4)
688c2ecf20Sopenharmony_ci#define RCP14_DBGBVR11()		MRC14(0, c0, c11, 4)
698c2ecf20Sopenharmony_ci#define RCP14_DBGBVR12()		MRC14(0, c0, c12, 4)
708c2ecf20Sopenharmony_ci#define RCP14_DBGBVR13()		MRC14(0, c0, c13, 4)
718c2ecf20Sopenharmony_ci#define RCP14_DBGBVR14()		MRC14(0, c0, c14, 4)
728c2ecf20Sopenharmony_ci#define RCP14_DBGBVR15()		MRC14(0, c0, c15, 4)
738c2ecf20Sopenharmony_ci#define RCP14_DBGBCR0()			MRC14(0, c0, c0, 5)
748c2ecf20Sopenharmony_ci#define RCP14_DBGBCR1()			MRC14(0, c0, c1, 5)
758c2ecf20Sopenharmony_ci#define RCP14_DBGBCR2()			MRC14(0, c0, c2, 5)
768c2ecf20Sopenharmony_ci#define RCP14_DBGBCR3()			MRC14(0, c0, c3, 5)
778c2ecf20Sopenharmony_ci#define RCP14_DBGBCR4()			MRC14(0, c0, c4, 5)
788c2ecf20Sopenharmony_ci#define RCP14_DBGBCR5()			MRC14(0, c0, c5, 5)
798c2ecf20Sopenharmony_ci#define RCP14_DBGBCR6()			MRC14(0, c0, c6, 5)
808c2ecf20Sopenharmony_ci#define RCP14_DBGBCR7()			MRC14(0, c0, c7, 5)
818c2ecf20Sopenharmony_ci#define RCP14_DBGBCR8()			MRC14(0, c0, c8, 5)
828c2ecf20Sopenharmony_ci#define RCP14_DBGBCR9()			MRC14(0, c0, c9, 5)
838c2ecf20Sopenharmony_ci#define RCP14_DBGBCR10()		MRC14(0, c0, c10, 5)
848c2ecf20Sopenharmony_ci#define RCP14_DBGBCR11()		MRC14(0, c0, c11, 5)
858c2ecf20Sopenharmony_ci#define RCP14_DBGBCR12()		MRC14(0, c0, c12, 5)
868c2ecf20Sopenharmony_ci#define RCP14_DBGBCR13()		MRC14(0, c0, c13, 5)
878c2ecf20Sopenharmony_ci#define RCP14_DBGBCR14()		MRC14(0, c0, c14, 5)
888c2ecf20Sopenharmony_ci#define RCP14_DBGBCR15()		MRC14(0, c0, c15, 5)
898c2ecf20Sopenharmony_ci#define RCP14_DBGWVR0()			MRC14(0, c0, c0, 6)
908c2ecf20Sopenharmony_ci#define RCP14_DBGWVR1()			MRC14(0, c0, c1, 6)
918c2ecf20Sopenharmony_ci#define RCP14_DBGWVR2()			MRC14(0, c0, c2, 6)
928c2ecf20Sopenharmony_ci#define RCP14_DBGWVR3()			MRC14(0, c0, c3, 6)
938c2ecf20Sopenharmony_ci#define RCP14_DBGWVR4()			MRC14(0, c0, c4, 6)
948c2ecf20Sopenharmony_ci#define RCP14_DBGWVR5()			MRC14(0, c0, c5, 6)
958c2ecf20Sopenharmony_ci#define RCP14_DBGWVR6()			MRC14(0, c0, c6, 6)
968c2ecf20Sopenharmony_ci#define RCP14_DBGWVR7()			MRC14(0, c0, c7, 6)
978c2ecf20Sopenharmony_ci#define RCP14_DBGWVR8()			MRC14(0, c0, c8, 6)
988c2ecf20Sopenharmony_ci#define RCP14_DBGWVR9()			MRC14(0, c0, c9, 6)
998c2ecf20Sopenharmony_ci#define RCP14_DBGWVR10()		MRC14(0, c0, c10, 6)
1008c2ecf20Sopenharmony_ci#define RCP14_DBGWVR11()		MRC14(0, c0, c11, 6)
1018c2ecf20Sopenharmony_ci#define RCP14_DBGWVR12()		MRC14(0, c0, c12, 6)
1028c2ecf20Sopenharmony_ci#define RCP14_DBGWVR13()		MRC14(0, c0, c13, 6)
1038c2ecf20Sopenharmony_ci#define RCP14_DBGWVR14()		MRC14(0, c0, c14, 6)
1048c2ecf20Sopenharmony_ci#define RCP14_DBGWVR15()		MRC14(0, c0, c15, 6)
1058c2ecf20Sopenharmony_ci#define RCP14_DBGWCR0()			MRC14(0, c0, c0, 7)
1068c2ecf20Sopenharmony_ci#define RCP14_DBGWCR1()			MRC14(0, c0, c1, 7)
1078c2ecf20Sopenharmony_ci#define RCP14_DBGWCR2()			MRC14(0, c0, c2, 7)
1088c2ecf20Sopenharmony_ci#define RCP14_DBGWCR3()			MRC14(0, c0, c3, 7)
1098c2ecf20Sopenharmony_ci#define RCP14_DBGWCR4()			MRC14(0, c0, c4, 7)
1108c2ecf20Sopenharmony_ci#define RCP14_DBGWCR5()			MRC14(0, c0, c5, 7)
1118c2ecf20Sopenharmony_ci#define RCP14_DBGWCR6()			MRC14(0, c0, c6, 7)
1128c2ecf20Sopenharmony_ci#define RCP14_DBGWCR7()			MRC14(0, c0, c7, 7)
1138c2ecf20Sopenharmony_ci#define RCP14_DBGWCR8()			MRC14(0, c0, c8, 7)
1148c2ecf20Sopenharmony_ci#define RCP14_DBGWCR9()			MRC14(0, c0, c9, 7)
1158c2ecf20Sopenharmony_ci#define RCP14_DBGWCR10()		MRC14(0, c0, c10, 7)
1168c2ecf20Sopenharmony_ci#define RCP14_DBGWCR11()		MRC14(0, c0, c11, 7)
1178c2ecf20Sopenharmony_ci#define RCP14_DBGWCR12()		MRC14(0, c0, c12, 7)
1188c2ecf20Sopenharmony_ci#define RCP14_DBGWCR13()		MRC14(0, c0, c13, 7)
1198c2ecf20Sopenharmony_ci#define RCP14_DBGWCR14()		MRC14(0, c0, c14, 7)
1208c2ecf20Sopenharmony_ci#define RCP14_DBGWCR15()		MRC14(0, c0, c15, 7)
1218c2ecf20Sopenharmony_ci#define RCP14_DBGDRAR()			MRC14(0, c1, c0, 0)
1228c2ecf20Sopenharmony_ci#define RCP14_DBGBXVR0()		MRC14(0, c1, c0, 1)
1238c2ecf20Sopenharmony_ci#define RCP14_DBGBXVR1()		MRC14(0, c1, c1, 1)
1248c2ecf20Sopenharmony_ci#define RCP14_DBGBXVR2()		MRC14(0, c1, c2, 1)
1258c2ecf20Sopenharmony_ci#define RCP14_DBGBXVR3()		MRC14(0, c1, c3, 1)
1268c2ecf20Sopenharmony_ci#define RCP14_DBGBXVR4()		MRC14(0, c1, c4, 1)
1278c2ecf20Sopenharmony_ci#define RCP14_DBGBXVR5()		MRC14(0, c1, c5, 1)
1288c2ecf20Sopenharmony_ci#define RCP14_DBGBXVR6()		MRC14(0, c1, c6, 1)
1298c2ecf20Sopenharmony_ci#define RCP14_DBGBXVR7()		MRC14(0, c1, c7, 1)
1308c2ecf20Sopenharmony_ci#define RCP14_DBGBXVR8()		MRC14(0, c1, c8, 1)
1318c2ecf20Sopenharmony_ci#define RCP14_DBGBXVR9()		MRC14(0, c1, c9, 1)
1328c2ecf20Sopenharmony_ci#define RCP14_DBGBXVR10()		MRC14(0, c1, c10, 1)
1338c2ecf20Sopenharmony_ci#define RCP14_DBGBXVR11()		MRC14(0, c1, c11, 1)
1348c2ecf20Sopenharmony_ci#define RCP14_DBGBXVR12()		MRC14(0, c1, c12, 1)
1358c2ecf20Sopenharmony_ci#define RCP14_DBGBXVR13()		MRC14(0, c1, c13, 1)
1368c2ecf20Sopenharmony_ci#define RCP14_DBGBXVR14()		MRC14(0, c1, c14, 1)
1378c2ecf20Sopenharmony_ci#define RCP14_DBGBXVR15()		MRC14(0, c1, c15, 1)
1388c2ecf20Sopenharmony_ci#define RCP14_DBGOSLSR()		MRC14(0, c1, c1, 4)
1398c2ecf20Sopenharmony_ci#define RCP14_DBGOSSRR()		MRC14(0, c1, c2, 4)
1408c2ecf20Sopenharmony_ci#define RCP14_DBGOSDLR()		MRC14(0, c1, c3, 4)
1418c2ecf20Sopenharmony_ci#define RCP14_DBGPRCR()			MRC14(0, c1, c4, 4)
1428c2ecf20Sopenharmony_ci#define RCP14_DBGPRSR()			MRC14(0, c1, c5, 4)
1438c2ecf20Sopenharmony_ci#define RCP14_DBGDSAR()			MRC14(0, c2, c0, 0)
1448c2ecf20Sopenharmony_ci#define RCP14_DBGITCTRL()		MRC14(0, c7, c0, 4)
1458c2ecf20Sopenharmony_ci#define RCP14_DBGCLAIMSET()		MRC14(0, c7, c8, 6)
1468c2ecf20Sopenharmony_ci#define RCP14_DBGCLAIMCLR()		MRC14(0, c7, c9, 6)
1478c2ecf20Sopenharmony_ci#define RCP14_DBGAUTHSTATUS()		MRC14(0, c7, c14, 6)
1488c2ecf20Sopenharmony_ci#define RCP14_DBGDEVID2()		MRC14(0, c7, c0, 7)
1498c2ecf20Sopenharmony_ci#define RCP14_DBGDEVID1()		MRC14(0, c7, c1, 7)
1508c2ecf20Sopenharmony_ci#define RCP14_DBGDEVID()		MRC14(0, c7, c2, 7)
1518c2ecf20Sopenharmony_ci
1528c2ecf20Sopenharmony_ci#define WCP14_DBGDTRTXint(val)		MCR14(val, 0, c0, c5, 0)
1538c2ecf20Sopenharmony_ci#define WCP14_DBGWFAR(val)		MCR14(val, 0, c0, c6, 0)
1548c2ecf20Sopenharmony_ci#define WCP14_DBGVCR(val)		MCR14(val, 0, c0, c7, 0)
1558c2ecf20Sopenharmony_ci#define WCP14_DBGECR(val)		MCR14(val, 0, c0, c9, 0)
1568c2ecf20Sopenharmony_ci#define WCP14_DBGDSCCR(val)		MCR14(val, 0, c0, c10, 0)
1578c2ecf20Sopenharmony_ci#define WCP14_DBGDSMCR(val)		MCR14(val, 0, c0, c11, 0)
1588c2ecf20Sopenharmony_ci#define WCP14_DBGDTRRXext(val)		MCR14(val, 0, c0, c0, 2)
1598c2ecf20Sopenharmony_ci#define WCP14_DBGDSCRext(val)		MCR14(val, 0, c0, c2, 2)
1608c2ecf20Sopenharmony_ci#define WCP14_DBGDTRTXext(val)		MCR14(val, 0, c0, c3, 2)
1618c2ecf20Sopenharmony_ci#define WCP14_DBGDRCR(val)		MCR14(val, 0, c0, c4, 2)
1628c2ecf20Sopenharmony_ci#define WCP14_DBGBVR0(val)		MCR14(val, 0, c0, c0, 4)
1638c2ecf20Sopenharmony_ci#define WCP14_DBGBVR1(val)		MCR14(val, 0, c0, c1, 4)
1648c2ecf20Sopenharmony_ci#define WCP14_DBGBVR2(val)		MCR14(val, 0, c0, c2, 4)
1658c2ecf20Sopenharmony_ci#define WCP14_DBGBVR3(val)		MCR14(val, 0, c0, c3, 4)
1668c2ecf20Sopenharmony_ci#define WCP14_DBGBVR4(val)		MCR14(val, 0, c0, c4, 4)
1678c2ecf20Sopenharmony_ci#define WCP14_DBGBVR5(val)		MCR14(val, 0, c0, c5, 4)
1688c2ecf20Sopenharmony_ci#define WCP14_DBGBVR6(val)		MCR14(val, 0, c0, c6, 4)
1698c2ecf20Sopenharmony_ci#define WCP14_DBGBVR7(val)		MCR14(val, 0, c0, c7, 4)
1708c2ecf20Sopenharmony_ci#define WCP14_DBGBVR8(val)		MCR14(val, 0, c0, c8, 4)
1718c2ecf20Sopenharmony_ci#define WCP14_DBGBVR9(val)		MCR14(val, 0, c0, c9, 4)
1728c2ecf20Sopenharmony_ci#define WCP14_DBGBVR10(val)		MCR14(val, 0, c0, c10, 4)
1738c2ecf20Sopenharmony_ci#define WCP14_DBGBVR11(val)		MCR14(val, 0, c0, c11, 4)
1748c2ecf20Sopenharmony_ci#define WCP14_DBGBVR12(val)		MCR14(val, 0, c0, c12, 4)
1758c2ecf20Sopenharmony_ci#define WCP14_DBGBVR13(val)		MCR14(val, 0, c0, c13, 4)
1768c2ecf20Sopenharmony_ci#define WCP14_DBGBVR14(val)		MCR14(val, 0, c0, c14, 4)
1778c2ecf20Sopenharmony_ci#define WCP14_DBGBVR15(val)		MCR14(val, 0, c0, c15, 4)
1788c2ecf20Sopenharmony_ci#define WCP14_DBGBCR0(val)		MCR14(val, 0, c0, c0, 5)
1798c2ecf20Sopenharmony_ci#define WCP14_DBGBCR1(val)		MCR14(val, 0, c0, c1, 5)
1808c2ecf20Sopenharmony_ci#define WCP14_DBGBCR2(val)		MCR14(val, 0, c0, c2, 5)
1818c2ecf20Sopenharmony_ci#define WCP14_DBGBCR3(val)		MCR14(val, 0, c0, c3, 5)
1828c2ecf20Sopenharmony_ci#define WCP14_DBGBCR4(val)		MCR14(val, 0, c0, c4, 5)
1838c2ecf20Sopenharmony_ci#define WCP14_DBGBCR5(val)		MCR14(val, 0, c0, c5, 5)
1848c2ecf20Sopenharmony_ci#define WCP14_DBGBCR6(val)		MCR14(val, 0, c0, c6, 5)
1858c2ecf20Sopenharmony_ci#define WCP14_DBGBCR7(val)		MCR14(val, 0, c0, c7, 5)
1868c2ecf20Sopenharmony_ci#define WCP14_DBGBCR8(val)		MCR14(val, 0, c0, c8, 5)
1878c2ecf20Sopenharmony_ci#define WCP14_DBGBCR9(val)		MCR14(val, 0, c0, c9, 5)
1888c2ecf20Sopenharmony_ci#define WCP14_DBGBCR10(val)		MCR14(val, 0, c0, c10, 5)
1898c2ecf20Sopenharmony_ci#define WCP14_DBGBCR11(val)		MCR14(val, 0, c0, c11, 5)
1908c2ecf20Sopenharmony_ci#define WCP14_DBGBCR12(val)		MCR14(val, 0, c0, c12, 5)
1918c2ecf20Sopenharmony_ci#define WCP14_DBGBCR13(val)		MCR14(val, 0, c0, c13, 5)
1928c2ecf20Sopenharmony_ci#define WCP14_DBGBCR14(val)		MCR14(val, 0, c0, c14, 5)
1938c2ecf20Sopenharmony_ci#define WCP14_DBGBCR15(val)		MCR14(val, 0, c0, c15, 5)
1948c2ecf20Sopenharmony_ci#define WCP14_DBGWVR0(val)		MCR14(val, 0, c0, c0, 6)
1958c2ecf20Sopenharmony_ci#define WCP14_DBGWVR1(val)		MCR14(val, 0, c0, c1, 6)
1968c2ecf20Sopenharmony_ci#define WCP14_DBGWVR2(val)		MCR14(val, 0, c0, c2, 6)
1978c2ecf20Sopenharmony_ci#define WCP14_DBGWVR3(val)		MCR14(val, 0, c0, c3, 6)
1988c2ecf20Sopenharmony_ci#define WCP14_DBGWVR4(val)		MCR14(val, 0, c0, c4, 6)
1998c2ecf20Sopenharmony_ci#define WCP14_DBGWVR5(val)		MCR14(val, 0, c0, c5, 6)
2008c2ecf20Sopenharmony_ci#define WCP14_DBGWVR6(val)		MCR14(val, 0, c0, c6, 6)
2018c2ecf20Sopenharmony_ci#define WCP14_DBGWVR7(val)		MCR14(val, 0, c0, c7, 6)
2028c2ecf20Sopenharmony_ci#define WCP14_DBGWVR8(val)		MCR14(val, 0, c0, c8, 6)
2038c2ecf20Sopenharmony_ci#define WCP14_DBGWVR9(val)		MCR14(val, 0, c0, c9, 6)
2048c2ecf20Sopenharmony_ci#define WCP14_DBGWVR10(val)		MCR14(val, 0, c0, c10, 6)
2058c2ecf20Sopenharmony_ci#define WCP14_DBGWVR11(val)		MCR14(val, 0, c0, c11, 6)
2068c2ecf20Sopenharmony_ci#define WCP14_DBGWVR12(val)		MCR14(val, 0, c0, c12, 6)
2078c2ecf20Sopenharmony_ci#define WCP14_DBGWVR13(val)		MCR14(val, 0, c0, c13, 6)
2088c2ecf20Sopenharmony_ci#define WCP14_DBGWVR14(val)		MCR14(val, 0, c0, c14, 6)
2098c2ecf20Sopenharmony_ci#define WCP14_DBGWVR15(val)		MCR14(val, 0, c0, c15, 6)
2108c2ecf20Sopenharmony_ci#define WCP14_DBGWCR0(val)		MCR14(val, 0, c0, c0, 7)
2118c2ecf20Sopenharmony_ci#define WCP14_DBGWCR1(val)		MCR14(val, 0, c0, c1, 7)
2128c2ecf20Sopenharmony_ci#define WCP14_DBGWCR2(val)		MCR14(val, 0, c0, c2, 7)
2138c2ecf20Sopenharmony_ci#define WCP14_DBGWCR3(val)		MCR14(val, 0, c0, c3, 7)
2148c2ecf20Sopenharmony_ci#define WCP14_DBGWCR4(val)		MCR14(val, 0, c0, c4, 7)
2158c2ecf20Sopenharmony_ci#define WCP14_DBGWCR5(val)		MCR14(val, 0, c0, c5, 7)
2168c2ecf20Sopenharmony_ci#define WCP14_DBGWCR6(val)		MCR14(val, 0, c0, c6, 7)
2178c2ecf20Sopenharmony_ci#define WCP14_DBGWCR7(val)		MCR14(val, 0, c0, c7, 7)
2188c2ecf20Sopenharmony_ci#define WCP14_DBGWCR8(val)		MCR14(val, 0, c0, c8, 7)
2198c2ecf20Sopenharmony_ci#define WCP14_DBGWCR9(val)		MCR14(val, 0, c0, c9, 7)
2208c2ecf20Sopenharmony_ci#define WCP14_DBGWCR10(val)		MCR14(val, 0, c0, c10, 7)
2218c2ecf20Sopenharmony_ci#define WCP14_DBGWCR11(val)		MCR14(val, 0, c0, c11, 7)
2228c2ecf20Sopenharmony_ci#define WCP14_DBGWCR12(val)		MCR14(val, 0, c0, c12, 7)
2238c2ecf20Sopenharmony_ci#define WCP14_DBGWCR13(val)		MCR14(val, 0, c0, c13, 7)
2248c2ecf20Sopenharmony_ci#define WCP14_DBGWCR14(val)		MCR14(val, 0, c0, c14, 7)
2258c2ecf20Sopenharmony_ci#define WCP14_DBGWCR15(val)		MCR14(val, 0, c0, c15, 7)
2268c2ecf20Sopenharmony_ci#define WCP14_DBGBXVR0(val)		MCR14(val, 0, c1, c0, 1)
2278c2ecf20Sopenharmony_ci#define WCP14_DBGBXVR1(val)		MCR14(val, 0, c1, c1, 1)
2288c2ecf20Sopenharmony_ci#define WCP14_DBGBXVR2(val)		MCR14(val, 0, c1, c2, 1)
2298c2ecf20Sopenharmony_ci#define WCP14_DBGBXVR3(val)		MCR14(val, 0, c1, c3, 1)
2308c2ecf20Sopenharmony_ci#define WCP14_DBGBXVR4(val)		MCR14(val, 0, c1, c4, 1)
2318c2ecf20Sopenharmony_ci#define WCP14_DBGBXVR5(val)		MCR14(val, 0, c1, c5, 1)
2328c2ecf20Sopenharmony_ci#define WCP14_DBGBXVR6(val)		MCR14(val, 0, c1, c6, 1)
2338c2ecf20Sopenharmony_ci#define WCP14_DBGBXVR7(val)		MCR14(val, 0, c1, c7, 1)
2348c2ecf20Sopenharmony_ci#define WCP14_DBGBXVR8(val)		MCR14(val, 0, c1, c8, 1)
2358c2ecf20Sopenharmony_ci#define WCP14_DBGBXVR9(val)		MCR14(val, 0, c1, c9, 1)
2368c2ecf20Sopenharmony_ci#define WCP14_DBGBXVR10(val)		MCR14(val, 0, c1, c10, 1)
2378c2ecf20Sopenharmony_ci#define WCP14_DBGBXVR11(val)		MCR14(val, 0, c1, c11, 1)
2388c2ecf20Sopenharmony_ci#define WCP14_DBGBXVR12(val)		MCR14(val, 0, c1, c12, 1)
2398c2ecf20Sopenharmony_ci#define WCP14_DBGBXVR13(val)		MCR14(val, 0, c1, c13, 1)
2408c2ecf20Sopenharmony_ci#define WCP14_DBGBXVR14(val)		MCR14(val, 0, c1, c14, 1)
2418c2ecf20Sopenharmony_ci#define WCP14_DBGBXVR15(val)		MCR14(val, 0, c1, c15, 1)
2428c2ecf20Sopenharmony_ci#define WCP14_DBGOSLAR(val)		MCR14(val, 0, c1, c0, 4)
2438c2ecf20Sopenharmony_ci#define WCP14_DBGOSSRR(val)		MCR14(val, 0, c1, c2, 4)
2448c2ecf20Sopenharmony_ci#define WCP14_DBGOSDLR(val)		MCR14(val, 0, c1, c3, 4)
2458c2ecf20Sopenharmony_ci#define WCP14_DBGPRCR(val)		MCR14(val, 0, c1, c4, 4)
2468c2ecf20Sopenharmony_ci#define WCP14_DBGITCTRL(val)		MCR14(val, 0, c7, c0, 4)
2478c2ecf20Sopenharmony_ci#define WCP14_DBGCLAIMSET(val)		MCR14(val, 0, c7, c8, 6)
2488c2ecf20Sopenharmony_ci#define WCP14_DBGCLAIMCLR(val)		MCR14(val, 0, c7, c9, 6)
2498c2ecf20Sopenharmony_ci
2508c2ecf20Sopenharmony_ci/*
2518c2ecf20Sopenharmony_ci * ETM Registers
2528c2ecf20Sopenharmony_ci *
2538c2ecf20Sopenharmony_ci * Available only in ETMv3.3, 3.4, 3.5
2548c2ecf20Sopenharmony_ci * ETMASICCR, ETMTECR2, ETMFFRR, ETMVDEVR, ETMVDCR1, ETMVDCR2, ETMVDCR3,
2558c2ecf20Sopenharmony_ci * ETMDCVRn, ETMDCMRn
2568c2ecf20Sopenharmony_ci *
2578c2ecf20Sopenharmony_ci * Available only in ETMv3.5 as read only
2588c2ecf20Sopenharmony_ci * ETMIDR2
2598c2ecf20Sopenharmony_ci *
2608c2ecf20Sopenharmony_ci * Available only in ETMv3.5, PFTv1.0, 1.1
2618c2ecf20Sopenharmony_ci * ETMTSEVR, ETMVMIDCVR, ETMPDCR
2628c2ecf20Sopenharmony_ci *
2638c2ecf20Sopenharmony_ci * Read only
2648c2ecf20Sopenharmony_ci * ETMCCR, ETMSCR, ETMIDR, ETMCCER, ETMOSLSR
2658c2ecf20Sopenharmony_ci * ETMLSR, ETMAUTHSTATUS, ETMDEVID, ETMDEVTYPE, ETMPIDR4, ETMPIDR5, ETMPIDR6,
2668c2ecf20Sopenharmony_ci * ETMPIDR7, ETMPIDR0, ETMPIDR1, ETMPIDR2, ETMPIDR2, ETMPIDR3, ETMCIDR0,
2678c2ecf20Sopenharmony_ci * ETMCIDR1, ETMCIDR2, ETMCIDR3
2688c2ecf20Sopenharmony_ci *
2698c2ecf20Sopenharmony_ci * Write only
2708c2ecf20Sopenharmony_ci * ETMOSLAR, ETMLAR
2718c2ecf20Sopenharmony_ci * Note: ETMCCER[11] controls WO nature of certain regs. Refer ETM arch spec.
2728c2ecf20Sopenharmony_ci */
2738c2ecf20Sopenharmony_ci#define RCP14_ETMCR()			MRC14(1, c0, c0, 0)
2748c2ecf20Sopenharmony_ci#define RCP14_ETMCCR()			MRC14(1, c0, c1, 0)
2758c2ecf20Sopenharmony_ci#define RCP14_ETMTRIGGER()		MRC14(1, c0, c2, 0)
2768c2ecf20Sopenharmony_ci#define RCP14_ETMASICCR()		MRC14(1, c0, c3, 0)
2778c2ecf20Sopenharmony_ci#define RCP14_ETMSR()			MRC14(1, c0, c4, 0)
2788c2ecf20Sopenharmony_ci#define RCP14_ETMSCR()			MRC14(1, c0, c5, 0)
2798c2ecf20Sopenharmony_ci#define RCP14_ETMTSSCR()		MRC14(1, c0, c6, 0)
2808c2ecf20Sopenharmony_ci#define RCP14_ETMTECR2()		MRC14(1, c0, c7, 0)
2818c2ecf20Sopenharmony_ci#define RCP14_ETMTEEVR()		MRC14(1, c0, c8, 0)
2828c2ecf20Sopenharmony_ci#define RCP14_ETMTECR1()		MRC14(1, c0, c9, 0)
2838c2ecf20Sopenharmony_ci#define RCP14_ETMFFRR()			MRC14(1, c0, c10, 0)
2848c2ecf20Sopenharmony_ci#define RCP14_ETMFFLR()			MRC14(1, c0, c11, 0)
2858c2ecf20Sopenharmony_ci#define RCP14_ETMVDEVR()		MRC14(1, c0, c12, 0)
2868c2ecf20Sopenharmony_ci#define RCP14_ETMVDCR1()		MRC14(1, c0, c13, 0)
2878c2ecf20Sopenharmony_ci#define RCP14_ETMVDCR2()		MRC14(1, c0, c14, 0)
2888c2ecf20Sopenharmony_ci#define RCP14_ETMVDCR3()		MRC14(1, c0, c15, 0)
2898c2ecf20Sopenharmony_ci#define RCP14_ETMACVR0()		MRC14(1, c0, c0, 1)
2908c2ecf20Sopenharmony_ci#define RCP14_ETMACVR1()		MRC14(1, c0, c1, 1)
2918c2ecf20Sopenharmony_ci#define RCP14_ETMACVR2()		MRC14(1, c0, c2, 1)
2928c2ecf20Sopenharmony_ci#define RCP14_ETMACVR3()		MRC14(1, c0, c3, 1)
2938c2ecf20Sopenharmony_ci#define RCP14_ETMACVR4()		MRC14(1, c0, c4, 1)
2948c2ecf20Sopenharmony_ci#define RCP14_ETMACVR5()		MRC14(1, c0, c5, 1)
2958c2ecf20Sopenharmony_ci#define RCP14_ETMACVR6()		MRC14(1, c0, c6, 1)
2968c2ecf20Sopenharmony_ci#define RCP14_ETMACVR7()		MRC14(1, c0, c7, 1)
2978c2ecf20Sopenharmony_ci#define RCP14_ETMACVR8()		MRC14(1, c0, c8, 1)
2988c2ecf20Sopenharmony_ci#define RCP14_ETMACVR9()		MRC14(1, c0, c9, 1)
2998c2ecf20Sopenharmony_ci#define RCP14_ETMACVR10()		MRC14(1, c0, c10, 1)
3008c2ecf20Sopenharmony_ci#define RCP14_ETMACVR11()		MRC14(1, c0, c11, 1)
3018c2ecf20Sopenharmony_ci#define RCP14_ETMACVR12()		MRC14(1, c0, c12, 1)
3028c2ecf20Sopenharmony_ci#define RCP14_ETMACVR13()		MRC14(1, c0, c13, 1)
3038c2ecf20Sopenharmony_ci#define RCP14_ETMACVR14()		MRC14(1, c0, c14, 1)
3048c2ecf20Sopenharmony_ci#define RCP14_ETMACVR15()		MRC14(1, c0, c15, 1)
3058c2ecf20Sopenharmony_ci#define RCP14_ETMACTR0()		MRC14(1, c0, c0, 2)
3068c2ecf20Sopenharmony_ci#define RCP14_ETMACTR1()		MRC14(1, c0, c1, 2)
3078c2ecf20Sopenharmony_ci#define RCP14_ETMACTR2()		MRC14(1, c0, c2, 2)
3088c2ecf20Sopenharmony_ci#define RCP14_ETMACTR3()		MRC14(1, c0, c3, 2)
3098c2ecf20Sopenharmony_ci#define RCP14_ETMACTR4()		MRC14(1, c0, c4, 2)
3108c2ecf20Sopenharmony_ci#define RCP14_ETMACTR5()		MRC14(1, c0, c5, 2)
3118c2ecf20Sopenharmony_ci#define RCP14_ETMACTR6()		MRC14(1, c0, c6, 2)
3128c2ecf20Sopenharmony_ci#define RCP14_ETMACTR7()		MRC14(1, c0, c7, 2)
3138c2ecf20Sopenharmony_ci#define RCP14_ETMACTR8()		MRC14(1, c0, c8, 2)
3148c2ecf20Sopenharmony_ci#define RCP14_ETMACTR9()		MRC14(1, c0, c9, 2)
3158c2ecf20Sopenharmony_ci#define RCP14_ETMACTR10()		MRC14(1, c0, c10, 2)
3168c2ecf20Sopenharmony_ci#define RCP14_ETMACTR11()		MRC14(1, c0, c11, 2)
3178c2ecf20Sopenharmony_ci#define RCP14_ETMACTR12()		MRC14(1, c0, c12, 2)
3188c2ecf20Sopenharmony_ci#define RCP14_ETMACTR13()		MRC14(1, c0, c13, 2)
3198c2ecf20Sopenharmony_ci#define RCP14_ETMACTR14()		MRC14(1, c0, c14, 2)
3208c2ecf20Sopenharmony_ci#define RCP14_ETMACTR15()		MRC14(1, c0, c15, 2)
3218c2ecf20Sopenharmony_ci#define RCP14_ETMDCVR0()		MRC14(1, c0, c0, 3)
3228c2ecf20Sopenharmony_ci#define RCP14_ETMDCVR2()		MRC14(1, c0, c2, 3)
3238c2ecf20Sopenharmony_ci#define RCP14_ETMDCVR4()		MRC14(1, c0, c4, 3)
3248c2ecf20Sopenharmony_ci#define RCP14_ETMDCVR6()		MRC14(1, c0, c6, 3)
3258c2ecf20Sopenharmony_ci#define RCP14_ETMDCVR8()		MRC14(1, c0, c8, 3)
3268c2ecf20Sopenharmony_ci#define RCP14_ETMDCVR10()		MRC14(1, c0, c10, 3)
3278c2ecf20Sopenharmony_ci#define RCP14_ETMDCVR12()		MRC14(1, c0, c12, 3)
3288c2ecf20Sopenharmony_ci#define RCP14_ETMDCVR14()		MRC14(1, c0, c14, 3)
3298c2ecf20Sopenharmony_ci#define RCP14_ETMDCMR0()		MRC14(1, c0, c0, 4)
3308c2ecf20Sopenharmony_ci#define RCP14_ETMDCMR2()		MRC14(1, c0, c2, 4)
3318c2ecf20Sopenharmony_ci#define RCP14_ETMDCMR4()		MRC14(1, c0, c4, 4)
3328c2ecf20Sopenharmony_ci#define RCP14_ETMDCMR6()		MRC14(1, c0, c6, 4)
3338c2ecf20Sopenharmony_ci#define RCP14_ETMDCMR8()		MRC14(1, c0, c8, 4)
3348c2ecf20Sopenharmony_ci#define RCP14_ETMDCMR10()		MRC14(1, c0, c10, 4)
3358c2ecf20Sopenharmony_ci#define RCP14_ETMDCMR12()		MRC14(1, c0, c12, 4)
3368c2ecf20Sopenharmony_ci#define RCP14_ETMDCMR14()		MRC14(1, c0, c14, 4)
3378c2ecf20Sopenharmony_ci#define RCP14_ETMCNTRLDVR0()		MRC14(1, c0, c0, 5)
3388c2ecf20Sopenharmony_ci#define RCP14_ETMCNTRLDVR1()		MRC14(1, c0, c1, 5)
3398c2ecf20Sopenharmony_ci#define RCP14_ETMCNTRLDVR2()		MRC14(1, c0, c2, 5)
3408c2ecf20Sopenharmony_ci#define RCP14_ETMCNTRLDVR3()		MRC14(1, c0, c3, 5)
3418c2ecf20Sopenharmony_ci#define RCP14_ETMCNTENR0()		MRC14(1, c0, c4, 5)
3428c2ecf20Sopenharmony_ci#define RCP14_ETMCNTENR1()		MRC14(1, c0, c5, 5)
3438c2ecf20Sopenharmony_ci#define RCP14_ETMCNTENR2()		MRC14(1, c0, c6, 5)
3448c2ecf20Sopenharmony_ci#define RCP14_ETMCNTENR3()		MRC14(1, c0, c7, 5)
3458c2ecf20Sopenharmony_ci#define RCP14_ETMCNTRLDEVR0()		MRC14(1, c0, c8, 5)
3468c2ecf20Sopenharmony_ci#define RCP14_ETMCNTRLDEVR1()		MRC14(1, c0, c9, 5)
3478c2ecf20Sopenharmony_ci#define RCP14_ETMCNTRLDEVR2()		MRC14(1, c0, c10, 5)
3488c2ecf20Sopenharmony_ci#define RCP14_ETMCNTRLDEVR3()		MRC14(1, c0, c11, 5)
3498c2ecf20Sopenharmony_ci#define RCP14_ETMCNTVR0()		MRC14(1, c0, c12, 5)
3508c2ecf20Sopenharmony_ci#define RCP14_ETMCNTVR1()		MRC14(1, c0, c13, 5)
3518c2ecf20Sopenharmony_ci#define RCP14_ETMCNTVR2()		MRC14(1, c0, c14, 5)
3528c2ecf20Sopenharmony_ci#define RCP14_ETMCNTVR3()		MRC14(1, c0, c15, 5)
3538c2ecf20Sopenharmony_ci#define RCP14_ETMSQ12EVR()		MRC14(1, c0, c0, 6)
3548c2ecf20Sopenharmony_ci#define RCP14_ETMSQ21EVR()		MRC14(1, c0, c1, 6)
3558c2ecf20Sopenharmony_ci#define RCP14_ETMSQ23EVR()		MRC14(1, c0, c2, 6)
3568c2ecf20Sopenharmony_ci#define RCP14_ETMSQ31EVR()		MRC14(1, c0, c3, 6)
3578c2ecf20Sopenharmony_ci#define RCP14_ETMSQ32EVR()		MRC14(1, c0, c4, 6)
3588c2ecf20Sopenharmony_ci#define RCP14_ETMSQ13EVR()		MRC14(1, c0, c5, 6)
3598c2ecf20Sopenharmony_ci#define RCP14_ETMSQR()			MRC14(1, c0, c7, 6)
3608c2ecf20Sopenharmony_ci#define RCP14_ETMEXTOUTEVR0()		MRC14(1, c0, c8, 6)
3618c2ecf20Sopenharmony_ci#define RCP14_ETMEXTOUTEVR1()		MRC14(1, c0, c9, 6)
3628c2ecf20Sopenharmony_ci#define RCP14_ETMEXTOUTEVR2()		MRC14(1, c0, c10, 6)
3638c2ecf20Sopenharmony_ci#define RCP14_ETMEXTOUTEVR3()		MRC14(1, c0, c11, 6)
3648c2ecf20Sopenharmony_ci#define RCP14_ETMCIDCVR0()		MRC14(1, c0, c12, 6)
3658c2ecf20Sopenharmony_ci#define RCP14_ETMCIDCVR1()		MRC14(1, c0, c13, 6)
3668c2ecf20Sopenharmony_ci#define RCP14_ETMCIDCVR2()		MRC14(1, c0, c14, 6)
3678c2ecf20Sopenharmony_ci#define RCP14_ETMCIDCMR()		MRC14(1, c0, c15, 6)
3688c2ecf20Sopenharmony_ci#define RCP14_ETMIMPSPEC0()		MRC14(1, c0, c0, 7)
3698c2ecf20Sopenharmony_ci#define RCP14_ETMIMPSPEC1()		MRC14(1, c0, c1, 7)
3708c2ecf20Sopenharmony_ci#define RCP14_ETMIMPSPEC2()		MRC14(1, c0, c2, 7)
3718c2ecf20Sopenharmony_ci#define RCP14_ETMIMPSPEC3()		MRC14(1, c0, c3, 7)
3728c2ecf20Sopenharmony_ci#define RCP14_ETMIMPSPEC4()		MRC14(1, c0, c4, 7)
3738c2ecf20Sopenharmony_ci#define RCP14_ETMIMPSPEC5()		MRC14(1, c0, c5, 7)
3748c2ecf20Sopenharmony_ci#define RCP14_ETMIMPSPEC6()		MRC14(1, c0, c6, 7)
3758c2ecf20Sopenharmony_ci#define RCP14_ETMIMPSPEC7()		MRC14(1, c0, c7, 7)
3768c2ecf20Sopenharmony_ci#define RCP14_ETMSYNCFR()		MRC14(1, c0, c8, 7)
3778c2ecf20Sopenharmony_ci#define RCP14_ETMIDR()			MRC14(1, c0, c9, 7)
3788c2ecf20Sopenharmony_ci#define RCP14_ETMCCER()			MRC14(1, c0, c10, 7)
3798c2ecf20Sopenharmony_ci#define RCP14_ETMEXTINSELR()		MRC14(1, c0, c11, 7)
3808c2ecf20Sopenharmony_ci#define RCP14_ETMTESSEICR()		MRC14(1, c0, c12, 7)
3818c2ecf20Sopenharmony_ci#define RCP14_ETMEIBCR()		MRC14(1, c0, c13, 7)
3828c2ecf20Sopenharmony_ci#define RCP14_ETMTSEVR()		MRC14(1, c0, c14, 7)
3838c2ecf20Sopenharmony_ci#define RCP14_ETMAUXCR()		MRC14(1, c0, c15, 7)
3848c2ecf20Sopenharmony_ci#define RCP14_ETMTRACEIDR()		MRC14(1, c1, c0, 0)
3858c2ecf20Sopenharmony_ci#define RCP14_ETMIDR2()			MRC14(1, c1, c2, 0)
3868c2ecf20Sopenharmony_ci#define RCP14_ETMVMIDCVR()		MRC14(1, c1, c0, 1)
3878c2ecf20Sopenharmony_ci#define RCP14_ETMOSLSR()		MRC14(1, c1, c1, 4)
3888c2ecf20Sopenharmony_ci/* Not available in PFTv1.1 */
3898c2ecf20Sopenharmony_ci#define RCP14_ETMOSSRR()		MRC14(1, c1, c2, 4)
3908c2ecf20Sopenharmony_ci#define RCP14_ETMPDCR()			MRC14(1, c1, c4, 4)
3918c2ecf20Sopenharmony_ci#define RCP14_ETMPDSR()			MRC14(1, c1, c5, 4)
3928c2ecf20Sopenharmony_ci#define RCP14_ETMITCTRL()		MRC14(1, c7, c0, 4)
3938c2ecf20Sopenharmony_ci#define RCP14_ETMCLAIMSET()		MRC14(1, c7, c8, 6)
3948c2ecf20Sopenharmony_ci#define RCP14_ETMCLAIMCLR()		MRC14(1, c7, c9, 6)
3958c2ecf20Sopenharmony_ci#define RCP14_ETMLSR()			MRC14(1, c7, c13, 6)
3968c2ecf20Sopenharmony_ci#define RCP14_ETMAUTHSTATUS()		MRC14(1, c7, c14, 6)
3978c2ecf20Sopenharmony_ci#define RCP14_ETMDEVID()		MRC14(1, c7, c2, 7)
3988c2ecf20Sopenharmony_ci#define RCP14_ETMDEVTYPE()		MRC14(1, c7, c3, 7)
3998c2ecf20Sopenharmony_ci#define RCP14_ETMPIDR4()		MRC14(1, c7, c4, 7)
4008c2ecf20Sopenharmony_ci#define RCP14_ETMPIDR5()		MRC14(1, c7, c5, 7)
4018c2ecf20Sopenharmony_ci#define RCP14_ETMPIDR6()		MRC14(1, c7, c6, 7)
4028c2ecf20Sopenharmony_ci#define RCP14_ETMPIDR7()		MRC14(1, c7, c7, 7)
4038c2ecf20Sopenharmony_ci#define RCP14_ETMPIDR0()		MRC14(1, c7, c8, 7)
4048c2ecf20Sopenharmony_ci#define RCP14_ETMPIDR1()		MRC14(1, c7, c9, 7)
4058c2ecf20Sopenharmony_ci#define RCP14_ETMPIDR2()		MRC14(1, c7, c10, 7)
4068c2ecf20Sopenharmony_ci#define RCP14_ETMPIDR3()		MRC14(1, c7, c11, 7)
4078c2ecf20Sopenharmony_ci#define RCP14_ETMCIDR0()		MRC14(1, c7, c12, 7)
4088c2ecf20Sopenharmony_ci#define RCP14_ETMCIDR1()		MRC14(1, c7, c13, 7)
4098c2ecf20Sopenharmony_ci#define RCP14_ETMCIDR2()		MRC14(1, c7, c14, 7)
4108c2ecf20Sopenharmony_ci#define RCP14_ETMCIDR3()		MRC14(1, c7, c15, 7)
4118c2ecf20Sopenharmony_ci
4128c2ecf20Sopenharmony_ci#define WCP14_ETMCR(val)		MCR14(val, 1, c0, c0, 0)
4138c2ecf20Sopenharmony_ci#define WCP14_ETMTRIGGER(val)		MCR14(val, 1, c0, c2, 0)
4148c2ecf20Sopenharmony_ci#define WCP14_ETMASICCR(val)		MCR14(val, 1, c0, c3, 0)
4158c2ecf20Sopenharmony_ci#define WCP14_ETMSR(val)		MCR14(val, 1, c0, c4, 0)
4168c2ecf20Sopenharmony_ci#define WCP14_ETMTSSCR(val)		MCR14(val, 1, c0, c6, 0)
4178c2ecf20Sopenharmony_ci#define WCP14_ETMTECR2(val)		MCR14(val, 1, c0, c7, 0)
4188c2ecf20Sopenharmony_ci#define WCP14_ETMTEEVR(val)		MCR14(val, 1, c0, c8, 0)
4198c2ecf20Sopenharmony_ci#define WCP14_ETMTECR1(val)		MCR14(val, 1, c0, c9, 0)
4208c2ecf20Sopenharmony_ci#define WCP14_ETMFFRR(val)		MCR14(val, 1, c0, c10, 0)
4218c2ecf20Sopenharmony_ci#define WCP14_ETMFFLR(val)		MCR14(val, 1, c0, c11, 0)
4228c2ecf20Sopenharmony_ci#define WCP14_ETMVDEVR(val)		MCR14(val, 1, c0, c12, 0)
4238c2ecf20Sopenharmony_ci#define WCP14_ETMVDCR1(val)		MCR14(val, 1, c0, c13, 0)
4248c2ecf20Sopenharmony_ci#define WCP14_ETMVDCR2(val)		MCR14(val, 1, c0, c14, 0)
4258c2ecf20Sopenharmony_ci#define WCP14_ETMVDCR3(val)		MCR14(val, 1, c0, c15, 0)
4268c2ecf20Sopenharmony_ci#define WCP14_ETMACVR0(val)		MCR14(val, 1, c0, c0, 1)
4278c2ecf20Sopenharmony_ci#define WCP14_ETMACVR1(val)		MCR14(val, 1, c0, c1, 1)
4288c2ecf20Sopenharmony_ci#define WCP14_ETMACVR2(val)		MCR14(val, 1, c0, c2, 1)
4298c2ecf20Sopenharmony_ci#define WCP14_ETMACVR3(val)		MCR14(val, 1, c0, c3, 1)
4308c2ecf20Sopenharmony_ci#define WCP14_ETMACVR4(val)		MCR14(val, 1, c0, c4, 1)
4318c2ecf20Sopenharmony_ci#define WCP14_ETMACVR5(val)		MCR14(val, 1, c0, c5, 1)
4328c2ecf20Sopenharmony_ci#define WCP14_ETMACVR6(val)		MCR14(val, 1, c0, c6, 1)
4338c2ecf20Sopenharmony_ci#define WCP14_ETMACVR7(val)		MCR14(val, 1, c0, c7, 1)
4348c2ecf20Sopenharmony_ci#define WCP14_ETMACVR8(val)		MCR14(val, 1, c0, c8, 1)
4358c2ecf20Sopenharmony_ci#define WCP14_ETMACVR9(val)		MCR14(val, 1, c0, c9, 1)
4368c2ecf20Sopenharmony_ci#define WCP14_ETMACVR10(val)		MCR14(val, 1, c0, c10, 1)
4378c2ecf20Sopenharmony_ci#define WCP14_ETMACVR11(val)		MCR14(val, 1, c0, c11, 1)
4388c2ecf20Sopenharmony_ci#define WCP14_ETMACVR12(val)		MCR14(val, 1, c0, c12, 1)
4398c2ecf20Sopenharmony_ci#define WCP14_ETMACVR13(val)		MCR14(val, 1, c0, c13, 1)
4408c2ecf20Sopenharmony_ci#define WCP14_ETMACVR14(val)		MCR14(val, 1, c0, c14, 1)
4418c2ecf20Sopenharmony_ci#define WCP14_ETMACVR15(val)		MCR14(val, 1, c0, c15, 1)
4428c2ecf20Sopenharmony_ci#define WCP14_ETMACTR0(val)		MCR14(val, 1, c0, c0, 2)
4438c2ecf20Sopenharmony_ci#define WCP14_ETMACTR1(val)		MCR14(val, 1, c0, c1, 2)
4448c2ecf20Sopenharmony_ci#define WCP14_ETMACTR2(val)		MCR14(val, 1, c0, c2, 2)
4458c2ecf20Sopenharmony_ci#define WCP14_ETMACTR3(val)		MCR14(val, 1, c0, c3, 2)
4468c2ecf20Sopenharmony_ci#define WCP14_ETMACTR4(val)		MCR14(val, 1, c0, c4, 2)
4478c2ecf20Sopenharmony_ci#define WCP14_ETMACTR5(val)		MCR14(val, 1, c0, c5, 2)
4488c2ecf20Sopenharmony_ci#define WCP14_ETMACTR6(val)		MCR14(val, 1, c0, c6, 2)
4498c2ecf20Sopenharmony_ci#define WCP14_ETMACTR7(val)		MCR14(val, 1, c0, c7, 2)
4508c2ecf20Sopenharmony_ci#define WCP14_ETMACTR8(val)		MCR14(val, 1, c0, c8, 2)
4518c2ecf20Sopenharmony_ci#define WCP14_ETMACTR9(val)		MCR14(val, 1, c0, c9, 2)
4528c2ecf20Sopenharmony_ci#define WCP14_ETMACTR10(val)		MCR14(val, 1, c0, c10, 2)
4538c2ecf20Sopenharmony_ci#define WCP14_ETMACTR11(val)		MCR14(val, 1, c0, c11, 2)
4548c2ecf20Sopenharmony_ci#define WCP14_ETMACTR12(val)		MCR14(val, 1, c0, c12, 2)
4558c2ecf20Sopenharmony_ci#define WCP14_ETMACTR13(val)		MCR14(val, 1, c0, c13, 2)
4568c2ecf20Sopenharmony_ci#define WCP14_ETMACTR14(val)		MCR14(val, 1, c0, c14, 2)
4578c2ecf20Sopenharmony_ci#define WCP14_ETMACTR15(val)		MCR14(val, 1, c0, c15, 2)
4588c2ecf20Sopenharmony_ci#define WCP14_ETMDCVR0(val)		MCR14(val, 1, c0, c0, 3)
4598c2ecf20Sopenharmony_ci#define WCP14_ETMDCVR2(val)		MCR14(val, 1, c0, c2, 3)
4608c2ecf20Sopenharmony_ci#define WCP14_ETMDCVR4(val)		MCR14(val, 1, c0, c4, 3)
4618c2ecf20Sopenharmony_ci#define WCP14_ETMDCVR6(val)		MCR14(val, 1, c0, c6, 3)
4628c2ecf20Sopenharmony_ci#define WCP14_ETMDCVR8(val)		MCR14(val, 1, c0, c8, 3)
4638c2ecf20Sopenharmony_ci#define WCP14_ETMDCVR10(val)		MCR14(val, 1, c0, c10, 3)
4648c2ecf20Sopenharmony_ci#define WCP14_ETMDCVR12(val)		MCR14(val, 1, c0, c12, 3)
4658c2ecf20Sopenharmony_ci#define WCP14_ETMDCVR14(val)		MCR14(val, 1, c0, c14, 3)
4668c2ecf20Sopenharmony_ci#define WCP14_ETMDCMR0(val)		MCR14(val, 1, c0, c0, 4)
4678c2ecf20Sopenharmony_ci#define WCP14_ETMDCMR2(val)		MCR14(val, 1, c0, c2, 4)
4688c2ecf20Sopenharmony_ci#define WCP14_ETMDCMR4(val)		MCR14(val, 1, c0, c4, 4)
4698c2ecf20Sopenharmony_ci#define WCP14_ETMDCMR6(val)		MCR14(val, 1, c0, c6, 4)
4708c2ecf20Sopenharmony_ci#define WCP14_ETMDCMR8(val)		MCR14(val, 1, c0, c8, 4)
4718c2ecf20Sopenharmony_ci#define WCP14_ETMDCMR10(val)		MCR14(val, 1, c0, c10, 4)
4728c2ecf20Sopenharmony_ci#define WCP14_ETMDCMR12(val)		MCR14(val, 1, c0, c12, 4)
4738c2ecf20Sopenharmony_ci#define WCP14_ETMDCMR14(val)		MCR14(val, 1, c0, c14, 4)
4748c2ecf20Sopenharmony_ci#define WCP14_ETMCNTRLDVR0(val)		MCR14(val, 1, c0, c0, 5)
4758c2ecf20Sopenharmony_ci#define WCP14_ETMCNTRLDVR1(val)		MCR14(val, 1, c0, c1, 5)
4768c2ecf20Sopenharmony_ci#define WCP14_ETMCNTRLDVR2(val)		MCR14(val, 1, c0, c2, 5)
4778c2ecf20Sopenharmony_ci#define WCP14_ETMCNTRLDVR3(val)		MCR14(val, 1, c0, c3, 5)
4788c2ecf20Sopenharmony_ci#define WCP14_ETMCNTENR0(val)		MCR14(val, 1, c0, c4, 5)
4798c2ecf20Sopenharmony_ci#define WCP14_ETMCNTENR1(val)		MCR14(val, 1, c0, c5, 5)
4808c2ecf20Sopenharmony_ci#define WCP14_ETMCNTENR2(val)		MCR14(val, 1, c0, c6, 5)
4818c2ecf20Sopenharmony_ci#define WCP14_ETMCNTENR3(val)		MCR14(val, 1, c0, c7, 5)
4828c2ecf20Sopenharmony_ci#define WCP14_ETMCNTRLDEVR0(val)	MCR14(val, 1, c0, c8, 5)
4838c2ecf20Sopenharmony_ci#define WCP14_ETMCNTRLDEVR1(val)	MCR14(val, 1, c0, c9, 5)
4848c2ecf20Sopenharmony_ci#define WCP14_ETMCNTRLDEVR2(val)	MCR14(val, 1, c0, c10, 5)
4858c2ecf20Sopenharmony_ci#define WCP14_ETMCNTRLDEVR3(val)	MCR14(val, 1, c0, c11, 5)
4868c2ecf20Sopenharmony_ci#define WCP14_ETMCNTVR0(val)		MCR14(val, 1, c0, c12, 5)
4878c2ecf20Sopenharmony_ci#define WCP14_ETMCNTVR1(val)		MCR14(val, 1, c0, c13, 5)
4888c2ecf20Sopenharmony_ci#define WCP14_ETMCNTVR2(val)		MCR14(val, 1, c0, c14, 5)
4898c2ecf20Sopenharmony_ci#define WCP14_ETMCNTVR3(val)		MCR14(val, 1, c0, c15, 5)
4908c2ecf20Sopenharmony_ci#define WCP14_ETMSQ12EVR(val)		MCR14(val, 1, c0, c0, 6)
4918c2ecf20Sopenharmony_ci#define WCP14_ETMSQ21EVR(val)		MCR14(val, 1, c0, c1, 6)
4928c2ecf20Sopenharmony_ci#define WCP14_ETMSQ23EVR(val)		MCR14(val, 1, c0, c2, 6)
4938c2ecf20Sopenharmony_ci#define WCP14_ETMSQ31EVR(val)		MCR14(val, 1, c0, c3, 6)
4948c2ecf20Sopenharmony_ci#define WCP14_ETMSQ32EVR(val)		MCR14(val, 1, c0, c4, 6)
4958c2ecf20Sopenharmony_ci#define WCP14_ETMSQ13EVR(val)		MCR14(val, 1, c0, c5, 6)
4968c2ecf20Sopenharmony_ci#define WCP14_ETMSQR(val)		MCR14(val, 1, c0, c7, 6)
4978c2ecf20Sopenharmony_ci#define WCP14_ETMEXTOUTEVR0(val)	MCR14(val, 1, c0, c8, 6)
4988c2ecf20Sopenharmony_ci#define WCP14_ETMEXTOUTEVR1(val)	MCR14(val, 1, c0, c9, 6)
4998c2ecf20Sopenharmony_ci#define WCP14_ETMEXTOUTEVR2(val)	MCR14(val, 1, c0, c10, 6)
5008c2ecf20Sopenharmony_ci#define WCP14_ETMEXTOUTEVR3(val)	MCR14(val, 1, c0, c11, 6)
5018c2ecf20Sopenharmony_ci#define WCP14_ETMCIDCVR0(val)		MCR14(val, 1, c0, c12, 6)
5028c2ecf20Sopenharmony_ci#define WCP14_ETMCIDCVR1(val)		MCR14(val, 1, c0, c13, 6)
5038c2ecf20Sopenharmony_ci#define WCP14_ETMCIDCVR2(val)		MCR14(val, 1, c0, c14, 6)
5048c2ecf20Sopenharmony_ci#define WCP14_ETMCIDCMR(val)		MCR14(val, 1, c0, c15, 6)
5058c2ecf20Sopenharmony_ci#define WCP14_ETMIMPSPEC0(val)		MCR14(val, 1, c0, c0, 7)
5068c2ecf20Sopenharmony_ci#define WCP14_ETMIMPSPEC1(val)		MCR14(val, 1, c0, c1, 7)
5078c2ecf20Sopenharmony_ci#define WCP14_ETMIMPSPEC2(val)		MCR14(val, 1, c0, c2, 7)
5088c2ecf20Sopenharmony_ci#define WCP14_ETMIMPSPEC3(val)		MCR14(val, 1, c0, c3, 7)
5098c2ecf20Sopenharmony_ci#define WCP14_ETMIMPSPEC4(val)		MCR14(val, 1, c0, c4, 7)
5108c2ecf20Sopenharmony_ci#define WCP14_ETMIMPSPEC5(val)		MCR14(val, 1, c0, c5, 7)
5118c2ecf20Sopenharmony_ci#define WCP14_ETMIMPSPEC6(val)		MCR14(val, 1, c0, c6, 7)
5128c2ecf20Sopenharmony_ci#define WCP14_ETMIMPSPEC7(val)		MCR14(val, 1, c0, c7, 7)
5138c2ecf20Sopenharmony_ci/* Can be read only in ETMv3.4, ETMv3.5 */
5148c2ecf20Sopenharmony_ci#define WCP14_ETMSYNCFR(val)		MCR14(val, 1, c0, c8, 7)
5158c2ecf20Sopenharmony_ci#define WCP14_ETMEXTINSELR(val)		MCR14(val, 1, c0, c11, 7)
5168c2ecf20Sopenharmony_ci#define WCP14_ETMTESSEICR(val)		MCR14(val, 1, c0, c12, 7)
5178c2ecf20Sopenharmony_ci#define WCP14_ETMEIBCR(val)		MCR14(val, 1, c0, c13, 7)
5188c2ecf20Sopenharmony_ci#define WCP14_ETMTSEVR(val)		MCR14(val, 1, c0, c14, 7)
5198c2ecf20Sopenharmony_ci#define WCP14_ETMAUXCR(val)		MCR14(val, 1, c0, c15, 7)
5208c2ecf20Sopenharmony_ci#define WCP14_ETMTRACEIDR(val)		MCR14(val, 1, c1, c0, 0)
5218c2ecf20Sopenharmony_ci#define WCP14_ETMIDR2(val)		MCR14(val, 1, c1, c2, 0)
5228c2ecf20Sopenharmony_ci#define WCP14_ETMVMIDCVR(val)		MCR14(val, 1, c1, c0, 1)
5238c2ecf20Sopenharmony_ci#define WCP14_ETMOSLAR(val)		MCR14(val, 1, c1, c0, 4)
5248c2ecf20Sopenharmony_ci/* Not available in PFTv1.1 */
5258c2ecf20Sopenharmony_ci#define WCP14_ETMOSSRR(val)		MCR14(val, 1, c1, c2, 4)
5268c2ecf20Sopenharmony_ci#define WCP14_ETMPDCR(val)		MCR14(val, 1, c1, c4, 4)
5278c2ecf20Sopenharmony_ci#define WCP14_ETMPDSR(val)		MCR14(val, 1, c1, c5, 4)
5288c2ecf20Sopenharmony_ci#define WCP14_ETMITCTRL(val)		MCR14(val, 1, c7, c0, 4)
5298c2ecf20Sopenharmony_ci#define WCP14_ETMCLAIMSET(val)		MCR14(val, 1, c7, c8, 6)
5308c2ecf20Sopenharmony_ci#define WCP14_ETMCLAIMCLR(val)		MCR14(val, 1, c7, c9, 6)
5318c2ecf20Sopenharmony_ci/* Writes to this from CP14 interface are ignored */
5328c2ecf20Sopenharmony_ci#define WCP14_ETMLAR(val)		MCR14(val, 1, c7, c12, 6)
5338c2ecf20Sopenharmony_ci
5348c2ecf20Sopenharmony_ci#endif
535