Compare commits

...

13 commits

Author SHA1 Message Date
Masayuki Ishikawa
d32555f3e0 arch: qemu-rv: Fix high CPU usage in SMP mode
Summary:
- I noticed that QEMU shows high CPU usage if the number of
  CPUs does not match the kernel configuration. (e.g. -smp 8
  and CONFIG_SMP_NCPUS=2)
- This commit fixes this issue.

Impact:
- qemu-rv only

Testing:
- Tested with the following configs
  - rv-virt:smp64 (CONFIG_NCPUS=1/2/8)
  - rv-virt:nsh64

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-09-09 19:11:50 +08:00
Gustavo Henrique Nihei
00296c1ef3 esp32s3: Fix Data allocation offset within shared Internal SRAM1
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-09-09 19:11:23 +08:00
Gustavo Henrique Nihei
075316cae5 xtensa/esp32s3: Fix alignment of FPU registers in exception context
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-09-09 19:10:58 +08:00
Gustavo Henrique Nihei
871803b4b8 arch: Improve documentation for up_fpucmp function
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-09-09 19:10:33 +08:00
Gustavo Henrique Nihei
ba885eb216 xtensa: Fix comparison result for up_fpucmp function
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-09-09 19:10:33 +08:00
Masayuki Ishikawa
062a6bc9e4 boards: lm3s6965-ek: Fix to load ELF applications for qemu-protected
Summary:
- I noticed that error happens in loading nettest elf application.
- This commit fixes this issue by adding SYMTAB to the NSH
  as well as adjusting some parameters in CONFIG_ELF_XXX
- Also, CONFIG_EXAMPLES_HELLO is changed from y to m for testing.

Impact:
- lm3s6965-ek:qemu-protected only

Tested:
- Tested with qemu-6.2

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-09-09 19:10:09 +08:00
Gustavo Henrique Nihei
20e537bb7e arch/xtensa: Remove non-existent ARCH_HAVE_TESTSET support for ESP32-S2
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-09-09 19:09:46 +08:00
Gustavo Henrique Nihei
4e739e5fff xtensa: Avoid including handlers when no coprocessor is available
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-09-09 19:09:25 +08:00
baggio63446333
244d4a7c09 documentation: Fix links to pull requests in release notes
In the ReleaseNotes, fix link errors to each pull request.
2022-09-09 19:08:59 +08:00
ligd
5bdf386d60 sim: fix signal crash in SMP mode
reproduce:
sim:smp
ostest

reason:
shouldn't do sim_sigdeliver() in irq handler

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-09-09 19:08:24 +08:00
Alin Jerpelea
74db56d6b3 documentation: Add release notes for 11.0.0 release
This is a local copy taken from the confluence notes
 https://cwiki.apache.org/confluence/display/NUTTX/NuttX+11.0.0

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-09-06 01:33:07 +08:00
Alan Carvalho de Assis
53800a8657 sim: Fix the /etc/passwd after TEA algo fixing 2022-08-15 09:10:02 +02:00
Alan Carvalho de Assis
d4e95f189a esp32c3-devkit: Fix /etc/passwd too 2022-08-15 09:04:43 +02:00
19 changed files with 2388 additions and 1433 deletions

File diff suppressed because it is too large Load diff

View file

@ -44,7 +44,14 @@
* Name: up_fpucmp * Name: up_fpucmp
* *
* Description: * Description:
* compare FPU areas from thread context * Compare FPU areas from thread context.
*
* Input Parameters:
* saveregs1 - Pointer to the saved FPU registers.
* saveregs2 - Pointer to the saved FPU registers.
*
* Returned Value:
* True if FPU areas compare equal, False otherwise.
* *
****************************************************************************/ ****************************************************************************/

View file

@ -44,7 +44,14 @@
* Name: up_fpucmp * Name: up_fpucmp
* *
* Description: * Description:
* compare FPU areas from thread context * Compare FPU areas from thread context.
*
* Input Parameters:
* saveregs1 - Pointer to the saved FPU registers.
* saveregs2 - Pointer to the saved FPU registers.
*
* Returned Value:
* True if FPU areas compare equal, False otherwise.
* *
****************************************************************************/ ****************************************************************************/

View file

@ -44,7 +44,14 @@
* Name: up_fpucmp * Name: up_fpucmp
* *
* Description: * Description:
* compare FPU areas from thread context * Compare FPU areas from thread context.
*
* Input Parameters:
* saveregs1 - Pointer to the saved FPU registers.
* saveregs2 - Pointer to the saved FPU registers.
*
* Returned Value:
* True if FPU areas compare equal, False otherwise.
* *
****************************************************************************/ ****************************************************************************/

View file

@ -44,7 +44,14 @@
* Name: up_fpucmp * Name: up_fpucmp
* *
* Description: * Description:
* compare FPU areas from thread context * Compare FPU areas from thread context.
*
* Input Parameters:
* saveregs1 - Pointer to the saved FPU registers.
* saveregs2 - Pointer to the saved FPU registers.
*
* Returned Value:
* True if FPU areas compare equal, False otherwise.
* *
****************************************************************************/ ****************************************************************************/

View file

@ -229,7 +229,14 @@ void arm64_fpu_disable(void)
* Name: up_fpucmp * Name: up_fpucmp
* *
* Description: * Description:
* compare FPU areas from thread context * Compare FPU areas from thread context.
*
* Input Parameters:
* saveregs1 - Pointer to the saved FPU registers.
* saveregs2 - Pointer to the saved FPU registers.
*
* Returned Value:
* True if FPU areas compare equal, False otherwise.
* *
***************************************************************************/ ***************************************************************************/

View file

@ -44,7 +44,14 @@
* Name: up_fpucmp * Name: up_fpucmp
* *
* Description: * Description:
* compare FPU areas from thread context * Compare FPU areas from thread context.
*
* Input Parameters:
* saveregs1 - Pointer to the saved FPU registers.
* saveregs2 - Pointer to the saved FPU registers.
*
* Returned Value:
* True if FPU areas compare equal, False otherwise.
* *
****************************************************************************/ ****************************************************************************/

View file

@ -52,13 +52,21 @@ __start:
j 2f j 2f
1: 1:
/* In case of single CPU config, stop here */ /* Load the number of CPUs that the kernel supports */
#if !defined(CONFIG_SMP) || (CONFIG_SMP_NCPUS == 1) #ifdef CONFIG_SMP
csrw mie, zero li t1, CONFIG_SMP_NCPUS
wfi #else
li t1, 1
#endif #endif
/* If a0 (mhartid) >= t1 (the number of CPUs), stop here */
blt a0, t1, 3f
csrw mie, zero
wfi
3:
/* To get g_cpu_basestack[mhartid], must get g_cpu_basestack first */ /* To get g_cpu_basestack[mhartid], must get g_cpu_basestack first */
la t0, g_cpu_basestack la t0, g_cpu_basestack

View file

@ -90,10 +90,6 @@ void *up_doirq(int irq, void *context)
CURRENT_REGS = NULL; CURRENT_REGS = NULL;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
/* Handle signal */
sim_sigdeliver();
/* Then switch contexts */ /* Then switch contexts */
longjmp(regs, 1); longjmp(regs, 1);

View file

@ -54,7 +54,6 @@ config ARCH_CHIP_ESP32S2
select ARCH_HAVE_SDRAM select ARCH_HAVE_SDRAM
select ARCH_HAVE_RESET select ARCH_HAVE_RESET
select ARCH_HAVE_BOOTLOADER select ARCH_HAVE_BOOTLOADER
select ARCH_HAVE_TESTSET
select ARCH_VECNOTIRQ select ARCH_VECNOTIRQ
select LIBC_ARCH_ATOMIC select LIBC_ARCH_ATOMIC
select LIBC_ARCH_MEMCPY select LIBC_ARCH_MEMCPY

View file

@ -68,6 +68,10 @@
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
#ifndef ALIGN_UP
# define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1))
#endif
/* IRQ Stack Frame Format. Each value is a uint32_t register index */ /* IRQ Stack Frame Format. Each value is a uint32_t register index */
#define REG_PC (0) /* Return PC */ #define REG_PC (0) /* Return PC */
@ -138,18 +142,13 @@
#endif #endif
#if XCHAL_CP_NUM > 0 #if XCHAL_CP_NUM > 0
# if (XCHAL_TOTAL_SA_ALIGN == 8) && ((_REG_CP_START & 1) == 1) /* FPU first address must align to CP align size. */
/* Fpu first address must align to cp align size. */
# define REG_CP_DUMMY (_REG_CP_START + 0) # define XCPTCONTEXT_REGS ALIGN_UP(_REG_CP_START, XCHAL_TOTAL_SA_ALIGN / 4)
# define XCPTCONTEXT_REGS (_REG_CP_START + 1) # define XCPTCONTEXT_SIZE ((4 * XCPTCONTEXT_REGS) + XTENSA_CP_SA_SIZE + 0x20)
# else
# define XCPTCONTEXT_REGS _REG_CP_START
# endif
# define XCPTCONTEXT_SIZE ((4 * XCPTCONTEXT_REGS) + XTENSA_CP_SA_SIZE + 0x20)
#else #else
# define XCPTCONTEXT_REGS _REG_CP_START # define XCPTCONTEXT_REGS _REG_CP_START
# define XCPTCONTEXT_SIZE ((4 * XCPTCONTEXT_REGS) + 0x20) # define XCPTCONTEXT_SIZE ((4 * XCPTCONTEXT_REGS) + 0x20)
#endif #endif
/**************************************************************************** /****************************************************************************

View file

@ -69,7 +69,10 @@
#include "chip.h" #include "chip.h"
#include "syscall.h" #include "syscall.h"
#include "xtensa_asm_utils.h" #include "xtensa_asm_utils.h"
#include "xtensa_coproc.S"
#if XCHAL_CP_NUM > 0
# include "xtensa_coproc.S"
#endif
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions

View file

@ -44,7 +44,14 @@
* Name: up_fpucmp * Name: up_fpucmp
* *
* Description: * Description:
* compare FPU areas from thread context * Compare FPU areas from thread context.
*
* Input Parameters:
* saveregs1 - Pointer to the saved FPU registers.
* saveregs2 - Pointer to the saved FPU registers.
*
* Returned Value:
* True if FPU areas compare equal, False otherwise.
* *
****************************************************************************/ ****************************************************************************/
@ -54,6 +61,6 @@ bool up_fpucmp(const void *saveregs1, const void *saveregs2)
const uint32_t *regs2 = saveregs2; const uint32_t *regs2 = saveregs2;
return memcmp(&regs1[XCPTCONTEXT_REGS], &regs2[XCPTCONTEXT_REGS], return memcmp(&regs1[XCPTCONTEXT_REGS], &regs2[XCPTCONTEXT_REGS],
XTENSA_CP_SA_SIZE); XTENSA_CP_SA_SIZE) == 0;
} }
#endif /* CONFIG_ARCH_FPU */ #endif /* CONFIG_ARCH_FPU */

View file

@ -17,7 +17,6 @@ CONFIG_ARCH_CHIP_LM=y
CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_STACKDUMP=y
CONFIG_ARM_MPU=y CONFIG_ARM_MPU=y
CONFIG_ARM_SEMIHOSTING_HOSTFS=y CONFIG_ARM_SEMIHOSTING_HOSTFS=y
CONFIG_BOARDCTL_APP_SYMTAB=y
CONFIG_BOARDCTL_ROMDISK=y CONFIG_BOARDCTL_ROMDISK=y
CONFIG_BOARD_LOOPSPERMSEC=4531 CONFIG_BOARD_LOOPSPERMSEC=4531
CONFIG_BUILD_PROTECTED=y CONFIG_BUILD_PROTECTED=y
@ -30,9 +29,11 @@ CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_SYMBOLS=y CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEBUG_WARN=y CONFIG_DEBUG_WARN=y
CONFIG_ELF=y CONFIG_ELF=y
CONFIG_ELF_RELOCATION_BUFFERCOUNT=64
CONFIG_ELF_SYMBOL_CACHECOUNT=64
CONFIG_EXAMPLES_ELF=y CONFIG_EXAMPLES_ELF=y
CONFIG_EXAMPLES_ELF_DEVPATH="/dev/ram5" CONFIG_EXAMPLES_ELF_DEVPATH="/dev/ram5"
CONFIG_EXAMPLES_HELLO=y CONFIG_EXAMPLES_HELLO=m
CONFIG_EXAMPLES_MODULE=y CONFIG_EXAMPLES_MODULE=y
CONFIG_EXAMPLES_MODULE_DEVPATH="/dev/ram6" CONFIG_EXAMPLES_MODULE_DEVPATH="/dev/ram6"
CONFIG_EXAMPLES_NETTEST=m CONFIG_EXAMPLES_NETTEST=m
@ -41,7 +42,6 @@ CONFIG_FS_BINFS=y
CONFIG_FS_HOSTFS=y CONFIG_FS_HOSTFS=y
CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS=y
CONFIG_FS_TMPFS=y CONFIG_FS_TMPFS=y
CONFIG_HOST_MACOS=y
CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_LIBC_DLFCN=y CONFIG_LIBC_DLFCN=y
CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_ENVPATH=y
@ -95,6 +95,9 @@ CONFIG_SYSLOG_CONSOLE=y
CONFIG_SYSTEM_DHCPC_RENEW=y CONFIG_SYSTEM_DHCPC_RENEW=y
CONFIG_SYSTEM_NETDB=y CONFIG_SYSTEM_NETDB=y
CONFIG_SYSTEM_NSH=y CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_NSH_SYMTAB=y
CONFIG_SYSTEM_NSH_SYMTAB_ARRAYNAME="g_symtab"
CONFIG_SYSTEM_NSH_SYMTAB_COUNTNAME="g_nsymbols"
CONFIG_SYSTEM_NTPC=y CONFIG_SYSTEM_NTPC=y
CONFIG_SYSTEM_PING=y CONFIG_SYSTEM_PING=y
CONFIG_TASK_NAME_SIZE=24 CONFIG_TASK_NAME_SIZE=24

View file

@ -1 +1 @@
admin:8Tv+Hbmr3pLddSjtzL0kwC:0:0:/ admin:8Tv+Hbmr3pLVb5HHZgd26D:0:0:/

View file

@ -1 +1 @@
admin:8Tv+Hbmr3pLddSjtzL0kwC:0:0:/ admin:8Tv+Hbmr3pLVb5HHZgd26D:0:0:/

View file

@ -71,7 +71,7 @@ SECTIONS
* and dram0_0_seg reflect the same address space on different buses. * and dram0_0_seg reflect the same address space on different buses.
*/ */
. = ORIGIN(dram0_0_seg) + _iram_end - _iram_start; . = ORIGIN(dram0_0_seg) + MAX(_iram_end, _diram_i_start) - _diram_i_start;
} > dram0_0_seg } > dram0_0_seg
/* Shared RAM */ /* Shared RAM */

View file

@ -71,7 +71,7 @@ SECTIONS
* and dram0_0_seg reflect the same address space on different buses. * and dram0_0_seg reflect the same address space on different buses.
*/ */
. = ORIGIN(dram0_0_seg) + _iram_end - _iram_start; . = ORIGIN(dram0_0_seg) + MAX(_iram_end, _diram_i_start) - _diram_i_start;
} > dram0_0_seg } > dram0_0_seg
/* Shared RAM */ /* Shared RAM */

View file

@ -2618,7 +2618,14 @@ int up_saveusercontext(FAR void *saveregs);
* Name: up_fpucmp * Name: up_fpucmp
* *
* Description: * Description:
* compare FPU areas from thread context * Compare FPU areas from thread context.
*
* Input Parameters:
* saveregs1 - Pointer to the saved FPU registers.
* saveregs2 - Pointer to the saved FPU registers.
*
* Returned Value:
* True if FPU areas compare equal, False otherwise.
* *
****************************************************************************/ ****************************************************************************/