Update reserved function names starting with one underscore, replacing them as follows: '_k_' with 'z_' '_K_' with 'Z_' '_handler_' with 'z_handl_' '_Cstart' with 'z_cstart' '_Swap' with 'z_swap' This renaming is done on both global and those static function names in kernel/include and include/. Other static function names in kernel/ are renamed by removing the leading underscore. Other function names not starting with any prefix listed above are renamed starting with a 'z_' or 'Z_' prefix. Function names starting with two or three leading underscores are not automatcally renamed since these names will collide with the variants with two or three leading underscores. Various generator scripts have also been updated as well as perf, linker and usb files. These are drivers/serial/uart_handlers.c include/linker/kobject-text.ld kernel/include/syscall_handler.h scripts/gen_kobject_list.py scripts/gen_syscall_header.py Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
64 lines
1.3 KiB
ArmAsm
64 lines
1.3 KiB
ArmAsm
/*
|
|
* Copyright (c) 2016 Jean-Paul Etienne <fractalclone@gmail.com>
|
|
* Contributors: 2018 Antmicro <www.antmicro.com>
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <kernel_structs.h>
|
|
|
|
/* exports */
|
|
GTEXT(__initialize)
|
|
GTEXT(__reset)
|
|
|
|
/* imports */
|
|
GTEXT(_PrepC)
|
|
|
|
#if CONFIG_INCLUDE_RESET_VECTOR
|
|
SECTION_FUNC(reset, __reset)
|
|
/*
|
|
* jump to __initialize
|
|
* use call opcode in case __initialize is far away.
|
|
* This will be dependent on linker.ld configuration.
|
|
*/
|
|
call __initialize
|
|
#endif /* CONFIG_INCLUDE_RESET_VECTOR */
|
|
|
|
/* use ABI name of registers for the sake of simplicity */
|
|
|
|
/*
|
|
* Remainder of asm-land initialization code before we can jump into
|
|
* the C domain
|
|
*/
|
|
SECTION_FUNC(TEXT, __initialize)
|
|
#ifdef CONFIG_INIT_STACKS
|
|
/* Pre-populate all bytes in _interrupt_stack with 0xAA */
|
|
la t0, _interrupt_stack
|
|
li t1, CONFIG_ISR_STACK_SIZE
|
|
add t1, t1, t0
|
|
|
|
/* Populate _interrupt_stack with 0xaaaaaaaa */
|
|
li t2, 0xaaaaaaaa
|
|
aa_loop:
|
|
sw t2, 0x00(t0)
|
|
addi t0, t0, 4
|
|
blt t0, t1, aa_loop
|
|
#endif
|
|
|
|
/*
|
|
* Initially, setup stack pointer to
|
|
* _interrupt_stack + CONFIG_ISR_STACK_SIZE
|
|
*/
|
|
la sp, _interrupt_stack
|
|
li t0, CONFIG_ISR_STACK_SIZE
|
|
add sp, sp, t0
|
|
|
|
#ifdef CONFIG_WDOG_INIT
|
|
call _WdogInit
|
|
#endif
|
|
|
|
/*
|
|
* Jump into C domain. _PrepC zeroes BSS, copies rw data into RAM,
|
|
* and then enters kernel z_cstart
|
|
*/
|
|
call _PrepC
|