You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/07/03 09:13:22 UTC
[incubator-nuttx] branch master updated (51b287b -> 4a9c07f)
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.
from 51b287b stm32f103-minimum/sensors: Remove CONFIG_ARCH_STACKDUMP
new 9f206f2 arch: armv6-m: Introduce setintstack macro
new 6370c82 arch: rp2040: Introduce setintstack macro for SMP
new 4a9c07f boards: raspberrypi-pico: Update smp/defconfig
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
arch/arm/src/armv6-m/arm_exception.S | 28 ++++++++++++++++--
arch/arm/src/rp2040/chip.h | 33 ++++++++++++++++------
.../rp2040/raspberrypi-pico/configs/smp/defconfig | 1 +
3 files changed, 52 insertions(+), 10 deletions(-)
[incubator-nuttx] 03/03: boards: raspberrypi-pico: Update
smp/defconfig
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 4a9c07fab1c99d5f05c59ac809501d4558315495
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Sat Jul 3 09:16:05 2021 +0900
boards: raspberrypi-pico: Update smp/defconfig
Summary:
- This commit adds CONFIG_ARCH_INTERRUPTSTACK=2048 to smp/defconfig
Impact:
- raspberrypi-pico:smp only
Testing:
- Tested with ostest
Signed-off-by: Masayuki Ishikawa <Ma...@jp.sony.com>
---
boards/arm/rp2040/raspberrypi-pico/configs/smp/defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/smp/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/smp/defconfig
index 7f35050..f7524ae 100644
--- a/boards/arm/rp2040/raspberrypi-pico/configs/smp/defconfig
+++ b/boards/arm/rp2040/raspberrypi-pico/configs/smp/defconfig
@@ -19,6 +19,7 @@ CONFIG_ARCH_BOARD="raspberrypi-pico"
CONFIG_ARCH_BOARD_RASPBERRYPI_PICO=y
CONFIG_ARCH_CHIP="rp2040"
CONFIG_ARCH_CHIP_RP2040=y
+CONFIG_ARCH_INTERRUPTSTACK=2048
CONFIG_ARCH_RAMVECTORS=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_BOARDCTL_RESET=y
[incubator-nuttx] 01/03: arch: armv6-m: Introduce setintstack macro
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 9f206f2bb6dcb6cf395fd430696af3c07312a8a1
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Sat Jul 3 09:03:23 2021 +0900
arch: armv6-m: Introduce setintstack macro
Summary:
- This commit introduces setintstack macro which can be
overridden for SMP with interrupt stack
Impact:
- SMP only
Testing:
- Tested with raspberrypi-pico:smp
- NOTE: more commits will be added later
Signed-off-by: Masayuki Ishikawa <Ma...@jp.sony.com>
---
arch/arm/src/armv6-m/arm_exception.S | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/arch/arm/src/armv6-m/arm_exception.S b/arch/arm/src/armv6-m/arm_exception.S
index a2200be..b71a912 100644
--- a/arch/arm/src/armv6-m/arm_exception.S
+++ b/arch/arm/src/armv6-m/arm_exception.S
@@ -44,6 +44,11 @@
#include <nuttx/config.h>
#include <arch/irq.h>
+
+#ifdef CONFIG_SMP
+# include "chip.h"
+#endif
+
#include "exc_return.h"
/****************************************************************************
@@ -54,6 +59,26 @@
.file "arm_exception.S"
/****************************************************************************
+ * Macro Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: setintstack
+ *
+ * Description:
+ * Set the current stack pointer to the "top" the interrupt stack. Single CPU
+ * case. Must be provided by MCU-specific logic in the SMP case.
+ *
+ ****************************************************************************/
+
+#if !defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 3
+ .macro setintstack, tmp1, tmp2
+ ldr \tmp1, =g_intstacktop
+ mov sp, \tmp1
+ .endm
+#endif
+
+/****************************************************************************
* .text
****************************************************************************/
@@ -142,8 +167,7 @@ exception_common:
*/
#if CONFIG_ARCH_INTERRUPTSTACK > 3
- ldr r7, =g_intstacktop /* R7=Top of the interrupt stack */
- mov sp, r7 /* Set the new stack point */
+ setintstack r7, r6 /* SP = IRQ stack top */
push {r1} /* Save the MSP on the interrupt stack */
bl arm_doirq /* R0=IRQ, R1=register save area on stack */
pop {r1} /* Recover R1=main stack pointer */
[incubator-nuttx] 02/03: arch: rp2040: Introduce setintstack macro
for SMP
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 6370c820eac3395e9d1a2692df676d1457e9b31b
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Sat Jul 3 09:11:59 2021 +0900
arch: rp2040: Introduce setintstack macro for SMP
Summary:
- This commit introduces setintstack macro to rp2040
which is used for SMP with interrupt stack
Impact:
- SMP with interrupt stack
Testing:
- Tested with raspberrypi-pico:smp
- NOTE: seed to set CONFIG_ARCH_INTERRUPTSTACK=2048
Signed-off-by: Masayuki Ishikawa <Ma...@jp.sony.com>
---
arch/arm/src/rp2040/chip.h | 33 +++++++++++++++++++++++++--------
1 file changed, 25 insertions(+), 8 deletions(-)
diff --git a/arch/arm/src/rp2040/chip.h b/arch/arm/src/rp2040/chip.h
index e9fc1b0..7850384 100644
--- a/arch/arm/src/rp2040/chip.h
+++ b/arch/arm/src/rp2040/chip.h
@@ -47,20 +47,37 @@
#include "hardware/rp2040_memorymap.h"
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
+#if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 3
+# include "hardware/rp2040_sio.h"
+# include "rp2040_irq.h"
+#endif
/****************************************************************************
- * Public Types
+ * Macro Definitions
****************************************************************************/
-/****************************************************************************
- * Public Data
- ****************************************************************************/
+#ifdef __ASSEMBLY__
/****************************************************************************
- * Public Function Prototypes
+ * Name: setintstack
+ *
+ * Description:
+ * Set the current stack pointer to the "top" the correct interrupt stack
+ * for the current CPU.
+ *
****************************************************************************/
+#if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 3
+ .macro setintstack, tmp1, tmp2
+ ldr \tmp1, =RP2040_SIO_CPUID
+ ldr \tmp1, [\tmp1, #0]
+ lsl \tmp1, \tmp1, #2
+ ldr \tmp2, =g_cpu_intstack_top
+ add \tmp2, \tmp2, \tmp1
+ ldr \tmp2, [\tmp2, #0]
+ mov sp, \tmp2 /* sp = g_cpu_intstack_top[cpuid] */
+ .endm
+#endif /* CONFIG_SMP && CONFIG_ARCH_INTERRUPTSTACK > 7 */
+
+#endif /* __ASSEMBLY__ */
#endif /* __ARCH_ARM_SRC_RP2040_CHIP_H */