Xiang Xiao
3bf416e8b8
arch: Move STACK_ALIGNMENT definition to up_internal.h
...
to avoid the same macro duplicate to many place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-28 15:05:41 +08:00
ligd
3cfc6761ff
xtensa: fix lack of float register save & resotre
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-01-11 12:17:09 +01:00
Abdelatif Guettouche
4edc5fb701
xtensa: Rename up_stack_color to xtensa_stack_color since it's an
...
internal function.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-01-04 02:45:45 +08:00
Gustavo Henrique Nihei
e13dd7dab9
arch/xtensa: Remove FAR qualifier for Xtensa-specific files
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-09-22 08:16:01 -03:00
Xiang Xiao
ab974edc84
sched: Identify the stack need to free by TCB_FLAG_FREE_STACK
...
instead calling kmm_heapmember or umm_heapmember because:
1.The stack supplied by caller may allocate from heap too
2.It's hard to implement these two function in ASan case
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I196377822b7c4643ab4f29b7c1dc41dcd7c4dab1
2021-06-18 05:44:41 -07:00
Xiang Xiao
fa0d123f87
arch: Colorize the idle thread stack in an unified way
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Idae8da53e5a4799a8edc0e882f17fd515b70cb14
2021-06-10 06:50:41 -07:00
Xiang Xiao
2e54df0f35
Don't include assert.h from public header file
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-03 08:36:03 -07:00
Xiang Xiao
2335b69120
arch: Allocate the space from the beginning in up_stack_frame
...
arch: Allocate the space from the beginning in up_stack_frame
and modify the affected portion:
1.Correct the stack dump and check
2.Allocate tls_info_s by up_stack_frame too
3.Move the stack fork allocation from arch to sched
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-16 12:41:41 +09:00
Xiang Xiao
3f67c67aaf
arch: Fix the stack boundary calculation and check
...
All supported arch uses a push-down stack:
The stack grows toward lower addresses in memory. The stack pointer
register points to the lowest, valid working address (the "top" of
the stack). Items on the stack are referenced as positive(include zero)
word offsets from sp.
Which means that for stack in the [begin, begin + size):
1.The initial SP point to begin + size
2.push equals sub and then store
3.pop equals load and then add
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-04-10 08:39:54 -07:00
Alin Jerpelea
778f050102
arch: xtensa: Author Gregory Nutt: update licenses to Apache
...
Gregory Nutt has submitted the SGA and we can migrate the licenses
to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-02 03:14:31 -05:00
Masayuki Ishikawa
e87d14721e
arch: xtensa: Fix stack coloring
...
Summary:
- Call up_stack_color() correctly in the up_create_stack()
- Fix nwords calculation in up_stack_color()
- Also, refactor up_stack_color()
- Fix do_stackcheck() to consider stack alignment
Impact:
- Only for CONFIG_STACK_COLORATION=y
Testing:
- Tested with esp32-devkitc:wapi_smp
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-18 19:05:07 -08:00
Abdelatif Guettouche
5d7428a385
arch/xtensa: Fix alignement when coloring and checking the stacks.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-09 09:44:04 -03:00
Abdelatif Guettouche
967fbebcb9
arch/xtensa: Fix stack's alignment
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-11-28 10:24:12 -03:00
Abdelatif Guettouche
fc5874ad75
arch/xtensa/src/common/xtensa_createstack.c: Fix stack alignement.
...
The required stack alignement is 16 bytes.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-11-21 11:31:46 -03:00
Abdelatif Guettouche
0182e6e8bb
arch/xtensa/src/commin/xtensa_usestack&createstack.c: Set the alignment
...
to be 4 bytes.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
2fa5d65355
arch/xtensa/src/common: Refactor the mm_ macros into a separate file.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
a1318926b4
arch/xtensa/esp32: Allow internal drivers and tasks' stack to be
...
allocated in an internal heap.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
chao.an
05ebb39998
arch: complete logic in create/use stack to support stack coloration.
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-18 07:30:46 -06:00
Gregory Nutt
c2244a2382
Remove CONFIG_TLS
...
A first step in implementing the user-space error is force TLS to be enabled at all times. It is no longer optional
2020-05-07 12:04:16 -06:00
Ouss4
1e3ec6ecd0
arch/: Implement Thread Local Storage for the rest of the architectures.
...
The change consisted on modifying *_usestack.c and *_createstack.c
2020-05-06 21:56:40 -06:00
Xiang Xiao
eca7059785
Refine __KERNEL__ and CONFIG_BUILD_xxx usage in the code base
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-01 10:43:47 -03:00
YAMAMOTO Takashi
7774cdd7aa
Appease many of nxstyle errors for esp32 related files
...
I skipped the following files because they were not simple.
I'll create separate PRs.
arch/xtensa/src/esp32/esp32_cpustart.c
arch/xtensa/src/common/xtensa_abi.h
boards/xtensa/esp32/esp32-core/include/board.h
Also, I skipped the following files and directories because
they looked too huge and/or foreign.
arch/xtensa/include/esp32/tie.h
arch/xtensa/include/xtensa/xtensa_corebits.h
arch/xtensa/src/esp32/hardware/
arch/xtensa/include/esp32/tie-asm.h
arch/xtensa/include/esp32/core-isa.h
arch/xtensa/include/xtensa/core.h
I also fixed a few "is is" style typos when unwrapping long lines.
2020-03-12 07:45:44 -06:00
Xiang Xiao
cde88cabcc
Run codespell -w with the latest dictonary again
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
Gregory Nutt
7cf88d7dbd
Make sure that labeling is used consistently in all function headers.
2018-02-01 10:00:02 -06:00
Gregory Nutt
28d1478480
Xtensa/ESP32: Add CPU1 startup logic
2016-10-31 13:15:15 -06:00
Gregory Nutt
d346f25aae
Xtensa/ESP32: Fix some compile issues related to new co-processor logic
2016-10-29 10:27:46 -06:00
Gregory Nutt
ccf5b4e357
Xtensa: Cleanup of co-processor logic; remove some unnecessary things.
2016-10-29 09:36:33 -06:00
Gregory Nutt
be2a801e30
Xtensa: Add xtensa_coproc.h
2016-10-28 10:33:20 -06:00
Gregory Nutt
29c3acdc4e
Add xtensa_testset.c
2016-10-19 09:58:12 -06:00
Gregory Nutt
a8662c70db
Xtensa: Keep task state in TCB (unless you want to redesign signal handling). Lots of cosmetic clean-up.
2016-10-16 07:57:16 -06:00
Gregory Nutt
4621784617
Add xtensa.h (which is call up_internal.h in other architectures.
2016-10-15 11:45:15 -06:00
Gregory Nutt
55523f5771
arch/xtensa: Add a few basic XTENSA/LX6 files. Not yet enough to do anything with
2016-10-12 13:11:05 -06:00