Squashed commit of the following:

sched/init/nx_bringup.c:  Fix a naming collision.
    sched/init:  Rename os_start() to nx_start()
    sched/init:  Rename os_smp* to nx_smp*
    sched/init:  Rename os_bringup to nx_bringup
    sched/init:  rename all internal static functions to begin with nx_ vs os_
This commit is contained in:
Gregory Nutt 2019-02-04 16:20:35 -06:00
parent bb623d1e04
commit a2e62f557d
89 changed files with 333 additions and 330 deletions

View File

@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4">
<td>
<h1><big><font color="#3c34ec"><i>On-Demand Paging</i></font></big></h1>
<p>Last Updated: February 4, 2010</p>
<p>Last Updated: February 4, 2019</p>
</td>
</tr>
</table>
@ -194,7 +194,7 @@
</ul>
</p>
<p>
During OS initialization in <code>sched/os_start.c</code>, the following steps
During OS initialization in <code>sched/init/nx_start.c</code>, the following steps
will be performed:
<ul>
<li>

View File

@ -12,7 +12,7 @@
<h1><big><font color="#3c34ec">
<i>NuttX RTOS Porting Guide</i>
</font></big></h1>
<p>Last Updated: August 25, 2018</p>
<p>Last Updated: February 4, 2019</p>
</td>
</tr>
</table>
@ -150,7 +150,7 @@
</ul>
<a href="#exports">4.6 APIs Exported by NuttX to Architecture-Specific Logic</a>
<ul>
<a href="#osstart">4.6.1 <code>os_start()</code></a><br>
<a href="#osstart">4.6.1 <code>nx_start()</code></a><br>
<a href="#listmgmt">4.6.2 OS List Management APIs</a><br>
<a href="#schedprocesstimer">4.6.3 <code>sched_process_timer()</code></a><br>
<a href="#schedtimerexpiration">4.6.4 <code>sched_timer_expiration()</code></a><br>
@ -3881,7 +3881,7 @@ void lpwork_restorepriority(uint8_t reqprio);
for use by the architecture specific logic.
</p>
<h3><a name="osstart">4.6.1 <code>os_start()</code></a></h3>
<h3><a name="osstart">4.6.1 <code>nx_start()</code></a></h3>
<p>
<b><i>To be provided</i></b>
</p>
@ -6649,7 +6649,7 @@ int syslog_initialize(enum syslog_init_e phase);
</li>
<li>
<p>
<code>syslog_initialize()</code> is called again from <code>os_start()</code> when the full OS initialization has completed, just before the application main entry point is spawned. In this case, <code>syslog_initialize()</code> is called with the argument <code>SYSLOG_INIT_LATE</code>.
<code>syslog_initialize()</code> is called again from <code>nx_start()</code> when the full OS initialization has completed, just before the application main entry point is spawned. In this case, <code>syslog_initialize()</code> is called with the argument <code>SYSLOG_INIT_LATE</code>.
</li>
</ul>
<p>

24
TODO
View File

@ -296,9 +296,9 @@ o Task/Scheduler (sched/)
1. One problem is stack-related data in the IDLE threads TCB.
A solution might be to standardize the use of g_idle_topstack.
That you could add initialization like this in os_start:
That you could add initialization like this in nx_start:
@@ -344,6 +347,11 @@ void os_start(void)
@@ -344,6 +347,11 @@ void nx_start(void)
g_idleargv[1] = NULL;
g_idletcb.argv = g_idleargv;
@ -335,18 +335,18 @@ o Task/Scheduler (sched/)
2. Another problem is colorizing that stack to use with
stack usage monitoring logic. There is logic in some
start functions to do this in a function called go_os_start.
start functions to do this in a function called go_nx_start.
It is available in these architectures:
./arm/src/efm32/efm32_start.c:static void go_os_start(void *pv, unsigned int nbytes)
./arm/src/kinetis/kinetis_start.c:static void go_os_start(void *pv, unsigned int nbytes)
./arm/src/sam34/sam_start.c:static void go_os_start(void *pv, unsigned int nbytes)
./arm/src/samv7/sam_start.c:static void go_os_start(void *pv, unsigned int nbytes)
./arm/src/stm32/stm32_start.c:static void go_os_start(void *pv, unsigned int nbytes)
./arm/src/stm32f7/stm32_start.c:static void go_os_start(void *pv, unsigned int nbytes)
./arm/src/stm32l4/stm32l4_start.c:static void go_os_start(void *pv, unsigned int nbytes)
./arm/src/tms570/tms570_boot.c:static void go_os_start(void *pv, unsigned int nbytes)
./arm/src/xmc4/xmc4_start.c:static void go_os_start(void *pv, unsigned int nbytes)
./arm/src/efm32/efm32_start.c:static void go_nx_start(void *pv, unsigned int nbytes)
./arm/src/kinetis/kinetis_start.c:static void go_nx_start(void *pv, unsigned int nbytes)
./arm/src/sam34/sam_start.c:static void go_nx_start(void *pv, unsigned int nbytes)
./arm/src/samv7/sam_start.c:static void go_nx_start(void *pv, unsigned int nbytes)
./arm/src/stm32/stm32_start.c:static void go_nx_start(void *pv, unsigned int nbytes)
./arm/src/stm32f7/stm32_start.c:static void go_nx_start(void *pv, unsigned int nbytes)
./arm/src/stm32l4/stm32l4_start.c:static void go_nx_start(void *pv, unsigned int nbytes)
./arm/src/tms570/tms570_boot.c:static void go_nx_start(void *pv, unsigned int nbytes)
./arm/src/xmc4/xmc4_start.c:static void go_nx_start(void *pv, unsigned int nbytes)
But no others.
Status: Open

View File

@ -630,7 +630,7 @@ __start:
/* Finally branch to the OS entry point */
mov lr, #0 /* LR = return address (none) */
b os_start /* Branch to os_start */
b nx_start /* Branch to nx_start */
/* Text-section constants:
*

View File

@ -147,7 +147,7 @@ __start:
/* Finally branch to the OS entry point */
mov lr, #0 /* LR = return address (none) */
b os_start /* Branch to os_start */
b nx_start /* Branch to nx_start */
/* Variables:
* _sbss is the start of the BSS region (see ld.script)

View File

@ -665,7 +665,7 @@ __start:
/* Finally branch to the OS entry point */
mov lr, #0 /* LR = return address (none) */
b os_start /* Branch to os_start */
b nx_start /* Branch to nx_start */
.size .Lvstart, .-.Lvstart
/***************************************************************************

View File

@ -697,7 +697,7 @@ __start:
/* Finally branch to the OS entry point */
mov lr, #0 /* LR = return address (none) */
b os_start /* Branch to os_start */
b nx_start /* Branch to nx_start */
.size .Lvstart, .-.Lvstart
/***************************************************************************

View File

@ -133,7 +133,7 @@ extern "C"
* among other things, must initialize memories. After initializatino
( of the memories, this function will call arm_data_initialize() to
* initialize the memory resources
* 4. This function will then branch to os_start() to start the operating
* 4. This function will then branch to nx_start() to start the operating
* system.
*
****************************************************************************/

View File

@ -384,10 +384,10 @@ __start:
* within arm_boot() must configure SDRAM and call arm_data_initialize()
* if CONFIG_ARMV7R_MEMINIT=y.
*
* This function does not return. It must give control to os_start()
* This function does not return. It must give control to nx_start()
* at the completion of its initialization.
*
* Why not just call arm_boot() and branch to os_start() when it returns?
* Why not just call arm_boot() and branch to nx_start() when it returns?
* If the stack pointer initialized above lies in SDRAM, then that may
* not be possible. Also, in the special case of the TMS570, it may
* perform a destructive test, losing the pushed content of the stack.

View File

@ -99,7 +99,7 @@ const uintptr_t g_idle_topstack = HEAP_BASE;
static inline void efm32_fpuconfig(void);
#endif
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
__attribute__ ((naked,no_instrument_function,noreturn));
#endif
@ -218,18 +218,18 @@ static inline void efm32_fpuconfig(void)
#endif
/****************************************************************************
* Name: go_os_start
* Name: go_nx_start
*
* Description:
* Set the IDLE stack to the coloration value and jump into os_start()
* Set the IDLE stack to the coloration value and jump into nx_start()
*
****************************************************************************/
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
{
/* Set the IDLE stack to the stack coloration value then jump to
* os_start(). We take extreme care here because were currently
* nx_start(). We take extreme care here because were currently
* executing on this stack.
*
* We want to avoid sneak stack access generated by the compiler.
@ -253,7 +253,7 @@ static void go_os_start(void *pv, unsigned int nbytes)
"2:\n"
"\tmov r14, #0\n" /* LR = return address (none) */
"\tb os_start\n" /* Branch to os_start */
"\tb nx_start\n" /* Branch to nx_start */
);
}
#endif
@ -339,13 +339,13 @@ void __start(void)
showprogress('\n');
#ifdef CONFIG_STACK_COLORATION
/* Set the IDLE stack to the coloration value and jump into os_start() */
/* Set the IDLE stack to the coloration value and jump into nx_start() */
go_os_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
go_nx_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
#else
/* Call os_start() */
/* Call nx_start() */
os_start();
nx_start();
/* Shouldn't get here */

View File

@ -962,7 +962,7 @@ int up_putc(int ch)
locked = false;
if (!up_interrupt_context() && g_os_initstate >= OSINIT_HARDWARE)
if (!up_interrupt_context() && g_nx_initstate >= OSINIT_HARDWARE)
{
ret = nxsem_wait(&g_putc_lock);
if (ret < 0)

View File

@ -92,7 +92,7 @@
static inline void imxrt_fpuconfig(void);
#endif
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
__attribute__ ((naked, no_instrument_function, noreturn));
#endif
@ -245,18 +245,18 @@ static inline void imxrt_tcmenable(void)
}
/****************************************************************************
* Name: go_os_start
* Name: go_nx_start
*
* Description:
* Set the IDLE stack to the coloration value and jump into os_start()
* Set the IDLE stack to the coloration value and jump into nx_start()
*
****************************************************************************/
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
{
/* Set the IDLE stack to the stack coloration value then jump to
* os_start(). We take extreme care here because were currently
* nx_start(). We take extreme care here because were currently
* executing on this stack.
*
* We want to avoid sneak stack access generated by the compiler.
@ -280,7 +280,7 @@ static void go_os_start(void *pv, unsigned int nbytes)
"2:\n"
"\tmov r14, #0\n" /* LR = return address (none) */
"\tb os_start\n" /* Branch to os_start */
"\tb nx_start\n" /* Branch to nx_start */
);
}
#endif
@ -390,13 +390,13 @@ void __start(void)
/* Then start NuttX */
#ifdef CONFIG_STACK_COLORATION
/* Set the IDLE stack to the coloration value and jump into os_start() */
/* Set the IDLE stack to the coloration value and jump into nx_start() */
go_os_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
go_nx_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
#else
/* Call os_start() */
/* Call nx_start() */
os_start();
nx_start();
/* Shouldn't get here */

View File

@ -69,7 +69,7 @@ static inline void kinetis_fpuconfig(void);
#if 0 /* Not used */
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
__attribute__ ((naked, no_instrument_function, noreturn));
#endif
#endif
@ -216,19 +216,19 @@ static inline void kinetis_fpuconfig(void)
#endif
/****************************************************************************
* Name: go_os_start
* Name: go_nx_start
*
* Description:
* Set the IDLE stack to the coloration value and jump into os_start()
* Set the IDLE stack to the coloration value and jump into nx_start()
*
****************************************************************************/
#if 0 /* Not used */
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
{
/* Set the IDLE stack to the stack coloration value then jump to
* os_start(). We take extreme care here because were currently
* nx_start(). We take extreme care here because were currently
* executing on this stack.
*
* We want to avoid sneak stack access generated by the compiler.
@ -252,7 +252,7 @@ static void go_os_start(void *pv, unsigned int nbytes)
"2:\n"
"\tmov r14, #0\n" /* LR = return address (none) */
"\tb os_start\n" /* Branch to os_start */
"\tb nx_start\n" /* Branch to nx_start */
);
}
#endif
@ -362,7 +362,7 @@ void __start(void)
/* Then start NuttX */
os_start();
nx_start();
/* Shouldn't get here */

View File

@ -177,7 +177,7 @@ void __start(void)
showprogress('\r');
showprogress('\n');
os_start();
nx_start();
/* Shoulnd't get here */

View File

@ -138,7 +138,7 @@ static void cpu1_boot(void)
/* Then transfer control to the IDLE task */
(void)os_idle_task(0, NULL);
(void)nx_idle_task(0, NULL);
}

View File

@ -126,7 +126,7 @@ extern uint32_t _stext_sram, _etext_sram, _ftext, _svect;
****************************************************************************/
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
__attribute__ ((naked, no_instrument_function, noreturn));
#endif
@ -149,18 +149,18 @@ static void go_os_start(void *pv, unsigned int nbytes)
#endif
/****************************************************************************
* Name: go_os_start
* Name: go_nx_start
*
* Description:
* Set the IDLE stack to the coloration value and jump into os_start()
* Set the IDLE stack to the coloration value and jump into nx_start()
*
****************************************************************************/
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
{
/* Set the IDLE stack to the stack coloration value then jump to
* os_start(). We take extreme care here because were currently
* nx_start(). We take extreme care here because were currently
* executing on this stack.
*
* We want to avoid sneak stack access generated by the compiler.
@ -184,7 +184,7 @@ static void go_os_start(void *pv, unsigned int nbytes)
"2:\n"
"\tmov r14, #0\n" /* LR = return address (none) */
"\tb os_start\n" /* Branch to os_start */
"\tb nx_start\n" /* Branch to nx_start */
);
}
#endif
@ -401,13 +401,13 @@ void __start(void)
CURRENT_REGS = NULL;
#ifdef CONFIG_STACK_COLORATION
/* Set the IDLE stack to the coloration value and jump into os_start() */
/* Set the IDLE stack to the coloration value and jump into nx_start() */
go_os_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
go_nx_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
#else
/* Call os_start() */
/* Call nx_start() */
os_start();
nx_start();
/* Shoulnd't get here */

View File

@ -168,7 +168,7 @@ void __start(void)
showprogress('\r');
showprogress('\n');
os_start();
nx_start();
/* Shouldn't get here */

View File

@ -290,7 +290,7 @@ void __start(void)
showprogress('\r');
showprogress('\n');
os_start();
nx_start();
/* Shouldn't get here */

View File

@ -597,7 +597,7 @@ __start:
/* Then jump to OS entry */
b os_start
b nx_start
/* Variables:
* _sbss is the start of the BSS region (see ld.script)

View File

@ -198,7 +198,7 @@ __start:
/* Then jump to OS entry */
b os_start
b nx_start
/* Variables:
* _sbss is the start of the BSS region (see ld.script)

View File

@ -352,7 +352,7 @@ void __start(void)
showprogress('\r');
showprogress('\n');
os_start();
nx_start();
/* Shouldn't get here */

View File

@ -275,7 +275,7 @@ void __start(void)
showprogress('\r');
showprogress('\n');
os_start();
nx_start();
/* Shouldn't get here */

View File

@ -281,7 +281,7 @@ void __start(void)
showprogress('\r');
showprogress('\n');
os_start();
nx_start();
/* Shouldn't get here */

View File

@ -256,7 +256,7 @@ void __start(void)
showprogress('\r');
showprogress('\n');
os_start();
nx_start();
/* Shouldn't get here */

View File

@ -169,7 +169,7 @@ void __start(void)
showprogress('\r');
showprogress('\n');
os_start();
nx_start();
/* Shoulnd't get here */

View File

@ -134,7 +134,7 @@ static void cpu1_boot(void)
/* Then transfer control to the IDLE task */
(void)os_idle_task(0, NULL);
(void)nx_idle_task(0, NULL);
}
/****************************************************************************

View File

@ -98,7 +98,7 @@ const uintptr_t g_idle_topstack = HEAP_BASE;
static inline void sam_fpuconfig(void);
#endif
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
__attribute__ ((naked, no_instrument_function, noreturn));
#endif
@ -217,18 +217,18 @@ static inline void sam_fpuconfig(void)
#endif
/****************************************************************************
* Name: go_os_start
* Name: go_nx_start
*
* Description:
* Set the IDLE stack to the coloration value and jump into os_start()
* Set the IDLE stack to the coloration value and jump into nx_start()
*
****************************************************************************/
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
{
/* Set the IDLE stack to the stack coloration value then jump to
* os_start(). We take extreme care here because were currently
* nx_start(). We take extreme care here because were currently
* executing on this stack.
*
* We want to avoid sneak stack access generated by the compiler.
@ -252,7 +252,7 @@ static void go_os_start(void *pv, unsigned int nbytes)
"2:\n"
"\tmov r14, #0\n" /* LR = return address (none) */
"\tb os_start\n" /* Branch to os_start */
"\tb nx_start\n" /* Branch to nx_start */
);
}
#endif
@ -368,14 +368,14 @@ void __start(void)
showprogress('\n');
#ifdef CONFIG_STACK_COLORATION
/* Set the IDLE stack to the coloration value and jump into os_start() */
/* Set the IDLE stack to the coloration value and jump into nx_start() */
go_os_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
go_nx_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
#else
/* Call os_start() */
/* Call nx_start() */
os_start();
nx_start();
/* Shouldn't get here */

View File

@ -170,7 +170,7 @@ void __start(void)
showprogress('\r');
showprogress('\n');
os_start();
nx_start();
/* Shoulnd't get here */

View File

@ -99,7 +99,7 @@ const uintptr_t g_idle_topstack = HEAP_BASE;
static inline void sam_fpu_configure(void);
#endif
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
__attribute__ ((naked, no_instrument_function, noreturn));
#endif
@ -218,18 +218,18 @@ static inline void sam_fpu_configure(void)
#endif
/****************************************************************************
* Name: go_os_start
* Name: go_nx_start
*
* Description:
* Set the IDLE stack to the coloration value and jump into os_start()
* Set the IDLE stack to the coloration value and jump into nx_start()
*
****************************************************************************/
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
{
/* Set the IDLE stack to the stack coloration value then jump to
* os_start(). We take extreme care here because were currently
* nx_start(). We take extreme care here because were currently
* executing on this stack.
*
* We want to avoid sneak stack access generated by the compiler.
@ -253,7 +253,7 @@ static void go_os_start(void *pv, unsigned int nbytes)
"2:\n"
"\tmov r14, #0\n" /* LR = return address (none) */
"\tb os_start\n" /* Branch to os_start */
"\tb nx_start\n" /* Branch to nx_start */
);
}
#endif
@ -363,14 +363,14 @@ void __start(void)
showprogress('\n');
#ifdef CONFIG_STACK_COLORATION
/* Set the IDLE stack to the coloration value and jump into os_start() */
/* Set the IDLE stack to the coloration value and jump into nx_start() */
go_os_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
go_nx_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
#else
/* Call os_start() */
/* Call nx_start() */
os_start();
nx_start();
/* Shouldn't get here */

View File

@ -104,7 +104,7 @@ const uintptr_t g_idle_topstack = HEAP_BASE;
static inline void sam_fpuconfig(void);
#endif
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
__attribute__ ((naked, no_instrument_function, noreturn));
#endif
@ -258,18 +258,18 @@ static inline void sam_tcmenable(void)
}
/****************************************************************************
* Name: go_os_start
* Name: go_nx_start
*
* Description:
* Set the IDLE stack to the coloration value and jump into os_start()
* Set the IDLE stack to the coloration value and jump into nx_start()
*
****************************************************************************/
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
{
/* Set the IDLE stack to the stack coloration value then jump to
* os_start(). We take extreme care here because were currently
* nx_start(). We take extreme care here because were currently
* executing on this stack.
*
* We want to avoid sneak stack access generated by the compiler.
@ -293,7 +293,7 @@ static void go_os_start(void *pv, unsigned int nbytes)
"2:\n"
"\tmov r14, #0\n" /* LR = return address (none) */
"\tb os_start\n" /* Branch to os_start */
"\tb nx_start\n" /* Branch to nx_start */
);
}
#endif
@ -404,13 +404,13 @@ void __start(void)
/* Then start NuttX */
#ifdef CONFIG_STACK_COLORATION
/* Set the IDLE stack to the coloration value and jump into os_start() */
/* Set the IDLE stack to the coloration value and jump into nx_start() */
go_os_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
go_nx_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
#else
/* Call os_start() */
/* Call nx_start() */
os_start();
nx_start();
/* Shouldn't get here */

View File

@ -96,7 +96,7 @@ const uintptr_t g_idle_topstack = HEAP_BASE;
static inline void stm32_fpuconfig(void);
#endif
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
__attribute__ ((naked, no_instrument_function, noreturn));
#endif
@ -219,18 +219,18 @@ static inline void stm32_fpuconfig(void)
#endif
/****************************************************************************
* Name: go_os_start
* Name: go_nx_start
*
* Description:
* Set the IDLE stack to the coloration value and jump into os_start()
* Set the IDLE stack to the coloration value and jump into nx_start()
*
****************************************************************************/
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
{
/* Set the IDLE stack to the stack coloration value then jump to
* os_start(). We take extreme care here because were currently
* nx_start(). We take extreme care here because were currently
* executing on this stack.
*
* We want to avoid sneak stack access generated by the compiler.
@ -254,7 +254,7 @@ static void go_os_start(void *pv, unsigned int nbytes)
"2:\n"
"\tmov r14, #0\n" /* LR = return address (none) */
"\tb os_start\n" /* Branch to os_start */
"\tb nx_start\n" /* Branch to nx_start */
);
}
#endif
@ -349,13 +349,13 @@ void __start(void)
showprogress('\n');
#ifdef CONFIG_STACK_COLORATION
/* Set the IDLE stack to the coloration value and jump into os_start() */
/* Set the IDLE stack to the coloration value and jump into nx_start() */
go_os_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
go_nx_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
#else
/* Call os_start() */
/* Call nx_start() */
os_start();
nx_start();
/* Shoulnd't get here */

View File

@ -160,7 +160,7 @@ void __start(void)
showprogress('\r');
showprogress('\n');
os_start();
nx_start();
/* Shouldn't get here */

View File

@ -104,7 +104,7 @@ const uintptr_t g_idle_topstack = HEAP_BASE;
static inline void stm32_fpuconfig(void);
#endif
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
__attribute__ ((naked, no_instrument_function, noreturn));
#endif
@ -259,18 +259,18 @@ static inline void stm32_tcmenable(void)
}
/****************************************************************************
* Name: go_os_start
* Name: go_nx_start
*
* Description:
* Set the IDLE stack to the coloration value and jump into os_start()
* Set the IDLE stack to the coloration value and jump into nx_start()
*
****************************************************************************/
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
{
/* Set the IDLE stack to the stack coloration value then jump to
* os_start(). We take extreme care here because were currently
* nx_start(). We take extreme care here because were currently
* executing on this stack.
*
* We want to avoid sneak stack access generated by the compiler.
@ -294,7 +294,7 @@ static void go_os_start(void *pv, unsigned int nbytes)
"2:\n"
"\tmov r14, #0\n" /* LR = return address (none) */
"\tb os_start\n" /* Branch to os_start */
"\tb nx_start\n" /* Branch to nx_start */
);
}
#endif
@ -395,13 +395,13 @@ void __start(void)
/* Then start NuttX */
#ifdef CONFIG_STACK_COLORATION
/* Set the IDLE stack to the coloration value and jump into os_start() */
/* Set the IDLE stack to the coloration value and jump into nx_start() */
go_os_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
go_nx_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
#else
/* Call os_start() */
/* Call nx_start() */
os_start();
nx_start();
/* Shouldn't get here */

View File

@ -105,7 +105,7 @@ const uintptr_t g_idle_topstack = HEAP_BASE;
static inline void stm32_fpuconfig(void);
#endif
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
__attribute__ ((naked, no_instrument_function, noreturn));
#endif
@ -274,18 +274,18 @@ static inline void stm32_tcmenable(void)
}
/****************************************************************************
* Name: go_os_start
* Name: go_nx_start
*
* Description:
* Set the IDLE stack to the coloration value and jump into os_start()
* Set the IDLE stack to the coloration value and jump into nx_start()
*
****************************************************************************/
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
{
/* Set the IDLE stack to the stack coloration value then jump to
* os_start(). We take extreme care here because were currently
* nx_start(). We take extreme care here because were currently
* executing on this stack.
*
* We want to avoid sneak stack access generated by the compiler.
@ -309,7 +309,7 @@ static void go_os_start(void *pv, unsigned int nbytes)
"2:\n"
"\tmov r14, #0\n" /* LR = return address (none) */
"\tb os_start\n" /* Branch to os_start */
"\tb nx_start\n" /* Branch to nx_start */
);
}
#endif
@ -418,13 +418,13 @@ void __start(void)
showprogress('\n');
#ifdef CONFIG_STACK_COLORATION
/* Set the IDLE stack to the coloration value and jump into os_start() */
/* Set the IDLE stack to the coloration value and jump into nx_start() */
go_os_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
go_nx_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
#else
/* Call os_start() */
/* Call nx_start() */
os_start();
nx_start();
/* Shouldn't get here */

View File

@ -104,7 +104,7 @@ const uintptr_t g_idle_topstack = HEAP_BASE;
static inline void stm32l4_fpuconfig(void);
#endif
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
__attribute__ ((naked, no_instrument_function, noreturn));
#endif
@ -227,18 +227,18 @@ static inline void stm32l4_fpuconfig(void)
#endif
/****************************************************************************
* Name: go_os_start
* Name: go_nx_start
*
* Description:
* Set the IDLE stack to the coloration value and jump into os_start()
* Set the IDLE stack to the coloration value and jump into nx_start()
*
****************************************************************************/
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
{
/* Set the IDLE stack to the stack coloration value then jump to
* os_start(). We take extreme care here because were currently
* nx_start(). We take extreme care here because were currently
* executing on this stack.
*
* We want to avoid sneak stack access generated by the compiler.
@ -262,7 +262,7 @@ static void go_os_start(void *pv, unsigned int nbytes)
"2:\n"
"\tmov r14, #0\n" /* LR = return address (none) */
"\tb os_start\n" /* Branch to os_start */
"\tb nx_start\n" /* Branch to nx_start */
);
}
#endif
@ -369,13 +369,13 @@ void __start(void)
showprogress('\n');
#ifdef CONFIG_STACK_COLORATION
/* Set the IDLE stack to the coloration value and jump into os_start() */
/* Set the IDLE stack to the coloration value and jump into nx_start() */
go_os_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
go_nx_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
#else
/* Call os_start() */
/* Call nx_start() */
os_start();
nx_start();
/* Shoulnd't get here */

View File

@ -70,7 +70,7 @@
#ifdef CONFIG_DEBUG_FEATURES
.globl up_lowputc /* Low-level debug output */
#endif
.globl os_start /* NuttX entry point */
.globl nx_start /* NuttX entry point */
/*****************************************************************************
* Macros
@ -577,7 +577,7 @@ ctor_end:
/* Then jump to OS entry */
b os_start
b nx_start
/* Call destructors -- never get here */

View File

@ -304,7 +304,7 @@ void __start(void)
showprogress('\r');
showprogress('\n');
os_start();
nx_start();
/* Shouldn't get here */

View File

@ -284,7 +284,7 @@ void __start(void)
showprogress('\r');
showprogress('\n');
os_start();
nx_start();
/* Shouldn't get here */

View File

@ -205,7 +205,7 @@ static void tms570_memory_initialize(uint32_t ramset)
}
/****************************************************************************
* Name: go_os_start
* Name: go_nx_start
*
* Description:
* Re-initialize the stack and frame pointers and branch to OS start.
@ -213,13 +213,13 @@ static void tms570_memory_initialize(uint32_t ramset)
****************************************************************************/
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
naked_function noreturn_function;
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
{
/* Set the IDLE stack to the stack coloration value then jump to
* os_start(). We take extreme care here because were currently
* nx_start(). We take extreme care here because were currently
* executing on this stack.
*
* We want to avoid sneak stack access generated by the compiler.
@ -245,16 +245,16 @@ static void go_os_start(void *pv, unsigned int nbytes)
"\tldr sp, [ip]\n" /* Reset the stack pointer */
"\tmov fp, #0\n" /* Reset the frame pointer */
"\tmov r14, #0\n" /* LR = return address (none) */
"\tb os_start\n" /* Branch to os_start */
"\tb nx_start\n" /* Branch to nx_start */
);
}
#else
static void go_os_start(void) naked_function noreturn_function;
static void go_nx_start(void) naked_function noreturn_function;
static void go_os_start(void)
static void go_nx_start(void)
{
/* Reset the stack/frame pointer and jump to os_start(). */
/* Reset the stack/frame pointer and jump to nx_start(). */
__asm__ __volatile__
(
@ -262,7 +262,7 @@ static void go_os_start(void)
"\tldr sp, [ip]\n" /* Reset the stack pointer */
"\tmov fp, #0\n" /* Reset the frame pointer */
"\tmov r14, #0\n" /* LR = return address (none) */
"\tb os_start\n" /* Branch to os_start */
"\tb nx_start\n" /* Branch to nx_start */
);
}
#endif
@ -291,7 +291,7 @@ static void go_os_start(void)
* things, must initialize SDRAM memory. After initializatino of the
* memories, this function will call arm_data_initialize() to
* initialize the memory resources
* 4. This function will then branch to os_start() to start the operating
* 4. This function will then branch to nx_start() to start the operating
* system.
*
****************************************************************************/
@ -471,12 +471,12 @@ void arm_boot(void)
/* Then start NuttX */
#ifdef CONFIG_STACK_COLORATION
/* Set the IDLE stack to the coloration value and jump into os_start() */
/* Set the IDLE stack to the coloration value and jump into nx_start() */
go_os_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
go_nx_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
#else
/* Branch to os_start(), resetting the stack and frame pointers. */
/* Branch to nx_start(), resetting the stack and frame pointers. */
go_os_start();
go_nx_start();
#endif
}

View File

@ -70,7 +70,7 @@ static inline void xmc4_fpu_config(void);
static inline void xmc4_unaligned(void);
static inline void xmc4_flash_waitstates(void);
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
__attribute__ ((naked, no_instrument_function, noreturn));
#endif
@ -256,18 +256,18 @@ static inline void xmc4_flash_waitstates(void)
}
/****************************************************************************
* Name: go_os_start
* Name: go_nx_start
*
* Description:
* Set the IDLE stack to the coloration value and jump into os_start()
* Set the IDLE stack to the coloration value and jump into nx_start()
*
****************************************************************************/
#ifdef CONFIG_STACK_COLORATION
static void go_os_start(void *pv, unsigned int nbytes)
static void go_nx_start(void *pv, unsigned int nbytes)
{
/* Set the IDLE stack to the stack coloration value then jump to
* os_start(). We take extreme care here because were currently
* nx_start(). We take extreme care here because were currently
* executing on this stack.
*
* We want to avoid sneak stack access generated by the compiler.
@ -291,7 +291,7 @@ static void go_os_start(void *pv, unsigned int nbytes)
"2:\n"
"\tmov r14, #0\n" /* LR = return address (none) */
"\tb os_start\n" /* Branch to os_start */
"\tb nx_start\n" /* Branch to nx_start */
);
}
#endif
@ -397,13 +397,13 @@ void __start(void)
/* Then start NuttX */
#ifdef CONFIG_STACK_COLORATION
/* Set the IDLE stack to the coloration value and jump into os_start() */
/* Set the IDLE stack to the coloration value and jump into nx_start() */
go_os_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
go_nx_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
#else
/* Call os_start() */
/* Call nx_start() */
os_start();
nx_start();
/* Shouldn't get here */

View File

@ -74,7 +74,7 @@
.global _eronly /* Start of .data section in FLASH */
.global _enoinit /* End of uninitialized data. Defined by ld.script */
.global up_lowinit /* Perform low level initialization */
.global os_start /* NuttX entry point */
.global nx_start /* NuttX entry point */
.global vectortab
.global at90usb_int0 /* External interrupt request 0 */
@ -258,7 +258,7 @@ __do_clear_bss:
/* Now start NuttX */
call os_start
call nx_start
jmp exit
.endfunc

View File

@ -76,7 +76,7 @@
.global _eronly /* Start of .data section in FLASH */
.global _enoinit /* End of uninitilized data. Defined by ld.script */
.global up_lowinit /* Perform low level initialization */
.global os_start /* NuttX entry point */
.global nx_start /* NuttX entry point */
.global vectortab
#if defined(CONFIG_ARCH_CHIP_ATMEGA128)
@ -454,7 +454,7 @@ __do_clear_bss:
/* Now start NuttX */
call os_start
call nx_start
jmp exit
.endfunc

View File

@ -56,7 +56,7 @@
.global _eronly /* Start of .data section in FLASH */
#endif
.global up_lowinit /* Perform low level initialization */
.global os_start /* NuttX entry point */
.global nx_start /* NuttX entry point */
.global vectortab /* Vector base address */
/****************************************************************************
@ -133,7 +133,7 @@ __start:
/* Then jump to OS entry (will not return) */
lda.w pc, os_start
lda.w pc, nx_start
.Lstackbase:
.word _ebss+CONFIG_IDLETHREAD_STACKSIZE-4

View File

@ -142,7 +142,7 @@ void up_addregion(void);
#endif
/* Defined in chip/xxx_lowinit.c. This function is called from the
* head.S file just before jumping to os_start(). This function
* head.S file just before jumping to nx_start(). This function
* performs whatever very low level initialization that is needed
* before the OS gets started (clocks, console, LEDs, etc.)
*/

View File

@ -68,7 +68,7 @@
.file "m9s12_start.S"
.globl __start
.globl os_start
.globl nx_start
.globl up_lowsetup
.globl hcs12_boardinitialize
@ -224,7 +224,7 @@ __start:
/* Now, start the OS */
showprogress '\n'
CALL os_start
CALL nx_start
bra __start
/* Variables:

View File

@ -126,7 +126,7 @@
/* Imported symbols */
.global os_start
.global nx_start
.global pic32mx_exception
.global pic32mx_decodeirq
#ifdef CONFIG_PIC32MX_NMIHANDLER
@ -575,9 +575,9 @@ __start_nuttx:
jalr ra, t0
nop
/* Call os_start */
/* Call nx_start */
la t0, os_start
la t0, nx_start
jalr ra, t0
nop

View File

@ -127,7 +127,7 @@
/* Imported symbols */
.global os_start
.global nx_start
.global pic32mz_exception
.global pic32mz_decodeirq
#ifdef CONFIG_PIC32MZ_NMIHANDLER
@ -676,9 +676,9 @@ __start_nuttx:
jalr ra, t0
nop
/* Call os_start */
/* Call nx_start */
la t0, os_start
la t0, nx_start
jalr ra, t0
nop

View File

@ -76,7 +76,7 @@ void up_idle(void)
*/
/* This is a kludge that I still don't understand. The call to kmm_trysemaphore()
* in the os_start.c IDLE loop seems necessary for the good health of the IDLE
* in the nx_start.c IDLE loop seems necessary for the good health of the IDLE
* loop. When the work queue is enabled, this logic is removed from the IDLE
* loop and it appears that we are somehow left idling with interrupts non-
* functional. The following should be no-op, it just disables then re-enables

View File

@ -178,7 +178,7 @@ _do_reset:
bi .clearBSS
.callMain:
bi os_start
bi nx_start
.save_all:
addi sp, sp, -136

View File

@ -131,7 +131,7 @@ void __start(void)
/* Start NuttX */
os_start();
nx_start();
/* Shouldn't get here */

View File

@ -267,8 +267,8 @@ __start:
/* Pass control to NuttX */
.globl _os_start
jsr.a _os_start
.globl _nx_start
jsr.a _nx_start
/* NuttX will not return, but just in case... */

View File

@ -70,7 +70,7 @@
#ifdef CONFIG_DEBUG_FEATURES
.globl _up_lowputc /* Low-level debug output */
#endif
.globl _os_start /* NuttX entry point */
.globl _nx_start /* NuttX entry point */
/* Variables set up by the linker script */
@ -495,7 +495,7 @@ __start0:
.Lledinit:
.long _board_autoled_initialize
.Losstart:
.long _os_start
.long _nx_start
.Lsvect:
.long _svect
.Lvectend:

View File

@ -75,7 +75,7 @@ void up_idle(void)
*/
/* This is a kludge that I still don't understand. The call to kmm_trysemaphore()
* in the os_start.c IDLE loop seems necessary for the good health of the IDLE
* in the nx_start.c IDLE loop seems necessary for the good health of the IDLE
* loop. When the work queue is enabled, this logic is removed from the IDLE
* loop and it appears that we are somehow left idling with interrupts non-
* functional. The following should be no-op, it just disables then re-enables

View File

@ -153,7 +153,7 @@ void up_lowputs(const char *str);
/* The OS start routine **************************************************/
void os_start(void);
void nx_start(void);
#undef EXTERN
#ifdef __cplusplus

View File

@ -186,7 +186,7 @@
.extern _idle_stack_end
.extern gap8_dispatch_irq
.extern os_start
.extern nx_start
.extern gapuino_sysinit
/*******************************************************************************
@ -229,9 +229,9 @@ zero_loop_end:
jal x1, gapuino_sysinit
/* Directly call Nuttx os_start() */
/* Directly call Nuttx nx_start() */
jal x1, os_start
jal x1, nx_start
/* If it ever returns, spin here forever... */

View File

@ -83,7 +83,7 @@
.extern __reset_vec
.extern __trap_vec
.extern __stack_start
.global os_start
.global nx_start
#ifndef CONFIG_LIB_NEWLIB

View File

@ -64,9 +64,9 @@ void __nr5_init(void)
nr5_boardinitialize();
/* Call os_start() */
/* Call nx_start() */
os_start();
nx_start();
/* Shouldn't get here */

View File

@ -98,7 +98,7 @@ int main(int argc, char **argv, char **envp)
#else
/* Start the Nuttx emulation. This should not return. */
os_start();
nx_start();
#endif
}

View File

@ -100,7 +100,7 @@ volatile spinlock_t g_cpu_paused[CONFIG_SMP_NCPUS];
* NuttX domain function prototypes
****************************************************************************/
void os_start(void) __attribute__ ((noreturn));
void nx_start(void) __attribute__ ((noreturn));
void up_cpu_paused(int cpu);
void sim_smp_hook(void);
@ -147,11 +147,11 @@ static void *sim_cpu0_trampoline(void *arg)
return NULL;
}
/* Give control to os_start() */
/* Give control to nx_start() */
os_start();
nx_start();
/* os_start() should not return */
/* nx_start() should not return */
return NULL;
}

View File

@ -76,7 +76,7 @@
****************************************************************************/
.global __start /* Making entry point visible to linker */
.global os_start /* os_start is defined elsewhere */
.global nx_start /* nx_start is defined elsewhere */
.global up_lowsetup /* up_lowsetup is defined elsewhere */
.global g_idle_topstack /* The start of the heap */
@ -119,7 +119,7 @@ __start:
/* Initialize and start NuttX */
call up_lowsetup /* Low-level, pre-OS initialization */
call os_start /* Start NuttX */
call nx_start /* Start NuttX */
/* NuttX will not return */

View File

@ -75,7 +75,7 @@ void up_idle(void)
*/
/* This is a kludge that I still don't understand. The call to kmm_trysemaphore()
* in the os_start.c IDLE loop seems necessary for the good health of the IDLE
* in the nx_start.c IDLE loop seems necessary for the good health of the IDLE
* loop. When the work queue is enabled, this logic is removed from the IDLE
* loop and it appears that we are somehow left idling with interrupts non-
* functional. The following should be no-op, it just disables then re-enables

View File

@ -152,6 +152,6 @@ void IRAM_ATTR __start(void)
/* Bring up NuttX */
os_start();
nx_start();
for(; ; ); /* Should not return */
}

View File

@ -61,7 +61,7 @@
#elif defined(USE_EARLYSERIALINIT)
xref _up_earlyserialinit:EROM
#endif
xref _os_start:EROM
xref _nx_start:EROM
xref _up_doirq:EROM
xref _z16f_sysexec:EROM
xdef _z16f_reset
@ -222,8 +222,8 @@ _z16f_reset8:
#endif
/* Start NuttX */
call _os_start /* Start the operating system */
_halt1: /* _os_start() should not return */
call _nx_start /* Start the operating system */
_halt1: /* _nx_start() should not return */
halt
jp _halt1

View File

@ -61,7 +61,7 @@
xref __len_code
xref __low_code
xref __low_romcode
xref _os_start
xref _nx_start
xdef _ez80_startup
xdef _ez80_halt
@ -145,7 +145,7 @@ _ez80_codedone:
; Then start NuttX
call _os_start ; jump to the OS entry point
call _nx_start ; jump to the OS entry point
; NuttX will never return, but just in case...

View File

@ -48,7 +48,7 @@
; Global symbols used
;**************************************************************************
.globl _os_start ; OS entry point
.globl _nx_start ; OS entry point
.globl _up_vectcommon ; Common interrupt handling logic
.globl _z180_mmu_lowinit ; MMU initialization logic
.globl s__HEAP ; Start of the heap
@ -159,7 +159,7 @@ _up_reset:
; Then start NuttX
call _os_start ; jump to the OS entry point
call _nx_start ; jump to the OS entry point
; NuttX will never return, but just in case...

View File

@ -48,7 +48,7 @@
; Global symbols used
;**************************************************************************
.globl _os_start ; OS entry point
.globl _nx_start ; OS entry point
.globl _up_vectcommon ; Common interrupt handling logic
.globl _z180_mmu_lowinit ; MMU initialization logic
.globl s__HEAP ; Start of the heap
@ -76,7 +76,7 @@ _up_reset:
; Then start NuttX
call _os_start ; jump to the OS entry point
call _nx_start ; jump to the OS entry point
; NuttX will never return, but just in case...

View File

@ -70,7 +70,7 @@
#ifdef CONFIG_ARCH_LEDS
xref _board_autoled_initialize:ROM
#endif
xref _os_start:ROM
xref _nx_start:ROM
xref _up_doirq:ROM
xref _low_nearbss
xref _len_nearbss
@ -225,7 +225,7 @@ _z8_reset10:
ldx __intrp,#0
xor r15, r15
xor r14, r14
call _os_start
call _nx_start
/* We should never get here */

View File

@ -60,7 +60,7 @@
; Global symbols used
;**************************************************************************
.globl _os_start ; OS entry point
.globl _nx_start ; OS entry point
.globl _up_doirq ; Interrupt decoding logic
;**************************************************************************
@ -174,7 +174,7 @@ _up_reset:
; Then start NuttX
call _os_start ; jump to the OS entry point
call _nx_start ; jump to the OS entry point
; NuttX will never return, but just in case...

View File

@ -60,7 +60,7 @@
; Global symbols used
;**************************************************************************
.globl _os_start ; OS entry point
.globl _nx_start ; OS entry point
.globl _up_doirq ; Interrupt decoding logic
;**************************************************************************
@ -86,7 +86,7 @@ _up_reset:
; Then start NuttX
call _os_start ; jump to the OS entry point
call _nx_start ; jump to the OS entry point
; NuttX will never return, but just in case...

View File

@ -91,7 +91,7 @@ locked.r: ld-locked.inc $(PASS1_LIBBOARD)
@echo "LD: locked.r"
$(Q) $(LD) -o $@ $(PASS1_LDFLAGS) $(PASS1_LIBPATHS) --start-group $(PASS1_LDLIBS) --end-group $(PASS1_LIBGCC)
$(Q) $(NM) $@ > locked.map
$(Q) fgrep " U " locked.map | grep -v os_start
$(Q) fgrep " U " locked.map | grep -v nx_start
$(Q) $(CROSSDEV)size $@
$(PASS1_SRCDIR)$(DELIM)locked.r: locked.r

View File

@ -144,7 +144,7 @@ fi
echo "EXTERN(arm_boot)" >>ld-locked.inc
# All of the initialization functions that are called by os_start up to
# All of the initialization functions that are called by nx_start up to
# the point where the page fill worker thread is started must also be
# included in the locked text section (at least for now)
@ -203,7 +203,7 @@ echo "EXTERN(task_create)" >>ld-locked.inc
#
# The IDLE loop must be forced to lie in the locked .text region.
echo "EXTERN(os_start)" >>ld-locked.inc
echo "EXTERN(nx_start)" >>ld-locked.inc
echo "EXTERN(up_idle)" >>ld-locked.inc
############################################################################

View File

@ -516,7 +516,7 @@ void weak_function lpc31_pginitialize(void)
* that it is called.
*
* In reality, however, this function is not very useful: This function is called
* from a low level (before os_start() is even called), it may not be possible to
* from a low level (before nx_start() is even called), it may not be possible to
* perform file system operations or even to get debug output yet. Therefore,
* to keep life simple, initialization will be deferred in all cases until the first
* time that up_fillpage() is called.

View File

@ -515,7 +515,7 @@ void weak_function lpc31_pginitialize(void)
* that it is called.
*
* In reality, however, this function is not very useful: This function is called
* from a low level (before os_start() is even called), it may not be possible to
* from a low level (before nx_start() is even called), it may not be possible to
* perform file system operations or even to get debug output yet. Therefore,
* to keep life simple, initialization will be deferred in all cases until the first
* time that up_fillpage() is called.

View File

@ -171,7 +171,7 @@ Debugging from FLASH:
(gdb) mon reset
(gdb) mon reg pc __start # Set PC to __start entry point
(gdb) file nuttx
(gdb) b os_start
(gdb) b nx_start
(gdb) c
Also not very reliable.
@ -187,7 +187,7 @@ Debugging from SRAM:
(gdb) load nuttx # Re-load code into SRAM
(gdb) mon reg pc __start # Set PC to __start entry point
(gdb) file nuttx
(gdb) b os_start
(gdb) b nx_start
(gdb) c
Recovering from bad code in FLASH:

View File

@ -1,6 +1,6 @@
target remote localhost:3333
file nuttx
b os_start
b nx_start
mon at91sam4 gpnvm set 1
load
mon reset init

View File

@ -227,7 +227,7 @@ SYSLOG Channels
up_initialize() function as some as basic hardware resources have been
initialized: Timers, interrupts, etc. In this case,
syslog_initialize() is called with the argument SYSLOG_INIT_EARLY.
* syslog_initialize() is called again from os_start() when the full OS
* syslog_initialize() is called again from nx_start() when the full OS
initialization has completed, just before the application main entry
point is spawned. In this case, syslog_initialize() is called with
the argument SYSLOG_INIT_LATE.

View File

@ -52,10 +52,10 @@
* initialization.
*/
#define OSINIT_MM_READY() (g_os_initstate >= OSINIT_MEMORY)
#define OSINIT_HW_READY() (g_os_initstate >= OSINIT_HARDWARE)
#define OSINIT_OS_READY() (g_os_initstate >= OSINIT_OSREADY)
#define OSINIT_OS_INITIALIZING() (g_os_initstate < OSINIT_OSREADY)
#define OSINIT_MM_READY() (g_nx_initstate >= OSINIT_MEMORY)
#define OSINIT_HW_READY() (g_nx_initstate >= OSINIT_HARDWARE)
#define OSINIT_OS_READY() (g_nx_initstate >= OSINIT_OSREADY)
#define OSINIT_OS_INITIALIZING() (g_nx_initstate < OSINIT_OSREADY)
/****************************************************************************
* Public Types
@ -63,7 +63,7 @@
/* Initialization state. OS bring-up occurs in several phases: */
enum os_initstate_e
enum nx_initstate_e
{
OSINIT_POWERUP = 0, /* Power-up. No initialization yet performed.
* Depends on .bss initialization logic for this
@ -100,7 +100,7 @@ extern "C"
* hardware resources may not yet be available to the OS-internal logic.
*/
EXTERN uint8_t g_os_initstate; /* See enum os_initstate_e */
EXTERN uint8_t g_nx_initstate; /* See enum nx_initstate_e */
/****************************************************************************
* Public Function Prototypes
@ -110,10 +110,10 @@ EXTERN uint8_t g_os_initstate; /* See enum os_initstate_e */
int CONFIG_USER_ENTRYPOINT(int argc, char *argv[]);
/* Functions contained in os_task.c *****************************************/
/* Functions contained in nx_task.c *****************************************/
/* OS entry point called by boot logic */
void os_start(void) noreturn_function;
void nx_start(void) noreturn_function;
#undef EXTERN
#ifdef __cplusplus

View File

@ -101,7 +101,7 @@ enum syslog_init_e
{
SYSLOG_INIT_RESET = 0, /* Power on SYSLOG initializaton phase */
SYSLOG_INIT_EARLY, /* Early initialization in up_initialize() */
SYSLOG_INIT_LATE /* Late initialization in os_start(). */
SYSLOG_INIT_LATE /* Late initialization in nx_start(). */
};
/* This structure provides the interface to a SYSLOG device */

View File

@ -61,7 +61,7 @@
* kernel and application code. There is only one heap that use is
* used by both the kernel and application logic.
*
* In this configuration, this function is called early in os_start()
* In this configuration, this function is called early in nx_start()
* to initialize the common heap.
*
* CONFIG_BUILD_PROTECTED
@ -72,7 +72,7 @@
* Or there may be separate protected/kernel and unprotected/user
* heaps.
*
* In either case, this function is still called early in os_start()
* In either case, this function is still called early in nx_start()
* to initialize the user heap.
*
* CONFIG_BUILD_KERNEL

View File

@ -1,7 +1,7 @@
############################################################################
# sched/init/Make.defs
#
# Copyright (C) 2014 Gregory Nutt. All rights reserved.
# Copyright (C) 2014, 2019 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@ -33,10 +33,10 @@
#
############################################################################
CSRCS += os_start.c os_bringup.c
CSRCS += nx_start.c nx_bringup.c
ifeq ($(CONFIG_SMP),y)
CSRCS += os_smpstart.c
CSRCS += nx_smpstart.c
endif
# Include init build support

View File

@ -47,7 +47,7 @@
****************************************************************************/
/****************************************************************************
* Name: os_start
* Name: nx_start
*
* Description:
* This function is called to initialize the operating system and to spawn
@ -62,10 +62,10 @@
*
****************************************************************************/
void os_start(void);
void nx_start(void);
/****************************************************************************
* Name: os_smp_start
* Name: nx_smp_start
*
* Description:
* In an SMP configution, only one CPU is initially active (CPU 0). System
@ -82,15 +82,15 @@ void os_start(void);
****************************************************************************/
#ifdef CONFIG_SMP
int os_smp_start(void);
int nx_smp_start(void);
#endif
/****************************************************************************
* Name: os_idle_trampoline
* Name: nx_idle_trampoline
*
* Description:
* This is the common IDLE task for CPUs 1 through (CONFIG_SMP_NCPUS-1).
* It is equivalent to the CPU 0 IDLE logic in os_start.c
* It is equivalent to the CPU 0 IDLE logic in nx_start.c
*
* Input Parameters:
* Standard task arguments.
@ -101,15 +101,15 @@ int os_smp_start(void);
****************************************************************************/
#ifdef CONFIG_SMP
void os_idle_trampoline(void);
void nx_idle_trampoline(void);
#endif
/****************************************************************************
* Name: os_idle_task
* Name: nx_idle_task
*
* Description:
* This is the common IDLE task for CPUs 1 through (CONFIG_SMP_NCPUS-1).
* It is equivalent to the CPU 0 IDLE logic in os_start.c
* It is equivalent to the CPU 0 IDLE logic in nx_start.c
*
* Input Parameters:
* Standard task arguments.
@ -120,11 +120,11 @@ void os_idle_trampoline(void);
****************************************************************************/
#ifdef CONFIG_SMP
int os_idle_task(int argc, FAR char *argv[]);
int nx_idle_task(int argc, FAR char *argv[]);
#endif
/****************************************************************************
* Name: os_bringup
* Name: nx_bringup
*
* Description:
* Start all initial system tasks. This does the "system bring-up" after
@ -151,6 +151,6 @@ int os_idle_task(int argc, FAR char *argv[]);
*
****************************************************************************/
int os_bringup(void);
int nx_bringup(void);
#endif /* __SCHED_INIT_INIT_H */

View File

@ -1,7 +1,7 @@
/****************************************************************************
* sched/init/os_bringup.c
* sched/init/nx_bringup.c
*
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2012, 2019 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* With extensions by:
@ -135,7 +135,7 @@ extern const int CONFIG_INIT_NEXPORTS;
****************************************************************************/
/****************************************************************************
* Name: os_pgworker
* Name: nx_pgworker
*
* Description:
* Start the page fill worker kernel thread that will resolve page faults.
@ -151,7 +151,7 @@ extern const int CONFIG_INIT_NEXPORTS;
****************************************************************************/
#ifdef CONFIG_PAGING
static inline void os_pgworker(void)
static inline void nx_pgworker(void)
{
/* Start the page fill worker kernel thread that will resolve page faults.
* This should always be the first thread started because it may have to
@ -167,12 +167,12 @@ static inline void os_pgworker(void)
}
#else /* CONFIG_PAGING */
# define os_pgworker()
# define nx_pgworker()
#endif /* CONFIG_PAGING */
/****************************************************************************
* Name: os_workqueues
* Name: nx_workqueues
*
* Description:
* Start the worker threads that service the work queues.
@ -186,7 +186,7 @@ static inline void os_pgworker(void)
****************************************************************************/
#ifdef CONFIG_SCHED_WORKQUEUE
static inline void os_workqueues(void)
static inline void nx_workqueues(void)
{
#ifdef CONFIG_LIB_USRWORK
pid_t pid;
@ -221,12 +221,12 @@ static inline void os_workqueues(void)
}
#else /* CONFIG_SCHED_WORKQUEUE */
# define os_workqueues()
# define nx_workqueues()
#endif /* CONFIG_SCHED_WORKQUEUE */
/****************************************************************************
* Name: os_start_application
* Name: nx_start_application
*
* Description:
* Execute the board initialization function (if so configured) and start
@ -241,7 +241,7 @@ static inline void os_workqueues(void)
****************************************************************************/
#if defined(CONFIG_INIT_ENTRYPOINT)
static inline void os_do_appstart(void)
static inline void nx_start_application(void)
{
int pid;
@ -277,7 +277,7 @@ static inline void os_do_appstart(void)
}
#elif defined(CONFIG_INIT_FILEPATH)
static inline void os_do_appstart(void)
static inline void nx_start_application(void)
{
int ret;
@ -313,7 +313,7 @@ static inline void os_do_appstart(void)
}
#elif defined(CONFIG_INIT_NONE)
# define os_do_appstart()
# define nx_start_application()
#else
# error "Cannot start initialization thread"
@ -321,7 +321,7 @@ static inline void os_do_appstart(void)
#endif
/****************************************************************************
* Name: os_start_task
* Name: nx_start_task
*
* Description:
* This is the framework for a short duration worker thread. It off-loads
@ -337,17 +337,17 @@ static inline void os_do_appstart(void)
****************************************************************************/
#ifdef CONFIG_BOARD_INITTHREAD
static int os_start_task(int argc, FAR char **argv)
static int nx_start_task(int argc, FAR char **argv)
{
/* Do the board/application initialization and exit */
os_do_appstart();
nx_start_application();
return OK;
}
#endif
/****************************************************************************
* Name: os_start_application
* Name: nx_create_initthread
*
* Description:
* Execute the board initialization function (if so configured) and start
@ -363,7 +363,7 @@ static int os_start_task(int argc, FAR char **argv)
*
****************************************************************************/
static inline void os_start_application(void)
static inline void nx_create_initthread(void)
{
#ifdef CONFIG_BOARD_INITTHREAD
int pid;
@ -374,13 +374,13 @@ static inline void os_start_application(void)
pid = kthread_create("AppBringUp", CONFIG_BOARD_INITTHREAD_PRIORITY,
CONFIG_BOARD_INITTHREAD_STACKSIZE,
(main_t)os_start_task, (FAR char * const *)NULL);
(main_t)nx_start_task, (FAR char * const *)NULL);
DEBUGASSERT(pid > 0);
UNUSED(pid);
#else
/* Do the board/application initialization on this thread of execution. */
os_do_appstart();
nx_start_application();
#endif
}
@ -390,7 +390,7 @@ static inline void os_start_application(void)
****************************************************************************/
/****************************************************************************
* Name: os_bringup
* Name: nx_bringup
*
* Description:
* Start all initial system tasks. This does the "system bring-up" after
@ -423,21 +423,23 @@ static inline void os_start_application(void)
*
****************************************************************************/
int os_bringup(void)
int nx_bringup(void)
{
#ifndef CONFIG_DISABLE_ENVIRON
/* Setup up the initial environment for the idle task. At present, this
* may consist of only the initial PATH variable. The PATH variable is
* (probably) not used by the IDLE task. However, the environment
* containing the PATH variable will be inherited by all of the threads
* created by the IDLE task.
* may consist of only the initial PATH variable and/or and init library
* path variable. These path variables are not used by the IDLE task.
* However, the environment containing the PATH variable will be inherited
* by all of the threads created by the IDLE task.
*/
#if !defined(CONFIG_DISABLE_ENVIRON) && defined(CONFIG_PATH_INITIAL)
#ifdef CONFIG_PATH_INITIAL
(void)setenv("PATH", CONFIG_PATH_INITIAL, 1);
#endif
#if !defined(CONFIG_DISABLE_ENVIRON) && defined(CONFIG_LDPATH_INITIAL)
#ifdef CONFIG_LDPATH_INITIAL
(void)setenv("LD_LIBRARY_PATH", CONFIG_LDPATH_INITIAL, 1);
#endif
#endif
/* Start the page fill worker kernel thread that will resolve page faults.
@ -445,24 +447,25 @@ int os_bringup(void)
* resolve page faults in other threads
*/
os_pgworker();
nx_pgworker();
/* Start the worker thread that will serve as the device driver "bottom-
* half" and will perform misc garbage clean-up.
*/
os_workqueues();
nx_workqueues();
/* Once the operating system has been initialized, the system must be
* started by spawning the user initialization thread of execution. This
* will be the first user-mode thread.
*/
os_start_application();
nx_create_initthread();
#if !defined(CONFIG_DISABLE_ENVIRON) && (defined(CONFIG_PATH_INITIAL) || \
defined(CONFIG_LDPATH_INITIAL))
/* We an save a few bytes by discarding the IDLE thread's environment. */
#if !defined(CONFIG_DISABLE_ENVIRON) && (defined(CONFIG_PATH_INITIAL) || defined(CONFIG_LDPATH_INITIAL))
(void)clearenv();
#endif

View File

@ -1,7 +1,7 @@
/****************************************************************************
* sched/init/os_smpstart.c
* sched/init/nx_smpstart.c
*
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2016, 2019 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -59,7 +59,7 @@
* Private Types
****************************************************************************/
struct os_tcballoc_s
struct nx_tcballoc_s
{
struct task_tcb_s tcb; /* IDLE task TCB */
FAR char *idleargv[2]; /* Argument list */
@ -78,7 +78,7 @@ static const char g_idlename[] = "CPUn Idle"
****************************************************************************/
/****************************************************************************
* Name: os_idle_trampoline
* Name: nx_idle_trampoline
*
* Description:
* This is the common start-up logic for the IDLE task for CPUs 1 through
@ -95,7 +95,7 @@ static const char g_idlename[] = "CPUn Idle"
*
****************************************************************************/
void os_idle_trampoline(void)
void nx_idle_trampoline(void)
{
#ifdef CONFIG_SCHED_INSTRUMENTATION
FAR struct tcb_s *tcb = this_task();
@ -107,7 +107,7 @@ void os_idle_trampoline(void)
/* Then transfer control to the IDLE task */
(void)os_idle_task(0, NULL);
(void)nx_idle_task(0, NULL);
/* The IDLE task should never return */
@ -115,11 +115,11 @@ void os_idle_trampoline(void)
}
/****************************************************************************
* Name: os_idle_task
* Name: nx_idle_task
*
* Description:
* This is the common IDLE task for CPUs 1 through (CONFIG_SMP_NCPUS-1).
* It is equivalent to the CPU 0 IDLE logic in os_start.c
* It is equivalent to the CPU 0 IDLE logic in nx_start.c
*
* Input Parameters:
* Standard task arguments.
@ -129,7 +129,7 @@ void os_idle_trampoline(void)
*
****************************************************************************/
int os_idle_task(int argc, FAR char *argv[])
int nx_idle_task(int argc, FAR char *argv[])
{
/* Enter the IDLE loop */
@ -170,7 +170,7 @@ int os_idle_task(int argc, FAR char *argv[])
}
/****************************************************************************
* Name: os_smp_start
* Name: nx_smp_start
*
* Description:
* In an SMP configuration, only one CPU is initially active (CPU 0).
@ -191,7 +191,7 @@ int os_idle_task(int argc, FAR char *argv[])
*
****************************************************************************/
int os_smp_start(void)
int nx_smp_start(void)
{
int ret;
int cpu;

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/init/os_start.c
* sched/init/nx_start.c
*
* Copyright (C) 2007-2014, 2016, 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -331,7 +331,7 @@ const struct tasklist_s g_tasklisttable[NUM_TASK_STATES] =
* hardware resources may not yet be available to the kernel logic.
*/
uint8_t g_os_initstate; /* See enum os_initstate_e */
uint8_t g_nx_initstate; /* See enum nx_initstate_e */
/****************************************************************************
* Private Data
@ -376,7 +376,7 @@ static FAR char *g_idleargv[1][2];
****************************************************************************/
/****************************************************************************
* Name: os_start
* Name: nx_start
*
* Description:
* This function is called to initialize the operating system and to spawn
@ -391,7 +391,7 @@ static FAR char *g_idleargv[1][2];
*
****************************************************************************/
void os_start(void)
void nx_start(void)
{
#ifdef CONFIG_SMP
int cpu;
@ -404,7 +404,7 @@ void os_start(void)
/* Boot up is complete */
g_os_initstate = OSINIT_BOOT;
g_nx_initstate = OSINIT_BOOT;
/* Initialize RTOS Data ***************************************************/
/* Initialize all task lists */
@ -485,14 +485,14 @@ void os_start(void)
#ifdef CONFIG_SMP
if (cpu > 0)
{
g_idletcb[cpu].cmn.start = os_idle_trampoline;
g_idletcb[cpu].cmn.entry.main = os_idle_task;
g_idletcb[cpu].cmn.start = nx_idle_trampoline;
g_idletcb[cpu].cmn.entry.main = nx_idle_task;
}
else
#endif
{
g_idletcb[cpu].cmn.start = (start_t)os_start;
g_idletcb[cpu].cmn.entry.main = (main_t)os_start;
g_idletcb[cpu].cmn.start = (start_t)nx_start;
g_idletcb[cpu].cmn.entry.main = (main_t)nx_start;
}
/* Set the task flags to indicate that this is a kernel thread and, if
@ -568,7 +568,7 @@ void os_start(void)
/* Task lists are initialized */
g_os_initstate = OSINIT_TASKLISTS;
g_nx_initstate = OSINIT_TASKLISTS;
/* Initialize RTOS facilities *********************************************/
/* Initialize the semaphore facility. This has to be done very early
@ -617,7 +617,7 @@ void os_start(void)
/* The memory manager is available */
g_os_initstate = OSINIT_MEMORY;
g_nx_initstate = OSINIT_MEMORY;
#if defined(CONFIG_SCHED_HAVE_PARENT) && defined(CONFIG_SCHED_CHILD_STATUS)
/* Initialize tasking data structures */
@ -721,7 +721,7 @@ void os_start(void)
/* Hardware resources are available */
g_os_initstate = OSINIT_HARDWARE;
g_nx_initstate = OSINIT_HARDWARE;
#ifdef CONFIG_MM_SHM
/* Initialize shared memory support */
@ -811,18 +811,18 @@ void os_start(void)
/* Then start the other CPUs */
DEBUGVERIFY(os_smp_start());
DEBUGVERIFY(nx_smp_start());
#endif /* CONFIG_SMP */
/* Bring Up the System ****************************************************/
/* The OS is fully initialized and we are beginning multi-tasking */
g_os_initstate = OSINIT_OSREADY;
g_nx_initstate = OSINIT_OSREADY;
/* Create initial tasks and bring-up the system */
DEBUGVERIFY(os_bringup());
DEBUGVERIFY(nx_bringup());
#ifdef CONFIG_SMP
/* Let other threads have access to the memory manager */

View File

@ -210,7 +210,7 @@ try_again:
* lists are valid.
*/
if (g_os_initstate >= OSINIT_TASKLISTS)
if (g_nx_initstate >= OSINIT_TASKLISTS)
{
/* If called from an interrupt handler, then just take the spinlock.
* If we are already in a critical section, this will lock the CPU
@ -406,7 +406,7 @@ irqstate_t enter_critical_section(void)
* lists have been initialized.
*/
if (!up_interrupt_context() && g_os_initstate >= OSINIT_TASKLISTS)
if (!up_interrupt_context() && g_nx_initstate >= OSINIT_TASKLISTS)
{
FAR struct tcb_s *rtcb = this_task();
DEBUGASSERT(rtcb != NULL);
@ -453,7 +453,7 @@ void leave_critical_section(irqstate_t flags)
* lists are valid.
*/
if (g_os_initstate >= OSINIT_TASKLISTS)
if (g_nx_initstate >= OSINIT_TASKLISTS)
{
/* If called from an interrupt handler, then just release the
* spinlock. The interrupt handling logic should already hold the
@ -593,7 +593,7 @@ void leave_critical_section(irqstate_t flags)
* lists have been initialized.
*/
if (!up_interrupt_context() && g_os_initstate >= OSINIT_TASKLISTS)
if (!up_interrupt_context() && g_nx_initstate >= OSINIT_TASKLISTS)
{
FAR struct tcb_s *rtcb = this_task();
DEBUGASSERT(rtcb != NULL);
@ -650,7 +650,7 @@ bool irq_cpu_locked(int cpu)
/* g_cpu_irqset is not valid in early phases of initialization */
if (g_os_initstate < OSINIT_OSREADY)
if (g_nx_initstate < OSINIT_OSREADY)
{
/* We are still single threaded. In either state of g_cpu_irqlock,
* the correct return value should always be false.

View File

@ -78,7 +78,7 @@
#ifndef __ASSEMBLY
/* This is the task IDof the page fill worker thread. This value was set in
* os_start when the page fill worker thread was started.
* nx_start when the page fill worker thread was started.
*/
extern pid_t g_pgworker;

View File

@ -75,7 +75,7 @@
****************************************************************************/
/* This is the task ID of the page fill worker thread. This value was set in
* os_start when the page fill worker thread was started.
* nx_start when the page fill worker thread was started.
*/
pid_t g_pgworker;

View File

@ -157,7 +157,7 @@ struct tasklist_s
* Public Data
****************************************************************************/
/* Declared in os_start.c ***************************************************/
/* Declared in nx_start.c ***************************************************/
/* The state of a task is indicated both by the task_state field of the TCB
* and by a series of task lists. All of these tasks lists are declared

View File

@ -76,7 +76,7 @@ bool sched_idletask(void)
* have been initialized and, in that case, rtcb may be NULL.
*/
DEBUGASSERT(rtcb != NULL || g_os_initstate < OSINIT_TASKLISTS);
DEBUGASSERT(rtcb != NULL || g_nx_initstate < OSINIT_TASKLISTS);
if (rtcb != NULL)
{
/* The IDLE task TCB is distinguishable by a few things: