mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
arch: adjust idle stack offset to reserve space of stack info
Change-Id: I064b6dfcfa5152e58ad2dba98021b1aa37c98b7e Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
|
||||
#include "arm.h"
|
||||
#include "arm_internal.h"
|
||||
@@ -62,8 +63,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
|
||||
#include "arm_internal.h"
|
||||
#include "arm_arch.h"
|
||||
@@ -64,8 +65,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
|
||||
#include "arm.h"
|
||||
#include "arm_internal.h"
|
||||
@@ -62,8 +63,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
#include <arch/armv7-m/nvicpri.h>
|
||||
|
||||
#include "arm_internal.h"
|
||||
@@ -65,8 +66,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
|
||||
#include "arm.h"
|
||||
#include "arm_internal.h"
|
||||
@@ -62,8 +63,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
#include <arch/armv8-m/nvicpri.h>
|
||||
|
||||
#include "arm_internal.h"
|
||||
@@ -65,8 +66,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
#include <arch/irq.h>
|
||||
#include <avr/io.h>
|
||||
|
||||
@@ -63,8 +64,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure. Zeroing
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
#include "up_arch.h"
|
||||
@@ -60,8 +61,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure. Zeroing
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/sched.h>
|
||||
#include <nuttx/tls.h>
|
||||
#include <arch/irq.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
@@ -60,8 +61,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
#include <arch/irq.h>
|
||||
#include <arch/mips32/cp0.h>
|
||||
|
||||
@@ -64,8 +65,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
#include <arch/irq.h>
|
||||
|
||||
#include "lm32.h"
|
||||
@@ -77,8 +78,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
#include <arch/irq.h>
|
||||
#include <arch/minerva/csrdefs.h>
|
||||
#include <arch/minerva/irq.h>
|
||||
@@ -81,8 +82,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
#include "up_arch.h"
|
||||
@@ -79,8 +80,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
@@ -62,8 +63,9 @@ void up_initial_state(FAR struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
|
||||
#include "chip/chip.h"
|
||||
#include "up_internal.h"
|
||||
@@ -67,8 +68,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
#include "up_internal.h"
|
||||
#include "up_arch.h"
|
||||
|
||||
@@ -79,8 +80,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
#include <arch/irq.h>
|
||||
|
||||
#include "riscv_internal.h"
|
||||
@@ -63,8 +64,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
#include <arch/irq.h>
|
||||
|
||||
#include "riscv_internal.h"
|
||||
@@ -63,8 +64,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#endif
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
|
||||
@@ -58,8 +59,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(sim_getsp() -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
memset(&tcb->xcp, 0, sizeof(struct xcptcontext));
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
#include <arch/arch.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
@@ -60,8 +61,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
#include <arch/arch.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
@@ -61,8 +62,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)(g_idle_topstack -
|
||||
CONFIG_IDLETHREAD_STACKSIZE);
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
#include <arch/irq.h>
|
||||
#include <arch/xtensa/core.h>
|
||||
#include <arch/chip/core-isa.h>
|
||||
@@ -63,8 +64,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
if (tcb->pid == 0)
|
||||
{
|
||||
tcb->stack_alloc_ptr = g_idlestack;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
|
||||
#include "xtensa.h"
|
||||
#include "esp32_smp.h"
|
||||
@@ -97,8 +98,9 @@ int up_cpu_idlestack(int cpu, FAR struct tcb_s *tcb, size_t stack_size)
|
||||
/* Save information about pre-allocated IDLE thread stack */
|
||||
|
||||
tcb->stack_alloc_ptr = g_cpu1_idlestack;
|
||||
tcb->adj_stack_size = CPU1_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CPU1_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
|
||||
#if XCHAL_CP_NUM > 0
|
||||
/* REVISIT: Does it make since to have co-processors enabled on the IDLE
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
|
||||
#include "chip.h"
|
||||
#include "z80_internal.h"
|
||||
@@ -58,8 +59,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
if (tcb->pid == 0)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)CONFIG_STACK_BASE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/tls.h>
|
||||
|
||||
#include "chip.h"
|
||||
#include "z80_internal.h"
|
||||
@@ -58,8 +59,9 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
if (tcb->pid == 0)
|
||||
{
|
||||
tcb->stack_alloc_ptr = (void *)CONFIG_STACK_BASE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE;
|
||||
tcb->stack_base_ptr = tcb->stack_alloc_ptr;
|
||||
tcb->adj_stack_size = CONFIG_IDLETHREAD_STACKSIZE -
|
||||
sizeof(struct task_info_s);
|
||||
}
|
||||
|
||||
/* Initialize the initial exception register context structure */
|
||||
|
||||
Reference in New Issue
Block a user