mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 13:27:01 +08:00
arch: Change the linker generated symbols from uint32_t to uint8_t *
and remove the duplicated declaration Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
95fe8426ed
commit
70290b6e38
@@ -94,7 +94,7 @@ void up_lowinit(void)
|
||||
* certain that there are no issues with the state of global variables.
|
||||
*/
|
||||
|
||||
for (dest = &_bss_start; dest < &_end; )
|
||||
for (dest = (uint32_t *)_bss_start; dest < (uint32_t *)_end; )
|
||||
{
|
||||
*dest++ = 0;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ void up_lowinit(void)
|
||||
* certain that there are no issues with the state of global variables.
|
||||
*/
|
||||
|
||||
for (dest = &_bss_start; dest < &_end; )
|
||||
for (dest = (uint32_t *)_bss_start; dest < (uint32_t *)_end; )
|
||||
{
|
||||
*dest++ = 0;
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ ssize_t up_check_stack_remain(void)
|
||||
#if CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||
size_t up_check_intstack(void)
|
||||
{
|
||||
return sparc_stack_check((uintptr_t)&g_intstackalloc,
|
||||
return sparc_stack_check((uintptr_t)g_intstackalloc,
|
||||
STACK_ALIGN_DOWN(CONFIG_ARCH_INTERRUPTSTACK));
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ volatile uint32_t *g_current_regs;
|
||||
#if defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||
static inline void up_color_intstack(void)
|
||||
{
|
||||
uint8_t *ptr = (uint8_t *)&g_intstackalloc;
|
||||
uint8_t *ptr = g_intstackalloc;
|
||||
ssize_t size;
|
||||
|
||||
for (size = (CONFIG_ARCH_INTERRUPTSTACK & ~3);
|
||||
|
||||
@@ -133,33 +133,23 @@ extern uint32_t g_idle_topstack;
|
||||
extern void g_intstackbase;
|
||||
#endif
|
||||
|
||||
/* These 'addresses' of these values are setup by the linker script.They are
|
||||
* not actual uint32_t storage locations! They are only used meaningfully in
|
||||
* the following way:
|
||||
*
|
||||
* - The linker script defines, for example, the symbol_sdata.
|
||||
* - The declaration extern uint32_t _sdata; makes C happy. C will believe
|
||||
* that the value _sdata is the address of a uint32_t variable _data
|
||||
* (it is not!).
|
||||
* - We can recoved the linker value then by simply taking the address of
|
||||
* of _data. like: uint32_t *pdata = &_sdata;
|
||||
*/
|
||||
/* These symbols are setup by the linker script. */
|
||||
|
||||
extern uint32_t _text_start; /* Start of .text */
|
||||
extern uint32_t _etext; /* End+1 of .text + .rodata */
|
||||
extern const uint32_t _rodata_start; /* Start of .data in FLASH */
|
||||
extern uint32_t _sdata; /* Start of .data */
|
||||
extern uint32_t _edata; /* End+1 of .data */
|
||||
extern uint32_t _bss_start; /* Start of .bss */
|
||||
extern uint32_t _end; /* End+1 of .bss */
|
||||
extern char _text_start[]; /* Start of .text */
|
||||
extern char _etext[]; /* End+1 of .text + .rodata */
|
||||
extern const char _rodata_start[]; /* Start of .data in FLASH */
|
||||
extern char _sdata[]; /* Start of .data */
|
||||
extern char _edata[]; /* End+1 of .data */
|
||||
extern char _bss_start[]; /* Start of .bss */
|
||||
extern char _end[]; /* End+1 of .bss */
|
||||
#ifdef CONFIG_ARCH_RAMFUNCS
|
||||
extern uint32_t _sramfunc; /* Start of ramfuncs */
|
||||
extern uint32_t _eramfunc; /* End+1 of ramfuncs */
|
||||
extern uint32_t _ramfunc_loadaddr; /* Start of ramfuncs in FLASH */
|
||||
extern uint32_t _ramfunc_sizeof; /* Size of ramfuncs */
|
||||
extern uint32_t _bmxdkpba_address; /* BMX register setting */
|
||||
extern uint32_t _bmxdudba_address; /* BMX register setting */
|
||||
extern uint32_t _bmxdupba_address; /* BMX register setting */
|
||||
extern char _sramfunc[]; /* Start of ramfuncs */
|
||||
extern char _eramfunc[]; /* End+1 of ramfuncs */
|
||||
extern char _ramfunc_loadaddr[]; /* Start of ramfuncs in FLASH */
|
||||
extern char _ramfunc_sizeof[]; /* Size of ramfuncs */
|
||||
extern char _bmxdkpba_address[]; /* BMX register setting */
|
||||
extern char _bmxdudba_address[]; /* BMX register setting */
|
||||
extern char _bmxdupba_address[]; /* BMX register setting */
|
||||
#endif /* CONFIG_ARCH_RAMFUNCS */
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ void up_dumpstate(void)
|
||||
/* Get the limits on the interrupt stack memory */
|
||||
|
||||
#if CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||
istackbase = (uint32_t)&g_intstackbase;
|
||||
istackbase = (uint32_t)g_intstackbase;
|
||||
istacksize = (CONFIG_ARCH_INTERRUPTSTACK & ~3) - 4;
|
||||
|
||||
/* Show interrupt stack info */
|
||||
|
||||
Reference in New Issue
Block a user