1. Changes the phyadd to 0xC to speed up the training of phyadd.
2. Set RX DMA buffer size configureable.
3. Create netnsh configs as ethernet boot from QSPI FLASH.
4. Fix some typo in #15720 which is nonsynchronous with local code.
PIC(Position-Independent-Code) board could work on cmake:
cmake -B ap -DBOARD_CONFIG=mps3-an547:ap -GNinja
Signed-off-by: chao an <anchao.archer@bytedance.com>
fix build break:
ld: drivers/libdrivers.a(rptun_ivshmem.c.obj): in function `rptun_ivshmem_get_resource':
nuttx/drivers/rptun/rptun_ivshmem.c:215:(.text.rptun_ivshmem_get_resource+0xfc): undefined reference to `simple_addrenv_initialize'
ld: openamp/libmetal/lib/libmetal.a(io.c.obj): in function `metal_io_phys_to_offset_':
nuttx/openamp/libmetal/lib/system/nuttx/io.c:112:(.text.metal_io_phys_to_offset_+0xc): undefined reference to `up_addrenv_pa_to_va'
Signed-off-by: chao an <anchao.archer@bytedance.com>
An example implementation for OpenAMP based on the Inter-VM share memory(ivshmem)::
rpproxy_ivshmem: Remote slave(client) proxy process.
rpserver_ivshmem: Remote master(host) server process.
Signed-off-by: chao an <anchao.archer@bytedance.com>
rpproxy_ivshmem: Remote slave(client) proxy process.
rpserver_ivshmem: Remote master(host) server process.
Please refer to the official Qemu ivshmem documentation for more information:
https://www.qemu.org/docs/master/system/devices/ivshmem.html
Signed-off-by: chao an <anchao.archer@bytedance.com>
The `$(APPDIR)` folder is added to the `$(KERNDEPDIRS)` when
`CONFIG_BUILD_KERNEL=y`. The `depend` phase iterates over the
`$(KERNDEPDIRS)` folders and executes the `depend` recipe of these
folders (including the apps' recipes) with the `__KERNEL__` macro
defined, which prevents `system()`'s prototype from being declared.
If the nodesize is 0, we cannot iterate to next node, siliently return None will cause memleak command to generate false positive report with no warnings.
Add log to indicate such case.
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
According to https://pubs.opengroup.org/onlinepubs/9799919799/, the
expected behavior for the wcstombs() function is that it should
convert the wide-character codes stoping conversion either when a
character sequence exceeds the limit of n total bytes or if a null
byte is stored. In the first case, the null-terminated value should
not be appended to the dst buffer.
Currently, no null-terminator is appended to the dst buffer, even
when it's expected to be appended, generating erroneous output.
The missing <nuttx/spinlock.h> header caused following compile errors:
CC: clock/clock_adjtime.c clock/clock_adjtime.c: In function 'adjtime_wdog_callback':
clock/clock_adjtime.c:67:11: error: implicit declaration of function 'spin_lock_irqsave' [-Wimplicit-function-declaration]
67 | flags = spin_lock_irqsave(&g_adjtime_lock);
| ^~~~~~~~~~~~~~~~~
clock/clock_adjtime.c:78:3: error: implicit declaration of function 'spin_unlock_irqrestore' [-Wimplicit-function-declaration]
78 | spin_unlock_irqrestore(&g_adjtime_lock, flags);
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
Reduce leak analysis time from 12s to 7.8s, achieving a 35% performance improvement that tested on an internal project.
1. Use memoryview to avoid creating int objects, reducing overhead
2. Store checked pointers in a dictionary for efficient lookups, improving performance.
3. While dictionary operations have some cost, the overall speedup is significant.
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Make sure the registers context size is aligned to 16bytes as required by armv8-a.
This issue has been reported earlier, thus make sense to make sure it won't happen in future.
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
zynq-mpsoc and zcu111 borad was broken by #15437, because #15437 changes
ARM64_CONTEXT_REGS from 36 to 37, resulting in the stack no longer being
16-byte aligned which appears to violate the ARMv8-A architecture's
requirement for 16-byte stack alignment. this commit changes ARM64_CONTEXT_REGS
to 38 to fix this issues.
The PS-side Gigabit Ethernet MAC (GEM) implements a 10/100/1000 Mb/s
Ethernet interface, which connects to a TI DP83867IRPAP Ethernet
RGMII PHY before being routed to an RJ45 Ethernet connector on ZCU111
board.The RGMII Ethernet PHY is boot strapped to PHY address 5'b01100
(0x0C) and Auto Negotiation is set to Enable.This commit add Ethernet
support for ZCU111 board and TI DP83867IRPAP Ethernet RGMII PHY.
Zynq MPSOC The processing system (PS) is equipped with four gigabit
Ethernet controllers.Each controller can be configured independently.
Each controller uses a reduced gigabit media independent interface (RGMII)
v2.0. This commit add support for ethernet of ZYNQ MPSOC.
Summary:
- Added `--print-memory-usage` to `LDFLAGS` in `Toolchain.defs` for both `lx6` and `lx7` architectures
- This flag enables memory usage reporting during the linking phase, providing better visibility into memory allocation
Impact:
- No functional changes - the flag only adds additional debug information during the build process
- Improves debugging and optimization capabilities by providing detailed memory usage statistics
- Maintains compatibility with existing build configurations and toolchains
Testing:
Test result on esp32s3:
```
Memory region Used Size Region Size %age Used
ROM: 556116 B 16777184 B 3.31%
iram0_0_seg: 23296 B 304 KB 7.48%
irom0_0_seg: 621652 B 16777184 B 3.71%
dram0_0_seg: 85780 B 288 KB 29.09%
drom0_0_seg: 157180 B 16777184 B 0.94%
rtc_iram_seg: 0 B 8168 B 0.00%
rtc_data_seg: 0 B 8168 B 0.00%
rtc_reserved_seg: 0 B 24 B 0.00%
rtc_slow_seg: 0 B 8 KB 0.00%
```
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
What's really need is a done signal sent from the secondary
cpu to the boot cpu, so let's simplify the logic by:
1.Change the spinlock to a bool flag
2.Set the flag to true in the secondary cpu
3.Wait the flag set in the boot cpu before continue booting
This also remove all bad usage of spinlock from the code base:
1.Lock spinlock in one thread, but unlock in a different thread
2.Lock spinlock twice in one thread, but unlock only once
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This PR updates the netnsh defconfig for nucleo-f429zi board, as currently the board would not get ip.
Few changes comes with this PR:
* enabled CONFIG_NETINIT_NOMAC option.
* enabled CONFIG_NETINIT_DHCPC and CONFIG_NETUTILS_TELNETD as I wanted to get a telnet shell and did not care about ip handling
* disabled legacy pinmap and updated the board.h config to get the board to compile
can_datahandler returns an unsigned value that represent the
number of bytes actually bufffered, but the call to iob_tryadd_queue
returns a negative value when it fails so that value can't be used as
can_datahandler return value because it is interpreted as unsigned so
a big number is wrongly returned when iob_tryadd_queue fails.
The fix is just setting the return value to zero when iob_tryadd_queue
fails, reflecting the actual meaning that no bytes have been buffered.
Add support for network statistics for CAN.
It includes counters for receive, sent
and drop frames.
Signed-off-by: Javier Casas <javiercasas@geotab.com>
This drops the board specific gnu-elf.ld for KERNEL apps as the
preprocessed modlib/gnu-elf.ld suffices. Checked w/ rv-virt:knsh
and rv-virt:knsh64
Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
Also errors which currently return other than -EAGAIN, are typically
recoverable with retraining. So just re-try trainining 20 times on any
error, resetting the controller in between.
Only reset if it is not recovered in this time.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This adds the support for RX DMA polling. The board initializes
timer channel SAMV7_UART_RXDMA_POLL_TIMER with frequency
SAMV7_UART_RXDMA_POLL_FREQUENCY that triggers DMA polling function.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
So far only USART drivers could use TX/RX DMA. This commit adds the
support for UART drivers as well (with the exception of serial console).
UART peripheral does not have timeout interrupt, so external polling
is required to flush the RX data from DMA buffers even if the buffer
is not yet full. The board layer can do this by calling
sam_serial_dma_poll function.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
There was a missing QSPI locking for w25qxxxjv_get_die_from_addr
function. We can't have the lock directly in w25qxxxjv_get_die_from_addr
because the function is called from already locked function
w25qxxxjv_erase_sector.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
If scratchpad is being used, the cache way 0, which is automatically
enabled at boot, needs to be re-configured as part of scratchpad memory
Otherwise there is a possibility of random memory corruption in the
scratchpad
area due to cache eviction from way 0.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>