This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 9d74a207d7d arch/tricore: Fix the make build of the PPRS support.
9d74a207d7d is described below
commit 9d74a207d7d04908a04d727e8db6923b28a33b26
Author: Saravanan Sekar <[email protected]>
AuthorDate: Tue Nov 17 13:43:47 2026 +0530
arch/tricore: Fix the make build of the PPRS support.
The help of ARCH_HAVE_PPRS starts with --help--, which kconfig-frontends
rejects, so make olddefconfig fails for every TriCore configuration.
The public irq.h also includes the iLLD IfxCpu.h for CPU_PPRS, which the
applications cannot find, so the TC4xx builds fail. Use ---help--- and
take PPRS from csfr.h like the other core registers.
Signed-off-by: Saravanan Sekar <[email protected]>
---
arch/tricore/Kconfig | 2 +-
arch/tricore/include/csfr.h | 1 +
arch/tricore/include/irq.h | 10 +++-------
3 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/arch/tricore/Kconfig b/arch/tricore/Kconfig
index 35edb65baaf..c220d924d54 100644
--- a/arch/tricore/Kconfig
+++ b/arch/tricore/Kconfig
@@ -150,7 +150,7 @@ config ARCH_MPU_CODE_NREGIONS
config ARCH_HAVE_PPRS
bool
- --help--
+ ---help---
The saving process for MPU PRS differs between TC1V6 and
TC1V8.TC1V6
saves PRS in the PSW, while TC1V8 saves PRS in the PPRS
register.
diff --git a/arch/tricore/include/csfr.h b/arch/tricore/include/csfr.h
index eefb06fd046..5875d813a37 100644
--- a/arch/tricore/include/csfr.h
+++ b/arch/tricore/include/csfr.h
@@ -38,6 +38,7 @@
#define TRICORE_CPU_PC 0xfe08 /* Program Counter */
#define TRICORE_CPU_CORE_ID 0xfe1c /* Core Identification */
#define TRICORE_CPU_ICR 0xfe2c /* Interrupt Control Register */
+#define TRICORE_CPU_PPRS 0xfe34 /* Previous PRS, TC1.8 */
#define TRICORE_CPU_FCX 0xfe38 /* Free CSA List Head Pointer */
#define TRICORE_CPU_LCX 0xfe3c /* Free CSA List Limit Pointer */
diff --git a/arch/tricore/include/irq.h b/arch/tricore/include/irq.h
index 0897326bb35..492e4be9908 100644
--- a/arch/tricore/include/irq.h
+++ b/arch/tricore/include/irq.h
@@ -46,10 +46,6 @@
#include <arch/chip/irq.h>
#include <arch/arch.h>
-#ifdef CONFIG_ARCH_HAVE_PPRS
-# include <IfxCpu.h>
-#endif
-
/****************************************************************************
* Pre-processor Prototypes
****************************************************************************/
@@ -132,10 +128,10 @@
#define PSW_PRS_USER (0)
#define tricore_change_pprs(tcb, val) (tcb)->xcp.pprs = (val)
#define tricore_load_pprs(tcb) (tcb)->xcp.pprs
- #define tricore_restore_pprs(tcb) __mtcr(CPU_PPRS,
(tcb)->xcp.pprs)
- #define tricore_store_pprs(tcb) (tcb)->xcp.pprs =
__mfcr(CPU_PPRS)
+ #define tricore_restore_pprs(tcb)
tricore_mtcr(TRICORE_CPU_PPRS, (tcb)->xcp.pprs)
+ #define tricore_store_pprs(tcb) (tcb)->xcp.pprs =
tricore_mfcr(TRICORE_CPU_PPRS)
#define tricore_syscall_load_pprs(tcb ,index) (tcb)->xcp.syscall_pprs[index]
- #define tricore_syscall_store_pprs(tcb ,index)
(tcb)->xcp.syscall_pprs[index] = __mfcr(CPU_PPRS)
+ #define tricore_syscall_store_pprs(tcb ,index)
(tcb)->xcp.syscall_pprs[index] = tricore_mfcr(TRICORE_CPU_PPRS)
#define tricore_sig_change_pprs(tcb ,val) (tcb)->xcp.saved_pprs = (val)
#define tricore_sig_load_pprs(tcb) (tcb)->xcp.saved_pprs
#define tricore_pprs_to_prs(pprs) (((pprs & 3) << 12) | ((pprs
& 4) << 13))