After it is not zero, the preceding member of the next node will no longer belong to the valid area of the previous alloc node.
Due to the existence of precedence, the memory block size of the node can only be aligned with sizeof(mmsize_t).
This configuration will be applied in the following scenarios when set 8:
ARM64 MTE hardware tag KASan, which requires the tag's memory address to be 16-byte aligned and the memory size must also be 16-byte aligned
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
If the NET_TCPBACKLOG configuration is not enabled, no I/O event will be
triggered for the socket file descriptor in poll/epoll. As a result, the
connection will not be accepted, leading to a failure in the TCP handshake.
The problem is that users may not have noticed this configuration,
no event will be received when polling the socket fd.
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
1. When the Clang compiler turns on "-fsanitize=kernel-address", inlining, global variables, and stack detection are enabled by default and must be turned off manually.
2. -mllvm is the parameter passing method of Clang, and --param is the parameter passing method of GCC
After the modification, KASan compilation and operation will be supported for Clang 18 and above
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
error: unpredictable STXR instruction, status is also a source
99 | "stxr %w0, %1, [%2] \n"
| ^
<inline asm>:5:10: note: instantiated into assembly here
5 | stxr w10, x10, [x9]
Using w0 to pass the result can cause the "status register is also a source" problem, resulting in unpredictable behavior.
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
The ARM64 instruction ADD has a 12-bit limit (0 - 4095) for immediate values, but here we try to use a symbolic address (.Linitparms) as an immediate value, which does not comply with the ARM64 instruction set rules.
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
common/arm64_cache.c:305:38: error: value size does not match register size specified by the constraint and modifier [-Werror,-Wasm-operand-widths]
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
Since the spinlock_type.h is designed to avoid including atomic.h in
the userspace, we should remove `atomic.h` inclusion in spinlock_type.h.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit provided a better recursive spinlock implementation with
less memory-overhead and better performance.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
Adds a defconfig for SDMMC over SPI to the following boards:
esp32-devkitc, esp32s2-saola-1 and esp32s3-devkit.
Renames the defconfig name for:
esp32-lyrat and esp32-wrover-kit.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
Deletes board specific sdmmc implementation in favor of a common source and header file.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
if dns_recv_response() fails, dns_bind() is called again at try_stream to
create a new socket. However, the original socket descriptor sd isn't closed
Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
Refered to PRINTF(3), the [v]snprintf returns the number of characters
printed (excluding the null byte used to end output to strings).
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Added subclasses of STM32G0 (such as STM32G07X) to Kconfig for use in dmamux driver. Added definitions to stm32g0_dmamux.h. Added configuration of number of dma and dmamux channels.
Added missing dma mappings for stm32g0.
Remove reserved defines.
Formatting fixes.
Added DMA2 IRQ mappings for STM32G0B and STM32G0C. Changed STM32_DMAMUX_BASE to STM32_DMAMUX1_BASE to align with stm32_dma_v1mux.c and C0 defines.
Provide correct mapping for ADC1_DMA_CHAN. Add STM32F0L0G0_HAVE_ADC1_DMA to STM32G0.
Add support for continuous mode to the ADC. Also added support to set smp1 and smp2 in board.h, as well as smpsel.
Removed unnecessary selects of STM32F0L0G0_STM32G0. Changed board level files to properly define A0-A3 on nucleo-g0b1re.
Add new Kconfig changes.
Made combined configs for STM32G0. Ex. STM32G0BX for STM32G0B0 and STM32G0B1.
Fixed defines and references in Kconfig and stm32_dma_v1mux.c
Defined adc_sampletime_write and adc_sampletime_set. Changed adc_sample_time_s structure to be much simpler. Old way made no sense. You can only have 2 sample times, so defining one for each channel makes no sense. The new adc_sample_time_s contains smp1, smp2, and smpsel. Also define ADC_HAVE_SMPR_SMP2 for STM32C0.
Added adc_sampletime_write and adc_sampletime_set. Altered adc_sample_time_s structure to be more appropriate for g0 and c0. Only two sample times can be defined. Added rcc support for DMA2.
Added defconfig for nucleo-g0b1re:adc_dma config.
Restore correct Kconfig from my original branch
Removed redundant ifdefs. If we select for G0 and C0, we know they have SMP2. Fixed formatting.
Formatting feedback. Aligned columns in irq and dma headers.
When the vaddr parameter passed to map_region() is not aligned to the page directory,
it causes incorrect address mapping for later regions.
For example, in the sv32 case, `PGPOOL` started at `0x80a00000` with a size of `1024*4096B`,
leading to page table errors for the range `0x80c00000~0x80e00000`.
This patch fixes the issue by ensuring map_region() correctly handles unaligned vaddr cases.
Signed-off-by: wushenhui <wushenhui@xiaomi.com>
follow up this change:
commit 84dc88730c
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date: Mon Jun 9 14:39:03 2025 +0800
libc: Move stream printf/scanf from libc/stdio to libc/stream
to keep all related code in one place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Fix an issue regarding the `rv-virt:nsbi` defconfig, which wasn't
booting properly because `sbi_set_mtimecmp` failed to get the
mtimecmp's register address when evaluating `g_mtimecmp`. This
variable, which should be located at the `.noinit` section, wasn't
being set accordingly by the linker script, ending up on `bss
section which is zero-initialized, overwriting its value previously
set by `sbi_init_mtimer`.