mage1
f6a4c17838
sim: fix sim runtime err under sanitize check mode.
...
since gcc sanitize can not stub proper code in nuttx kernel code.
Change-Id: I0910bddee71538c202c6a0a8faab76bcc65f5cd2
2021-07-02 10:49:13 +08:00
ligd
dcea2afd7e
mm: fix memory corruption when loop create/exit thread in SMP mode
...
Root casue:
when do thread exit, need add free stack operation to mm_delaylist,
but in SMP mode, CPU0 thread1 exit, at this time, CPU1 call malloc
and free mm_delaylist.
Fix:
Divide mm_delaylist for per CPU in SMP mode.
Change-Id: Ibf7d04614ea2f99fb5b506356b7346a0d94f0590
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-01 18:26:20 +08:00
Xiang Xiao
82047fe3c4
mm: Add kmm_malloc_size and mm_malloc_size
...
make malloc_size implementation align with malloc
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I8d7781925f06e58a880437a16569dccbfd2ea035
2021-07-01 18:08:54 +08:00
Xiang Xiao
4b7c156321
arch/sim: Implement mm_mallinfo for the custom heap
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Idf07081869a4659490109aacf8d7905bdb485835
2021-06-28 21:26:09 +08:00
Xiang Xiao
a9f917e44d
arch/sim: Implement malloc_size for the custom heap
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-28 21:26:09 +08:00
Xiang Xiao
62ac1e1b6d
arch/sim: Remove host_malloc and host_calloc
...
use host_realloc instead
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I41e5a722532830b9ec26dd7b32bfab9f30b443c2
2021-06-28 21:26:09 +08:00
Xiang Xiao
4e3c1ed8af
mm: Support malloc_size function
...
and rename malloc_usable_size to malloc_size
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I8d83e9148d70e752142af26d7dd9a291123fdd14
2021-06-28 21:26:09 +08:00
Xiang Xiao
d37d8e00a5
mtd: Add MTDIOC_FLUSH IOCTL like MTDIOC_XIPBASE
...
since the old design reuse BIOC_FLUSH for
MTD device which make some confusion
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-28 18:06:52 +08:00
Virus.V
4624cb25d6
riscv/bl602:replace syslog to debugging log macros
2021-06-28 18:06:52 +08:00
Xiang Xiao
800754a9be
Replace mktime with timegm in rtc and fs driver
...
since kernel component should use UTC instead local time
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Icf939e1ab0af8e577105f539d2553bc67b3b3d10
2021-06-24 20:53:53 +08:00
Xiang Xiao
b3bcc02a04
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 20:59:03 +08:00
ligd
200a1d51d3
arm: fix enable interrupt too earlier caused system crash
...
reason:
msr cpsr, r2 /* Set the CPSR */
// interrupt hanppend, context switch
pop {r0-r2, pc}
resolve:
use SPSR instead, and recover with ldmia ^
Change-Id: Id7cee6452997ec19919eeecf6e7616164b3a0ab3
Signed-off-by: ligd <liguiding1@xiaomi.com>
(cherry picked from commit 6fa6c1676932d7babb7ff22ef556a17bb18f1c0d)
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-06-17 14:39:22 +08:00
chao.an
27aad31338
sim: add posix_memalign() to nuttx-names.in
...
hide the symbol definition from up_hostmemory.c:
147: error = posix_memalign(&p, alignment, size);
Change-Id: I0bbc509c1ecf43388f6b21997a878a5f5fecf60a
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-15 14:59:01 +08:00
Xiang Xiao
4d66266a8e
sched: Don't include nuttx/sched.h inside sched.h
...
But let nuttx/sched.h include sched.h instead to
avoid expose nuttx kernel API to userspace.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I6fe673364be9eb1259381e6575d4c1a9fea58097
2021-06-13 00:25:26 -07:00
Xiang Xiao
8ae0e1759e
arch: Colorize the idle thread stack in an unified way
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Idae8da53e5a4799a8edc0e882f17fd515b70cb14
2021-06-11 11:37:32 +08:00
Xiang Xiao
35035f5c89
arch: Rename xxx_getsp to up_getsp
...
All modern desgin support stack pointer and it's also an
important information, so let's standardize this interface.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-11 11:37:19 +08:00
chao.an
0d960286a6
Revert "arch: adjust idle stack offset to reserve space of stack info"
...
This reverts commit 91dbb26153 .
2021-06-09 23:21:56 +08:00
chao.an
e223790148
serial/uart/h4: add bt h4 uart serial driver
...
Change-Id: I456622ce097006447cc8b050e4a44ee96865ddfe
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-03 18:33:20 +08:00
chao.an
8f0cc709d4
wireless/bluetooth: decoupling bt_driver_s and bt_buf_s
...
Change-Id: I12879c364cf8ca63898da94621e94d8fc23a4f6f
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-03 18:33:14 +08:00
chao.an
e9954c80dd
arch/sim: remove BT uart implement
...
Change-Id: Ic9ea51116ba46cb667eae0ea151f69079f9f05ab
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-03 18:32:49 +08:00
chao.an
91dbb26153
arch: adjust idle stack offset to reserve space of stack info
...
Change-Id: I064b6dfcfa5152e58ad2dba98021b1aa37c98b7e
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-03 17:31:05 +08:00
Dong Heng
2af7861b31
riscv/esp32c3: Fix SPI Flash driver internal chip data address error
...
"g_rom_flashchip" is not in fixed address between all ESP32-C3's different versions.
2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei
16dd2260f1
risc-v/esp32c3: Uniformize alignment for assembly instructions
2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei
6b5fe76506
risc-v/esp32c3: Improve interrupt handler documentation
2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei
f948f9fa8d
risc-v/esp32c3: Reorder register restoration on interrupt handler epiloque
2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei
401a1bf751
risc-v/esp32c3: Fix wrong references to ESP32
2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei
5a76c52ae2
arch/risc-v: Fix stack alignment according to calling convention
...
The RISC-V Integer Calling Convention states that the stack pointer
shall always be aligned to a 128-bit boundary upon procedure entry, both
for RV32* and RV64* ISAs (exception to the RV32E ISA, which must follow a
specific convention)
2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei
e0e9f4db1c
xtensa/esp32: Change ESP32_RT_TIMER_TASK_PRIORITY comment into help text
2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei
3782ca8dcc
xtensa/esp32: Add missing default value for CONFIG_ESP32_GPIO_IRQ
2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei
91039bff97
xtensa/esp32: Uniformize Kconfig alignment and styling
2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei
e06fa3cc7e
xtensa/esp32: Remove inconsistent usage of comment command
2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei
a35c140d0c
xtensa/esp32: Remove redundant dependency
2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei
bfb8eec64a
risc-v/esp32c3: Change ESP32C3_RT_TIMER_TASK_PRIORITY comment into help text
2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei
b85090684d
risc-v/esp32c3: Uniformize Kconfig alignment and styling
2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei
672d879d34
risc-v/esp32c3: Remove inconsistent usage of comment command
2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei
0d32ff6a5c
risc-v/esp32c3: Remove redundant dependency
2021-05-10 19:23:33 +08:00
Byron Ellacott
70ab250c5d
Add experimental support for an eZ80 toolchain using llvm and GNU binutils.
...
An additional fix for the RTC driver to lock the RTC after setting values instead of unlocking it is included.
2021-05-10 19:23:33 +08:00
chenwen
98d97f27fd
xtensa/esp32: Fix crash issue caused by null pointer operation
2021-05-10 19:23:33 +08:00
Gustavo Henrique Nihei
0e0c7a9a47
risc-v/esp32c3: Add driver for General Purpose SPI Master
2021-05-10 19:23:33 +08:00
Huang Qi
9e5aa98495
arch/sim: Fix warning of duplicated object
...
N/A
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: I91cf182a396fc8f8024faf65c1cc7bf45cf34bbc
2021-05-08 22:11:52 +08:00
Jiuzhu Dong
94eecb1702
sim/rptun: support multi(>2) core interactive by share memory
...
N/A
Change-Id: Ia8254bfe369e40a04ed54adfa64afa38974b165c
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-08 20:45:26 +08:00
Jiuzhu Dong
788e409cb7
driver/syslog: add config SYSLOG_RPMSG_SERVER_NAME to
...
N/A
specified the name of remote proc(rpmsg server)
Change-Id: Ie270d651071e87a40a80ab489597ae18db9814f0
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-08 20:22:28 +08:00
Jiuzhu Dong
a099f22123
driver/rtc: add config CONFIG_RTC_RPMSG_SERVER to
...
N/A
select rtc rpmsg role.
Change-Id: I7f9053b070593573caa5d988c6a2e13593da6bc5
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-08 20:19:07 +08:00
chao.an
dcc2db8d40
make/archive: replace the dependency to preprequisite list
...
Change-Id: Id63f3cd32906461a54cb016ef8078d4d922845e2
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-05-07 21:34:45 +08:00
chao.an
48beda08e2
Revert "armv8-m: Fix EXC_RETURN for non-secure usage"
...
This reverts commit 2ecfddb430 .
Change-Id: I9c01dc9b6eada54642787c8a3395cb32c8c4f7d4
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-05-07 20:54:03 +08:00
liuhaitao
dc639b2b59
Merge remote-tracking branch 'mirtos/master' into dev-upmerge-nuttx-10.1-0507
...
Change-Id: I4bb3a61356be2b4a77ccfe45390b15e68a376dd6
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-05-07 20:46:07 +08:00
liuhaitao
e3166ecac0
Revert "make/archive: replace the dependency to preprequisite list"
...
This reverts commit 9c946e2af6 .
Change-Id: Ia8b7726d036c861d5eda51765d330e894e0d214a
2021-05-07 16:38:39 +08:00
Jiuzhu Dong
241dcfacd1
cmd/free: add nused field in command free
...
N/A
Change-Id: I74aa4b1e7394a17c3b117322a4cc24aa52aac3b8
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-04-28 11:34:26 +08:00
Masayuki Ishikawa
8e161bc992
arch: rp2040: Add stack coloration for the idle task
...
Summary:
- This commit adds stack coloration for the idle task
Impact:
- rp2040 with CONFIG_STACK_COLORATION=y
Testing:
- Tested with nsh, nshsram and smp configurations
- NOTE: CONFIG_STACK_COLORATION=y needs to be added
2021-04-25 03:19:24 -05:00
Masayuki Ishikawa
dc9223f4cf
arch: rp2040: Fix the initial stack pointer
...
Summary:
- The NuttX for raspberrypi-pico boots via the boot_stage2 provided
by the pico-sdk which sets the MSP at the end of the SRAM.
- However, the NuttX expects the MSP is set to the top of the idle stack.
- This commit fixes this issue.
Impact:
- None
Testing:
- Tested with nsh, nshsram and smp configrations
2021-04-25 03:19:24 -05:00