Commit Graph

54341 Commits

Author SHA1 Message Date
lipengfei28 9dc9500aaf pci add register drivers
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
lipengfei28 c25f839b06 pci: add pci bus find capability interface
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
lipengfei28 45f1597562 pci: add pci read/write config/io space interface
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
lipengfei28 d9c8838319 pci: use g_pci_ctrl_list replace g_root_bus_list
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
yangshuyong 75f8c72dbb drivers/pci/pci_qemu_edu: update qemu edu driver code
Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
yangshuyong 9c07b369e9 drivers/pci/pci_qemu_test: update qemu pci test code
Change the qmeu pci test code for new pci driver framework

Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
yangshuyong 7cbb7d36d8 Changed the x86 64 pci driver
Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
yangshuyong 125884ae95 Changed the pci bus for arm architecture
Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
yinshengkai cec3b5c0fb boards: Add TLS_NELEM dependency to libcxxabi
Refresh all defconfig

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-09-06 09:52:33 +08:00
yinshengkai a055734912 libcxx: adds tls&libcxxabi dependency
If libcxxabi is not enabled, the toolchain default implementation will be used. However, arm-gcc does not enable thread
support by default, which will cause errors in a multi-threaded environment.

libcxx depends on pthread_key_create

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-09-06 09:52:33 +08:00
yinshengkai 6d39b248a4 libcxxabi: fix compilation warnings
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-09-06 09:52:33 +08:00
yinshengkai ad76a4f7a9 libcxxabi: libcxxabi enables exceptions by default
In the following code, even though the application does not use exceptions, an exception is still thrown in libcxx

If libcxxabi is not enabled, the toolchain default implementation will be used. However, arm-gcc does not enable thread
support by default, which will cause errors in a multi-threaded environment.

Therefore, we need to use libcxxabi to ensure normal functions in a multi-threaded environment.

using namespace std;

void foo(bool recur);
int bar(bool recur)
{
  if (recur) {
      foo(false);
  }
  return 0xFAFAFA;
}

void foo(bool recur)
{
  static int i = bar(recur);
  cout << "Static is:" << i << "\n";
}

int main(int argc, char *argv[])
{
  foo(true);
  return 0;
}

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-09-06 09:52:33 +08:00
yinshengkai b721f2c84e libcxx: Disable dynamic type checking when enabling libcxxabi
It results in a recursive call, cxxabiv1::__dynamic_case -> is_equal -> __ubsan::checkDynamic -> cxxabiv1::__dynamic_case

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-09-06 09:52:33 +08:00
Filipe Cavalcanti 2af7037fa1 xtensa/esp32s2: add WiFi support on ESP32S2 2024-09-06 09:46:59 +08:00
Filipe Cavalcanti 4915338857 xtensa/esp32s2: fix for timers and watchdog init on startup 2024-09-06 09:46:59 +08:00
Filipe Cavalcanti 2e884cbd11 xtensa/esp32s2: add support for shutdown handlers 2024-09-06 09:46:59 +08:00
yinshengkai 6ac1299218 nrf91: fix cmake compiler error
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-09-06 09:42:53 +08:00
yinshengkai d7f02a8cb6 sched: change pthread_mutex implementation from sem to mutex
Since pthread_mutex is implemented by sem, it is impossible to see in ps who holds the lock and causes the wait.
Replace sem with mutex implementation to solve the above problems

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-09-06 09:42:53 +08:00
yinshengkai 2fd3981a8e pthread: remove pshared parameter from pthread_mutex_init
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-09-06 09:42:53 +08:00
yinshengkai 4feb418e36 pthread: remove the code which save and restore mutex state in pthread_condwait
type and flags are only initialized in mutex_init and should not change in the middle

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-09-06 09:42:53 +08:00
hujun5 608b59e401 smp: enable smp_call in all smp arch
reason:
In subsequent implementations, we will replace up_cpu_pause with smp_call.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-06 07:11:38 +09:00
hujun5 ea181e2621 arm: armv7-a/r and armv8-r up_cpu_index inline
reason:
inline small code to improve performance

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-06 03:44:49 +08:00
yinshengkai da6ddea8d4 arch/arm: support kernel heap in BUILD_FLAT mode
Make umm & kmm heap alloc more clear, and possible support FLAT build to
enable kernel heap.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-09-05 11:19:47 -03:00
hujun5 874c0b002c spinlock: spin_initialize should add memory barrier
reason:
spin_initialize is often used to release a lock,
and if we don't include a memory barrier,
it may lead to the lock being released prematurely.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-05 21:28:52 +08:00
hujun5 855060f353 sched: Make sure that affinity mask is valid
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-05 21:26:58 +08:00
shizhenghui af19a22b11 ci-docker: add subversion to linux dockerfile
Add subversion to install list ensure linux docker
can use svn command to download source code.

Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-09-05 21:25:46 +08:00
hujun5 e1b9144e71 can: Before we use pstate, we should check if it is NULL.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-05 21:25:22 +08:00
chao an dedb4c95c9 armv8-r/r52: add neon support into compiler line
1. correct the armv8-r fpu flag from vfpv3-d16 to fpv5-sp-d16
2. add neon support

This commit updates the build script to specify the FPU type of
`fpv5-sp-d16` when the processor is configured with a single-precision
FPU, and `neon-fp-armv8` when the processor is configured with a
double-precision + Advanced SIMD-capable FPU.

Note that the `fp-armv8` FPU type is an alias for double-precision FPv5
with 32 double-precision registers (refer to the GCC
`gcc/config/arm/arm-cpus.in` for more details); NEON is always
specified in case of a double-precision configuration because the
Cortex-R52 can only be configured as such.

Reference:
https://developer.arm.com/Processors/Cortex-R52

Instruction set:

Arm and Thumb-2. Supports DSP instructions and a configurable Floating-Point
Unit either with single-precision or double precision and Neon.

Signed-off-by: chao an <anchao@lixiang.com>
2024-09-05 09:52:51 -03:00
hujun5 a65adcd9db smp: smp call handler add up_cpu_paused_[save|restore]
reason:
Since smp call handler may lead to context switching,
we need to update the context information by calling up_cpu_paused_[save|restore].

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-05 09:35:17 -03:00
tfzou fad8a22074 arm: Add support for CSK6011A SOC and CSK6011A-NANO board
Signed-off-by: tfzou <tfzou@listenai.com>
2024-09-05 09:34:33 -03:00
hujun5 198630a809 sched: use this_task replace nxsched_self
reason:
We can reduce a function call to improve performance.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-05 09:33:50 -03:00
TAiGA cc0d4af20a tools/mksymtab: support for structure 2024-09-05 15:54:49 +08:00
fangxinyong 7b05a550dc sched: replace up_cpu_index with this_cpu
Make this_cpu is arch independent and up_cpu_index do that.
In AMP mode, up_cpu_index() may return the index of the physical core.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-09-05 12:09:24 +08:00
YAMAMOTO Takashi fb58ac99fa esp32_psram.c: Remove a seemingly stale comment 2024-09-05 11:49:31 +08:00
chao an 2465b67c84 cmake/tricore: filter out nostdlib in linker phase to avoid build break
Regression by:

| commit b64fb09e6c
| Author: xuxin19 <xuxin19@xiaomi.com>
| Date:   Tue Jul 16 15:50:13 2024 +0800
|
|     cmake:bugfix fix CMake LTO build block
|
|     it was wrong in https://github.com/apache/nuttx/pull/12423/files#r1618852245
|     EXTRA_FLAGS is useful in LTO for pass option tu lto linker
|
|     Signed-off-by: xuxin19 <xuxin19@xiaomi.com>

Signed-off-by: chao an <anchao@lixiang.com>
2024-09-05 11:47:06 +08:00
Kevin Zhou fc6bcd6600 xtensa/esp32s3: Add timing delay set interface for QSPI 2024-09-05 11:36:18 +08:00
Matheus Catarino 1936e68f40 risc-v/qemu-rv: Add Build Config for leds64_zig
This PR adds a new Build Config `rv-virt:leds64_zig` that builds the Zig App `leds_zig` for QEMU RISC-V 64-bit.
ref.: https://github.com/apache/nuttx-apps/pull/2534
2024-09-05 11:28:12 +08:00
Saurav Pal fc31c61730 boards/sim: Defconfigs for nand and mnemofs
Adds nand and mnemofs sim configs.

Signed-off-by: Saurav Pal <resyfer.dev@gmail.com>
2024-09-05 11:02:05 +08:00
Petro Karashchenko a2ed0ddd72 libs/libm: fix epsilon relaxation in log and logf
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-09-05 10:14:04 +08:00
Alexander Merkle 39937c9685 tools/ci/docker/linux/Dockerfile: fix ccache when running container as user
Normally ccache places the temporary files in `~/.ccache`, when invoking the container with
  `-u <uid>:<gid>`
as e.g. Jenkins does, this might result in a invalid/unknown home folder.
Thus ccache tries to write to `/.ccache` which doesn't exist and the user doesn't have any permissions.

Explicitly set `CCACHE_DIR` to a folder with appropriate permissions.
2024-09-05 10:09:57 +08:00
chao an 6098747c4f arm/giv3: add g_ prefix to some global variables
Signed-off-by: chao an <anchao@lixiang.com>
2024-09-05 09:58:21 +08:00
YAMAMOTO Takashi 3d275bd4a2 psram_cache_init: remove cosmetic differences between PRO/APP
No functional changes are intended.
2024-09-05 09:44:18 +08:00
hujun5 433f159c06 arch: remove unused up_cpu_pausereq waiting
reason:
After the up_cpu_pause call completes, it guarantees that other CPUs have fully stopped.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-05 07:15:54 +09:00
Nonpawit Ekburanawat c9fc04911c doc: Add STM32H745I-DISCO dual-core documentation
Signed-off-by: Nonpawit Ekburanawat <nonpawit.ek@gmail.com>
2024-09-04 10:27:20 -03:00
Yanfeng Liu 7bd857c9f1 Revert "arch/riscv: unify in-kernel syscall"
This reverts commit 6986cd4105 as it breaks critical section as in
https://github.com/apache/nuttx/pull/12864#issuecomment-2325779041
2024-09-04 09:47:49 -03:00
YAMAMOTO Takashi 58d3c53d2e esp32: fix seemingly wrong calculations
DPORT_APP_CACHE_MASK_DRAM1 is already a mask.
2024-09-04 09:15:16 +02:00
Alexander Merkle c95a1cc98b tools/ci/docker/linux/Dockerfile: fix cmake download
remove the leftover `wget` as curl is used
triggers a host not found on my machine

Signed-off-by: Alexander Merkle <alexander.merkle@lauterbach.com>
2024-09-04 09:09:50 +02:00
hujun5 9e5d3dacd6 irq: dynaminc create g_irqmap
reason:
dynaminc create g_irqmap to reduce the use of data segments
CONFIG_ARCH_NUSER_INTERRUPTS should be one more than the number of IRQs actually used

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-03 19:22:28 -03:00
YAMAMOTO Takashi 471d411503 esp32: psram_set_cs_timing: sync with esp-idf
I have no idea what this setting is.
I'm just blindly trying to follow whatever esp-idf does.

the esp-idf counterpart:
6e5414b6c4/components/esp_psram/esp32/esp_psram_impl_quad.c (L702-L712)
6e5414b6c4/components/esp_psram/esp32/esp_psram_impl_quad.c (L136-L147)
2024-09-03 19:16:28 -03:00
chao an b15c1a441a arm/gicv3: set routing affinity before enable IRQ
In corner case, the pending ISR will be triggered immediately
after enable the IRQ, this PR will setting CPU affinity first
to avoid routing the unexpected IRQ to other CPUs.

Signed-off-by: chao an <anchao@lixiang.com>
2024-09-03 19:14:14 -03:00