Eliminate _nano_start()
The helper function _nano_start() is no longer required (due to the recent relocation of boot banner and kernel build timestamp code), so the kernel's initialization code calls _nano_fiber_swap() directly. Change-Id: I06b9f473715afbfbdd4105b0def3445f1b2e3583 Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This commit is contained in:
parent
5555bcff31
commit
2801be129a
6 changed files with 7 additions and 37 deletions
|
@ -40,7 +40,7 @@
|
|||
|
||||
#ifndef _ASMLANGUAGE
|
||||
extern void _nano_init(nano_context_id_t, int argc, char *argv[], char *envp[]);
|
||||
extern void _nano_start(void);
|
||||
extern void _nano_fiber_swap(void);
|
||||
#endif
|
||||
|
||||
#endif /* _ARCH_ARC_V2_INIT_H_ */
|
||||
|
|
|
@ -40,7 +40,7 @@ ARM-specific nanokernel initialization interface. Included by ARM/arch.h.
|
|||
|
||||
#ifndef _ASMLANGUAGE
|
||||
extern void _nano_init(nano_context_id_t, int argc, char *argv[], char *envp[]);
|
||||
extern void _nano_start(void);
|
||||
extern void _nano_fiber_swap(void);
|
||||
#endif
|
||||
|
||||
#endif /* _ARCH_ARM_CORTEXM_INIT_H_ */
|
||||
|
|
|
@ -594,7 +594,7 @@ typedef void (*NANO_EOI_GET_FUNC) (void *);
|
|||
extern void _nano_init (nano_context_id_t dummyOutContext, int argc,
|
||||
char *argv[], char *envp[]);
|
||||
|
||||
extern void _nano_start (void);
|
||||
extern void _nano_fiber_swap (void);
|
||||
|
||||
extern unsigned int find_first_set (unsigned int op);
|
||||
|
||||
|
|
|
@ -168,10 +168,9 @@ FUNC_NORETURN void _Cstart(void)
|
|||
|
||||
PRINT_BOOT_BANNER();
|
||||
|
||||
/* context switch into the background context (entry function is main())
|
||||
*/
|
||||
/* context switch into background context (entry function is main()) */
|
||||
|
||||
_nano_start();
|
||||
_nano_fiber_swap();
|
||||
|
||||
/*
|
||||
* Compiler can't tell that the above routines won't return and issues
|
||||
|
|
|
@ -298,31 +298,3 @@ FUNC_NORETURN void fiber_abort(void)
|
|||
_nano_fiber_swap();
|
||||
}
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* _nano_start - start the nanokernel
|
||||
*
|
||||
* This routine is invoked as the last step of a BSP's _Cstart() implementation
|
||||
* to start the nanokernel. The _nano_init() function is called early during
|
||||
* the execution of _Cstart() to setup the various nanokernel data structures,
|
||||
* but it's not until _nano_start() is invoked that a context switch into the
|
||||
* "main" task is performed.
|
||||
*
|
||||
* This routine should only be called from a BSP's _Cstart() implementation
|
||||
*
|
||||
* RETURNS: This function never returns
|
||||
*/
|
||||
|
||||
/*
|
||||
* Print the boot banner if enabled
|
||||
*/
|
||||
#ifdef CONFIG_BOOT_BANNER
|
||||
void _nano_start(void)
|
||||
{
|
||||
_nano_fiber_swap();
|
||||
}
|
||||
|
||||
#else
|
||||
FUNC_ALIAS(_nano_fiber_swap, _nano_start, void);
|
||||
#endif
|
||||
|
|
|
@ -85,8 +85,7 @@ extern void main(int argc, char *argv[], char *envp[]);
|
|||
* initialization sequence:
|
||||
*
|
||||
* crt0.s -> _Cstart() -> _nano_init()
|
||||
* -> _nano_start() -> _Swap() (context switch into
|
||||
*"main")
|
||||
* -> _nano_fiber_swap()
|
||||
*
|
||||
* main () -> kernel_init () -> task_fiber_start(... K_swapper ...)
|
||||
*
|
||||
|
@ -96,7 +95,7 @@ extern void main(int argc, char *argv[], char *envp[]);
|
|||
* the provided <dummyOutContext> tCCS, however _NanoKernel.fiber is set to
|
||||
* NULL.
|
||||
*
|
||||
* Thus the subsequent invocation of _Swap() depicted above will result
|
||||
* Thus the subsequent invocation of _nano_fiber_swap() depicted above results
|
||||
* in a context switch into the main() routine. The <dummyOutContext> will
|
||||
* be used as the context save area for the swap. Typically, <dummyOutContext>
|
||||
* is a temp area on the current stack (as setup by crt0.s).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue