reason:
Due to incomplete handling of spinlock_t in arch/spinlock.h,
it should not be used directly by external code.
Furthermore, because pthread.h and nuttx/spinlock.h have a circular
dependency, pthread.h cannot successfully include nuttx/spinlock.h.
Therefore, we have split spinlock_type.h from spinlock.h.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Inter-processor interrupts (IPIs) are not cleared via mie/mip registers but
rather, at the MPFS_CLINT_BASE + mhartid * 4 (a word or 4-byte offset for
each hart).
If there's an IPI waiting, the system will continue to boot altough it's
expected to stay at the wfi loop waiting for the IPI.
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
This CONFIG_MPFS_CLKINIT is set with bootloaders by default. However,
this gives an option to have it unset. In some cases, the clocks
may be already set so it becomes unnecessary to re-initialize them.
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
reason:
up_set_current_regs initially had two functions:
1: To mark the entry into an interrupt state.
2: To record the context before an interrupt/exception. If we switch to a new task, we need to store the upcoming context regs by calling up_set_current_regs(regs).
Currently, we record the context in other ways, so the second function is obsolete. Therefore, we need to rename up_set_current_regs to better reflect its actual meaning, which is solely to mark an interrupt.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
ST7789 fills the display with 0xffff color during its initialization.
This color may or may not be overwritten by a higher layer (framebuffer
or lcd driver for example). The color remains on the display until
application UI is started if not overwritten by the higher layer before.
This commit adds configuration option LCD_ST7789_DEFAULT_COLOR that
allows to set the default background color. This may avoid shining
display with, for example, white color for an extensive amount of time.
The default value is set to 0xffff previously hard-coded in the driver,
therefore current implementations will not notice the change.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
hostfs will allow developers to access the current execution directory.
nsh> ls
/:
bin/
data/
dev/
etc/
proc/
tmp/
nsh> cd /data
nsh> ls
/data:
README.md
fs/
pass1/
cmake/
arch/
Signed-off-by: chao an <anchao@lixiang.com>
When running qemu/nsh_smp or sim/nsh configuration, run gcov -d /tmp/xxx
to save all gcov generated data and export them to the host. Use
./tools/gcov.sh to parse and generate reports. For details, see:
Documentation/applications/system/gcov/index.rst
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
reason:
Since the scheduling records have already been moved to the interrupt exit in this submission,
we need to delete the original records' locations.
This commit fixes the regression from https://github.com/apache/nuttx/pull/13651
Signed-off-by: hujun5 <hujun5@xiaomi.com>
From the RISV-V Privileged Spec v1.10 (3.1.14 MIP/MIE):
Only the bits corresponding to lower-privilege software interrupts
(USIP, SSIP), timer interrupts (UTIP, STIP), and external interrupts
(UEIP, SEIP) in mip are writable through this CSR address; the
remaining bits are read-only.
Thus, it is futile to write to the M-mode status bit via the CSR, only
access via RISCV_IPI is valid.
knsh_romfs - for QEMU and legacy serial port
knsh_romfs_pci - for bare-metal Intel hardware and PCI serial port
Steps to build kernel image with user-space apps in romfs:
$ ./tools/configure.sh qemu-intel64/knsh_romfs
$ make -j
$ make export -j
$ pushd ../apps
$ ./tools/mkimport.sh -z -x ../nuttx/nuttx-export-*.tar.gz
$ make import -j
$ ./tools/mkromfsimg.sh
$ mv boot_romfsimg.h ../nuttx/arch/x86_64/src/board/romfs_boot.c
$ popd
$ make -j
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>