MCP794XX supports digital trimming that periodically adds or subtracts
clock cycles, resulting in small adjustments in the internal timing.
This way inaccuracies of clock source can be compensated.
This commit adds option to set the trimming register for MCP794XX.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
The definition of nxsched_process_cpuload_ticks uses clock_t, which is
portable across uint32_t and uint64_t timers, and works if CONFIG_SYSTEM_TIME64 is
defined.
only when first time change state can hold WFI for enough time thresh,
allow second time goto target state,
suitable for the case when wakeup from sleep too slow, etc.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
Some drivers may set too big quota by accident and consume all of our
buffers, so we add a check when registering devices.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
we removed "select SCHED_RESUMESCHEDULER",
As SCHED_RESUMESCHEDULER is not a necessary feature in SMP,
turning it on by default may affect performance.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Implement the bzero function as an alternative to macro expansion.
and support gcc FORTIFY_SOURCE features for nuttx libc
This function will use gcc's function
__builtin_dynamic_object_size and __builtin_object_size
Its function is to obtain the size of the object through compilation,
so as to judge whether there are out-of-bounds operations in commonly used functions.
It should be noted that the option -O2 and above is required to enable this function
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This revises vm_map_region() by accepting unaligned paddr, which is
aligned-down before mapping and in-page offset is then added to vaddr
before returning. It also moves vm_map_region() and vm_unmap_region()
to vm_region.c.
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
Also extend the "struct phy_desc_s" to support for 1GB PHY's, the speed
detection always needs more than one bit.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
In the gcc-riscv compiler, __builtin_ffs will call ffs, and calling __builtin_ffs in ffs will cause recursion
Change ffs to an inline function, and compile ffs implemented by nuttx by default.
Only call the implementation of nuttx when the compiler cannot provide an ffs implementation.
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This patch adds definitions to support user space device mappings
that allows devices like frame buffer to be accessible from user
space in kernel mode.
The are mainly two changes:
- in `mm/`:
added vm_map_region(), vm_unmap_region() for drivers to do
device mapping easily.
- in `arch/`:
extended ARCH_SHM_NPAGES as user-space mapping region size.
decoupled ARCH_SHM_MAXREGIONS from region size calculations and
limit its usage only for SysV shm purposes.
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
Support the network interface card driver to receive zero copies of packets and send and receive giant frame packets, allowing drivers to initialize the DMA buffer to the iob structure, and we can apply for IOB with large memory
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
Now we only supports conntrack info from NAT entries, to let our apps in user space know the mapping status in NAT.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
This commit adds support for reallocarray function. The functionality
is the same as for standard realloc, but the function also checks for
multiplication overflow and fails safely in case it occurs.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>