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 2024/06/04 06:27:01 UTC
(nuttx) branch master updated (74702085f0 -> a219d75ace)
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/nuttx.git
from 74702085f0 defconfigs: Add SCHED_HAVE_PARENT=y to configs with WAITPID && BUILD_KERNEL
new 81c140a953 sched/mqueue: move message queue buffer to bss
new 58ad896281 sched/signal: move signal structures pool to bss
new a219d75ace boards/arm/lpc17xx_40xx: enlarge ksram size to 6k
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:
.../lpc17xx_40xx/lpc4088-devkit/scripts/memory.ld | 6 ++--
.../lpc4088-quickstart/scripts/memory.ld | 6 ++--
boards/arm/lpc17xx_40xx/open1788/scripts/memory.ld | 6 ++--
boards/arm/sam34/sam3u-ek/scripts/memory.ld | 6 ++--
boards/arm/stm32/stm3240g-eval/scripts/memory.ld | 6 ++--
sched/mqueue/mq_initialize.c | 41 ++++++++++++++--------
sched/signal/sig_initialize.c | 32 +++++++++++------
7 files changed, 62 insertions(+), 41 deletions(-)
(nuttx) 03/03: boards/arm/lpc17xx_40xx: enlarge ksram size to 6k
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/nuttx.git
commit a219d75aceacd5b1275b2735d833fbacf5c8ab90
Author: chao an <an...@lixiang.com>
AuthorDate: Mon Jun 3 08:55:28 2024 +0800
boards/arm/lpc17xx_40xx: enlarge ksram size to 6k
Signed-off-by: chao an <an...@lixiang.com>
---
boards/arm/lpc17xx_40xx/lpc4088-devkit/scripts/memory.ld | 6 +++---
boards/arm/lpc17xx_40xx/lpc4088-quickstart/scripts/memory.ld | 6 +++---
boards/arm/lpc17xx_40xx/open1788/scripts/memory.ld | 6 +++---
boards/arm/sam34/sam3u-ek/scripts/memory.ld | 6 +++---
boards/arm/stm32/stm3240g-eval/scripts/memory.ld | 6 +++---
5 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/boards/arm/lpc17xx_40xx/lpc4088-devkit/scripts/memory.ld b/boards/arm/lpc17xx_40xx/lpc4088-devkit/scripts/memory.ld
index 21d1813218..4cc10d8278 100644
--- a/boards/arm/lpc17xx_40xx/lpc4088-devkit/scripts/memory.ld
+++ b/boards/arm/lpc17xx_40xx/lpc4088-devkit/scripts/memory.ld
@@ -73,9 +73,9 @@ MEMORY
/* 64Kb of SRAM in the CPU block */
- ksram (rwx) : ORIGIN = 0x10000000, LENGTH = 4K /* May include waste */
- usram (rwx) : ORIGIN = 0x10001000, LENGTH = 4K
- xsram (rwx) : ORIGIN = 0x10002000, LENGTH = 24K /* All used as heap */
+ ksram (rwx) : ORIGIN = 0x10000000, LENGTH = 6K /* May include waste */
+ usram (rwx) : ORIGIN = 0x10001800, LENGTH = 4K
+ xsram (rwx) : ORIGIN = 0x10002800, LENGTH = 22K /* All used as heap */
/* Other peripheral memory (free, nothing is linked here) */
diff --git a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/scripts/memory.ld b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/scripts/memory.ld
index cba850d0b0..28275cf76f 100644
--- a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/scripts/memory.ld
+++ b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/scripts/memory.ld
@@ -73,9 +73,9 @@ MEMORY
/* 64Kb of SRAM in the CPU block */
- ksram (rwx) : ORIGIN = 0x10000000, LENGTH = 4K /* May include waste */
- usram (rwx) : ORIGIN = 0x10001000, LENGTH = 4K
- xsram (rwx) : ORIGIN = 0x10002000, LENGTH = 24K /* All used as heap */
+ ksram (rwx) : ORIGIN = 0x10000000, LENGTH = 6K /* May include waste */
+ usram (rwx) : ORIGIN = 0x10001800, LENGTH = 4K
+ xsram (rwx) : ORIGIN = 0x10002800, LENGTH = 22K /* All used as heap */
/* Other peripheral memory (free, nothing is linked here) */
diff --git a/boards/arm/lpc17xx_40xx/open1788/scripts/memory.ld b/boards/arm/lpc17xx_40xx/open1788/scripts/memory.ld
index f5f4a55d29..0a426207a2 100644
--- a/boards/arm/lpc17xx_40xx/open1788/scripts/memory.ld
+++ b/boards/arm/lpc17xx_40xx/open1788/scripts/memory.ld
@@ -73,9 +73,9 @@ MEMORY
/* 64Kb of SRAM in the CPU block */
- ksram (rwx) : ORIGIN = 0x10000000, LENGTH = 4K /* May include waste */
- usram (rwx) : ORIGIN = 0x10001000, LENGTH = 4K
- xsram (rwx) : ORIGIN = 0x10002000, LENGTH = 24K /* All used as heap */
+ ksram (rwx) : ORIGIN = 0x10000000, LENGTH = 6K /* May include waste */
+ usram (rwx) : ORIGIN = 0x10001800, LENGTH = 4K
+ xsram (rwx) : ORIGIN = 0x10002800, LENGTH = 22K /* All used as heap */
/* Other peripheral memory (free, nothing is linked here) */
diff --git a/boards/arm/sam34/sam3u-ek/scripts/memory.ld b/boards/arm/sam34/sam3u-ek/scripts/memory.ld
index e1c985cc7f..86ddea8980 100644
--- a/boards/arm/sam34/sam3u-ek/scripts/memory.ld
+++ b/boards/arm/sam34/sam3u-ek/scripts/memory.ld
@@ -72,9 +72,9 @@ MEMORY
/* 32Kb SRAM */
- ksram1 (rwx) : ORIGIN = 0x20000000, LENGTH = 4K
- usram1 (rwx) : ORIGIN = 0x20001000, LENGTH = 4K
- xsram1 (rwx) : ORIGIN = 0x20002000, LENGTH = 24K
+ ksram1 (rwx) : ORIGIN = 0x20000000, LENGTH = 6K
+ usram1 (rwx) : ORIGIN = 0x20001800, LENGTH = 4K
+ xsram1 (rwx) : ORIGIN = 0x20002800, LENGTH = 22K
/* 16Kb SRAM */
diff --git a/boards/arm/stm32/stm3240g-eval/scripts/memory.ld b/boards/arm/stm32/stm3240g-eval/scripts/memory.ld
index 115d523216..95ee51b96b 100644
--- a/boards/arm/stm32/stm3240g-eval/scripts/memory.ld
+++ b/boards/arm/stm32/stm3240g-eval/scripts/memory.ld
@@ -79,7 +79,7 @@ MEMORY
/* 112Kb of contiguous SRAM */
- ksram (rwx) : ORIGIN = 0x20000000, LENGTH = 4K
- usram (rwx) : ORIGIN = 0x20001000, LENGTH = 4K
- xsram (rwx) : ORIGIN = 0x20002000, LENGTH = 104K
+ ksram (rwx) : ORIGIN = 0x20000000, LENGTH = 6K
+ usram (rwx) : ORIGIN = 0x20001800, LENGTH = 4K
+ xsram (rwx) : ORIGIN = 0x20002800, LENGTH = 102K
}
(nuttx) 01/03: sched/mqueue: move message queue buffer to bss
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/nuttx.git
commit 81c140a9533d9cd2a1a36041b735e8d6ed05bd98
Author: chao an <an...@lixiang.com>
AuthorDate: Wed May 29 08:53:32 2024 +0800
sched/mqueue: move message queue buffer to bss
Signed-off-by: chao an <an...@lixiang.com>
---
sched/mqueue/mq_initialize.c | 41 ++++++++++++++++++++++++++---------------
1 file changed, 26 insertions(+), 15 deletions(-)
diff --git a/sched/mqueue/mq_initialize.c b/sched/mqueue/mq_initialize.c
index b0cc3ea5a9..933dd2f23b 100644
--- a/sched/mqueue/mq_initialize.c
+++ b/sched/mqueue/mq_initialize.c
@@ -31,6 +31,21 @@
#include "mqueue/mqueue.h"
#include "mqueue/msg.h"
+/****************************************************************************
+ * Private Type Definitions
+ ****************************************************************************/
+
+struct msgpool_s
+{
+#ifndef CONFIG_DISABLE_MQUEUE
+ struct mqueue_msg_s mqueue[CONFIG_PREALLOC_MQ_MSGS +
+ CONFIG_PREALLOC_MQ_IRQ_MSGS];
+#endif
+#ifndef CONFIG_DISABLE_MQUEUE_SYSV
+ struct msgbuf_s msgbuf[CONFIG_PREALLOC_MQ_MSGS];
+#endif
+};
+
/****************************************************************************
* Public Data
****************************************************************************/
@@ -52,6 +67,14 @@ struct list_node g_msgfreeirq;
#endif
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+/* This is a pool of pre-allocated message queue buffers */
+
+static struct msgpool_s g_msgpool;
+
/****************************************************************************
* Private Functions
****************************************************************************/
@@ -69,8 +92,8 @@ struct list_node g_msgfreeirq;
#ifndef CONFIG_DISABLE_MQUEUE
static FAR void * mq_msgblockinit(FAR struct list_node *list,
- FAR struct mqueue_msg_s *mqmsgblock,
- uint16_t nmsgs, uint8_t alloc_type)
+ FAR struct mqueue_msg_s *mqmsgblock,
+ uint16_t nmsgs, uint8_t alloc_type)
{
int i;
for (i = 0; i < nmsgs; i++)
@@ -125,22 +148,10 @@ static FAR void *sysv_msgblockinit(FAR struct list_node *list,
void nxmq_initialize(void)
{
- FAR void *msg;
+ FAR void *msg = &g_msgpool;
sched_trace_begin();
- msg = kmm_malloc(
-#ifndef CONFIG_DISABLE_MQUEUE
- sizeof(struct mqueue_msg_s) *
- (CONFIG_PREALLOC_MQ_MSGS + CONFIG_PREALLOC_MQ_IRQ_MSGS)
-#endif
-#ifndef CONFIG_DISABLE_MQUEUE_SYSV
- + sizeof(struct msgbuf_s) * CONFIG_PREALLOC_MQ_MSGS
-#endif
- );
-
- DEBUGASSERT(msg != NULL);
-
/* Initialize a block of messages for general use */
#ifndef CONFIG_DISABLE_MQUEUE
(nuttx) 02/03: sched/signal: move signal structures pool to bss
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/nuttx.git
commit 58ad8962816b5e10213dce23d1cd86930183a407
Author: chao an <an...@lixiang.com>
AuthorDate: Wed May 29 09:14:53 2024 +0800
sched/signal: move signal structures pool to bss
Decoupling with memory allocator
Signed-off-by: chao an <an...@lixiang.com>
---
sched/signal/sig_initialize.c | 32 +++++++++++++++++++++-----------
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/sched/signal/sig_initialize.c b/sched/signal/sig_initialize.c
index 3f9e2a1e67..21b5c8025a 100644
--- a/sched/signal/sig_initialize.c
+++ b/sched/signal/sig_initialize.c
@@ -33,6 +33,18 @@
#include "signal/signal.h"
+/****************************************************************************
+ * Private Type Definitions
+ ****************************************************************************/
+
+struct sigpool_s
+{
+ sigq_t sigq[NUM_PENDING_ACTIONS +
+ CONFIG_SIG_PREALLOC_IRQ_ACTIONS];
+ sigpendq_t sigpendq[NUM_SIGNALS_PENDING +
+ CONFIG_SIG_PREALLOC_IRQ_ACTIONS];
+};
+
/****************************************************************************
* Public Data
****************************************************************************/
@@ -68,6 +80,14 @@ sq_queue_t g_sigpendingsignal;
sq_queue_t g_sigpendingirqsignal;
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+/* This is a pool of pre-allocated signal structures buffers */
+
+static struct sigpool_s g_sigpool;
+
/****************************************************************************
* Private Functions
****************************************************************************/
@@ -134,7 +154,7 @@ static void *nxsig_init_pendingsignalblock(FAR sq_queue_t *siglist,
void nxsig_initialize(void)
{
- FAR void *sigpool;
+ FAR void *sigpool = &g_sigpool;
sched_trace_begin();
@@ -146,16 +166,6 @@ void nxsig_initialize(void)
sq_init(&g_sigpendingsignal);
sq_init(&g_sigpendingirqsignal);
- /* Add a block of signal structures to each list */
-
- sigpool =
- kmm_malloc(sizeof(sigq_t) *
- (NUM_PENDING_ACTIONS + CONFIG_SIG_PREALLOC_IRQ_ACTIONS)
- + sizeof(sigpendq_t) *
- (NUM_SIGNALS_PENDING + CONFIG_SIG_PREALLOC_IRQ_ACTIONS));
-
- DEBUGASSERT(sigpool != NULL);
-
sigpool = nxsig_init_block(&g_sigpendingaction, sigpool,
NUM_PENDING_ACTIONS, SIG_ALLOC_FIXED);
sigpool = nxsig_init_block(&g_sigpendingirqaction, sigpool,