Commit Graph

48622 Commits

Author SHA1 Message Date
SPRESENSE
a3cce487ca tools/Unix.mk: Add VERSION_ARG to argument of version.sh
Allow version arguments to be changed externally.
2023-03-01 13:32:01 +08:00
qinwei2004
fa359e355c Update arm64_head.S 2023-03-01 13:23:48 +08:00
qinwei1
518eb4076e arm64: ARMv8-r(Cortex-R82) support(mpid fix)
Summary
  Different ARM64 Core will use different Affn define, the mpidr_el1
value is not CPU number, So we need to change CPU number to mpid
and vice versa, the patch change the mpid define into platform

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-03-01 13:23:48 +08:00
qinwei1
d5c6b8a94b arm64: add 64-bit time for all arm64 platform
Summary
  For ARM64 architecture, the arch timer is 64-bit,
the CONFIG_SYSTEM_TIME64 need to be enabled just like
x86_64 and risc-v 64

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-03-01 13:23:48 +08:00
qinwei1
4cb5ff3353 arm64: ARMv8-r(Cortex-R82) support(add ARCH_SET_VMPIDR_EL2 option)
Summary

   VMPIDR_EL2 holds the value of the Virtualization Multiprocessor ID.
From architecture manual of AArch64, the behave is:
  -reading register MPIDR_EL1 in EL2, it's return real MPIDR_EL1
  -reading register MPIDR_EL1 in EL1, it's return VMPIDR_EL2
  So since NuttX for SMP is running at EL1 to read MPIDR_EL1 for
  identify CPU id, it's need to set VMPIDR_EL2 to MPIDR_EL1 for
  every CPU at boot EL2 stage.
  For some platform, the bootloader or hypervisor will do that at
  the EL2 stage, but not all.

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-03-01 13:23:48 +08:00
qinwei1
0841f4dbaa arm64: ARMv8-r(Cortex-R82) support
Summary:

  Adding armv8-r(Cortex-R82) support and modify some common code to
fit the change, the change including:

1. ARM Single Security State Support, ARMv8-R support only single
   security state, and some GIC configure need to change and fit
2. For ARMv8-R, only have EL0 ~ EL2, the code at EL3 is not necessary
   and system register for EL3 is not accessible(gcc will failed when
   access these registers)
3. add base MPU configure for the platform.

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-03-01 13:23:48 +08:00
qinwei1
4240723b78 arm64: add ARCH_EARLY_PRINT support
Summary:
  The aarch64 have EL0~El3 execute level and NS/S (security state),
the NuttX should be execute at EL1 in NS(ARmv8-A) or S(ARmv8-R)
state. but booting NuttX have different ELs and state while with
different platform, if NuttX runing at wrong ELs or state it will
be not normal anymore. So we need to print something in arm64_head.S
to debug this situation.
Enabling this option will need to implement up_earlyserialinit and
up_lowputc functions just you see in qemu, if you not sure,
keeping the option disable.

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-03-01 13:23:48 +08:00
qinwei1
e5564a9872 arm64: PSCI config support
Summory
   This Power State Coordination Interface (PSCI) defines a standard
interface for power management. the PCSI need to implement handling
firmware at EL2 or EL3 for ARM64. the PSCI maybe not applicable
for arm core without PCSI firmware interface implement.
  Add configure option for it.

Note:
1. ostest is PASSED at qemu and fvp ( single core and SMP)

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-03-01 13:23:48 +08:00
SPRESENSE
b576a26d51 arch: cxd56xx: Fix emmc pin control on initialization error
Fix emmc pin control on initialization error.
2023-03-01 12:29:23 +08:00
SPRESENSE
57ca5c0401 arch: cxd56xx: Disable SubCore to use DMA
Disable SubCore to use SPI transfer with DMA because it may be used
by MainCore.
2023-03-01 12:29:23 +08:00
SPRESENSE
134424da18 arch: cxd56xx: Fix a warning in cxd56_serial.c
Fix a warning by -Wunused-function when CONFIG_UART2_SERIAL_CONSOLE=y.
2023-03-01 12:29:23 +08:00
SPRESENSE
700610e625 arch: cxd56xx: Fix eMMC uninitialize function
- Fix prototype function with prefix of cxd56.
- Add logic to unregister blockdriver.
- Minor fix nxstyle.
2023-03-01 12:29:23 +08:00
SPRESENSE
d71562c794 tools/cxd56: Fix nxstyle 2023-03-01 12:26:32 +08:00
SPRESENSE
fc1c8a4d74 tools/cxd56: Fix typo in mkspk tool
Fix typo in mkspk tool.
2023-03-01 12:26:32 +08:00
SPRESENSE
d643fb8511 arch: cxd56xx: Fix gnss poll when an event has already occurred
Fix an issue that poll with timeout=0 cannot detect events that have
already occurred.
2023-03-01 12:26:06 +08:00
SPRESENSE
1877be8ce9 arch: cxd56xx: Fix a freezing issue caused by power control
- Add retry timeout to prevent inifinite loop
- Change the register operation of power control
- Add exclusive control by semaphore into some functions
- Add short delay until power control is reflected
2023-03-01 12:17:29 +08:00
Huang Qi
b96035885a stdio: Implement simple buffered out stream for vdprintf
Improve performance for raw fd based printf like operation.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-01 13:08:59 +09:00
Gustavo Henrique Nihei
e4d219ca06 risc-v/esp32c3: Remove erroneous interrupt disable
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-02-28 22:14:54 +02:00
Dong Heng
f47cb67da6 xtensa/common: Fix Xtensa interrupt stack context restore issue 2023-02-28 16:36:55 -03:00
Alan Carvalho de Assis
49a5f02fb1 esp32c3: Fix missing irq timer 2023-03-01 01:22:24 +08:00
Fotis Panagiotopoulos
5e625b9cdb Performance optimizations in connection allocations. 2023-02-28 14:23:16 +01:00
YAMAMOTO Takashi
e9158efd42 libcxx.defs: Disable a warning and explain why 2023-02-27 23:55:52 +08:00
YAMAMOTO Takashi
892ecb4e40 Make 64-bit time_t unsigned
* 32-bit time_t should be unsigned because otherwise it wraps too
  soon. (in 2038)

* 64-bit time_t should be unsigned because it should be consistent
  within NuttX.

* While signed time_t seems more popular among other OSes, the
  consisitency within NuttX outweighs, IMO.
2023-02-27 23:55:52 +08:00
Huang Qi
8a389a06e1 Don't download tarball if a local git repo found
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-02-27 23:55:23 +08:00
dongjiuzhu1
81825bc003 mm/circbuf: fix minor issue about update buffer head
update head pointer with skip before write buffer.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-02-27 22:35:00 +08:00
Huang Qi
b178ce4da9 driver/pty: Map CR->LF from terminal input
NuttX only treat \n as new line after https://github.com/apache/nuttx/pull/8628,
so need this conversion to interact with terminal emulator.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-02-27 21:12:35 +08:00
Xiang Xiao
2c5f653bfd Remove the tail spaces from all files except Documentation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-26 13:24:24 -08:00
zhangyuan21
528dce4f7f usbdev/adb: fixed adb build issue
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-27 01:30:19 +08:00
zhangyuan21
3c162b1e14 tools/ci: add libusb1.0 package
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-26 22:39:57 +08:00
Takeyoshi Kikuchi
b901837f52 tools: nxstyle: add "NimMain" to whitelists.
Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
2023-02-26 19:11:53 +08:00
dongjiuzhu1
89e8409244 mm/circbuf: update buffer head according to real length of writing
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-02-26 15:55:18 +08:00
Michal Lenc
49ce1c5df7 samv7: add support for ADC conversion triggering with PWM
This commit enhances ADC and PWM drivers with option to trigger ADC
conversion with events generated by PWM comparison units.

The generation of PWM events is handled by comparison units set up from
Kconfig option SAMV7_PWMx_TRIGn. ADC triggering from PWM can be selected
by AFECn_PWMTRIG option.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-02-26 10:47:12 +08:00
wangbowen6
d77b53957c sched/env: add tg_envc in task_group_s to avoid some loops in code
this commit optimize the env api speed

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-02-25 23:10:37 +02:00
Alan Carvalho de Assis
dd0f389e72 doc: Add guide how to use QEMU and GDB to debug NuttX
This guide is based on steps from this issue:
https://github.com/apache/nuttx/issues/8616
2023-02-26 01:14:41 +08:00
Xiang Xiao
0f20888a0e tools/parsememdump.py: Restore the execution permission bit
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-25 12:21:13 -03:00
yinshengkai
aa6bffef83 drivers/note: dump the latest scheduling information when panic
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-25 18:39:27 +08:00
yinshengkai
f9f0ab8dc4 drivers: add note driver backend for recording scheduling information
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-25 18:39:27 +08:00
yinshengkai
8d16fa04df libc/stream: Implement lowoutstream_puts
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-25 18:39:27 +08:00
chenrun1
4f3c73fb45 libc/lib_bzero:Add bzero prototype.
Implement the bzero function as an alternative to macro expansion.
2023-02-25 08:07:07 +02:00
pengyiqiang
621bf54efc drivers/video/fb: fix poll event lost
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-02-24 22:21:09 +08:00
Lucas Saavedra Vaz
b7bfd9e530 boards/xtensa/esp32-lyrat: Add SD Card config 2023-02-24 22:20:13 +08:00
Alan Carvalho de Assis
b216f74a4b doc: Add xxd to get romfs working, reported by Simon Filgis 2023-02-24 21:53:48 +08:00
Zhe Weng
0069eefd4b net/udp: Add drop count when limited by recv bufsize
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-02-24 14:36:01 +02:00
Junbo Zheng
468a0f0991 sched: fix kconfig warning
warning: SIG_ABRT (defined at sched/Kconfig:1481) has 'help' but empty help text

Reference: https://dsa.cs.tsinghua.edu.cn/oj/static/unix_signal.html

Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2023-02-24 15:49:33 +08:00
yinshengkai
9ed1519cea note: handle tcb is empty, so that it can also record before the driver initialization
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-24 14:07:33 +08:00
lilei19
38f64f559d change strcpy to strlcpy
Signed-off-by: lilei19 <lilei19@xiaomi.com>
2023-02-24 12:15:40 +08:00
Xiang Xiao
68ff73c5fb stdio: lib_fgets convert \r\n to \n
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-24 10:39:48 +08:00
Xiang Xiao
cd74a1df22 libc/stdio: Make gets/gets_s work without CONFIG_FILE_STREAM
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-24 10:39:48 +08:00
chenrun1
e6227e1943 include/signal.h:Expanding SIGNAL to be consistent with Linux 2023-02-24 04:07:10 +08:00
Tiago Medicci Serrano
173212ebc9 esp32s3: Define syscall table to enable using ROM functions 2023-02-24 04:06:50 +08:00