Circular buffer does not use DMA linked list therefore function
sam_freelinklist() cannot be called as it would fail on assertion (csa
not defined). Peripheral that calls DMA should care of buffer invalidation
instead.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
EALREADY:
Both Linux(asm-generic/errno.h) and FreeBSD(sys/sys/errno.h) regard it as "Operation already in progress"
ESTALE:
Linux specifically removed the "NFS" description, and we may not only use it for NFS
0ca4343518
The ECANCELED and EOWNERDEAD also use different strings from Linux's header, but their meanings are same, and NuttX's description are more likely to obey POSIX 1003.1-2008, so not changing them.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
1. the lio_sigsetup() method use a universal sighand instance across all
aiocb instances, but inside the lio_sighandler() method, if one aiocb is
handle finished, then this method will free the sighand instance that
come along with current aiocb instance. thus when handle next aiocb
instance, use-after-free crash will happen. in order to solve this
problem, we make each aiocb instance have their own sighand instance
2. make the lio_listio implementation can pass the
ltp/open_posix_testsuite/lio_listio testcases
3. the modification are referred to https://pubs.opengroup.org/onlinepubs/9699919799/functions/lio_listio.html
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
Port based on arch/arm/nrf53.
Modem not fully supported yet. At the moment, initialization and AT interface work.
Sockets and GNSS interface will be added later.
There is no need to use global spinlock to protect netdev
specific data counters. Allocate per-netdev specific spinlock
to get better locking granularity.
Move C/C++ atomic support checking to compiler.h
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
Summary:
- This commit adds netnsh_hv and netnsh_smp_hv to run the NuttX
with hypervisor environments
- Also updates README.txt
Impact:
- None
Testing:
- Tested with qemu=7.1 + kvm on raspi3b+ (ubuntu server 20.04)
- Tested with qemu-7.1 + hvf on M1/MBP (macOS 12.6.1)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Reference:https://xpack.github.io/blog/2022/05/18/riscv-none-elf-gcc-v12-1-0-2-released/
RISC-V ISA updates
Compared to previous releases, starting from 12.x, the compiler implements the new RISC-V ISA, which introduces an incompatibility issue, and builds might throw error messages like unrecognized opcode csrr.
The reason is that csr read/write (csrr*/csrw*) instructions and fence.i instruction were separated from the I extension, becoming two standalone extensions: Zicsr and Zifencei.
The solution is to add _zicsr and/or _zifencei to the -march option, e.g. -march=rv32imac becomes -march=rv32imac_zicsr_zifencei.
Summary:
- Some network drivers such as GS2200M do not support to bind
a local port for TCP client socket. In this case, this config
disables to bind the port.
- See also https://github.com/apache/nuttx/pull/3707
Impact:
- None
Testing:
- Tested with spresense:wifi_smp (Kconfig will be updated later)
- Tested with sabre-6quad:netnsh_smp (QEMU)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Summary:
- I noticed that virtio-blk and FAT are not enabled for some
virt configurations.
- This commit enables them for testing.
Impact:
- None
Testing:
- Tested with qemu-7.1
- NOTE: file copy with rv-virt:knetnsh64 is sometimes unstable.
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Initialize ICACHE way with correct mask.
Initialize scratchpad with constant g_init_marker as it has been done in HSS
Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
Summary:
- I noticed that arm64_gic_raise_sgi() is not implemented for
GICv2 which is used for SMP + hypervisor such as qemu + kvm.
- This commit fixes this issue
Impact:
- None
Testing:
- Tested with qemu-7.1 + kvm (linux) and qemu-7.1 + hvf (macOS)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Summary:
- I noticed that pcsi version can not be obtained with qemu + kvm.
- Also, pci_detect hangs with qemu + hvf.
- This commit fixes this issue by using hvc (hypervisor call).
Impact:
- None
Testing:
- Tested with qemu-7.1 + kvm (linux) and qemu-7.1 + hvf (macOS)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Summary:
- During testing with qemu + kvm, I noticed that nuttx hangs
when setting cntfrq_el0. With qemu + kvm, it starts from
EL1 because we can not specify virtualization=on
- However, I noticed that it works without setting cntfrq_el0
- This commit fixes this issue
Impact:
- None
Testing:
- Tested with qemu-7.1 (both with kvm and without kvm)
- NOTE: to work with kvm, GICv2 must be used.
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
CONFIG_ARM_TOOLCHAIN_GNU_EABI build got broken when -mthumb option was moved
from ARCHCPUFLAGS to ARCHOPTIMIZATION variable:
arm-none-eabi-ld: error: .../build/nuttx/nuttx uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/5.4.1/libgcc.a(_fixunsdfdi.o) does not
arm-none-eabi-ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/5.4.1/libgcc.a(_fixunsdfdi.o)
arm-none-eabi-ld: error: .../build/nuttx/nuttx uses VFP register arguments, /usr/lib/gcc/arm-none-eabi/5.4.1/libgcc.a(_udivmoddi4.o) does not
arm-none-eabi-ld: failed to merge target specific data of file /usr/lib/gcc/arm-none-eabi/5.4.1/libgcc.a(_udivmoddi4.o)
Separately checking the state of a file before operating on it may allow
an attacker to modify the file between the two operations.
Reference:
CWE-367
4290aed051/sysdeps/posix/remove.c (L29-L41)
Signed-off-by: Mingjie Shen <shen497@purdue.edu>
Testing for overflow by adding a value to a variable to see if it "wraps
around" works only for unsigned integer values, because signed overflow
has undefined behavior according to the C and C++ standards.
Signed-off-by: Mingjie Shen <shen497@purdue.edu>
A normal user task calls pthread_exit(), will crash at DEBUGASSERT.
Cause pthread_exit limit in user pthread task.
test case:
int main(int argc, FAR char *argv[])
{
pthread_exit(NULL);
return 0;
}
>> test
>> echo $?
>> 0
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
Changes the executable type built against the `make export` target fully linked by default. This greatly improves performance when loading applications, as relocations no longer need to be processed.