Commit Graph

47605 Commits

Author SHA1 Message Date
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
TimJTi
e1b8c02f96 Add SAMA5D2 MCAN support
Update arch/arm/src/sama5/sam_mcan.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update arch/arm/src/sama5/sam_mcan.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update arch/arm/src/sama5/sam_mcan.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update arch/arm/src/sama5/sam_mcan.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update arch/arm/src/sama5/sam_mcan.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update arch/arm/src/sama5/sam_mcan.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-21 14:51:57 -03:00
ligd
18beaaa480 sim: remove unused variable in sim_saveusercontext()
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-12-21 17:45:32 +08:00
ligd
1544adb548 sim: open CONFIG_SIM_WALLTIME_SIGNAL=y in sim:nsh sim:smp
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-12-21 16:59:56 +09:00
ligd
ec191d05b6 sim/looper: close interrupt when looper run
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-12-21 16:59:56 +09:00
ligd
5744c62443 sim: set timer irq as real timer
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-12-21 16:59:56 +09:00
Lee Lup Yuen
64a54d2dfd arm64/a64: Add driver for Display Engine
This PR adds the driver for Display Engine 2.0 on Allwinner A64 SoC. The Display Engine Driver will be called by the upcoming LCD Driver for PINE64 PinePhone.

`arch/arm64/src/a64/Kconfig`: Added the Kconfig option for "A64 Peripheral Selection > DE" (`CONFIG_A64_DE`), which enables the Display Engine Driver

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

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

`boards/arm64/a64/pinephone/configs/nsh/defconfig`: Removed Scheduler Debug Info (`CONFIG_DEBUG_SCHED_INFO`) from the PinePhone Board Config, because it garbles the Console Output.

`arch/arm64/src/a64/a64_de.c`, `a64_de.h`: Display Engine Driver for Allwinner A64

`platforms/arm/a64/boards/pinephone/index.rst`: Added Display Engine as supported peripheral for PinePhone
2022-12-21 13:17:34 +08:00
Petro Karashchenko
3e36f40130 compiler.h: rename printflike to printf_like
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-21 10:56:45 +08:00
Petro Karashchenko
7f564e0d86 nuttx: add some missing FAR
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-21 10:56:45 +08:00
Petro Karashchenko
b107e4f417 nuttx: unify MIN, MAX and ABS macro definition across the code
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-21 09:31:28 +08:00
pengyiqiang
72fdea5c13 video/fb: initializes the info structure
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2022-12-21 01:16:55 +02:00
Xiang Xiao
fd0d6a9bf5 compiler.h: Add _ between format|printf|syslog|scanf|strftime and like
align with other macro naming style

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-21 01:05:19 +02:00
TimJTi
bc9b476d55 Update sam_mcan.c 2022-12-20 19:49:13 -03:00
halyssonJr
cdbb670e5d Add support to Franzininho board
rename files ESP32S2-Franzininho to Franzininho-WiFi and remove some scripts previously tested
2022-12-20 19:47:37 -03:00
ligd
886df37569 sim/fb: remove the lpwork in fb & lcd, merge to looper task
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-12-21 01:43:37 +08:00
chao an
e6b37f2b2d mm/iob: revert "modify iob to support header padding and alignment features"
we don't need to implement l2 isolation through io_head, iob offload will use io_offset

-------------------------------------------------------------
Layout of different NICs implementation:

        iob_data (aligned by CONFIG_IOB_ALIGNMENT)
            |
            |                 io_offset(CONFIG_NET_LL_GUARDSIZE)
            |                                |
            -------------------------------------------------
 Ethernet   |       Reserved    | ETH_HDRLEN |    io_len    |
            ---------------------------------|---------------
 8021Q      |   Reserved  | ETH_8021Q_HDRLEN |    io_len    |
            ---------------------------------|---------------
 ipforward  |            Reserved            |    io_len    |
            -------------------------------------------------

--------------------------------------------------------------------

Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-21 01:43:02 +08:00
chao an
6e380c0978 mm/iob: add a helper function to get iob count in chain
Signed-off-by: chao an <anchao@xiaomi.com>
2022-12-21 01:40:24 +08:00
wangbowen6
eb884c00e8 minidumpserver: sync the stackdump search string after #7875
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-12-21 01:39:43 +08:00
zouboan
60c0184b76 A64/irq.h: Add irq definition of Allwinner A64 interrupts 2022-12-20 23:34:23 +08:00
zhanghongyu
ba9ef06970 tun: add ioctl cmd TUNGETIFF implement
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-12-20 21:15:50 +08:00
ligd
2dbfd8e798 sim_uart: fix printf error when use irq mode
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-12-20 18:01:54 +08:00
dongjiuzhu1
eb102a668f sim/uart: check if txbuffer is not full before uart write
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-12-20 18:01:54 +08:00
David Sidrane
4fa163ade7 s32k3xx:EDMA fix git count 2022-12-20 18:01:21 +08:00
Peter Bee
2b11fd585f drivers/video: fix typo
Wrong buf used

Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-12-20 17:00:44 +08:00
Peter Bee
9f537d7a3f sim/video: fix hang when user temporarily blocks
host_set_fmt should not return error when EBUSY

Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-12-20 17:00:44 +08:00
Peter Bee
a897fe3005 sim/video: rename dq_buf to dqbuf
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-12-20 17:00:44 +08:00
jihandong
8e6185f4ad driver/fb: support linux info.
add struct fix_screeninfo and var_screeninfo, and related ioctl,
macro.

Signed-off-by: jihandong <jihandong@xiaomi.com>
2022-12-20 15:54:00 +08:00
David Sidrane
d33475d2d4 s32k3xx:Serial add DMA 2022-12-20 13:28:54 +08:00
ligd
f2de1ce930 sim/alsa: don't let siwtch out when open alsa mixer
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-12-20 13:28:19 +08:00
ligd
c74627cbec sim/head: don't let switch out when do poweroff
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-12-20 13:28:19 +08:00