The video_controls.h is a public header file, and it is used by
videoio.h. So it should be moved to the include/sys directory.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
In SMP mode, up_cpu_index()/this_cpu() are the same, both return the index of the physical core.
In AMP mode, up_cpu_index() will return the index of the physical core, and this_cpu() will always return 0
| #ifdef CONFIG_SMP
| # define this_cpu() up_cpu_index()
| #elif defined(CONFIG_AMP)
| # define this_cpu() (0)
| #else
| # define this_cpu() (0)
| #endif
Signed-off-by: chao an <anchao@lixiang.com>
If a context switch occurs in syscall, the g_running_task need to be recorded for assert logic.
This copies the logic from arm platforms
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
When entering the function from an external bootloader, the CPU could be using PSP. But the following
code expects MSP to be in use.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
We shouldn't panic the kernel when a user task excepts, we can just kill the user task and
it's children. Do this by returning to _exit() in kernel context.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
Adds board definition for imx93-evk board
- Support for the Cortex-A55 core in i.MX93, support for the Cortex-M33
core is _not_ provided
- "nsh" profile is provided, this includes a minimalistic feature set
which boots the SoM to nsh console
- A bootloader is required, u-boot has been tested
Adds support for NXP i.MX9-series System-on-Module chips.
- Support for i.MX93 is added
- CPU is Cortex A55 / ARMv8.2A
- The chip also contains a Cortex M33, but no support is provided
- Supported drivers include lpuart only for now
This commit implements functions icjx_multireadpin and icjx_multiwritepin.
These functions can be used for multiple pin access (read/write) if
CONFIG_IOEXPANDER_MULTIPIN is selected. This access is generally
faster than one by one pin and may simplify user application.
Changes to general functions icjx_read and icjx_write were also required
to provide support for multiple data send/receive.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
This driver is based on ESP32 TWAI CAN drivers currently available
in Nuttx, and captures the differences currently present across the
TWAI drivers for easy future adaption to remaining ESP32 platforms
with no loss of support/function. Also provides a generic SJA1000 CAN
driver solution that is CPU-architecture independent.
Changes:
- Low-level driver re-written to allow usage independent of CPU
architecture, and support both SJA1000 and TWAI CAN controllers.
- Platform-specific settings abstracted away to be provided by board
layer.
- Support for multiple instances of SJA1000 driver.
function bloaty() Add -D CMAKE_INSTALL_PREFIX="${NUTTXTOOLS}"/bloaty.
Improves workflow execution time because it is now cached.
Changed reference file to calculate the hash for key of actions/cache@v4. Now it is darwin.sh.
The overhead of spinlok is less than mutext (mutex need to call
enter_critical section.)
After this patch, `down_write_trylock` and `down_read_trylock` can be
use in interrupt context.
The instruction is protected with mutex only one instruction so using
spinlock is better.
Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
We can decide whether use trustzone
After this patch, we can support the following mode:
ARCH_HAVE_TRUSTZONE ARCH_TRUSTZONE_DISABLED ARCH_TRUSTZONE_SECURE ARCH_TRUSTZONE_NONSECURE
Without Security Extensions n n n n
CHIP have NO trustzone
With Security Extensions y y n n
Only one bin in sec mode
With Security Extensions y n y n
TEE bin in sec mode
With Security Extensions y n n y
REE bin in non-sec mode
Signed-off-by: ligd <liguiding1@xiaomi.com>
Purpose: make the the os crash when busyloop with interrupt disable
Follow the arm gicv2 spec, if we want to use the IRQ and FIQ
simultaneously when not using the processor Security Externsions.
We should:
1. IRQ to Group 1 and FIQ to Group 0;
2. Set CICC_CTLR.FIQEn to 1;
Then in NuttX:
1. implement the arm_decodefiq and directly crash in it;
2. provide interface to change the IRQ to FIQ, e.g. change the
watchdog IRQ to FIQ, so the watchdog can trigger even with the
interrupt disabled (up_irq_save() called);
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
The method of passing in parameters to memdump is modified and the
incoming address is added. After traversing the node to which the
address belongs, the memdump command will end.
Signed-off-by: wangmingrong <wangmingrong@xiaomi.com>
Currently only FLAT mode development can enjoy cmake build system. This
patch tries to add initial kernel mode support. It can build NuttX kernel
and libproxies.a, the latter will be further checked though.
This can already help to build an AMP remote node image as it can share
userland apps living in the AMP master node.
Major changes:
- in top folder:
- CMakeLists.txt adjust for KERNEL mode, separate from PROTECTED mode.
- in `syscall`:
- CMakeLists.txt add mksyscall target for stubs/proxies generation
- in `syscall/stubs`:
- CMakeLists.txt use dependency to mksyscall
- in `syscall/proxies`:
- CMakeLists.txt use dependency to mksyscall
- in `arch`:
- CMakeLists.txt separate KERNEL from PROTECTED mode.
- in `arch/risc-v/src`:
- CMakeLists.txt separate from PROTECTED mode, add sub folders.
- in `arch/risc-v/common`:
- CMakeLists.txt add sources and sub-folders for KERNEL mode.
- in `arch/risc-v/k230`:
- CMakeLists.txt add sources for KERNEL mode.
- in `boards/risc-v/k230/canmv230/src`:
- CMakeLists.txt adjust k230 specific scripts for kernel mode.
New additions:
- in `arch/risc-v/src/nuttsbi/` add CMakeLists.txt
- in `arch/risc-v/src/common/supervisor/` add CMakeLists.txt
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
./helloxx_main.cxx:29:10: fatal error: cxxabi.h: No such file or directory
29 | #include <cxxabi.h>
| ^~~~~~~~~~
CONFIG_LIBCXXABI is turned on, but the library include is not linked to nuttx/include, causing the compilation to fail.
Signed-off-by: wangmingrong <wangmingrong@xiaomi.com>
if driver complete unlink ops, we need to call it to release some resource,
otherwise, it will only remove inode.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This patch fixes the issue that k230_hart_is_big() doesn't work in
S-mode. It also adds convenient debug macros to ease debugging process
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
1. add support to join main task
| static pthread_t self;
|
| static void *join_task(void *arg)
| {
| int ret;
| ret = pthread_join(self, NULL); <--- /* Fix Task could not be joined */
| return NULL;
| }
|
| int main(int argc, char *argv[])
| {
| pthread_t thread;
|
| self = pthread_self();
|
| pthread_create(&thread, NULL, join_task, NULL);
| sleep(1);
|
| pthread_exit(NULL);
| return 0;
| }
2. Detach active thread will not alloc for additional join, just update the task flag.
3. Remove the return value waiting lock logic (data_sem),
the return value will be stored in the waiting tcb.
4. Revise the return value of pthread_join(), consistent with linux
e.g:
Joining a detached and canceled thread should return EINVAL, not ESRCH
https://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_join.html
[EINVAL]
The value specified by thread does not refer to a joinable thread.
NOTE:
This PR will not increase stack usage, but struct tcb_s will increase 32 bytes.
Signed-off-by: chao an <anchao@lixiang.com>