reason:
In x86_64, tcb->xcp.regs is always valid, and we obtain the location
where the context is saved through irq_xcp_regs every time an interrupt occurs.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
reason:
We aim to replace big locks with smaller ones. So we will use spin_lock_irqsave extensively to
replace enter_critical_section in the subsequent process. We imitate the implementation of Linux
by adding sched_lock to spin_lock_irqsave in order to address scenarios where sem_post occurs
within spin_lock_irqsave, which can lead to spinlock failures and deadlocks.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
reason:
1 Accelerated the implementation of sched_lock, remove enter_critical_section in sched_lock and
only enter_critical_section when task scheduling is required.
2 we add sched_lock_wo_note/sched_unlock_wo_note and it does not perform instrumentation logic
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Under apps/testing folder, the macro of CONFIG_TESTING_MM is changed to CONFIG_TESTING_HEAP.
So we need to update the defconfig containing CONFIG_TESTING_HEAP in the nuttx/boards folder.
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
UART RAM will have probabilistic bubble time during continuous transmission.
Update the offset after sending to avoid this problem.
Signed-off-by: chao an <anchao.archer@bytedance.com>
add sim_rpmsg_port_uart.c to verify the rpmsg port uart wrapper layer,
The physical transport layer could be:
1. SIM_RAM_UART(current)
2. SIM_UART(through "socat" virtual "/dev/pts/*", "socat" could monitor the bus data)
Signed-off-by: chao an <anchao.archer@bytedance.com>
This forces the bch layer to read the sector from the physical device
instead of using the cached values. It is necessary to call when the
device is updated from the different source than bch, for example
erased by the MTD ioctl command.
It also has to invalidate readahead buffer from FTL if option
CONFIG_DRVR_READAHEAD is set.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: ../../boards/arm/stm32/nucleo-l152re/configs/nsh/defconfig
no changes added to commit (use "git add" and/or "git commit -a")
This removes the need to call nxsched_self upon exception return. Later
with a bit of added logic, it is possible to use tp in kernel to store and
read the current tcb.
Note: setting tp in riscv_restorecontext is too late for this, as
this_task() points to the (next) ready-to-run task, thus tp should be
updated when the rtr list is updated (via up_update_task, which does not
exist for risc-v yet)
Set the LOCKED bit when the final ddr segmentatition is
in place. Otherwise the system is prone to potential
security issues if the config is altered later. Once the
LOCKED bit is set, the register may no longer be changed.
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
In file included from nuttx/drivers/rpmsg/rpmsg_port_uart.c:27:
nuttx/drivers/rpmsg/rpmsg_port_uart.c: In function ‘rpmsg_port_uart_send_connect_req’:
nuttx/drivers/rpmsg/rpmsg_port_uart.c:219:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘ssize_t’ {aka ‘long int’} [-Wformat=]
219 | rpmsgerr("Send connect request failed, ret=%d\n", ret);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~
| |
| ssize_t {aka long int}
nuttx/drivers/rpmsg/rpmsg_port_uart.c:219:51: note: format string is defined here
219 | rpmsgerr("Send connect request failed, ret=%d\n", ret);
| ~^
| |
| int
| %ld
nuttx/drivers/rpmsg/rpmsg_port_uart.c: In function ‘rpmsg_port_uart_send_connect_ack’:
nuttx/drivers/rpmsg/rpmsg_port_uart.c:235:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘ssize_t’ {aka ‘long int’} [-Wformat=]
235 | rpmsgerr("Send connect ack failed, ret=%d\n", ret);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~
| |
| ssize_t {aka long int}
nuttx/drivers/rpmsg/rpmsg_port_uart.c:235:47: note: format string is defined here
235 | rpmsgerr("Send connect ack failed, ret=%d\n", ret);
| ~^
| |
| int
| %ld
Signed-off-by: chao an <anchao.archer@bytedance.com>
Corrections to CA training verify step. The original copied from HSS didn't
make sense in all aspects:
- The check is not per lane, so it should be out of the "for (lane_sel" loop.
- The check wasn't proper. The expected outcome is just a vector of increasing numbers
separated enough
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
After read training, check also that the eye is centered properly. Sometimes
after the training the width is long enough, but it is not centered.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
Interrupts on MPFS platform are currently served on the hart, on
which the up_enable_irq was called.
Call to up_disable_irq may execute on different hart than on which
the up_enable_irq was executed. In this case the interrupt is not
disabled currently.
While there is nothing fancy (irq affinity control or such), an
easy way to fix this is to simply disable the irq on all harts.
This also changes the prototypes of mpfs_plic_get_iebase and
mpfs_plic_get_claimbase to get the hart id as an argument, in
order to accomplish this.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This adjusts `qemu-armv7a:knsh` with following changes:
- use smaller flash/memory so that `-m 1024` can be omitted.
- use ELF_EXECUTABLE for apps to allow easier app debugging.
- enable graceful shutdown from NSH command.
- enable more cases of ostest (e.g. vfork, pthread_exit etc).
Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
Read/write special data like 0x2a2a2a2a will trigger this issue.
The current GDB implementation has this flaw. GDB processes the RLE
decoding before espaping the data, make it impossible to repeate special
characters.
The details can be seen in GDB source code remote.c
remote_target::read_frame function.
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>