Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9750af55 authored by Aparna Das's avatar Aparna Das
Browse files

jtagv8: add debug and etm register save-restore support for armv8



Debug and ETM registers do not retain their state on power collapse.
This change provides save-restore support for these registers to allow
debugging and tracing across power collapse. Add this support on ARMv8
targets.

Change-Id: I67fe7c236267ba741b3e926bd3c10658f137611c
Signed-off-by: default avatarAparna Das <adas@codeaurora.org>
parent 549bdfca
Loading
Loading
Loading
Loading
+247 −0
Original line number Diff line number Diff line
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * 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.
 */

#ifndef __ASM_HARDWARE_DEBUGV8_H
#define __ASM_HARDWARE_DEBUGV8_H

#include <linux/types.h>

/* Accessors for CP14 registers */
#define dbg_read(reg)			RCP14_##reg()
#define dbg_write(val, reg)		WCP14_##reg(val)

/* MRC14 registers */
#define MRC14(op1, crn, crm, op2)					\
({									\
uint32_t val;								\
asm volatile("mrc p14, "#op1", %0, "#crn", "#crm", "#op2 : "=r" (val));	\
val;									\
})

/* MCR14 registers */
#define MCR14(val, op1, crn, crm, op2)					\
({									\
asm volatile("mcr p14, "#op1", %0, "#crn", "#crm", "#op2 : : "r" (val));\
})

/*
 * Debug Registers
 *
 * Read only
 * DBGDIDR, DBGDSCRint, DBGDTRRXint, DBGDRAR, DBGOSLSR, DBGOSSRR, DBGDSAR,
 * DBGAUTHSTATUS, DBGDEVID2, DBGDEVID1, DBGDEVID
 *
 * Write only
 * DBGDTRTXint, DBGOSLAR
 */
#define RCP14_DBGDIDR()			MRC14(0, c0, c0, 0)
#define RCP14_DBGDSCRint()		MRC14(0, c0, c1, 0)
#define RCP14_DBGDCCINT()		MRC14(0, c0, c2, 0)
#define RCP14_DBGDTRRXint()		MRC14(0, c0, c5, 0)
#define RCP14_DBGWFAR()			MRC14(0, c0, c6, 0)
#define RCP14_DBGVCR()			MRC14(0, c0, c7, 0)
#define RCP14_DBGDTRRXext()		MRC14(0, c0, c0, 2)
#define RCP14_DBGDSCRext()		MRC14(0, c0, c2, 2)
#define RCP14_DBGDTRTXext()		MRC14(0, c0, c3, 2)
#define RCP14_DBGOSECCR()		MRC14(0, c0, c6, 2)
#define RCP14_DBGBVR0()			MRC14(0, c0, c0, 4)
#define RCP14_DBGBVR1()			MRC14(0, c0, c1, 4)
#define RCP14_DBGBVR2()			MRC14(0, c0, c2, 4)
#define RCP14_DBGBVR3()			MRC14(0, c0, c3, 4)
#define RCP14_DBGBVR4()			MRC14(0, c0, c4, 4)
#define RCP14_DBGBVR5()			MRC14(0, c0, c5, 4)
#define RCP14_DBGBVR6()			MRC14(0, c0, c6, 4)
#define RCP14_DBGBVR7()			MRC14(0, c0, c7, 4)
#define RCP14_DBGBVR8()			MRC14(0, c0, c8, 4)
#define RCP14_DBGBVR9()			MRC14(0, c0, c9, 4)
#define RCP14_DBGBVR10()		MRC14(0, c0, c10, 4)
#define RCP14_DBGBVR11()		MRC14(0, c0, c11, 4)
#define RCP14_DBGBVR12()		MRC14(0, c0, c12, 4)
#define RCP14_DBGBVR13()		MRC14(0, c0, c13, 4)
#define RCP14_DBGBVR14()		MRC14(0, c0, c14, 4)
#define RCP14_DBGBVR15()		MRC14(0, c0, c15, 4)
#define RCP14_DBGBCR0()			MRC14(0, c0, c0, 5)
#define RCP14_DBGBCR1()			MRC14(0, c0, c1, 5)
#define RCP14_DBGBCR2()			MRC14(0, c0, c2, 5)
#define RCP14_DBGBCR3()			MRC14(0, c0, c3, 5)
#define RCP14_DBGBCR4()			MRC14(0, c0, c4, 5)
#define RCP14_DBGBCR5()			MRC14(0, c0, c5, 5)
#define RCP14_DBGBCR6()			MRC14(0, c0, c6, 5)
#define RCP14_DBGBCR7()			MRC14(0, c0, c7, 5)
#define RCP14_DBGBCR8()			MRC14(0, c0, c8, 5)
#define RCP14_DBGBCR9()			MRC14(0, c0, c9, 5)
#define RCP14_DBGBCR10()		MRC14(0, c0, c10, 5)
#define RCP14_DBGBCR11()		MRC14(0, c0, c11, 5)
#define RCP14_DBGBCR12()		MRC14(0, c0, c12, 5)
#define RCP14_DBGBCR13()		MRC14(0, c0, c13, 5)
#define RCP14_DBGBCR14()		MRC14(0, c0, c14, 5)
#define RCP14_DBGBCR15()		MRC14(0, c0, c15, 5)
#define RCP14_DBGWVR0()			MRC14(0, c0, c0, 6)
#define RCP14_DBGWVR1()			MRC14(0, c0, c1, 6)
#define RCP14_DBGWVR2()			MRC14(0, c0, c2, 6)
#define RCP14_DBGWVR3()			MRC14(0, c0, c3, 6)
#define RCP14_DBGWVR4()			MRC14(0, c0, c4, 6)
#define RCP14_DBGWVR5()			MRC14(0, c0, c5, 6)
#define RCP14_DBGWVR6()			MRC14(0, c0, c6, 6)
#define RCP14_DBGWVR7()			MRC14(0, c0, c7, 6)
#define RCP14_DBGWVR8()			MRC14(0, c0, c8, 6)
#define RCP14_DBGWVR9()			MRC14(0, c0, c9, 6)
#define RCP14_DBGWVR10()		MRC14(0, c0, c10, 6)
#define RCP14_DBGWVR11()		MRC14(0, c0, c11, 6)
#define RCP14_DBGWVR12()		MRC14(0, c0, c12, 6)
#define RCP14_DBGWVR13()		MRC14(0, c0, c13, 6)
#define RCP14_DBGWVR14()		MRC14(0, c0, c14, 6)
#define RCP14_DBGWVR15()		MRC14(0, c0, c15, 6)
#define RCP14_DBGWCR0()			MRC14(0, c0, c0, 7)
#define RCP14_DBGWCR1()			MRC14(0, c0, c1, 7)
#define RCP14_DBGWCR2()			MRC14(0, c0, c2, 7)
#define RCP14_DBGWCR3()			MRC14(0, c0, c3, 7)
#define RCP14_DBGWCR4()			MRC14(0, c0, c4, 7)
#define RCP14_DBGWCR5()			MRC14(0, c0, c5, 7)
#define RCP14_DBGWCR6()			MRC14(0, c0, c6, 7)
#define RCP14_DBGWCR7()			MRC14(0, c0, c7, 7)
#define RCP14_DBGWCR8()			MRC14(0, c0, c8, 7)
#define RCP14_DBGWCR9()			MRC14(0, c0, c9, 7)
#define RCP14_DBGWCR10()		MRC14(0, c0, c10, 7)
#define RCP14_DBGWCR11()		MRC14(0, c0, c11, 7)
#define RCP14_DBGWCR12()		MRC14(0, c0, c12, 7)
#define RCP14_DBGWCR13()		MRC14(0, c0, c13, 7)
#define RCP14_DBGWCR14()		MRC14(0, c0, c14, 7)
#define RCP14_DBGWCR15()		MRC14(0, c0, c15, 7)
#define RCP14_DBGDRAR()			MRC14(0, c1, c0, 0)
#define RCP14_DBGBXVR0()		MRC14(0, c1, c0, 1)
#define RCP14_DBGBXVR1()		MRC14(0, c1, c1, 1)
#define RCP14_DBGBXVR2()		MRC14(0, c1, c2, 1)
#define RCP14_DBGBXVR3()		MRC14(0, c1, c3, 1)
#define RCP14_DBGBXVR4()		MRC14(0, c1, c4, 1)
#define RCP14_DBGBXVR5()		MRC14(0, c1, c5, 1)
#define RCP14_DBGBXVR6()		MRC14(0, c1, c6, 1)
#define RCP14_DBGBXVR7()		MRC14(0, c1, c7, 1)
#define RCP14_DBGBXVR8()		MRC14(0, c1, c8, 1)
#define RCP14_DBGBXVR9()		MRC14(0, c1, c9, 1)
#define RCP14_DBGBXVR10()		MRC14(0, c1, c10, 1)
#define RCP14_DBGBXVR11()		MRC14(0, c1, c11, 1)
#define RCP14_DBGBXVR12()		MRC14(0, c1, c12, 1)
#define RCP14_DBGBXVR13()		MRC14(0, c1, c13, 1)
#define RCP14_DBGBXVR14()		MRC14(0, c1, c14, 1)
#define RCP14_DBGBXVR15()		MRC14(0, c1, c15, 1)
#define RCP14_DBGOSLSR()		MRC14(0, c1, c1, 4)
#define RCP14_DBGOSSRR()		MRC14(0, c1, c2, 4)
#define RCP14_DBGOSDLR()		MRC14(0, c1, c3, 4)
#define RCP14_DBGPRCR()			MRC14(0, c1, c4, 4)
#define RCP14_DBGPRSR()			MRC14(0, c1, c5, 4)
#define RCP14_DBGDSAR()			MRC14(0, c2, c0, 0)
#define RCP14_DBGITCTRL()		MRC14(0, c7, c0, 4)
#define RCP14_DBGCLAIMSET()		MRC14(0, c7, c8, 6)
#define RCP14_DBGCLAIMCLR()		MRC14(0, c7, c9, 6)
#define RCP14_DBGAUTHSTATUS()		MRC14(0, c7, c14, 6)
#define RCP14_DBGDEVID2()		MRC14(0, c7, c0, 7)
#define RCP14_DBGDEVID1()		MRC14(0, c7, c1, 7)
#define RCP14_DBGDEVID()		MRC14(0, c7, c2, 7)

#define WCP14_DBGDCCINT(val)		MCR14(val, 0, c0, c2, 0)
#define WCP14_DBGDTRTXint(val)		MCR14(val, 0, c0, c5, 0)
#define WCP14_DBGWFAR(val)		MCR14(val, 0, c0, c6, 0)
#define WCP14_DBGVCR(val)		MCR14(val, 0, c0, c7, 0)
#define WCP14_DBGDTRRXext(val)		MCR14(val, 0, c0, c0, 2)
#define WCP14_DBGDSCRext(val)		MCR14(val, 0, c0, c2, 2)
#define WCP14_DBGDTRTXext(val)		MCR14(val, 0, c0, c3, 2)
#define WCP14_DBGOSECCR(val)		MCR14(val, 0, c0, c6, 2)
#define WCP14_DBGBVR0(val)		MCR14(val, 0, c0, c0, 4)
#define WCP14_DBGBVR1(val)		MCR14(val, 0, c0, c1, 4)
#define WCP14_DBGBVR2(val)		MCR14(val, 0, c0, c2, 4)
#define WCP14_DBGBVR3(val)		MCR14(val, 0, c0, c3, 4)
#define WCP14_DBGBVR4(val)		MCR14(val, 0, c0, c4, 4)
#define WCP14_DBGBVR5(val)		MCR14(val, 0, c0, c5, 4)
#define WCP14_DBGBVR6(val)		MCR14(val, 0, c0, c6, 4)
#define WCP14_DBGBVR7(val)		MCR14(val, 0, c0, c7, 4)
#define WCP14_DBGBVR8(val)		MCR14(val, 0, c0, c8, 4)
#define WCP14_DBGBVR9(val)		MCR14(val, 0, c0, c9, 4)
#define WCP14_DBGBVR10(val)		MCR14(val, 0, c0, c10, 4)
#define WCP14_DBGBVR11(val)		MCR14(val, 0, c0, c11, 4)
#define WCP14_DBGBVR12(val)		MCR14(val, 0, c0, c12, 4)
#define WCP14_DBGBVR13(val)		MCR14(val, 0, c0, c13, 4)
#define WCP14_DBGBVR14(val)		MCR14(val, 0, c0, c14, 4)
#define WCP14_DBGBVR15(val)		MCR14(val, 0, c0, c15, 4)
#define WCP14_DBGBCR0(val)		MCR14(val, 0, c0, c0, 5)
#define WCP14_DBGBCR1(val)		MCR14(val, 0, c0, c1, 5)
#define WCP14_DBGBCR2(val)		MCR14(val, 0, c0, c2, 5)
#define WCP14_DBGBCR3(val)		MCR14(val, 0, c0, c3, 5)
#define WCP14_DBGBCR4(val)		MCR14(val, 0, c0, c4, 5)
#define WCP14_DBGBCR5(val)		MCR14(val, 0, c0, c5, 5)
#define WCP14_DBGBCR6(val)		MCR14(val, 0, c0, c6, 5)
#define WCP14_DBGBCR7(val)		MCR14(val, 0, c0, c7, 5)
#define WCP14_DBGBCR8(val)		MCR14(val, 0, c0, c8, 5)
#define WCP14_DBGBCR9(val)		MCR14(val, 0, c0, c9, 5)
#define WCP14_DBGBCR10(val)		MCR14(val, 0, c0, c10, 5)
#define WCP14_DBGBCR11(val)		MCR14(val, 0, c0, c11, 5)
#define WCP14_DBGBCR12(val)		MCR14(val, 0, c0, c12, 5)
#define WCP14_DBGBCR13(val)		MCR14(val, 0, c0, c13, 5)
#define WCP14_DBGBCR14(val)		MCR14(val, 0, c0, c14, 5)
#define WCP14_DBGBCR15(val)		MCR14(val, 0, c0, c15, 5)
#define WCP14_DBGWVR0(val)		MCR14(val, 0, c0, c0, 6)
#define WCP14_DBGWVR1(val)		MCR14(val, 0, c0, c1, 6)
#define WCP14_DBGWVR2(val)		MCR14(val, 0, c0, c2, 6)
#define WCP14_DBGWVR3(val)		MCR14(val, 0, c0, c3, 6)
#define WCP14_DBGWVR4(val)		MCR14(val, 0, c0, c4, 6)
#define WCP14_DBGWVR5(val)		MCR14(val, 0, c0, c5, 6)
#define WCP14_DBGWVR6(val)		MCR14(val, 0, c0, c6, 6)
#define WCP14_DBGWVR7(val)		MCR14(val, 0, c0, c7, 6)
#define WCP14_DBGWVR8(val)		MCR14(val, 0, c0, c8, 6)
#define WCP14_DBGWVR9(val)		MCR14(val, 0, c0, c9, 6)
#define WCP14_DBGWVR10(val)		MCR14(val, 0, c0, c10, 6)
#define WCP14_DBGWVR11(val)		MCR14(val, 0, c0, c11, 6)
#define WCP14_DBGWVR12(val)		MCR14(val, 0, c0, c12, 6)
#define WCP14_DBGWVR13(val)		MCR14(val, 0, c0, c13, 6)
#define WCP14_DBGWVR14(val)		MCR14(val, 0, c0, c14, 6)
#define WCP14_DBGWVR15(val)		MCR14(val, 0, c0, c15, 6)
#define WCP14_DBGWCR0(val)		MCR14(val, 0, c0, c0, 7)
#define WCP14_DBGWCR1(val)		MCR14(val, 0, c0, c1, 7)
#define WCP14_DBGWCR2(val)		MCR14(val, 0, c0, c2, 7)
#define WCP14_DBGWCR3(val)		MCR14(val, 0, c0, c3, 7)
#define WCP14_DBGWCR4(val)		MCR14(val, 0, c0, c4, 7)
#define WCP14_DBGWCR5(val)		MCR14(val, 0, c0, c5, 7)
#define WCP14_DBGWCR6(val)		MCR14(val, 0, c0, c6, 7)
#define WCP14_DBGWCR7(val)		MCR14(val, 0, c0, c7, 7)
#define WCP14_DBGWCR8(val)		MCR14(val, 0, c0, c8, 7)
#define WCP14_DBGWCR9(val)		MCR14(val, 0, c0, c9, 7)
#define WCP14_DBGWCR10(val)		MCR14(val, 0, c0, c10, 7)
#define WCP14_DBGWCR11(val)		MCR14(val, 0, c0, c11, 7)
#define WCP14_DBGWCR12(val)		MCR14(val, 0, c0, c12, 7)
#define WCP14_DBGWCR13(val)		MCR14(val, 0, c0, c13, 7)
#define WCP14_DBGWCR14(val)		MCR14(val, 0, c0, c14, 7)
#define WCP14_DBGWCR15(val)		MCR14(val, 0, c0, c15, 7)
#define WCP14_DBGBXVR0(val)		MCR14(val, 0, c1, c0, 1)
#define WCP14_DBGBXVR1(val)		MCR14(val, 0, c1, c1, 1)
#define WCP14_DBGBXVR2(val)		MCR14(val, 0, c1, c2, 1)
#define WCP14_DBGBXVR3(val)		MCR14(val, 0, c1, c3, 1)
#define WCP14_DBGBXVR4(val)		MCR14(val, 0, c1, c4, 1)
#define WCP14_DBGBXVR5(val)		MCR14(val, 0, c1, c5, 1)
#define WCP14_DBGBXVR6(val)		MCR14(val, 0, c1, c6, 1)
#define WCP14_DBGBXVR7(val)		MCR14(val, 0, c1, c7, 1)
#define WCP14_DBGBXVR8(val)		MCR14(val, 0, c1, c8, 1)
#define WCP14_DBGBXVR9(val)		MCR14(val, 0, c1, c9, 1)
#define WCP14_DBGBXVR10(val)		MCR14(val, 0, c1, c10, 1)
#define WCP14_DBGBXVR11(val)		MCR14(val, 0, c1, c11, 1)
#define WCP14_DBGBXVR12(val)		MCR14(val, 0, c1, c12, 1)
#define WCP14_DBGBXVR13(val)		MCR14(val, 0, c1, c13, 1)
#define WCP14_DBGBXVR14(val)		MCR14(val, 0, c1, c14, 1)
#define WCP14_DBGBXVR15(val)		MCR14(val, 0, c1, c15, 1)
#define WCP14_DBGOSLAR(val)		MCR14(val, 0, c1, c0, 4)
#define WCP14_DBGOSSRR(val)		MCR14(val, 0, c1, c2, 4)
#define WCP14_DBGOSDLR(val)		MCR14(val, 0, c1, c3, 4)
#define WCP14_DBGPRCR(val)		MCR14(val, 0, c1, c4, 4)
#define WCP14_DBGITCTRL(val)		MCR14(val, 0, c7, c0, 4)
#define WCP14_DBGCLAIMSET(val)		MCR14(val, 0, c7, c8, 6)
#define WCP14_DBGCLAIMCLR(val)		MCR14(val, 0, c7, c9, 6)

#endif
+229 −0
Original line number Diff line number Diff line
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * 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.
 */

#ifndef __ASM_DEBUGV8_H
#define __ASM_DEBUGV8_H

#include <linux/types.h>

/* 32 bit register reads for aarch 64 bit */
#define dbg_readl(reg)			RSYSL_##reg()
/* 64 bit register reads for aarch 64 bit */
#define dbg_readq(reg)			RSYSQ_##reg()
/* 32 and 64 bit register writes for aarch 64 bit */
#define dbg_write(val, reg)		WSYS_##reg(val)

#define MRSL(reg)				\
({						\
uint32_t val;					\
asm volatile("mrs %0, "#reg : "=r" (val));	\
val;						\
})

#define MRSQ(reg)				\
({						\
uint64_t val;					\
asm volatile("mrs %0, "#reg : "=r" (val));	\
val;						\
})

#define MSR(val, reg)				\
({						\
asm volatile("msr "#reg", %0" : : "r" (val));	\
})

/*
 * Debug Feature Register
 *
 * Read only
 */
#define RSYSQ_ID_AA64DFR0_EL1()		MRSQ(ID_AA64DFR0_EL1)

/*
 * Debug Registers
 *
 * Available only in DBGv8
 *
 * Read only
 * MDCCSR_EL0, MDRAR_EL1, OSLSR_EL1, DBGDTRRX_EL0, DBGAUTHSTATUS_EL1
 *
 * Write only
 * DBGDTRTX_EL0, OSLAR_EL1
 */
/* 32 bit registers */
#define RSYSL_DBGDTRRX_EL0()		MRSL(DBGDTRRX_EL0)
#define RSYSL_MDCCSR_EL0()		MRSL(MDCCSR_EL0)
#define RSYSL_MDSCR_EL1()		MRSL(MDSCR_EL1)
#define RSYSL_OSDTRRX_EL1()		MRSL(OSDTRRX_EL1)
#define RSYSL_OSDTRTX_EL1()		MRSL(OSDTRTX_EL1)
#define RSYSL_OSDLR_EL1()		MRSL(OSDLR_EL1)
#define RSYSL_OSLSR_EL1()		MRSL(OSLSR_EL1)
#define RSYSL_MDCCINT_EL1()		MRSL(MDCCINT_EL1)
#define RSYSL_OSECCR_EL1()		MRSL(OSECCR_EL1)
#define RSYSL_DBGPRCR_EL1()		MRSL(DBGPRCR_EL1)
#define RSYSL_DBGBCR0_EL1()		MRSL(DBGBCR0_EL1)
#define RSYSL_DBGBCR1_EL1()		MRSL(DBGBCR1_EL1)
#define RSYSL_DBGBCR2_EL1()		MRSL(DBGBCR2_EL1)
#define RSYSL_DBGBCR3_EL1()		MRSL(DBGBCR3_EL1)
#define RSYSL_DBGBCR4_EL1()		MRSL(DBGBCR4_EL1)
#define RSYSL_DBGBCR5_EL1()		MRSL(DBGBCR5_EL1)
#define RSYSL_DBGBCR6_EL1()		MRSL(DBGBCR6_EL1)
#define RSYSL_DBGBCR7_EL1()		MRSL(DBGBCR7_EL1)
#define RSYSL_DBGBCR8_EL1()		MRSL(DBGBCR8_EL1)
#define RSYSL_DBGBCR9_EL1()		MRSL(DBGBCR9_EL1)
#define RSYSL_DBGBCR10_EL1()		MRSL(DBGBCR10_EL1)
#define RSYSL_DBGBCR11_EL1()		MRSL(DBGBCR11_EL1)
#define RSYSL_DBGBCR12_EL1()		MRSL(DBGBCR12_EL1)
#define RSYSL_DBGBCR13_EL1()		MRSL(DBGBCR13_EL1)
#define RSYSL_DBGBCR14_EL1()		MRSL(DBGBCR14_EL1)
#define RSYSL_DBGBCR15_EL1()		MRSL(DBGBCR15_EL1)
#define RSYSL_DBGWCR0_EL1()		MRSL(DBGWCR0_EL1)
#define RSYSL_DBGWCR1_EL1()		MRSL(DBGWCR1_EL1)
#define RSYSL_DBGWCR2_EL1()		MRSL(DBGWCR2_EL1)
#define RSYSL_DBGWCR3_EL1()		MRSL(DBGWCR3_EL1)
#define RSYSL_DBGWCR4_EL1()		MRSL(DBGWCR4_EL1)
#define RSYSL_DBGWCR5_EL1()		MRSL(DBGWCR5_EL1)
#define RSYSL_DBGWCR6_EL1()		MRSL(DBGWCR6_EL1)
#define RSYSL_DBGWCR7_EL1()		MRSL(DBGWCR7_EL1)
#define RSYSL_DBGWCR8_EL1()		MRSL(DBGWCR8_EL1)
#define RSYSL_DBGWCR9_EL1()		MRSL(DBGWCR9_EL1)
#define RSYSL_DBGWCR10_EL1()		MRSL(DBGWCR10_EL1)
#define RSYSL_DBGWCR11_EL1()		MRSL(DBGWCR11_EL1)
#define RSYSL_DBGWCR12_EL1()		MRSL(DBGWCR12_EL1)
#define RSYSL_DBGWCR13_EL1()		MRSL(DBGWCR13_EL1)
#define RSYSL_DBGWCR14_EL1()		MRSL(DBGWCR14_EL1)
#define RSYSL_DBGWCR15_EL1()		MRSL(DBGWCR15_EL1)
#define RSYSL_DBGCLAIMSET_EL1()		MRSL(DBGCLAIMSET_EL1)
#define RSYSL_DBGCLAIMCLR_EL1()		MRSL(DBGCLAIMCLR_EL1)
#define RSYSL_DBGAUTHSTATUS_EL1()	MRSL(DBGAUTHSTATUS_EL1)
#define RSYSL_DBGVCR32_EL2()		MRSL(DBGVCR32_EL2)
#define RSYSL_MDCR_EL2()		MRSL(MDCR_EL2)
#define RSYSL_MDCR_EL3()		MRSL(MDCR_EL3)
/* 64 bit registers */
#define RSYSQ_DBGDTR_EL0()		MRSQ(DBGDTR_EL0)
#define RSYSQ_MDRAR_EL1()		MRSQ(MDRAR_EL1)
#define RSYSQ_DBGBVR0_EL1()		MRSQ(DBGBVR0_EL1)
#define RSYSQ_DBGBVR1_EL1()		MRSQ(DBGBVR1_EL1)
#define RSYSQ_DBGBVR2_EL1()		MRSQ(DBGBVR2_EL1)
#define RSYSQ_DBGBVR3_EL1()		MRSQ(DBGBVR3_EL1)
#define RSYSQ_DBGBVR4_EL1()		MRSQ(DBGBVR4_EL1)
#define RSYSQ_DBGBVR5_EL1()		MRSQ(DBGBVR5_EL1)
#define RSYSQ_DBGBVR6_EL1()		MRSQ(DBGBVR6_EL1)
#define RSYSQ_DBGBVR7_EL1()		MRSQ(DBGBVR7_EL1)
#define RSYSQ_DBGBVR8_EL1()		MRSQ(DBGBVR8_EL1)
#define RSYSQ_DBGBVR9_EL1()		MRSQ(DBGBVR9_EL1)
#define RSYSQ_DBGBVR10_EL1()		MRSQ(DBGBVR10_EL1)
#define RSYSQ_DBGBVR11_EL1()		MRSQ(DBGBVR11_EL1)
#define RSYSQ_DBGBVR12_EL1()		MRSQ(DBGBVR12_EL1)
#define RSYSQ_DBGBVR13_EL1()		MRSQ(DBGBVR13_EL1)
#define RSYSQ_DBGBVR14_EL1()		MRSQ(DBGBVR14_EL1)
#define RSYSQ_DBGBVR15_EL1()		MRSQ(DBGBVR15_EL1)
#define RSYSQ_DBGWVR0_EL1()		MRSQ(DBGWVR0_EL1)
#define RSYSQ_DBGWVR1_EL1()		MRSQ(DBGWVR1_EL1)
#define RSYSQ_DBGWVR2_EL1()		MRSQ(DBGWVR2_EL1)
#define RSYSQ_DBGWVR3_EL1()		MRSQ(DBGWVR3_EL1)
#define RSYSQ_DBGWVR4_EL1()		MRSQ(DBGWVR4_EL1)
#define RSYSQ_DBGWVR5_EL1()		MRSQ(DBGWVR5_EL1)
#define RSYSQ_DBGWVR6_EL1()		MRSQ(DBGWVR6_EL1)
#define RSYSQ_DBGWVR7_EL1()		MRSQ(DBGWVR7_EL1)
#define RSYSQ_DBGWVR8_EL1()		MRSQ(DBGWVR8_EL1)
#define RSYSQ_DBGWVR9_EL1()		MRSQ(DBGWVR9_EL1)
#define RSYSQ_DBGWVR10_EL1()		MRSQ(DBGWVR10_EL1)
#define RSYSQ_DBGWVR11_EL1()		MRSQ(DBGWVR11_EL1)
#define RSYSQ_DBGWVR12_EL1()		MRSQ(DBGWVR12_EL1)
#define RSYSQ_DBGWVR13_EL1()		MRSQ(DBGWVR13_EL1)
#define RSYSQ_DBGWVR14_EL1()		MRSQ(DBGWVR14_EL1)
#define RSYSQ_DBGWVR15_EL1()		MRSQ(DBGWVR15_EL1)

/* 32 bit registers */
#define WSYS_DBGDTRTX_EL0(val)		MSR(val, DBGDTRTX_EL0)
#define WSYS_MDCCINT_EL1(val)		MSR(val, MDCCINT_EL1)
#define WSYS_MDSCR_EL1(val)		MSR(val, MDSCR_EL1)
#define WSYS_OSDTRRX_EL1(val)		MSR(val, OSDTRRX_EL1)
#define WSYS_OSDTRTX_EL1(val)		MSR(val, OSDTRTX_EL1)
#define WSYS_OSDLR_EL1(val)		MSR(val, OSDLR_EL1)
#define WSYS_OSECCR_EL1(val)		MSR(val, OSECCR_EL1)
#define WSYS_DBGPRCR_EL1(val)		MSR(val, DBGPRCR_EL1)
#define WSYS_DBGBCR0_EL1(val)		MSR(val, DBGBCR0_EL1)
#define WSYS_DBGBCR1_EL1(val)		MSR(val, DBGBCR1_EL1)
#define WSYS_DBGBCR2_EL1(val)		MSR(val, DBGBCR2_EL1)
#define WSYS_DBGBCR3_EL1(val)		MSR(val, DBGBCR3_EL1)
#define WSYS_DBGBCR4_EL1(val)		MSR(val, DBGBCR4_EL1)
#define WSYS_DBGBCR5_EL1(val)		MSR(val, DBGBCR5_EL1)
#define WSYS_DBGBCR6_EL1(val)		MSR(val, DBGBCR6_EL1)
#define WSYS_DBGBCR7_EL1(val)		MSR(val, DBGBCR7_EL1)
#define WSYS_DBGBCR8_EL1(val)		MSR(val, DBGBCR8_EL1)
#define WSYS_DBGBCR9_EL1(val)		MSR(val, DBGBCR9_EL1)
#define WSYS_DBGBCR10_EL1(val)		MSR(val, DBGBCR10_EL1)
#define WSYS_DBGBCR11_EL1(val)		MSR(val, DBGBCR11_EL1)
#define WSYS_DBGBCR12_EL1(val)		MSR(val, DBGBCR12_EL1)
#define WSYS_DBGBCR13_EL1(val)		MSR(val, DBGBCR13_EL1)
#define WSYS_DBGBCR14_EL1(val)		MSR(val, DBGBCR14_EL1)
#define WSYS_DBGBCR15_EL1(val)		MSR(val, DBGBCR15_EL1)
#define WSYS_DBGWCR0_EL1(val)		MSR(val, DBGWCR0_EL1)
#define WSYS_DBGWCR1_EL1(val)		MSR(val, DBGWCR1_EL1)
#define WSYS_DBGWCR2_EL1(val)		MSR(val, DBGWCR2_EL1)
#define WSYS_DBGWCR3_EL1(val)		MSR(val, DBGWCR3_EL1)
#define WSYS_DBGWCR4_EL1(val)		MSR(val, DBGWCR4_EL1)
#define WSYS_DBGWCR5_EL1(val)		MSR(val, DBGWCR5_EL1)
#define WSYS_DBGWCR6_EL1(val)		MSR(val, DBGWCR6_EL1)
#define WSYS_DBGWCR7_EL1(val)		MSR(val, DBGWCR7_EL1)
#define WSYS_DBGWCR8_EL1(val)		MSR(val, DBGWCR8_EL1)
#define WSYS_DBGWCR9_EL1(val)		MSR(val, DBGWCR9_EL1)
#define WSYS_DBGWCR10_EL1(val)		MSR(val, DBGWCR10_EL1)
#define WSYS_DBGWCR11_EL1(val)		MSR(val, DBGWCR11_EL1)
#define WSYS_DBGWCR12_EL1(val)		MSR(val, DBGWCR12_EL1)
#define WSYS_DBGWCR13_EL1(val)		MSR(val, DBGWCR13_EL1)
#define WSYS_DBGWCR14_EL1(val)		MSR(val, DBGWCR14_EL1)
#define WSYS_DBGWCR15_EL1(val)		MSR(val, DBGWCR15_EL1)
#define WSYS_DBGCLAIMSET_EL1(val)	MSR(val, DBGCLAIMSET_EL1)
#define WSYS_DBGCLAIMCLR_EL1(val)	MSR(val, DBGCLAIMCLR_EL1)
#define WSYS_OSLAR_EL1(val)		MSR(val, OSLAR_EL1)
#define WSYS_DBGVCR32_EL2(val)		MSR(val, DBGVCR32_EL2)
#define WSYS_MDCR_EL2(val)		MSR(val, MDCR_EL2)
#define WSYS_MDCR_EL3(val)		MSR(val, MDCR_EL3)
/* 64 bit registers */
#define WSYS_DBGDTR_EL0(val)		MSR(val, DBGDTR_EL0)
#define WSYS_DBGBVR0_EL1(val)		MSR(val, DBGBVR0_EL1)
#define WSYS_DBGBVR1_EL1(val)		MSR(val, DBGBVR1_EL1)
#define WSYS_DBGBVR2_EL1(val)		MSR(val, DBGBVR2_EL1)
#define WSYS_DBGBVR3_EL1(val)		MSR(val, DBGBVR3_EL1)
#define WSYS_DBGBVR4_EL1(val)		MSR(val, DBGBVR4_EL1)
#define WSYS_DBGBVR5_EL1(val)		MSR(val, DBGBVR5_EL1)
#define WSYS_DBGBVR6_EL1(val)		MSR(val, DBGBVR6_EL1)
#define WSYS_DBGBVR7_EL1(val)		MSR(val, DBGBVR7_EL1)
#define WSYS_DBGBVR8_EL1(val)		MSR(val, DBGBVR8_EL1)
#define WSYS_DBGBVR9_EL1(val)		MSR(val, DBGBVR9_EL1)
#define WSYS_DBGBVR10_EL1(val)		MSR(val, DBGBVR10_EL1)
#define WSYS_DBGBVR11_EL1(val)		MSR(val, DBGBVR11_EL1)
#define WSYS_DBGBVR12_EL1(val)		MSR(val, DBGBVR12_EL1)
#define WSYS_DBGBVR13_EL1(val)		MSR(val, DBGBVR13_EL1)
#define WSYS_DBGBVR14_EL1(val)		MSR(val, DBGBVR14_EL1)
#define WSYS_DBGBVR15_EL1(val)		MSR(val, DBGBVR15_EL1)
#define WSYS_DBGWVR0_EL1(val)		MSR(val, DBGWVR0_EL1)
#define WSYS_DBGWVR1_EL1(val)		MSR(val, DBGWVR1_EL1)
#define WSYS_DBGWVR2_EL1(val)		MSR(val, DBGWVR2_EL1)
#define WSYS_DBGWVR3_EL1(val)		MSR(val, DBGWVR3_EL1)
#define WSYS_DBGWVR4_EL1(val)		MSR(val, DBGWVR4_EL1)
#define WSYS_DBGWVR5_EL1(val)		MSR(val, DBGWVR5_EL1)
#define WSYS_DBGWVR6_EL1(val)		MSR(val, DBGWVR6_EL1)
#define WSYS_DBGWVR7_EL1(val)		MSR(val, DBGWVR7_EL1)
#define WSYS_DBGWVR8_EL1(val)		MSR(val, DBGWVR8_EL1)
#define WSYS_DBGWVR9_EL1(val)		MSR(val, DBGWVR9_EL1)
#define WSYS_DBGWVR10_EL1(val)		MSR(val, DBGWVR10_EL1)
#define WSYS_DBGWVR11_EL1(val)		MSR(val, DBGWVR11_EL1)
#define WSYS_DBGWVR12_EL1(val)		MSR(val, DBGWVR12_EL1)
#define WSYS_DBGWVR13_EL1(val)		MSR(val, DBGWVR13_EL1)
#define WSYS_DBGWVR14_EL1(val)		MSR(val, DBGWVR14_EL1)
#define WSYS_DBGWVR15_EL1(val)		MSR(val, DBGWVR15_EL1)

#endif
+11 −0
Original line number Diff line number Diff line
@@ -75,6 +75,17 @@ config MSM_JTAG_MM
	  If unsure, say 'N' here to avoid potential power, performance and
	  memory penalty.

config MSM_JTAGV8
	bool "Debug and ETM trace support across power collapse for ARMv8"
	help
	  Enables support for debugging (specifically breakpoints) and ETM
	  processor tracing across power collapse both for JTag and OS hosted
	  software running on ARMv8 target. Enabling this will ensure debug
	  and ETM registers are saved and restored across power collapse.

	  If unsure, say 'N' here to avoid potential power, performance and
	  memory penalty.

config MSM_QMI_INTERFACE
	depends on IPC_ROUTER
	depends on QMI_ENCDEC
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ obj-$(CONFIG_MSM_RPM_STATS_LOG) += rpm_stats.o rpm_master_stat.o
obj-$(CONFIG_MSM_RPM_LOG) += rpm_log.o
obj-$(CONFIG_MSM_JTAG) += jtag-fuse.o jtag.o
obj-$(CONFIG_MSM_JTAG_MM) +=  jtag-fuse.o jtag-mm.o
obj-$(CONFIG_MSM_JTAGV8) += jtag-fuse.o jtagv8.o jtagv8-mm.o
obj-$(CONFIG_MSM_QMI_INTERFACE) += qmi_interface.o

obj-$(CONFIG_MSM_SCM) += scm.o scm-boot.o
+632 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading