Commit Graph

21367 Commits

Author SHA1 Message Date
zhanghongyu
7c322c250a sim_netdriver: some sim defconfig have problems when using the network
if the configured SIM_NETDEV_BUFSIZE < host MTU, there will be issues with access out of bounds

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-11-04 17:53:25 +08:00
liqinhui
2d27dc0ef0 simwifi: For scan results, parse and translate the Chinese ssid encoded by the wpa_cli.
Because there is no pre-encoding length of the ssid, the ssid including
the Chinese characters whose length is less than 32 after encoding
cann't be translated.
For example, the ssid name is `word人`. After encoding it is `world\xe4\xba\xba` and will not be decoded.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-11-03 22:29:43 +08:00
raiden00pl
24c7e355d9 arch/stm32: remove unused STM32_UART_RXDMA and STM32_UART_TXDMA flags
These flags are not used in the code.
SERIAL_HAVE_RXDMA and SERIAL_HAVE_TXDMA flags are used instead.

STM32_UART_TXDMA flag is not even defined in Kconfig
2023-11-03 22:24:31 +08:00
raiden00pl
3220a59a3e arch/stm32: STM32_FOC_G4_ADCCHAN0_WORKAROUND depend on STM32G4 2023-11-03 22:24:31 +08:00
SPRESENSE
2f5bb9200a arch: cxd56xx: Support to get gnss firmware version
Support to get gnss firmware version and fix typo.
2023-11-03 09:23:57 +01:00
Ville Juven
3f3b30e384 riscv_addrenv: Fix static page table mapping (paddr instead of vaddr)
Connecting the static page tables to each other was done with the page
table virtual address (riscv_pgvaddr) when the page table physical address
is needed.
2023-11-02 21:52:23 +08:00
Ville Juven
aacdbf2a3b risc-v/addrenv: Improve the commenting on struct arch_addrenv_s
I can never remember whether the static page table list contains the
table's physical or kernel virtual address.. Add the fact as a comment
there.

Also add the limitations that come from this static page table approach
for Sv32.
2023-11-02 21:52:23 +08:00
Ville Juven
8a2d3958e9 mm/kmap: Fix bad dependency to ARCH_VMA_MAPPING
kmap does not need ARCH_VMA_MAPPING => remove the dependency
2023-11-02 15:10:57 +02:00
liqinhui
22d11aafa2 simwifi: Transfer the special characters in ssid.
The SSID can be configured with special symbols suach as single
quotations, double quotations and backslashes, which need to be escaped.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-11-01 16:14:34 +01:00
liqinhui
c7d0b32e4f simwifi: Support that get the connected Chinese essid.
The Chinese essid obtained by wpa_cli is encoded. So, we directly use
the essid saved in wifidev.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-11-01 09:28:51 +08:00
David Sidrane
e0c883f487 s32k3xxx:serial ensure the cache is updated if the DMA has updated again 2023-11-01 09:24:57 +08:00
Gabriel de Sousa
0bc897df15 FIX: s32kxxx flexcan doesn't set srr bit for extended frames 2023-10-31 12:22:00 -03:00
SPRESENSE
ed5785ad06 arch: cxd56xx: Update gnss header files
- Add some ioctl commands to get version, sleep, wakeup and reset.
- Add new data structures for CXD5610 GNSS Add-on board.
2023-10-31 09:18:18 +01:00
Ville Juven
d64f216424 arch/mpfs: Add CONFIG_MPFS_BOARD_PMP option for PMP configuration
This adds option to do PMP configuration via mpfs_board_pmp_setup instead
of just opening up everything. In this case, it is up to the specific
board to implement the PMP configuration in whichever way it sees fit.
2023-10-30 12:26:39 -03:00
Ville Juven
598e1c6512 mpfs_entrypoints.c: Open all memory from PMP for hart before booting
Open PMP before the hart payload starts to execute
2023-10-30 12:26:39 -03:00
Ville Juven
17a7a7bd76 mpfs_opensbi: Remove mpfs_opensbi_pmp_setup
The PMP setup should be done in the board specific code, at a much
earlier stage. Granting all access is a security risk anyway.
2023-10-30 12:26:39 -03:00
dongjiuzhu1
8ad88a3fc5 qemu/arm64: implement up_textheap_align and support sotest
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-30 18:20:22 +08:00
dongjiuzhu1
da95b35175 arch/arm64: Add declaration for arm64_mmu_set_memregion
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-30 18:20:22 +08:00
dongjiuzhu1
489bd15271 arch/arm64: support relocate for aarch64
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-30 18:20:22 +08:00
raiden00pl
5b87fdfb9d Documentation: remove all migrated READMEs 2023-10-29 21:03:54 -03:00
TimJTi
bfa14406d6 SAMA5D2 add new mcan ioctls 2023-10-28 15:21:46 +08:00
SPRESENSE
f3fabc5d32 Revert "make/archive: Use the full path name when matching or storing names in the archive"
This reverts commit 563125fde3.
2023-10-27 22:26:18 +08:00
liqinhui
1560db9f9b simwifi: Fix the error of the need length for scanning.
The error of estimating the buffer space may cause an out-of-bounds in filling scan results.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-10-27 22:25:58 +08:00
David Sidrane
881d67272c s32k3xx:Serial overcome race where DMA has not fetched TCD again"
With TCD set to loop, there is a window where the
   DMA has raised Done, but not reloaded the TCD, resetting
   count and clearing Done.

   In this window  imxrt_dmach_getcount could then return 0.
   Resulting in imxrt_dma_nextrx returning RXDMA_BUFFER_SIZE.
   Which is not a valid index in the FIFO.

   Since the count will be set to RXDMA_BUFFER_SIZE. When the DMA
   engine completes the TCD reload. The imxrt_dma_nextrx would
   return 0. Therefore:

    (RXDMA_BUFFER_SIZE - dmaresidual) % RXDMA_BUFFER_SIZE

   accomplishes this.
2023-10-27 22:24:27 +08:00
David Sidrane
8b9d05d0f7 s32k1xx:Serial overcome race where DMA has not fetched TCD again"
With TCD set to loop, there is a window where the
   DMA has raised Done, but not reloaded the TCD, resetting
   count and clearing Done.

   In this window  imxrt_dmach_getcount could then return 0.
   Resulting in imxrt_dma_nextrx returning RXDMA_BUFFER_SIZE.
   Which is not a valid index in the FIFO.

   Since the count will be set to RXDMA_BUFFER_SIZE. When the DMA
   engine completes the TCD reload. The imxrt_dma_nextrx would
   return 0. Therefore:

    (RXDMA_BUFFER_SIZE - dmaresidual) % RXDMA_BUFFER_SIZE

   accomplishes this.
2023-10-27 22:24:27 +08:00
David Sidrane
892fe45900 imxrt:Serial overcome race where DMA has not fetched TCD again"
With TCD set to loop, there is a window where the
   DMA has raised Done, but not reloaded the TCD, resetting
   count and clearing Done.

   In this window  imxrt_dmach_getcount could then return 0.
   Resulting in imxrt_dma_nextrx returning RXDMA_BUFFER_SIZE.
   Which is not a valid index in the FIFO.

   Since the count will be set to RXDMA_BUFFER_SIZE. When the DMA
   engine completes the TCD reload. The imxrt_dma_nextrx would
   return 0. Therefore:

    (RXDMA_BUFFER_SIZE - dmaresidual) % RXDMA_BUFFER_SIZE

   accomplishes this.
2023-10-27 22:24:27 +08:00
Robert Middleton
c50d47136c Fix #11005 2023-10-27 11:44:44 +08:00
xuxin19
9112b9e4c0 cmake:add zifencei extension in compile options
this fixes the error opcode `fence.i` by cmake compilation

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-10-26 21:01:46 +08:00
xuxin19
e3003f691b cmake:init RISC-V cmake qemu-rv build
cmake currently does not support non-FlatBuild,
need disable ELF and LOADABLE when compiling other defconfigs

```
 cmake -B build -DBOARD_CONFIG=rv-virt/smp64 -GNinja # for rv32:rv-virt/smp
 cmake --build build -t menuconfig
 cmake --build build
 qemu-system-riscv64 -semihosting -M virt,aclint=on -cpu rv64 -smp 8 -bios none -kernel nuttx -nographic
```

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-10-26 21:01:46 +08:00
Tiago Medicci Serrano
a2be27ef7d espressif: Update esp-hal-3rdparty version
This version includes a bugfix for the NULL definition.
2023-10-26 20:02:13 +08:00
liqinhui
5228d773d3 simwifi: Support that simwifi connects to the hiden ssid.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-10-26 08:27:45 -03:00
Dong Heng
d4cebae155 xtensa/esp32s3: Support to read data from flash to PSRAM 2023-10-26 08:23:34 -03:00
liqinhui
66b11d8940 sim/wifidriver: Fix the scan error.
Using the uninitialized buffer causes the out of bounds.
Add a terminator for the rbuf.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-10-26 16:22:28 +08:00
Stuart Ianna
5fa1819492 arch/risc-v/litex/litex-emac: Add support for phy interrupts.
Add support for PHY interrupts in the architecture layer of the Litex emac driver. Boards need to add handling for interrupt lines, if supported.
2023-10-26 09:02:23 +08:00
simbit18
37729540c0 Fix Kconfig style
Remove spaces from Kconfig
Add comments
2023-10-26 01:53:58 +08:00
simbit18
fa7d0bbd45 Fix nuttx coding style
Remove TABs
2023-10-26 01:53:48 +08:00
dongjiuzhu1
e88a36fa92 libs/modlib: Adding architecture-specific memory allocator for dynamic data loading
Arch can specific the memory allocator for data to optimize access speed.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-26 01:53:38 +08:00
dongjiuzhu1
6efdd50d5a arch/sim: Remove executable bit from the normal heap
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-10-26 01:53:38 +08:00
dongjiuzhu1
861220f649 arch/sim: Simplify the implementation of textheap by reuse the heap manager
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-10-26 01:53:38 +08:00
David Sidrane
def7a34733 s32k1xx:lpi2c DMA transaction only need the status conditioned
With DMA enabled on some I2C channels but not all
   the Non DMA channels were failing.

   The cause was condition the status with only the enabled
   interrupts on non DMA chennels. This conditioning needs
   to only happen in DMA enabled channels
2023-10-25 17:22:47 +03:00
David Sidrane
506f725a19 s32k3xx:lpi2c DMA transaction only need the status conditioned
With DMA enabled on some I2C channels but not all
   the Non DMA channels were failing.

   The cause was condition the status with only the enabled
   interrupts on non DMA chennels. This conditioning needs
   to only happen in DMA enabled channels
2023-10-25 17:22:47 +03:00
David Sidrane
1b5aeb1a08 imxrt:lpi2c DMA transaction only need the status conditioned
With DMA enabled on some I2C channels but not all
   the Non DMA channels were failing.

   The cause was condition the status with only the enabled
   interrupts on non DMA chennels. This conditioning needs
   to only happen in DMA enabled channels
2023-10-25 17:22:47 +03:00
David Sidrane
611309b956 imxrt:serial Ensure the cache is updated if the DMA has updated again
The DMA can bring in more rx data, than the number of
   DMA completions call backs. The call back happen on
   idle, 1/2 and full events. But in between these events
   the DMA can write more data to the buffers memory that
   need to be brought in to the cache. (invalidate)

   We do the invalidate on the reads from the fifo memory
   if the the DMA as commited since the last read.
2023-10-25 16:14:45 +03:00
chao an
2b06142232 kernel: replace all sem_* to nxsem_*: in kernel space
syscall cannot be called from kernel space

Signed-off-by: chao an <anchao@xiaomi.com>
2023-10-25 15:46:03 +08:00
chao an
3cadf6642a kernel: replace all usleep to nxsig_usleep in kernel space
syscall cannot be called from kernel space

Signed-off-by: chao an <anchao@xiaomi.com>
2023-10-25 15:46:03 +08:00
Stuart Ianna
ee84ea3875 arch/risc-v/litex/litex_gpio: Fix ISR dispatch when using higher GPIO indexes.
Previously, GPIO interrupts were not correctly mapped to the peripheral base register responsible for the interrupt.

Change the IRQ number calculation so the interrupts work correctly on all GPIO peripheral bases.
2023-10-25 15:42:25 +08:00
Stuart Ianna
ac5800386c arch/risc-v/litex/litex_emac: Add support for KSZ8061 ethernet PHY.
Adds support for using the microchip KSZ8061 ethernet PHY instead of the default DP83848C.
2023-10-25 13:33:03 +08:00
David Sidrane
8cb65d9b3b s32k1xx:lpi2c end only on stop with end of packet 2023-10-24 19:27:03 +03:00
David Sidrane
b2b5826b80 s32k3xx:lpi2c end only on stop with end of packet 2023-10-24 19:27:03 +03:00
David Sidrane
119bf660a4 imxrt:lpi2c end only on stop with end of packet 2023-10-24 19:27:03 +03:00