Commit Graph

47634 Commits

Author SHA1 Message Date
Petro Karashchenko
a208e5860a tools: Ensure removing Python3.11 related commands for macOS
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-28 22:05:33 +08:00
Alan Carvalho de Assis
1b58542dd4 esp32c3: Clear the timer interrupt to avoid losing the next one 2022-12-28 09:45:29 +08:00
Alan Carvalho de Assis
e3748be0e5 esp32s3: Clear the timer interrupt to avoid losing the next one 2022-12-28 09:45:29 +08:00
Alan Carvalho de Assis
e67b968f15 esp32s2: Clear the timer interrupt to avoid losing the next one 2022-12-28 09:45:29 +08:00
Alan Carvalho de Assis
1ab8c1ea01 esp32: Clear the timer interrupt to avoid losing the next one 2022-12-28 09:45:29 +08:00
zhanghongyu
5d3f47c37b net: Separate IP_PKTINFO from NET_IGMP
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-12-28 00:05:57 +08:00
zhangyuan21
f31ea8af7f arch: add volatile for regs in up_dump_register function
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-27 13:34:03 +08:00
Lee Lup Yuen
17639af0a8 arm64/pinephone: Add driver for LCD Panel (Xingbangda XBD599)
This PR adds the driver for Xingbangda XBD599 LCD Panel (based on Sitronix ST7703 LCD Controller) on PINE64 PinePhone. This PR also includes:

- The driver for X-Powers AXP803 Power Mgmt IC, which calls our driver for Allwinner A64's Reduced Serial Bus. The PMIC Driver is needed to power on the MIPI DSI Interface for the LCD Panel.

- A simple Display Driver that renders a Test Pattern on the LCD Display at startup. It calls our Allwinner A64 drivers for Display Engine, Timing Controller TCON0 and MIPI Display Serial Interface.

The NuttX Frame Buffer Driver will be implemented in the next PR.

`arch/arm64/src/a64/a64_de.c`, `a64_de.h`: Changed the Frame Buffer pointer to `const` for Allwinner A64 Display Engine

`arch/arm64/src/a64/hardware/a64_memorymap.h`: Added the Base Address for PWM, for controlling the PWM Backlight

`boards/arm64/a64/pinephone/src/pinephone_bringup.c`: Call `fb_register()` to start the Display Driver at startup

`boards/arm64/a64/pinephone/src/Makefile`: Added LCD Driver, PMIC Driver and Display Driver to Makefile

`boards/arm64/a64/pinephone/Kconfig`: Added the Kconfig option for "PINE64 PinePhone > LCD Display" (`CONFIG_PINEPHONE_LCD`) which enables the LCD Driver, PMIC Driver and Display Driver

`boards/arm64/a64/pinephone/src/pinephone_lcd.c`, `pinephone_lcd.h`: Driver for Xingbangda XBD599 LCD Panel

`boards/arm64/a64/pinephone/src/pinephone_pmic.c`, `pinephone_pmic.h`: Driver for X-Powers AXP803 Power Mgmt IC

`boards/arm64/a64/pinephone/src/pinephone_display.c`: Simple Display Driver that renders a Test Pattern in `up_fbinitialize()`

`boards/arm64/a64/pinephone/configs/lcd/defconfig`: New PinePhone Board Configuration `pinephone:lcd` that enables the LCD Driver (`CONFIG_PINEPHONE_LCD`)

`platforms/arm/a64/boards/pinephone/index.rst`: Added PinePhone Board Configuration `pinephone:lcd` that enables the LCD Driver
2022-12-27 11:44:17 +08:00
Zhe Weng
5a0d8fdf49 net: Add netfilter compatible headers.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-26 22:41:16 +08:00
YAMAMOTO Takashi
bf7db14feb Suppress -Wsign-compare warning on a few places 2022-12-26 18:23:41 +08:00
yinshengkai
dd32eccfc3 drivers/note: Move taskname related functions to note_driver.c
so all note drivers can retrieve the task name even after the task exit

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-26 15:03:57 +08:00
Xiang Xiao
7322eafba7 drivers/usb: Fix the typo error in Kconfig
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-25 01:01:26 +02:00
Xiang Xiao
b9d7d00943 arch: Remove the unused arch color function variant
up_check_tcbstack_remain, up_check_stack, up_check_stack_remain and up_check_intstack_remain

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-24 22:40:52 +02:00
Petro Karashchenko
b52aa1b5ca tools: Ensure removing Python related commands for macOS
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-25 04:35:27 +08:00
Xiang Xiao
85566fb5d7 boards/esp32c3-devkit: Enable CONFIG_PM_PROCFS to improve the ci coverage
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-24 11:26:48 -03:00
Xiang Xiao
02e92d2ba5 Fix ower/pm/pm_procfs.c:46:15: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'time_t' {aka 'long long int'}
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-24 11:26:48 -03:00
Xiang Xiao
72e76600c3 fs/procfs: Avoid the cast in uptime_read
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-24 11:26:48 -03:00
Masayuki Ishikawa
2f80a05eae arch: qemu-rv: Fix qemu_rv_mtimer_interrupt() for BUILD_KERNEL
Summary:
- I noticed that rv-virt:ksmp64 sometimes stops during boot.
- Finally, I found that it posts the Supervisor Software Interrupt
  before the OS finishes hardware initialization.
- This commit fixes this issue.

Impact:
- None

Testing:
- Tested with QEMU-7.1

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-12-24 11:25:39 -03:00
Zhe Weng
7f9cf184e5 net/devif_loopback: Add robustness to avoid infinite loop
When ipv4_input/ipv6_input called by devif_loopback writes wrong data into buffer (another bug we're fixing), the else block does nothing but only record the 'dropped' statistic, then infinite loop happens.

Refers to previous lo device with dropping logic:
https://github.com/apache/nuttx/blob/releases/11.0/drivers/net/loopback.c#L178-L180

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-24 16:20:17 +08:00
zhangyuan21
45394eb6dc arch: save user context in assert common code
This is the work continue with #7875

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-24 13:02:56 +08:00
Zhe Weng
cb958e5d69 net/nat: Clear entries when NAT will be disabled
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-24 12:05:20 +08:00
Zhe Weng
902a6dcad2 net/nat: Support isolation between multiple WAN devices by saving external ip
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-24 12:05:20 +08:00
Zhe Weng
0ceee72239 net/nat: modify chksum_adjust and MANIP_IPADDR macro for better readability
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-24 12:05:20 +08:00
Adam Feuer
a65ecf793c Jupiter Nano support
- Adds support for the Starcat Jupiter Nano
  SAMA5D27C-LD1G board
- https://github.com/starcat-io/jupiter-nano
- this board is very similar to the Microchip/Atmel
  SAMA5D2-Xplained board (sama5d2-xult)
2022-12-24 12:04:33 +08:00
Peter van der Perk
aac9eb57e8 S32K3XX Progmem dataflash with littlefs support 2022-12-24 12:03:56 +08:00
Lee Lup Yuen
c8cf27e848 arm64/a64: Add driver for Reduced Serial Bus
This PR adds the driver for Reduced Serial Bus (RSB) on Allwinner A64 SoC. The RSB Driver will be called by the upcoming Power Mgmt IC Driver for PINE64 PinePhone, to power on the LCD Display.

`arch/arm64/src/a64/Kconfig`: Added the Kconfig option for "A64 Peripheral Selection > RSB" (`CONFIG_A64_RSB`), which enables the RSB Driver

`arch/arm64/src/a64/hardware/a64_memorymap.h`: Added the Base Address for RSB

`arch/arm64/src/a64/Make.defs`: Added the RSB Driver to the Makefile

`arch/arm64/src/a64/a64_de.c`: Increase PLL Timeout for Allwinner A64 Display Engine

`boards/arm64/a64/pinephone/configs/nsh/defconfig`: Set PinePhone Board Config `CONFIG_BOARD_LOOPSPERMSEC` to the value computed by `calib_udelay`

`arch/arm64/src/a64/a64_rsb.c`, `a64_rsb.h`: RSB Driver for Allwinner A64

`platforms/arm/a64/boards/pinephone/index.rst`: Added RSB as supported peripheral for PinePhone
2022-12-24 12:01:46 +08:00
Zhe Weng
7bd2195fde net/nat: Fix misused d_draddr in select_port
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-23 19:40:19 +08:00
flyingfish89
2dfd0087ca Add copyright/NOTICE for scalbn(f|l) 2022-12-23 13:54:06 +08:00
Ville Juven
5fb3a960f5 riscv/addrenv: Test that satp contents make sense
Check that satp (the page directory root) is not 0, which means it has
not been set.
2022-12-23 10:47:04 +08:00
rajvinder kaur
3fd10fd504 s32k1xx\Kconfig: Add config option to enable UART invert setting. 2022-12-23 10:46:27 +08:00
Peter van der Perk
371f81d157 S32K3XX FlexCAN kconfig fix to work in conjunction with EMAC ioctl 2022-12-23 00:32:59 +08:00
Peter van der Perk
7f3cd2d3e8 S32K3XX EMAC MII PHY implementation 2022-12-23 00:32:59 +08:00
Alan Carvalho de Assis
3d016db226 Doc: Fix ping to external IP on simulator 2022-12-23 00:32:10 +08:00
Ville Juven
172b209f2d sched/assert: Re-implement assert() into user space
_assert is a kernel procedure, entered via system call to make the core
dump in privileged mode.

Running exit() from this context is not OK as it runs the registered
exit functions and flushes streams, which must not be done
from privileged mode as it is a security hole.

Thus, implement assert() into user space (again) and remove the exit()
call from the kernel procedure.
2022-12-22 21:07:47 +08:00
Ville Juven
b0b352f784 sched/assert: Fix printing argv when address environments are in use
Instantiate the correct address environment when reading the process's
argument vector. Otherwise doing this will crash the system every time,
causing a recursive assert loop.

Also try to do a bit of sanity checking before attempting to read the
process's memory, it might be in a bad state in which case this will
fail anyway.
2022-12-22 20:35:57 +08:00
wangbowen6
069fac1c67 power/relay: add relay driver framework for NuttX
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-12-22 20:30:49 +08:00
Zhe Weng
45b7debe13 doc/nat: update config options
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-22 20:20:12 +08:00
Zhe Weng
a9da1fff28 net/nat: Add auto reclaim logic for NAT entries.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-22 20:20:12 +08:00
Zhe Weng
879c337e30 net/nat: Use hashtable to optimize performance
Performance tested on simulator:

Before optimization:      -25% bandwidth @2k entries, -64% @10k entries
hashtable size=  2(1bit): -24% bandwidth @2k entries, -65% @10k entries
hashtable size=  4(2bits):-15% bandwidth @2k entries, -51% @10k entries
hashtable size= 32(5bits): -3% bandwidth @2k entries, -14% @10k entries
hashtable size=256(8bits): -1% bandwidth @2k entries,  -3% @10k entries

Note: Tested on worst performance, the earliest entry will be the worst.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-22 20:20:12 +08:00
Zhe Weng
573c79fd56 hashtable.h: Added a hashtable implementation
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-22 20:20:12 +08:00
anjiahao
f403118647 mm:fix typos
./mm_heap/mm.h:86:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
   86 |          FAR strcut tcb_s *tcb; \
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-12-22 20:19:05 +08:00
Ville Juven
3be81e649f libc/stdio: Flush streams in userspace when process exits
This fixes a long standing issue, where the kernel does flushing of file
streams, although it should not handle such streams at all.
2022-12-22 20:16:11 +08:00
Ville Juven
c2fa780ed0 boards/lpc17xx/lpc17_40_symtab: Remove ref. to nxsched_get_streams
I don't know how to handle this properly as I don't know what this
symbol table is supposed to do. Most likely the part that uses the
symbol table needs to be patched also...
2022-12-22 20:16:11 +08:00
Ville Juven
2ed51d026c fs/streams: Move the file streams from the group structure into TLS
This is preparation for flushing streams from user space, like it should
be done.

- Move tg_streamlist (group, kernel space) ->
       ta_streamlist (TLS, user space)
- Access stream list via tg_info in kernel
- Access stream list via TLS in user space
- Remove / rename nxsched_get_streams -> lib_getstreams
- Remove system call for nxsched_get_streams
2022-12-22 20:16:11 +08:00
yinshengkai
1a8cbc0b99 sched/assert: modify assert message
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-22 20:08:27 +08:00
Neo Xu
1697723b63 sim/config: enable luamodule
Enable existing luamodules: csjon, lfs, lsyslog and luv

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2022-12-22 15:26:11 +08:00
TimJTi
5f7bf743c5 Add LP503x RGB LED driver
style corrections

Update lp503x.h

Update lp503x.h

Update lp503x.c

Update lp503x.h

post review changes
2022-12-22 13:39:05 +08:00
Peter van der Perk
7c8f3b4916 LPC17_40 CAN driver SocketCAN enforce TX fifo behaviour
Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-22 11:55:59 +08:00
flyingfish89
035656661e 1 2022-12-22 11:52:00 +08:00
Adam Feuer
e57d0312ca Update SAMA5D2-XULT entry point
- in NuttX 11.x and 12.x the nuttx entry point
  for the sama5d2-xult board changed to 0x20008E20
  (from 0x2008040).

  This change updates defconfigs and the README.txt
  to reflect that.

- no code changes
2022-12-22 11:32:28 +08:00