Commit Graph

22528 Commits

Author SHA1 Message Date
ligd 4358eba13a armv7-a/r: export __start symbol
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-16 10:30:41 +08:00
ligd 07b55cf7ab armv7-a/r: set up_cpu_start() to wakefunction
cause some platform will have their special way

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-16 10:30:41 +08:00
Masayuki Ishikawa df298c186f Revert "build depend:Revert Make.dep intermediate ddc file"
This reverts commit ddc3119c4e.
2024-09-15 19:29:47 +08:00
wanggang26 2c24e5b430 arch/arm-m: Clear lr before jump to __start
to fix issue about https://github.com/apache/nuttx/issues/12687

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-09-15 17:31:12 +08:00
Kevin Zhou d6ae4a0342 xtensa/esp32s3: Adjust I2C clock timing 2024-09-15 10:23:19 +08:00
xuxin19 ddc3119c4e build depend:Revert Make.dep intermediate ddc file
Revert "Parallelize depend file generation"
This reverts commit d5b6ec450f.

parallel depend ddc does not significantly speed up compilation,
intermediately generated .ddc files can cause problems if compilation is interrupted unexpectedly

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-15 10:01:58 +08:00
xuxin19 ab488800bb cmake:enhance the module for adding extra libraries
change the extra library from a file to an import target;
this will avoid differences in the handling of static libraries
between different versions of cmake and different platforms.

after unifying as a target, extra libraries can be
handled as the same as other compiled libraries

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-15 10:01:07 +08:00
p-szafonimateusz 2890232f3d arch/intel64: add support for PCI serial
intel64 can work with PCI serial cards now

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-09-15 03:37:58 +08:00
p-szafonimateusz ceb2921d79 drivers: prepare 16550 UART driver to support PCI
prepare 16550 UART driver to support PCI:

- [breaking change] change argument of uart_ioctl() from `struct file *filep` to `FAR struct u16550_s *priv`
  Also fix moxart_16550.c build related to this change

- [breaking change] change argument of uart_getreg() and uart_putreg from `uart_addrwidth_t base` to `FAR struct u16550_s *priv`
  Also fix arch/x86/src/qemu/qemu_serial.c and arch/x86_64/src/intel64/intel64_serial.c related to this change

- [breaking change] change argument of uart_dmachan() from `uart_addrwidth_t base` to `FAR struct u16550_s *priv`

- move `struct u16550_s` to public header

- generalize UART_XXX_OFFSET so we can use it with any register increment

- make u16550_bind(), u16550_interrupt(), u16550_interrupt() public

- remove arch/or1k/src/common/or1k_uart.c and use common 16550 MIMO interfacve

- change irq type in `struct u16550_s` from uint8_t to int to match MSI API

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-09-15 03:37:58 +08:00
p-szafonimateusz a0e00b993a intel64: register PCI controller early but postpone PCI drivers init
Some of PCI drivers require OS interfaces that can't be executed in the INIT context.
In that case we have to postpone PCI drivers probing and call it for example
in board initialization logic.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-09-15 03:37:58 +08:00
wangyongrong ff399054c1 rptun/rpmsg_virtio: fix addrenv/raddrenv num error
Buf fix, simple_addrenv assume the last addrenv in addrenv array
be zero value

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-09-14 17:34:52 +08:00
wangyongrong 842486ff52 sim_rptun/rpmsg_virtio: Replace work queue with wdog
Wdog has better performance than work queue

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2024-09-14 17:34:52 +08:00
yintao 30fd12c687 sim/sim_rptun.c: Fixed data type for sim_rptun_shmem_s
Use fixed length data type for the struct shared in cross-core
communication

Signed-off-by: yintao <yintao@xiaomi.com>
2024-09-14 17:34:52 +08:00
yintao 5a04670600 sim/sim_rptun: Check if the shared memory has been allocated
Bug fix

Signed-off-by: yintao <yintao@xiaomi.com>
2024-09-14 17:34:52 +08:00
yintao 4f14f8226a sim/sim_rptun: Support master/slave notifies opposite side when recovery
When in a multi-core structure, as the intermediate core,
remote is both the master and slave;When the remote exception or
restart occurs, it needs to notify the slave and reestablish the connection

Signed-off-by: yintao <yintao@xiaomi.com>
2024-09-14 17:34:52 +08:00
Yongrong Wang a20cc9f04c sim rpmsg virtio: add sim rpmsg virtio support
add sim_rpmsg_virtio.c to verify the new rpmsg virtio wrapper layer,
new the rpmsg virtio can be used in sim platfrom

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-09-14 17:34:52 +08:00
ouyangxiangzhen 733a68002c arch/riscv: Fixed hardware timer warps-around issue
This commit fixed the issue where the hardware timer wraps around and causes the system to halt.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-09-14 00:07:13 +08:00
hujun5 908df725ad arch: use up_current_regs/up_set_current_regs replace CURRENT_REGS
reason:
1 On different architectures, we can utilize more optimized strategies
  to implement up_current_regs/up_set_current_regs.
eg. use interrupt registersor percpu registers.

code size
before
    text    data     bss     dec     hex filename
 262848   49985   63893  376726   5bf96 nuttx

after
       text    data     bss     dec     hex filename
 262844   49985   63893  376722   5bf92 nuttx

size change -4

Configuring NuttX and compile:
$ ./tools/configure.sh -l qemu-armv8a:nsh_smp
$ make
Running with qemu
$ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \
   -machine virt,virtualization=on,gic-version=3 \
   -net none -chardev stdio,id=con,mux=on -serial chardev:con \
   -mon chardev=con,mode=readline -kernel ./nuttx

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-13 23:18:58 +08:00
ligd 72bdc9d9b4 armv7/8-m: change enter_critical_section to up_irq_save
caused critical_monitor will gettime, that will caused
enter_critical_seciton recursive

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-13 23:08:00 +08:00
ligd 32f56c3c62 armv8m: support busfault forward to TEE in REE handler mode
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-13 23:08:00 +08:00
ouyangxiangzhen cb7894d644 arch/x86_64: Add ARCH_INTEL64_DISABLE_CET
Intel CET (Control-flow Enforcement Technology) is a hardware enhancement aimed at mitigating the Retpoline vulnerability, but it may impact CPU branch prediction performance. This commit added ARCH_INTEL64_DISABLE_CET, which can disable CET completely with compilation option `-fcf-protection=none`.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-09-13 17:01:24 +02:00
ouyangxiangzhen 126221df97 arch/x86_64: Add elf32 multiboot1 wrapper for NuttX binary
It was discovered that attempting to load x86-64 format ELF files with a multiboot1 header using the qemu `-kernel` command would result in an error, as multiboot1 only allows x86-32 format ELF files. To address this limitation, we have developed a simple x86_32 bootloader. This bootloader is designed to copy the `nuttx.bin` file to the designated memory address (`0x100000`) and then transfer control to NuttX by executing a jump instruction (`jmp 0x100000`).

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-09-13 21:25:51 +08:00
p-szafonimateusz 2b1da40832 arch/x86_64/intel64: fix compilation errors in intel64_oneshot_lower.c
clock_time2ticks and clock_ticks2time macros changes but this file was not update

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-09-13 21:24:39 +08:00
p-szafonimateusz d6a6a0a7cc arch/intel64/hpet: add FSB interrupts support and support for 32-bit mode
These are changes to make HPET work with ACRN hypervisor:

- FSB interrupt delivery (which works like PCI MSI)
- 32-bit mode support

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-09-13 09:28:08 -03:00
Jukka Laitinen 78d2d884d3 arch/arm64/src/imx9/imx9_lpi2c.c: Ignore spurious RX interrupts
Check remaining data count, just in case an extra RX interrupt occurs
after receiving a message

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-09-13 09:18:30 -03:00
p-szafonimateusz 0659b333b4 arch/x86_64/intel64: add MSI/MSI-X support
Add MSI and MSI-X support for intel64

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-09-13 09:42:08 +08:00
liaoao 512a496467 riscv_mtimer: modify riscv_mtimer_current to reduce precision lost
Signed-off-by: liaoao <liaoao@xiaomi.com>
2024-09-13 08:55:00 +08:00
Jouni Ukkonen ac319ba49a arch/arm64/imx9: Add system reset controller
System reset controller to powercycle ml and media blocks
and disable power-isolation

Signed-off-by: Jouni Ukkonen <jouni.ukkonen@unikie.com>
2024-09-13 08:48:34 +08:00
Jouni Ukkonen 101c2f0421 arch/arm64/imx9: Configure ENET clock
Configure ENET clock to 125MHz in clock init

Signed-off-by: Jouni Ukkonen <jouni.ukkonen@unikie.com>
2024-09-13 01:50:22 +08:00
Jukka Laitinen 3f82050623 arch/arm64/src/imx9: Add config option to select TX clk direction
TX clock or ref clock can be driven either from outside (PHY / oscilator) or by the ENET block.

Typical connection with RMII PHY is that the PHY drives the refclk.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-09-13 01:50:22 +08:00
Jukka Laitinen 56c9cbd7af arch/arm64/src/imx9: Add register definitions for imx9 wakeupmix block control
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-09-13 01:50:22 +08:00
Martin Vajnar 1fa4e61230 espressif: Add Quadrature Encoder driver (using PCNT)
Signed-off-by: Martin Vajnar <martin.vajnar@gmail.com>
Co-authored-by: Pavel Pisa <pisa@fel.cvut.cz>
2024-09-13 01:49:28 +08:00
Jouni Ukkonen c2a300d2b0 arch/arm64/imx9: Change Kconfig logic
New configuration IMX9_HAVE_ATF_FIRMWARE introduced,
it is default on and it selects ARM64_HAVE_PSCI, when compiling
bootloader or when using bootloader that does not have atf
this shall be disabled

Signed-off-by: Jouni Ukkonen <jouni.ukkonen@unikie.com>
2024-09-13 01:41:56 +08:00
ouyangxiangzhen 74df0974b2 arch/x86_64: Add ARCH_X86_64_IDLE_NOP and ARCH_X86_64_IDLE_MWAIT
Using the HLT instruction in VM usually traps into the Hypervisor and releases CPU control. This will result in real-time performance degradation. Using the NOP or MWAIT instruction for an IDLE loop can reduce energy consumption while not trapping into the Hypervisor.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-09-12 18:12:12 +02:00
Jukka Laitinen 08949dec66 arch/arm64/src/imx9/imx9_lpi2c.c: Cleanups and error fixes
Clean up the interrupt-driven logic in the driver; handle error cases properly,
remove dead code and simplify logic.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-09-12 10:27:12 -03:00
Jukka Laitinen 9bee10f05e imx9/edma: Fix function prototypes
Change "DMACH_HANDLE *handle" into "DMACH_HANDLE handle". The DMACH_HANDLE is already
defined as "void *".

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-09-12 10:25:17 -03:00
Jukka Laitinen 201be401c0 arch/arm64/src/imx9/imx9_lowputc.h: Allow linking to C++ by adding extern "C"
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-09-12 10:24:40 -03:00
Jukka Laitinen b805b73681 arch/arm64/src/imx9/imx9_lowputc.c: Fix a some preprocessor macros
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-09-12 10:24:40 -03:00
YAMAMOTO Takashi 419da0209f esp32: retire 0001-esp32-Connect-Xtensa-Instruction-RAM1-to-Cache.patch
This file is no longer used.
2024-09-12 21:17:04 +08:00
YAMAMOTO Takashi 64804be879 arch/xtensa/src/esp32/Bootloader.mk: stop applying a local patch
From @tmedicci
https://github.com/apache/nuttx/pull/13311#issuecomment-2343486553
2024-09-12 21:17:04 +08:00
YAMAMOTO Takashi e02325a0a6 esp32: Port the bootloader patch
currently esp32 protected mode requires a patched bootloader.
it's a bit cumbersome to build the bootloader for that purpose.

this commit attempts to remove the need of the patched bootloader
by applying the changes by ourselves using esp hal.
2024-09-12 21:17:04 +08:00
ligd 6a2c03732f clock: Replace all ts and tick conversion functions
Using the ts/tick conversion functions provided in clock.h

Do this caused we want speed up the time calculation, so change:
clock_time2ticks, clock_ticks2time, clock_timespec_add,
clock_timespec_compare, clock_timespec_subtract... to MACRO

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-12 18:14:39 +08:00
Ville Juven 8e7c0617ff arm64/Kconfig: Make the ARM64_PA/VA_BITS a true Kconfig variable
Enforcing the default 48-bit VA for everyone also implies a 4 page table
translation system. However, if less than 40 bits are needed, a full
translation table level can be dropped, making the translations faster.

Thus, make this into a configurable option, instead of enforcing the same
address widht for everyone.
2024-09-12 17:16:20 +08:00
Stuart Ianna 779d4af3e9 arch/risc-v/src/litex: Claim all pending PLIC interrupts.
Attempt to service all interrupts pending in the PLIC's claim register. Ideally, this is more efficient than switching context for each interrupt received.
2024-09-12 15:06:04 +08:00
Stuart Ianna 29ee9aacb3 arch/risc-v/common: provide architecture specific perfmon bindings.
Provides two implementations:
 - CSR_CYCLE: Cores which implement hardware performance monitoring.
 - CSR_TIME: Uses the machine time registers.

Using the up_perf_xx bindings directory is more efficient than performing a nanosecond conversion on every gettime event.
2024-09-12 15:04:02 +08:00
Ville Juven ca4bd482a0 arm64/task/pthread_start: Fix rare issue with context register location
There is a tiny possibility that when a process is started a trap is
taken which causes a context switch. This moves the kernel stack
unexpectedly and the task start logic no longer works.

Fix this by recording the initial context location, and use that to
trampoline into the user process with interrupts disabled. This ensures
the context stays intact AND the kernel stack is fully unwound before
the user process starts.
2024-09-11 08:59:01 -03:00
Ville Juven 87d9dac817 arm64/syscall: (Re-)enable interrupts only if they were previously enabled
Don't change the CPU state unexpectedly
2024-09-11 19:51:35 +08:00
Ville Juven 498275ca43 arm64/irq: Add mask for DAIF and SPSR DAIF bits
Use them for critical section handling, removes a bit of copy&pasted
code behind CONFIG_ARM64_DECODEFIQ flag
2024-09-11 19:51:35 +08:00
Huang Qi fc5a029e44 riscv: Unify the extended context save/restore
This patch unifies the extended context save/restore for RISC-V,
allowing the customized context save/restore to be used, for example,
the extended context in rv32m1.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-09-11 19:50:07 +08:00
Ville Juven 48f545d54a arm64/crt0.c: Fix stack alignment when executing signal trampoline
The stack alignment requirement is 16-bytes, not 8-bytes.
2024-09-11 19:49:24 +08:00
Tiago Medicci Serrano f063e47c28 espressif: Update external libraries to fix GPIO interrupt bug
This commit updates the HAL version used by NuttX to fix the bug
reported in https://github.com/apache/nuttx/issues/13303
2024-09-11 09:05:45 +08:00
Ville Juven 132868b728 arm64_syscall.c: Don't need to set register context during syscall
The register context is not needed, the original idea was to provide
the user stack pointer for signal handler delivery, but the user stack
can be obtained via sp_el0 so the context registers are not needed.

SP0 is not stored upon exception entry anyways, so this code is just
completely redundant and wrong.
2024-09-10 23:23:21 +08:00
hujun5 1aab457b4c sched:add parameters to restore_critical_section
reason:
In SMP, when a context switch occurs, restore_critical_section is executed.
To reduce the time taken for context switching, we directly pass the required
parameters to restore_critical_section instead of acquiring them repeatedly.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-10 23:14:09 +08:00
Ville Juven 0ca1a07e84 arm64_addrenv_pgmap.c: Revoke user execution access to kernel mmap'd pages
Otherwise, user can run code from there
2024-09-10 23:10:57 +08:00
Ville Juven eebff25d69 arm64_mmu.h: Change ordering of access flags for user data
This makes it more readable, no functional changes
2024-09-10 23:05:12 +08:00
Ville Juven 080f9ede45 arm64_mmu.c: Fix kernel L1 page table size
The kernel L1 page table must be at least 1 page
2024-09-10 23:05:12 +08:00
Ville Juven 4149e45450 arm64_mmu: Fix TLBI instruction format
The vaddr field in TLBI means: Bits[55:12] of the virtual address to match.
This basically means the page offset of the virtual address, so the input
vaddr must be shifted to the page offset.

Reference TLBI VALE1IS register description from ARMv8-A reference manual.
2024-09-10 23:05:12 +08:00
Ville Juven fbc796cff1 arm64_mmu: Do not set accessed-flag for table descriptors
The 12:0 bits in table descriptors are RES0 and AF is the 10th bit, so
it is not valid to set it in this case.

Fix this by moving AF to the common MMU_MT_NORMAL_FLAGS field
2024-09-10 23:05:12 +08:00
Ville Juven 00c4da73b3 arm64_addrenv.c: Flush kernel page table copy to user mappings
Make sure the user L1 page is updated to system memory when the kernel
mappings are copied.

Also, flush the I-cache when switching address environments.
2024-09-10 22:56:06 +08:00
Ville Juven 20ce41d080 arm64_vector_table.S: Remove unnecessary instruction
The expression "sub    x0,  x0, #8 * XCPTCONTEXT_GP_REGS" is void,
as the next instruction overwrites x0 anyway.
2024-09-10 22:55:12 +08:00
shizhenghui 7472b08851 sim_sound: add AUDIOUTILS_LAME to dependency list
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-09-10 20:25:48 +08:00
shizhenghui dea9e5343d arch/sim/Makefile: add libmad & lame include path
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-09-10 20:25:48 +08:00
shizhenghui 6637606096 sim_offload: move out of the posix directory
The libmad and libmp3lame libraries have been ported to
apps/audioutils and will be compiled with NuttX.

Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-09-10 20:25:48 +08:00
cuiziwei 6eb286ae01 sim:Remove -lmad cause it has been ported to the apps/audioutils directory.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-09-10 20:25:48 +08:00
Bowen Wang bf5c571098 arm64/qemu_boot: add arm64 pci io memory map
and rename other pci region name to make them more
readable

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-09-10 14:34:31 +08:00
Bowen Wang b12fa7f760 qemu_boot: change IVSHMEM memory region to PCI memory region
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-09-10 14:34:31 +08:00
Bowen Wang 99876fa529 arm64/mmu_region: add ivshmem mmu region for arm64
Now the ivhsmem memory region can be used in arm64

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-09-10 14:34:31 +08:00
yangshuyong 6a09037efd arm64/qemu_boot: add the pcie cfg address for arm64
1. Extend the arm64 address to 48bit;
2. Add pci cfg address to the mmu map table;

Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
2024-09-10 14:34:31 +08:00
Stuart Ianna f69a62583c arch/risc-v/src/litex: Update parameter to match new register typedef.
This silences the warning produced after the uintreg_t definitions was introduced in 8ebc3aa9e8.
2024-09-10 14:03:16 +08:00
Stuart Ianna f96370700e arch/risc-v/src/litex/litex_serial: Fix build warning after inline spinlock change.
Resolves regression introduced in a4fece3450.
2024-09-10 14:03:16 +08:00
adriendesp 42f471ba4d Fix xmc4_spi.c DX select.
Added option to have different DX for each USIC channel.
2024-09-10 11:36:59 +08:00
meijian a7224cf35a net/netstatistics: add tx/rx bytes statistics for dev
We can see them in ifconfig:

ap> ifconfig
wlan0   Link encap:Ethernet HWaddr 42:64:7f:b3:12:03 at UP mtu 1500
        inet addr:10.0.1.2 DRaddr:10.0.1.1 Mask:255.255.255.0
        inet6 DRaddr: ::

        RX: Received Fragment Errors   Bytes
            00000b9b 00000000 00000000 21daf5
            IPv4     IPv6     ARP      Dropped
            00000a33 00000137 00000031 00000000
        TX: Queued   Sent     Errors   Timeouts Bytes
            00000ac4 00000ac4 00000000 00000000 1a2103
        Total Errors: 00000000

Signed-off-by: meijian <meijian@xiaomi.com>
2024-09-10 11:36:03 +08:00
yanghuatao c43c91816d toolchain/ghs: add ghs link script for mps2-an500 platform
Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2024-09-09 01:26:13 +08:00
George White 3f00c4aae0 rp2040: support pico-sdk 2.0.0
Since the introduction of the rp2350, the pico-sdk project has been
re-arranged and elf2uf2 has been merged in to a new 'picotool' binary
which is supplied and installed separately.
2024-09-08 21:43:22 +08:00
p-szafonimateusz 882c0d0a47 arch/x86_64: convert all asm() to __asm__()
asm() is not supported by -std=c99, __asm__() is more portable

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-09-07 01:01:24 +02:00
YAMAMOTO Takashi 8b81689f2c Appease a GCC warning
```
common/xtensa_swint.c:442:24: error: passing argument 1 of 'up_dump_register' discards 'volatile' qualifier from pointer target type [-Werror=discarded-qualifiers]
  442 |       up_dump_register(CURRENT_REGS);
      |                        ^~~~~~~~~~~~
```
2024-09-06 21:17:57 +02:00
ouyangxiangzhen dc7d3470e6 arch/x86_64: Fix wrong RDTSCP implementation
RDTSCP instruction reads the current value of the processor’s
time-stamp counter (a 64-bit MSR) into the EDX:EAX registers, and it
also reads the value of the IA32_TSC_AUX MSR (address C0000103H) into
the ECX register. However, the current RDTSCP implementation does not
provide a hint for the compiler that ECX has been changed, resulting in
register corrupted and subtle errors.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-09-06 17:27:20 +02:00
ouyangxiangzhen f6e4ab25bd arch/x86_64: Support QEMU PVH ELF loader
Enabling CONFIG_ARCH_CHIP_INTEL64_PVH_BOOT will allow nuttx.elf loaded by QEMU -kernel parameter.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-09-06 20:56:46 +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
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
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
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
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
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
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
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
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
Filipe Cavalcanti 29ae9d1110 esp32s2: fix SPI flash and file system mounting
Copied spi flash files from risc-v
Removed old spiflash from make.defs
KConfig modifications for common spiflash
Added new spiflash entry to make.defs
S2 Board config update
Modifications working on S2. Need fix on ROM function
Board fixes
Deleted old spiflash files
Fixes for smartfs operation
Set new HAL version
Fixed wrong change on S3
2024-09-03 19:13:46 -03:00
Tiago Medicci Serrano 6df9de8788 esp32: fix initialization with PSRAM + SMP
Cache flush must be done prior to the APP cpu initalization. This,
however, must be true for the case where PSRAM is not available or
not selected. To do that, this commit flushs the cache during the
device initialization.
2024-09-02 10:24:26 -03:00
YAMAMOTO Takashi c06a742a63 esp32: fix a crash with PSRAM + SMP
this function is called via esp_spiram_init_cache early in the boot.
2024-09-02 10:24:26 -03:00
guoshichao 4c01594d5b nuttx: remove the unnecessary -pipe build option
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-31 10:22:20 +08:00
Tiago Medicci Serrano c72c66fff8 espressif: Fix deadlock in RT timer caused by critical section
This commit fixes a deadlock in `esp32s3-devkit:sta_softap`
defconfig: `spin_lock_irqsave` was being used to enter a critical
section that calls `nxsem_post`. In this case, it's recommended
to use `[enter|leave]_critical_section` to avoid deadlocks when a
context switch may happen, for instance.
2024-08-30 17:00:51 -03:00
YAMAMOTO Takashi e8b1876f99 esp32: enable APP_CPU cache earlier
NuttX uses PSRAM, possibly using the APP_CPU cache MMU,
way before starting the APP_CPU in up_cpu_start().
Flushing the cache when launching the APP_CPU can cause
data corruptions on PSRAM.
Eg. mm_heap structures if the PSRAM is added to a heap.
2024-08-31 00:13:42 +08:00
chao an cf4a92c81e armv8-r/gicv3: correct cpu index of irouter
interrupt routing cpu should be index not cpuset

Signed-off-by: chao an <anchao@lixiang.com>
2024-08-30 21:48:58 +08:00
YAMAMOTO Takashi a722b74de7 esp32: cache_sram_mmu_set: update the correct register bits 2024-08-30 21:46:31 +08:00
Tiago Medicci Serrano a916de0e14 espressif: Update HAL library reference to include debug assert
During the board bringup, the new HAL reference includes an assert
to check if the critical section flags is being stored as expected.
2024-08-30 21:41:47 +08:00
yangsong8 5a39e83c05 usbdev: extend the usb req len to size_t
Some USB controllers can receive or send multiple data packets then
generate one interrupt. This mechanism can reduce the number of data
copies. Extend req buf to accommodate this.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-08-30 01:32:02 +08:00
Ville Juven 23e0bf5953 imx9_usdhc.c: Fix build error when CONFIG_ARM64_DCACHE_DISABLE=y
priv->rxbuffer does not exist when CONFIG_ARM64_DCACHE_DISABLE=y so
references to it will create a build error -> flag / remove accesses
to it.
2024-08-30 01:13:26 +08:00
Ville Juven a0a85e5c10 arch/arm64: Move ELF_64BIT selection to arch/Kconfig
Unify the elf file format for the whole arm64 architecture
2024-08-28 07:45:36 -04:00
Lup Yuen Lee 4c35bde3ba risc-v/bl808: Configure MMU to cache User Text, Data and Heap
This PR configures the BL808 MMU to cache the the User Text, Data and Heap. We enable the T-Head MMU Flags for Shareable, Bufferable and Cacheable, as explained in the previous PR: https://github.com/apache/nuttx/pull/13199

This PR fixes the Slow Memory Access for NuttX Apps on Ox64 BL808 SBC: https://github.com/apache/nuttx/issues/12696. With this fix, Ox64 NuttX CoreMark jumps from 19 to 1,104. (Close to Buildroot Linux CoreMark)

Modified Files:

`arch/risc-v/Kconfig`: Enabled `ARCH_MMU_EXT_THEAD` for BL808 SoC.
2024-08-28 13:47:41 +08:00
pangzhen1 dee4c63adb protected build: userspace threads will unexpectly work in privileged mode after syscall
In protected build mode, the syscall returns without setting correct value for the CONTROL register, which causes the userspace threads working in privileged mode after syscall.

Signed-off-by: pangzhen1 <pangzhen1@xiaomi.com>
2024-08-28 13:44:37 +08:00
Lup Yuen Lee b14dc8f8ae risc-v/mmu: Configure T-Head MMU to cache User Text, Data and Heap
This PR configures the T-Head MMU to cache the the User Text, Data and Heap. We enable the MMU Flags for Shareable, Bufferable and Cacheable, as explained in this article: https://lupyuen.github.io/articles/plic3#appendix-mmu-caching-for-t-head-c906

This PR fixes the Slow Memory Access for NuttX Apps on BL808 and SG2000 SoCs: https://github.com/apache/nuttx/issues/12696. With this fix, SG2000 NuttX CoreMark jumps from 21 to 2,423. (Close to SG2000 Debian CoreMark)

We introduce a Kconfig Option: `ARCH_MMU_EXT_THEAD` ("System Type > Enable T-Head MMU extension support"). Enabling this Kconfig Option will configure the T-Head MMU to cache the User Text, Data and Heap.

This PR enables the MMU cache for only SG2000 SoC (Milk-V Duo S SBC). The next PR will apply the same settings to BL808 SoC (Pine64 Ox64 SBC).

Modified Files:

`arch/risc-v/Kconfig`: Added Kconfig Option `ARCH_MMU_EXT_THEAD` that will configure the T-Head MMU. Enabled `ARCH_MMU_EXT_THEAD` for SG2000 SoC.

`arch/risc-v/src/common/riscv_mmu.h`: Set the T-Head MMU Flags (Shareable, Bufferable and Cacheable) for User Text, Data and Heap, if `ARCH_MMU_EXT_THEAD` is enabled

`arch/risc-v/src/common/riscv_addrenv.c`: Extended the MMU Flags from 32 bits to 64 bits, to accommodate the T-Head MMU Flags

`arch/risc-v/src/common/riscv_exception.c`: Extended the MMU Flags from 32 bits to 64 bit, to accommodate the T-Head MMU Flags. This code is enabled only for MMU Paging (`CONFIG_PAGING`).
2024-08-27 19:54:58 -04:00
guoshichao 2d7c47ce16 greenhills: fix the build option warning
Warning: Unknown option "-fno-optimize-sibling-calls" ignored.  Did you mean "-mno-long-calls"?

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-28 01:22:03 +08:00
jinxiuxu 575c9b12ab drivers/audio: fix samp rate conversion issue
use ac_controls.hw to get the correct sample rate intead of ac_controls.b

Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2024-08-27 22:00:39 +08:00
simbit18 1661a66843 [cmake]: added initial support for MSYS2
Currently concerns only arm.

tools/ci/testlist/msys2.dat:
At the moment I only added the board nucleo-l152re:nsh

.github/workflows/build.yml:
Enabled cmake for msys2
2024-08-27 21:36:12 +08:00
Ville Juven 12ba2eeb23 arm64_checkstack.c: Fix traversing of user stack when ARCH_ADDRENV=Y
Need to instantiate the correct address environment when reading from
user stack, otherwise the result is very likely a crash
2024-08-27 21:34:43 +08:00
Ville Juven 963c5e8e52 arm64/imx9: Force 64-bit ELF format
The format is always 64-bits
2024-08-27 07:39:26 -04:00
SPRESENSE 2cc9221c09 arch: cxd56xx: Add logic for i2c reset
Add ARCH_HAVE_I2CRESET configration to ARCH_CHIP_CXD56XX
and implement i2c reset function.
2024-08-27 12:29:46 +02:00
SPRESENSE de8829f8cd arch: cxd56xx: Fix SCU sensor data format
Add offset setting for sensor data to be written to SCU math function.
Fix comments in function descriptions.
2024-08-27 12:28:50 +02:00
yangguangcai 352e3a6873 armv7-a timer:fix timer overflow.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-08-26 17:50:47 -04:00
yanghuatao 33ddf1a297 toolchain/ghs: Fix green hills toolchain build Vela warnings
ccarm: Warning: Option "-fomit-frame-pointer" not supported in this product
ccarm: Warning: Unknown option "-Wno-cpp" ignored.  Did you mean "--nocpp"?
ccarm: Warning: Unknown option "-pipe" passed to linker
ccarm: Warning: Unknown option "-Wno-psabi" ignored.  Did you mean "-Wno-convert64"?
ccarm: Warning: Option "-fomit-frame-pointer" not supported in this product
ccarm: Warning: Unknown option "-Wno-cpp" ignored.  Did you mean "--nocpp"?
ccarm: Warning: Unknown option "-pipe" passed to linker
[asarm] (warning #2073) unknown option: -mimplicit-it=always
Warning: Unknown option "-pipe" passed to linker
[asarm] (warning #2073) unknown option: -mthumb
[asarm] (warning #2073) unknown option: -mimplicit-it=always
[asarm] (warning #2073) unknown option: -mthumb
[asarm] (warning #2073) unknown option: -mimplicit-it=always
[asarm] (warning #2073) unknown option: -mthumb
[asarm] (warning #2073) unknown option: -mimplicit-it=always
[asarm] (warning #2073) unknown option: -mthumb
[asarm] (warning #2073) unknown option: -mimplicit-it=always
[asarm] (warning #2073) unknown option: -mthumb
[asarm] (warning #2073) unknown option: -mimplicit-it=always

Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2024-08-27 01:56:34 +08:00
guoshichao 3bb30231a9 greenhills: fix the file build path error
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-27 01:56:34 +08:00
guoshichao e5f40db601 greenhills: fix the "etc/init.d/rc.sysinit" file preprocess error
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-27 01:56:34 +08:00
guoshichao c2d26988fd greenhills: fix double-precision float operation running error
since not all Armv7-m platform support double-precision floating
operations, so we add an extra option that help those specific platform
could define the single-precision floating operations.
for example, qemu-mps platform(armv7-m) support double-precision
floating operations, so we do not need to open
CONFIG_ARM_FPU_SINGLE_HARDWARE build options;
but for fc7300 platform(armv7-m) only support single-precision floating
operations, so if we pass "-fhard" build option to "ghs" compiler, then
the following instruction will be generated:
vcvt.f64.s32    d9, s18
which will fail to execute on fc7300 platform.
with "-fsingle" build option, the "ghs" compiler will generate hardware
instruction for single-precision floating operation, and generate
software instruction for double-precision floating operation.

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-27 01:56:34 +08:00
guoshichao 90a6ced9c1 arch/arm/toolchain: add --entry_std LDFLAGS for different toolchain
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-27 01:56:34 +08:00
pangzhen1 d2ec034ada support inputting multiple ldscript files when linking the nuttx.bin
To support greenhill compilation, LDFLAGS removes the code that adds -T through addprefix to ARCHSCRIPT(greenhill requires a space between -T and ldscript files, but addprefix didn't do it). However,if we modified like this, when ARCHSCRIPT has more than one ldscript, the -T is only added to the first ldscript, but not to the following ldscripts, which results in a warning when linking.
To solve this problem, we can just add a space after $(SCRIPT_OPT) when using addprefix, instead of deleting addprefix.

Signed-off-by: pangzhen1 <pangzhen1@xiaomi.com>
2024-08-27 01:56:34 +08:00
guoshichao 67f0b5131b arch/arm/toolchain: add greenhills toolchain config
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-27 01:56:34 +08:00
guoshichao dd8b630b0d nuttx: add GREENHILLS compiler config option
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-27 01:56:34 +08:00
Xiang Xiao fcb3e84c24 can: Merge netpacket/can.h into nuttx/can.h
To align with the layout of Linux can header file.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-08-26 05:05:31 -04:00
Windrow14 cc8d453b5a arch/xtensa/src/esp32s3/esp32s3_sdmmc.c: wait for command done event also on error response
Wait for CMDDONE in esp32s3_waitresponse even an error response is received.
Otherwise, the CMDDONE event of this command will disrupt later command.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-26 13:44:57 +08:00
yinshengkai 84333881d7 mm: add mm_largest api to get the current largest available memory block
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-08-25 23:09:28 +08:00
yinshengkai 49d1b4198f mm: add memory pressure notification support
Add mm_heap_free interface to pass remaining memory to memory pressure

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-08-25 23:09:28 +08:00
yanghuatao fac44ab8aa nuttx/mps2: Support NuttX running on qemu cortex-m7
Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2024-08-25 22:56:46 +08:00
Xiang Xiao d3be25d90c arch/arm: Add the support of MPS2 AN386 and AN500
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-08-25 22:56:46 +08:00
hujun5 1d6a099180 irq: remove restore_critical_section in irq
Only in the non-critical region, nuttx can the respond to the irq and not hold the lock
When returning from the irq, there is no need to check whether the lock needs to be released
we also need keep restore_critical_section in svc call

test:
Configuring NuttX and compile:
$ ./tools/configure.sh -l qemu-armv8a:nsh_smp
$ make
Running with qemu
$ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \
   -machine virt,virtualization=on,gic-version=3 \
   -net none -chardev stdio,id=con,mux=on -serial chardev:con \
   -mon chardev=con,mode=readline -kernel ./nuttx

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-08-25 21:14:19 +08:00
Petro Karashchenko d499ac9d58 nuttx: fix multiple 'FAR', 'CODE' and style issues
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-08-25 19:22:15 +08:00
Petro Karashchenko 7b18f9d19f nuttx: add missing 'FAR' and fix style issues
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-08-25 19:22:15 +08:00
Petro Karashchenko a8ec8b8cd2 arch/x86_64: remove 'ul' sufix from shift value
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-08-25 19:22:15 +08:00
Petro Karashchenko b7cbe16fed arch/x86_64: remove redundant init
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-08-25 19:22:15 +08:00
Petro Karashchenko f40b09cbc9 style: remove redundant spaces
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-08-25 19:22:15 +08:00
Petro Karashchenko d252b6229f nuttx: use sizeof instead of define or number in snprintf
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-08-25 19:22:15 +08:00
Kevin Zhou bf57047429 xtensa/esp32s3: Separate address and command flag for QSPI DMA transfer 2024-08-24 11:31:35 +08:00
Yanfeng Liu 634ee5b1f6 board/maix-bit: add cmake support
This adds initial CMake support for `maix-bit` device.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-08-24 11:08:25 +08:00
Ville Juven 29f8648ecc arm64: Initial implementation of CONFIG_BUILD_KERNEL
This is the initial version for kernel mode build on the arm64 platform.
It works much in the same way as the risc-v implementation so any
highlights can be read from there.

Features that have been tested working:
- Creating address environments
- Loading init (nsh) from elf file
- Booting to nsh
- Starting other processes from nsh
- ostest runs to completion

Features that are not tested / do not work:
- SHM / shared memory support
- Kernel memory mapping (MM_KMAP)
- fork/vfork

An example qemu target is provided as a separate patch:
tools/configure.sh qemu-armv8a:knsh
2024-08-23 10:26:34 -03:00
Ville Juven 7f228b1554 arm64/barriers.h: Generalize barrier macros
Make it possible to define arguments for barriers
2024-08-23 10:26:34 -03:00
Ville Juven 52781221b3 arm64_sync_exc: Use temporaries x9/x10 instead of x0/x1
Why? Because this allows optimizing the user system call path in such
a way that the parameter registers don't have to be read from the saved
integer register context when the system call is executed.
2024-08-23 10:26:34 -03:00