[GitHub] [nuttx] xiaoxiang781216 commented on pull request #8646: Usb: add sim usb device and host driver
xiaoxiang781216 commented on PR #8646: URL: https://github.com/apache/nuttx/pull/8646#issuecomment-1449507725 > > @btashton do you have progress, thanks? > > Sorry for the delay. Let's see if this works, it looks like it frees up about 13GB. > > #8680 Thanks! @btashton -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[nuttx] branch master updated: CI: Free space on worker building container
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git The following commit(s) were added to refs/heads/master by this push: new 05801f9fec CI: Free space on worker building container 05801f9fec is described below commit 05801f9fecbdb58045475cfd11c674a4ab747ffd Author: Brennan Ashton AuthorDate: Tue Feb 28 21:40:38 2023 -0800 CI: Free space on worker building container --- .github/workflows/docker_linux.yml | 5 + 1 file changed, 5 insertions(+) diff --git a/.github/workflows/docker_linux.yml b/.github/workflows/docker_linux.yml index 1a1dab87c1..0494d14e8a 100644 --- a/.github/workflows/docker_linux.yml +++ b/.github/workflows/docker_linux.yml @@ -57,6 +57,11 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Free Up Extra Disk Space +run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/local/lib/android + sudo rm -rf /opt/gch - name: Pre-build Disk Stats run: | df -h
[GitHub] [nuttx] xiaoxiang781216 merged pull request #8680: CI: Free space on worker building container
xiaoxiang781216 merged PR #8680: URL: https://github.com/apache/nuttx/pull/8680 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] XiandongHu closed pull request #8670: mtd: Extend isbad and markbad func for mtd_dev_s
XiandongHu closed pull request #8670: mtd: Extend isbad and markbad func for mtd_dev_s URL: https://github.com/apache/nuttx/pull/8670 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] btashton commented on pull request #8680: CI: Free space on worker building container
btashton commented on PR #8680: URL: https://github.com/apache/nuttx/pull/8680#issuecomment-1449412106 Looks like we need to clean up some more space. I will optimize the intermediate containers to be smaller. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] btashton commented on pull request #8646: Usb: add sim usb device and host driver
btashton commented on PR #8646: URL: https://github.com/apache/nuttx/pull/8646#issuecomment-1449389147 > @btashton do you have progress, thanks? Sorry for the delay. Let's see if this works, it looks like it frees up about 13GB. https://github.com/apache/nuttx/pull/8680 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] btashton opened a new pull request, #8680: CI: Free space on worker building container
btashton opened a new pull request, #8680: URL: https://github.com/apache/nuttx/pull/8680 ## Summary Remove large unused tools from worker that builds docker containers. ## Testing CI should be able to build image again. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] SPRESENSE opened a new pull request, #8679: boards: spresense: Update miscellaneous spresense drivers
SPRESENSE opened a new pull request, #8679: URL: https://github.com/apache/nuttx/pull/8679 ## Summary * Fix nxstyle * Remove wrong build condition * Remove duplicate definitions * Support using GPIO for power control * Update eMMC driver * Add configuration for eMMC power control * Add board function for eMMC finalization * Add eMMC power-on wait time * Support eMMC late initialization * Add eMMC initialization into bringup function ## Impact Only spresense board ## Testing Build all spresense defconfigs. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] xiaoxiang781216 commented on pull request #8646: Usb: add sim usb device and host driver
xiaoxiang781216 commented on PR #8646: URL: https://github.com/apache/nuttx/pull/8646#issuecomment-1449376926 @btashton do you have progress, thanks? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[nuttx] branch master updated: tools/Unix.mk: Add VERSION_ARG to argument of version.sh
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git The following commit(s) were added to refs/heads/master by this push: new a3cce487ca tools/Unix.mk: Add VERSION_ARG to argument of version.sh a3cce487ca is described below commit a3cce487cab7f484dda7480408b1c0b5eb4f3467 Author: SPRESENSE <41312067+sprese...@users.noreply.github.com> AuthorDate: Thu Feb 9 17:26:15 2023 +0900 tools/Unix.mk: Add VERSION_ARG to argument of version.sh Allow version arguments to be changed externally. --- tools/Unix.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Unix.mk b/tools/Unix.mk index 7c0428b0bf..db56615c75 100644 --- a/tools/Unix.mk +++ b/tools/Unix.mk @@ -57,7 +57,7 @@ else # Only update .version if the contents of version.tmp actually changes # Note: this is executed before any rule is run -$(shell tools/version.sh .version.tmp > /dev/null) +$(shell tools/version.sh $(VERSION_ARG) .version.tmp > /dev/null) $(shell $(call TESTANDREPLACEFILE, .version.tmp, .version)) endif
[GitHub] [nuttx] xiaoxiang781216 merged pull request #8675: tools/Unix.mk: Add VERSION_ARG to argument of version.sh
xiaoxiang781216 merged PR #8675: URL: https://github.com/apache/nuttx/pull/8675 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[nuttx] 04/07: arm64: ARMv8-r(Cortex-R82) support(add ARCH_SET_VMPIDR_EL2 option)
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git commit 4cb5ff3353af37a50603f6c5a2b4fd9aceae107f Author: qinwei1 AuthorDate: Tue Feb 28 17:02:37 2023 +0800 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 --- arch/arm64/Kconfig | 15 +++ arch/arm64/src/common/arm64_boot.c | 5 + arch/arm64/src/common/arm64_cpustart.c | 1 - 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index e0b187f002..c44ebec8cf 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -84,6 +84,21 @@ config ARCH_HAVE_EL3 runing at EL3 is not necessary and system register for EL3 is not accessible +config ARCH_SET_VMPIDR_EL2 + bool "Set VMPIDR_EL2 at EL2 stage" + help + 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. + ARM FVP and VDK should set it since these platform will boot + without BootLoader. + config ARCH_EARLY_PRINT bool "arch early print support" default n diff --git a/arch/arm64/src/common/arm64_boot.c b/arch/arm64/src/common/arm64_boot.c index 1d4013733a..74ba8632ed 100644 --- a/arch/arm64/src/common/arm64_boot.c +++ b/arch/arm64/src/common/arm64_boot.c @@ -130,6 +130,11 @@ void arm64_boot_el2_init(void) zero_sysreg(cnthp_ctl_el2); #endif +#ifdef CONFIG_ARCH_SET_VMPIDR_EL2 + reg = read_sysreg(mpidr_el1); + write_sysreg(reg, vmpidr_el2); +#endif + /* Enable this if/when we use the hypervisor timer. * write_cnthp_cval_el2(~(uint64_t)0); */ diff --git a/arch/arm64/src/common/arm64_cpustart.c b/arch/arm64/src/common/arm64_cpustart.c index 1eac831cf0..808799c8b2 100644 --- a/arch/arm64/src/common/arm64_cpustart.c +++ b/arch/arm64/src/common/arm64_cpustart.c @@ -149,7 +149,6 @@ static void arm64_start_cpu(int cpu_num, char *stack, int stack_sz, { uint64_t cpu_mpid = cpu_num; - #ifdef CONFIG_SCHED_INSTRUMENTATION /* Notify of the start event */
[nuttx] 07/07: Update arm64_head.S
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git commit fa359e355c231984a7401bc3e0a3b100133b0ba4 Author: qinwei2004 <104544671+qinwei2...@users.noreply.github.com> AuthorDate: Wed Mar 1 10:17:39 2023 +0800 Update arm64_head.S --- arch/arm64/src/common/arm64_head.S | 4 1 file changed, 4 deletions(-) diff --git a/arch/arm64/src/common/arm64_head.S b/arch/arm64/src/common/arm64_head.S index 47f052e3e2..fba688f782 100644 --- a/arch/arm64/src/common/arm64_head.S +++ b/arch/arm64/src/common/arm64_head.S @@ -196,11 +196,7 @@ primary_core: blup_earlyserialinit #endif -#ifdef CONFIG_SMP PRINT(primary_boot, "- Ready to Boot Primary CPU\r\n") -#else -PRINT(cpu_boot, "- Ready to Boot CPU\r\n") -#endif cpu_boot:
[nuttx] 06/07: arm64: ARMv8-r(Cortex-R82) support(mpid fix)
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git commit 518eb4076ed4ccf46eaf7f79a38b862b30eae74b Author: qinwei1 AuthorDate: Tue Feb 28 21:31:23 2023 +0800 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 --- arch/arm64/include/qemu/chip.h | 2 +- arch/arm64/src/common/Make.defs| 2 +- arch/arm64/src/common/arm64_arch.h | 40 ++-- arch/arm64/src/common/arm64_cpuindex.c | 68 -- arch/arm64/src/common/arm64_cpustart.c | 6 ++- arch/arm64/src/common/arm64_gicv3.c| 12 -- arch/arm64/src/common/arm64_head.S | 60 ++ arch/arm64/src/qemu/qemu_boot.c| 52 ++ 8 files changed, 148 insertions(+), 94 deletions(-) diff --git a/arch/arm64/include/qemu/chip.h b/arch/arm64/include/qemu/chip.h index 6b6cae7521..f854f888bc 100644 --- a/arch/arm64/include/qemu/chip.h +++ b/arch/arm64/include/qemu/chip.h @@ -44,7 +44,7 @@ #define CONFIG_GICD_BASE 0x800 #define CONFIG_GICR_BASE 0x80a - +#define CONFIG_GICR_OFFSET0x2 #else #error CONFIG_ARM_GIC_VERSION should be 2, 3 or 4 diff --git a/arch/arm64/src/common/Make.defs b/arch/arm64/src/common/Make.defs index eea3c1d3de..afae287cf6 100644 --- a/arch/arm64/src/common/Make.defs +++ b/arch/arm64/src/common/Make.defs @@ -78,7 +78,7 @@ CMN_CSRCS += arm64_cpu_psci.c arm64_systemreset.c endif ifeq ($(CONFIG_SMP),y) -CMN_CSRCS += arm64_cpuidlestack.c arm64_cpustart.c arm64_cpuindex.c +CMN_CSRCS += arm64_cpuidlestack.c arm64_cpustart.c CMN_CSRCS += arm64_cpupause.c endif diff --git a/arch/arm64/src/common/arm64_arch.h b/arch/arm64/src/common/arm64_arch.h index 61a61e6e78..dd30b3f185 100644 --- a/arch/arm64/src/common/arm64_arch.h +++ b/arch/arm64/src/common/arm64_arch.h @@ -156,12 +156,31 @@ #define MPIDR_AFF2_SHIFT(16) #define MPIDR_AFF3_SHIFT(32) +/* mpidr_el1 register, the register is define: + * - bit 0~7: Aff0 + * - bit 8~15: Aff1 + * - bit 16~23: Aff2 + * - bit 24:MT, multithreading + * - bit 25~29: RES0 + * - bit 30:U, multiprocessor/Uniprocessor + * - bit 31:RES1 + * - bit 32~39: Aff3 + * - bit 40~63: RES0 + * 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 + */ + +#define GET_MPIDR() read_sysreg(mpidr_el1) + #define MPIDR_AFFLVL(mpidr, aff_level) \ (((mpidr) >> MPIDR_AFF ## aff_level ## _SHIFT) & MPIDR_AFFLVL_MASK) -#define GET_MPIDR() read_sysreg(mpidr_el1) -#define MPIDR_TO_CORE(mpidr)MPIDR_AFFLVL((mpidr), 0) -#define IS_PRIMARY_CORE() (!MPIDR_TO_CORE(GET_MPIDR())) +#define MPID_TO_CORE(mpid, aff_level) \ + (((mpid) >> MPIDR_AFF ## aff_level ## _SHIFT) & MPIDR_AFFLVL_MASK) + +#define CORE_TO_MPID(core, aff_level) \ + (((core) << MPIDR_AFF ## aff_level ## _SHIFT)) /* System register interface to GICv3 */ @@ -529,6 +548,21 @@ void arm64_cpu_enable(void); # define arm64_cpu_enable() #endif +/ + * Name: arm64_get_mpid + * + * Description: + * The function from cpu index to get cpu mpid which is reading + * from mpidr_el1 register. 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 + * + / + +#ifdef CONFIG_SMP +uint64_t arm64_get_mpid(int cpu); +#endif /* CONFIG_SMP */ + #endif /* __ASSEMBLY__ */ #endif /* ___ARCH_ARM64_SRC_COMMON_ARM64_ARCH_H */ diff --git a/arch/arm64/src/common/arm64_cpuindex.c b/arch/arm64/src/common/arm64_cpuindex.c deleted file mode 100644 index a0249d8273..00 --- a/arch/arm64/src/common/arm64_cpuindex.c +++ /dev/null @@ -1,68 +0,0 @@ -/ - * arch/arm64/src/common/arm64_cpuindex.c - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed
[nuttx] branch master updated (b576a26d51 -> fa359e355c)
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git from b576a26d51 arch: cxd56xx: Fix emmc pin control on initialization error new e5564a9872 arm64: PSCI config support new 4240723b78 arm64: add ARCH_EARLY_PRINT support new 0841f4dbaa arm64: ARMv8-r(Cortex-R82) support new 4cb5ff3353 arm64: ARMv8-r(Cortex-R82) support(add ARCH_SET_VMPIDR_EL2 option) new d5c6b8a94b arm64: add 64-bit time for all arm64 platform new 518eb4076e arm64: ARMv8-r(Cortex-R82) support(mpid fix) new fa359e355c Update arm64_head.S The 7 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: arch/arm64/Kconfig | 60 arch/arm64/include/qemu/chip.h | 2 +- arch/arm64/src/Toolchain.defs | 6 + arch/arm64/src/a64/a64_boot.c | 20 +- arch/arm64/src/common/Make.defs| 30 +- arch/arm64/src/common/arm64_arch.h | 40 ++- arch/arm64/src/common/arm64_arch_timer.c | 6 +- arch/arm64/src/common/arm64_boot.c | 13 + arch/arm64/src/common/arm64_cpu_psci.c | 6 +- arch/arm64/src/common/arm64_cpu_psci.h | 6 +- arch/arm64/src/common/arm64_cpuindex.c | 68 - arch/arm64/src/common/arm64_cpustart.c | 71 +++-- arch/arm64/src/common/arm64_fatal.c| 2 + arch/arm64/src/common/arm64_gic.h | 29 +- arch/arm64/src/common/arm64_gicv3.c| 80 -- arch/arm64/src/common/arm64_head.S | 79 -- arch/arm64/src/common/arm64_mpu.c | 241 + arch/arm64/src/common/arm64_mpu.h | 301 + arch/arm64/src/common/arm64_systemreset.c | 2 +- arch/arm64/src/qemu/Kconfig| 3 + arch/arm64/src/qemu/qemu_boot.c| 74 - arch/arm64/src/qemu/qemu_boot.h| 6 + arch/arm64/src/qemu/qemu_serial.c | 1 - boards/arm64/a64/pinephone/configs/lcd/defconfig | 1 + boards/arm64/a64/pinephone/configs/lvgl/defconfig | 1 + boards/arm64/a64/pinephone/configs/nsh/defconfig | 1 + .../arm64/a64/pinephone/configs/sensor/defconfig | 1 + .../qemu/qemu-armv8a/configs/netnsh/defconfig | 1 + .../qemu/qemu-armv8a/configs/netnsh_smp/defconfig | 1 + .../arm64/qemu/qemu-armv8a/configs/nsh/defconfig | 2 + .../qemu/qemu-armv8a/configs/nsh_gicv2/defconfig | 1 + .../qemu/qemu-armv8a/configs/nsh_smp/defconfig | 2 + 32 files changed, 992 insertions(+), 165 deletions(-) delete mode 100644 arch/arm64/src/common/arm64_cpuindex.c create mode 100644 arch/arm64/src/common/arm64_mpu.c create mode 100644 arch/arm64/src/common/arm64_mpu.h
[nuttx] 05/07: arm64: add 64-bit time for all arm64 platform
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git commit d5c6b8a94b61873e427805d99af9d1bb1604000c Author: qinwei1 AuthorDate: Tue Feb 28 17:30:13 2023 +0800 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 --- arch/arm64/src/common/arm64_arch_timer.c | 4 ++-- boards/arm64/a64/pinephone/configs/lcd/defconfig | 1 + boards/arm64/a64/pinephone/configs/lvgl/defconfig | 1 + boards/arm64/a64/pinephone/configs/nsh/defconfig | 1 + boards/arm64/a64/pinephone/configs/sensor/defconfig| 1 + boards/arm64/qemu/qemu-armv8a/configs/netnsh/defconfig | 1 + boards/arm64/qemu/qemu-armv8a/configs/netnsh_smp/defconfig | 1 + boards/arm64/qemu/qemu-armv8a/configs/nsh/defconfig| 1 + boards/arm64/qemu/qemu-armv8a/configs/nsh_gicv2/defconfig | 1 + boards/arm64/qemu/qemu-armv8a/configs/nsh_smp/defconfig| 1 + 10 files changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/arm64/src/common/arm64_arch_timer.c b/arch/arm64/src/common/arm64_arch_timer.c index 51518a2fee..c2e860aa41 100644 --- a/arch/arm64/src/common/arm64_arch_timer.c +++ b/arch/arm64/src/common/arm64_arch_timer.c @@ -134,7 +134,7 @@ static int arm64_arch_timer_compare_isr(int irq, void *regs, void *arg) static int arm64_arch_timer_compare_isr(int irq, void *regs, void *arg) { uint64_t curr_cycle; - uint32_t delta_ticks; + uint64_t delta_ticks; uint64_t next_cycle; UNUSED(irq); @@ -142,7 +142,7 @@ static int arm64_arch_timer_compare_isr(int irq, void *regs, void *arg) UNUSED(arg); curr_cycle= arm64_arch_timer_count(); - delta_ticks = (uint32_t)((curr_cycle - last_cycle) / cycle_per_tick); + delta_ticks = (curr_cycle - last_cycle) / cycle_per_tick; last_cycle += delta_ticks * cycle_per_tick; diff --git a/boards/arm64/a64/pinephone/configs/lcd/defconfig b/boards/arm64/a64/pinephone/configs/lcd/defconfig index f9e0313b6c..31a73b5089 100644 --- a/boards/arm64/a64/pinephone/configs/lcd/defconfig +++ b/boards/arm64/a64/pinephone/configs/lcd/defconfig @@ -61,6 +61,7 @@ CONFIG_START_YEAR=2022 CONFIG_SYMTAB_ORDEREDBYNAME=y CONFIG_SYSTEM_NSH=y CONFIG_SYSTEM_SYSTEM=y +CONFIG_SYSTEM_TIME64=y CONFIG_TESTING_GETPRIME=y CONFIG_TESTING_OSTEST=y CONFIG_UART1_SERIAL_CONSOLE=y diff --git a/boards/arm64/a64/pinephone/configs/lvgl/defconfig b/boards/arm64/a64/pinephone/configs/lvgl/defconfig index 925489f8ca..9dfd1147ec 100644 --- a/boards/arm64/a64/pinephone/configs/lvgl/defconfig +++ b/boards/arm64/a64/pinephone/configs/lvgl/defconfig @@ -79,6 +79,7 @@ CONFIG_START_YEAR=2022 CONFIG_SYMTAB_ORDEREDBYNAME=y CONFIG_SYSTEM_NSH=y CONFIG_SYSTEM_SYSTEM=y +CONFIG_SYSTEM_TIME64=y CONFIG_TESTING_GETPRIME=y CONFIG_TESTING_OSTEST=y CONFIG_UART1_SERIAL_CONSOLE=y diff --git a/boards/arm64/a64/pinephone/configs/nsh/defconfig b/boards/arm64/a64/pinephone/configs/nsh/defconfig index a858488067..c6813b13b8 100644 --- a/boards/arm64/a64/pinephone/configs/nsh/defconfig +++ b/boards/arm64/a64/pinephone/configs/nsh/defconfig @@ -60,6 +60,7 @@ CONFIG_START_YEAR=2022 CONFIG_SYMTAB_ORDEREDBYNAME=y CONFIG_SYSTEM_NSH=y CONFIG_SYSTEM_SYSTEM=y +CONFIG_SYSTEM_TIME64=y CONFIG_TESTING_GETPRIME=y CONFIG_TESTING_OSTEST=y CONFIG_UART1_SERIAL_CONSOLE=y diff --git a/boards/arm64/a64/pinephone/configs/sensor/defconfig b/boards/arm64/a64/pinephone/configs/sensor/defconfig index a416f9f029..351b871866 100644 --- a/boards/arm64/a64/pinephone/configs/sensor/defconfig +++ b/boards/arm64/a64/pinephone/configs/sensor/defconfig @@ -65,6 +65,7 @@ CONFIG_START_YEAR=2022 CONFIG_SYMTAB_ORDEREDBYNAME=y CONFIG_SYSTEM_NSH=y CONFIG_SYSTEM_SYSTEM=y +CONFIG_SYSTEM_TIME64=y CONFIG_TESTING_GETPRIME=y CONFIG_TESTING_OSTEST=y CONFIG_UART1_SERIAL_CONSOLE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/netnsh/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/netnsh/defconfig index 343013cb74..05d91bbc78 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/netnsh/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/netnsh/defconfig @@ -80,6 +80,7 @@ CONFIG_SYSTEM_NSH=y CONFIG_SYSTEM_PING=y CONFIG_SYSTEM_SYSTEM=y CONFIG_SYSTEM_TELNETD_SESSION_STACKSIZE=8192 +CONFIG_SYSTEM_TIME64=y CONFIG_TESTING_GETPRIME=y CONFIG_TESTING_OSTEST=y CONFIG_UART1_SERIAL_CONSOLE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/netnsh_smp/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/netnsh_smp/defconfig index dbab634430..88733f9011 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/netnsh_smp/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/netnsh_smp/defconfig @@ -84,6 +84,7 @@ CONFIG_SYSTEM_PING=y CONFIG_SYSTEM_SYSTEM=y CONFIG_SYSTEM_TASKSET=y
[nuttx] 02/07: arm64: add ARCH_EARLY_PRINT support
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git commit 4240723b7850f5274a9629383b2c71d510d6db7b Author: qinwei1 AuthorDate: Tue Feb 28 15:07:42 2023 +0800 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 --- arch/arm64/Kconfig | 13 + arch/arm64/src/common/arm64_head.S | 15 --- boards/arm64/qemu/qemu-armv8a/configs/nsh/defconfig | 1 + boards/arm64/qemu/qemu-armv8a/configs/nsh_smp/defconfig | 1 + 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index c50519b064..cb9c7fcc58 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -64,6 +64,19 @@ config ARCH_HAVE_PSCI maybe not applicable for arm core without PCSI firmware interface implement +config ARCH_EARLY_PRINT + bool "arch early print support" + default n + ---help--- + 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. config ARCH_CORTEX_A53 bool diff --git a/arch/arm64/src/common/arm64_head.S b/arch/arm64/src/common/arm64_head.S index ec6cc41f40..82104b7d57 100644 --- a/arch/arm64/src/common/arm64_head.S +++ b/arch/arm64/src/common/arm64_head.S @@ -48,7 +48,7 @@ #define __HEAD_FLAGS((__HEAD_FLAG_PAGE_SIZE << 1) | \ (__HEAD_FLAG_PHYS_BASE << 3)) -#ifdef CONFIG_DEBUG_FEATURES +#ifdef CONFIG_ARCH_EARLY_PRINT #define RODATA_STR(label, msg) \ .pushsection .rodata.str, "aMS", %progbits, 1 ; \ @@ -66,7 +66,7 @@ label: .asciz msg; \ RODATA_STR(boot_string_##sym, _s) #else #define PRINT(sym, s) -#endif /* CONFIG_DEBUG_FEATURES */ +#endif /* CONFIG_ARCH_EARLY_PRINT */ / * Private Functions @@ -166,7 +166,7 @@ primary_core: bl __reset_prep_c -#ifdef CONFIG_DEBUG_FEATURES +#ifdef CONFIG_ARCH_EARLY_PRINT /* Initialize the UART for early print. * Should only be called on the boot CPU */ @@ -228,8 +228,9 @@ jump_to_c_entry: /* Fail-stop */ fail: -PRINT(fail, "- Boot failed -\r\n") -1: wfe +/* Boot failed */ + +1: wfe b 1b /* Set the minimum necessary to safely call C code */ @@ -283,7 +284,7 @@ out: ret x23 -#ifdef CONFIG_DEBUG_FEATURES +#ifdef CONFIG_ARCH_EARLY_PRINT /* Print early debug messages. * x0: Nul-terminated string to print. @@ -303,4 +304,4 @@ boot_stage_puts: .type boot_low_puts, %function; -#endif /* !CONFIG_DEBUG_FEATURES */ +#endif /* !CONFIG_ARCH_EARLY_PRINT */ diff --git a/boards/arm64/qemu/qemu-armv8a/configs/nsh/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/nsh/defconfig index 06af9b7ea3..821eb9c6c6 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/nsh/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/nsh/defconfig @@ -12,6 +12,7 @@ CONFIG_ARCH_BOARD_QEMU_ARMV8A=y CONFIG_ARCH_CHIP="qemu" CONFIG_ARCH_CHIP_QEMU=y CONFIG_ARCH_CHIP_QEMU_A53=y +CONFIG_ARCH_EARLY_PRINT=y CONFIG_ARCH_INTERRUPTSTACK=4096 CONFIG_BUILTIN=y CONFIG_DEBUG_ASSERTIONS=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp/defconfig index 3540638a72..c7fdd37a93 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp/defconfig @@ -13,6 +13,7 @@ CONFIG_ARCH_BOARD_QEMU_ARMV8A=y CONFIG_ARCH_CHIP="qemu" CONFIG_ARCH_CHIP_QEMU=y CONFIG_ARCH_CHIP_QEMU_A53=y +CONFIG_ARCH_EARLY_PRINT=y CONFIG_ARCH_INTERRUPTSTACK=8192 CONFIG_BUILTIN=y CONFIG_DEBUG_ASSERTIONS=y
[nuttx] 03/07: arm64: ARMv8-r(Cortex-R82) support
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git commit 0841f4dbaa700ef61b7c476f31cda8ef31bd0a95 Author: qinwei1 AuthorDate: Tue Feb 28 17:01:24 2023 +0800 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 --- arch/arm64/Kconfig | 20 ++ arch/arm64/src/Toolchain.defs| 6 + arch/arm64/src/a64/a64_boot.c| 18 ++ arch/arm64/src/common/Make.defs | 20 +- arch/arm64/src/common/arm64_arch_timer.c | 2 - arch/arm64/src/common/arm64_boot.c | 8 + arch/arm64/src/common/arm64_cpustart.c | 51 -- arch/arm64/src/common/arm64_fatal.c | 2 + arch/arm64/src/common/arm64_gic.h| 29 ++- arch/arm64/src/common/arm64_gicv3.c | 70 +-- arch/arm64/src/common/arm64_head.S | 8 +- arch/arm64/src/common/arm64_mpu.c| 241 + arch/arm64/src/common/arm64_mpu.h| 301 +++ arch/arm64/src/qemu/qemu_boot.c | 20 ++ arch/arm64/src/qemu/qemu_boot.h | 6 + arch/arm64/src/qemu/qemu_serial.c| 1 - 16 files changed, 761 insertions(+), 42 deletions(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index cb9c7fcc58..e0b187f002 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -49,10 +49,12 @@ endchoice config ARCH_ARMV8A bool default n + select ARCH_HAVE_EL3 config ARCH_ARMV8R bool default n + select ARCH_SINGLE_SECURITY_STATE config ARCH_HAVE_PSCI bool "ARM PCSI (Power State Coordination Interface) Support" @@ -64,6 +66,24 @@ config ARCH_HAVE_PSCI maybe not applicable for arm core without PCSI firmware interface implement +config ARCH_SINGLE_SECURITY_STATE + bool "ARM Single Security State Support" + default n + ---help--- + Some ARM aarch64 Cortex-family processors only supports single + security state(eg. Cortex-R82). For these Processors, + GIC or other ARM architecture feature will with different + configure + +config ARCH_HAVE_EL3 + bool + default n + ---help--- + Some ARM aarch64 Cortex-family processors only supports + EL0~El2(eg. Cortex-R82). For these Processors, the code + runing at EL3 is not necessary and system register for EL3 + is not accessible + config ARCH_EARLY_PRINT bool "arch early print support" default n diff --git a/arch/arm64/src/Toolchain.defs b/arch/arm64/src/Toolchain.defs index 7b2c9cb0d0..a62d87c14e 100644 --- a/arch/arm64/src/Toolchain.defs +++ b/arch/arm64/src/Toolchain.defs @@ -34,12 +34,18 @@ ifeq ($(CONFIG_ARCH_ARMV8A),y) ARCHCPUFLAGS += -march=armv8-a endif +ifeq ($(CONFIG_ARCH_ARMV8R),y) + ARCHCPUFLAGS += -march=armv8-r +endif + ifeq ($(CONFIG_ARCH_CORTEX_A53),y) ARCHCPUFLAGS += -mtune=cortex-a53 else ifeq ($(CONFIG_ARCH_CORTEX_A57),y) ARCHCPUFLAGS += -mtune=cortex-a57 else ifeq ($(CONFIG_ARCH_CORTEX_A72),y) ARCHCPUFLAGS += -mtune=cortex-a72 +else ifeq ($(CONFIG_ARCH_CORTEX_R82),y) + ARCHCPUFLAGS += -mtune=cortex-r82 endif ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) diff --git a/arch/arm64/src/a64/a64_boot.c b/arch/arm64/src/a64/a64_boot.c index 02777e120e..65a5c8ce99 100644 --- a/arch/arm64/src/a64/a64_boot.c +++ b/arch/arm64/src/a64/a64_boot.c @@ -70,6 +70,24 @@ const struct arm_mmu_config mmu_config = * Public Functions / +/ + * Name: arm64_el_init + * + * Description: + * The function called from arm64_head.S at very early stage for these + * platform, it's use to: + * - Handling special hardware initialize routine which is need to + * run at high ELs + * - Initialize system software such as hypervisor or security firmware + * which is need to run at high ELs + * + / + +void arm64_el_init(void) +{ + /* TODO: A64 set init sys clock */ +} + / * Name: arm64_chip_boot * diff --git a/arch/arm64/src/common/Make.defs b/arch/arm64/src/common/Make.defs
[nuttx] 01/07: arm64: PSCI config support
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git commit e5564a98723563f235508a255debeb725b3aed37 Author: qinwei1 AuthorDate: Tue Feb 28 14:23:02 2023 +0800 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 --- arch/arm64/Kconfig| 12 arch/arm64/src/a64/a64_boot.c | 2 +- arch/arm64/src/common/Make.defs | 8 ++-- arch/arm64/src/common/arm64_cpu_psci.c| 6 +++--- arch/arm64/src/common/arm64_cpu_psci.h| 6 +++--- arch/arm64/src/common/arm64_cpustart.c| 15 +-- arch/arm64/src/common/arm64_systemreset.c | 2 +- arch/arm64/src/qemu/Kconfig | 3 +++ arch/arm64/src/qemu/qemu_boot.c | 2 +- 9 files changed, 35 insertions(+), 21 deletions(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 4136e5a09d..c50519b064 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -31,6 +31,7 @@ config ARCH_CHIP_A64 select ARCH_CORTEX_A53 select ARCH_HAVE_ADDRENV select ARCH_HAVE_RESET + select ARCH_HAVE_PSCI select ARCH_NEED_ADDRENV_MAPPING ---help--- Allwinner A64 SoC @@ -53,6 +54,17 @@ config ARCH_ARMV8R bool default n +config ARCH_HAVE_PSCI + bool "ARM PCSI (Power State Coordination Interface) Support" + default n + ---help--- + This Power State Coordination Interface (PSCI) defines + a standard interface for power management. the PCSI need + to implement handling firmware at EL2 or EL3. The option + maybe not applicable for arm core without PCSI firmware + interface implement + + config ARCH_CORTEX_A53 bool default n diff --git a/arch/arm64/src/a64/a64_boot.c b/arch/arm64/src/a64/a64_boot.c index ffb66fdf7a..02777e120e 100644 --- a/arch/arm64/src/a64/a64_boot.c +++ b/arch/arm64/src/a64/a64_boot.c @@ -84,7 +84,7 @@ void arm64_chip_boot(void) arm64_mmu_init(true); -#if defined(CONFIG_SMP) || defined(CONFIG_ARCH_HAVE_RESET) +#if defined(CONFIG_SMP) || defined(CONFIG_ARCH_HAVE_PSCI) arm64_psci_init("smc"); #endif diff --git a/arch/arm64/src/common/Make.defs b/arch/arm64/src/common/Make.defs index e076f888dd..cc4aecdfc6 100644 --- a/arch/arm64/src/common/Make.defs +++ b/arch/arm64/src/common/Make.defs @@ -46,17 +46,21 @@ CMN_CSRCS = arm64_initialize.c arm64_initialstate.c arm64_boot.c CMN_CSRCS += arm64_nputs.c arm64_idle.c arm64_copystate.c arm64_createstack.c CMN_CSRCS += arm64_releasestack.c arm64_stackframe.c arm64_usestack.c CMN_CSRCS += arm64_task_sched.c arm64_exit.c arm64_vfork.c arm64_switchcontext.c -CMN_CSRCS += arm64_schedulesigaction.c arm64_sigdeliver.c arm64_systemreset.c +CMN_CSRCS += arm64_schedulesigaction.c arm64_sigdeliver.c CMN_CSRCS += arm64_backtrace.c arm64_getintstack.c arm64_registerdump.c # Common C source files ( hardware BSP ) CMN_CSRCS += arm64_mmu.c arm64_arch_timer.c arm64_cache.c CMN_CSRCS += arm64_doirq.c arm64_gicv2.c arm64_gicv3.c arm64_fatal.c -CMN_CSRCS += arm64_syscall.c arm64_cpu_psci.c +CMN_CSRCS += arm64_syscall.c # Use common heap allocation for now (may need to be customized later) CMN_CSRCS += arm64_allocateheap.c +ifeq ($(CONFIG_ARCH_HAVE_PSCI),y) +CMN_CSRCS += arm64_cpu_psci.c arm64_systemreset.c +endif + ifeq ($(CONFIG_SMP),y) CMN_CSRCS += arm64_cpuidlestack.c arm64_cpustart.c arm64_cpuindex.c CMN_CSRCS += arm64_cpupause.c diff --git a/arch/arm64/src/common/arm64_cpu_psci.c b/arch/arm64/src/common/arm64_cpu_psci.c index 25ff69746a..f8c066f465 100644 --- a/arch/arm64/src/common/arm64_cpu_psci.c +++ b/arch/arm64/src/common/arm64_cpu_psci.c @@ -150,7 +150,7 @@ uint32_t psci_version(void) return psci_data.version; } -int pcsi_cpu_off(void) +int psci_cpu_off(void) { int ret; @@ -164,7 +164,7 @@ int pcsi_cpu_off(void) return psci_to_dev_err(ret); } -int pcsi_cpu_reset(void) +int psci_cpu_reset(void) { int ret; @@ -178,7 +178,7 @@ int pcsi_cpu_reset(void) return psci_to_dev_err(ret); } -int pcsi_cpu_on(unsigned long cpuid, uintptr_t entry_point) +int psci_cpu_on(unsigned long cpuid, uintptr_t entry_point) { int ret; diff --git a/arch/arm64/src/common/arm64_cpu_psci.h b/arch/arm64/src/common/arm64_cpu_psci.h index eeb3801bd5..66e6e7445e 100644 --- a/arch/arm64/src/common/arm64_cpu_psci.h +++ b/arch/arm64/src/common/arm64_cpu_psci.h @@ -98,8 +98,8 @@ struct psci_interface
[GitHub] [nuttx] xiaoxiang781216 merged pull request #8665: arm64: ARMv8-r(Cortex-R82) support
xiaoxiang781216 merged PR #8665: URL: https://github.com/apache/nuttx/pull/8665 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[nuttx] 04/04: arch: cxd56xx: Fix emmc pin control on initialization error
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git commit b576a26d51cc5cf0c6af9a3c73e342f1d8254254 Author: SPRESENSE <41312067+sprese...@users.noreply.github.com> AuthorDate: Tue Feb 14 19:22:09 2023 +0900 arch: cxd56xx: Fix emmc pin control on initialization error Fix emmc pin control on initialization error. --- arch/arm/src/cxd56xx/cxd56_emmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/src/cxd56xx/cxd56_emmc.c b/arch/arm/src/cxd56xx/cxd56_emmc.c index 8cf697a15b..abea9af0ec 100644 --- a/arch/arm/src/cxd56xx/cxd56_emmc.c +++ b/arch/arm/src/cxd56xx/cxd56_emmc.c @@ -673,7 +673,7 @@ static int emmc_hwinitialize(void) errout: up_disable_irq(CXD56_IRQ_EMMC); - emmc_pincontrol(true); + emmc_pincontrol(false); cxd56_emmc_clock_disable(); return ret;
[nuttx] 01/04: arch: cxd56xx: Fix eMMC uninitialize function
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git commit 700610e625f2bba3a322057fb099da3559042818 Author: SPRESENSE <41312067+sprese...@users.noreply.github.com> AuthorDate: Tue Nov 22 11:55:56 2022 +0900 arch: cxd56xx: Fix eMMC uninitialize function - Fix prototype function with prefix of cxd56. - Add logic to unregister blockdriver. - Minor fix nxstyle. --- arch/arm/src/cxd56xx/cxd56_emmc.c | 24 arch/arm/src/cxd56xx/cxd56_emmc.h | 2 +- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/arch/arm/src/cxd56xx/cxd56_emmc.c b/arch/arm/src/cxd56xx/cxd56_emmc.c index 4d56aa040f..8cf697a15b 100644 --- a/arch/arm/src/cxd56xx/cxd56_emmc.c +++ b/arch/arm/src/cxd56xx/cxd56_emmc.c @@ -932,6 +932,10 @@ static int cxd56_emmc_geometry(struct inode *inode, return OK; } +/ + * Public Functions + / + int cxd56_emmcinitialize(void) { struct cxd56_emmc_state_s *priv = _emmcdev; @@ -967,21 +971,25 @@ int cxd56_emmcinitialize(void) } ret = register_blockdriver("/dev/emmc0", _bops, 0, priv); - if (ret) + if (ret < 0) { ferr("register_blockdriver failed: %d\n", -ret); - return ret; } - return OK; + return ret; } -/ - * Public Functions - / - -int emmc_uninitialize(void) +int cxd56_emmcuninitialize(void) { + int ret; + + ret = unregister_blockdriver("/dev/emmc0"); + if (ret < 0) +{ + ferr("unregister_blockdriver failed: %d\n", -ret); + return ret; +} + /* Send power off command */ emmc_switchcmd(EXTCSD_PON, EXTCSD_PON_POWERED_OFF_LONG); diff --git a/arch/arm/src/cxd56xx/cxd56_emmc.h b/arch/arm/src/cxd56xx/cxd56_emmc.h index 91f3211e43..5dcd35cee2 100644 --- a/arch/arm/src/cxd56xx/cxd56_emmc.h +++ b/arch/arm/src/cxd56xx/cxd56_emmc.h @@ -43,7 +43,7 @@ extern "C" / int cxd56_emmcinitialize(void); -void cxd56_emmcuninitialize(void); +int cxd56_emmcuninitialize(void); #undef EXTERN #ifdef __cplusplus
[nuttx] 03/04: arch: cxd56xx: Disable SubCore to use DMA
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git commit 57ca5c040127a90ff648ed517051c162d305fa49 Author: SPRESENSE <41312067+sprese...@users.noreply.github.com> AuthorDate: Tue Jan 24 12:33:56 2023 +0900 arch: cxd56xx: Disable SubCore to use DMA Disable SubCore to use SPI transfer with DMA because it may be used by MainCore. --- arch/arm/src/cxd56xx/cxd56_dmac.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/src/cxd56xx/cxd56_dmac.c b/arch/arm/src/cxd56xx/cxd56_dmac.c index f0a0649976..c52e495e40 100644 --- a/arch/arm/src/cxd56xx/cxd56_dmac.c +++ b/arch/arm/src/cxd56xx/cxd56_dmac.c @@ -731,7 +731,9 @@ void weak_function arm_dma_initialize(void) for (i = 0; i < NCHANNELS; i++) { g_dmach[i].chan = i; +#ifndef CONFIG_CXD56_SUBCORE up_enable_irq(irq_map[i]); +#endif } }
[nuttx] 02/04: arch: cxd56xx: Fix a warning in cxd56_serial.c
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git commit 134424da18f14bdbb6e7482c56e825abe666100f Author: SPRESENSE <41312067+sprese...@users.noreply.github.com> AuthorDate: Mon Nov 28 21:59:05 2022 +0900 arch: cxd56xx: Fix a warning in cxd56_serial.c Fix a warning by -Wunused-function when CONFIG_UART2_SERIAL_CONSOLE=y. --- arch/arm/src/cxd56xx/cxd56_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/src/cxd56xx/cxd56_serial.c b/arch/arm/src/cxd56xx/cxd56_serial.c index 3d0a917733..d96a15d7bf 100644 --- a/arch/arm/src/cxd56xx/cxd56_serial.c +++ b/arch/arm/src/cxd56xx/cxd56_serial.c @@ -336,7 +336,7 @@ static inline void up_enablebreaks(struct up_dev_s *priv, bool enable) * Name: cxd56_serial2_pm_event / -#ifdef CONFIG_CXD56_UART2 +#if defined(CONFIG_CXD56_UART2) && !defined(CONFIG_UART2_SERIAL_CONSOLE) static int cxd56_serial2_pm_event(uint8_t id) { struct up_dev_s *priv = (struct up_dev_s *)_uart2priv;
[nuttx] branch master updated (d71562c794 -> b576a26d51)
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git from d71562c794 tools/cxd56: Fix nxstyle new 700610e625 arch: cxd56xx: Fix eMMC uninitialize function new 134424da18 arch: cxd56xx: Fix a warning in cxd56_serial.c new 57ca5c0401 arch: cxd56xx: Disable SubCore to use DMA new b576a26d51 arch: cxd56xx: Fix emmc pin control on initialization error The 4 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: arch/arm/src/cxd56xx/cxd56_dmac.c | 2 ++ arch/arm/src/cxd56xx/cxd56_emmc.c | 26 +- arch/arm/src/cxd56xx/cxd56_emmc.h | 2 +- arch/arm/src/cxd56xx/cxd56_serial.c | 2 +- 4 files changed, 21 insertions(+), 11 deletions(-)
[GitHub] [nuttx] xiaoxiang781216 merged pull request #8676: arch: cxd56xx: Update miscellaneous cxd56xx drivers
xiaoxiang781216 merged PR #8676: URL: https://github.com/apache/nuttx/pull/8676 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[nuttx] branch master updated (d643fb8511 -> d71562c794)
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git from d643fb8511 arch: cxd56xx: Fix gnss poll when an event has already occurred add fc1c8a4d74 tools/cxd56: Fix typo in mkspk tool add d71562c794 tools/cxd56: Fix nxstyle No new revisions were added by this update. Summary of changes: tools/cxd56/mkspk.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-)
[GitHub] [nuttx] xiaoxiang781216 merged pull request #8674: tools/cxd56: Fix typo in mkspk tool
xiaoxiang781216 merged PR #8674: URL: https://github.com/apache/nuttx/pull/8674 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[nuttx] branch master updated (1877be8ce9 -> d643fb8511)
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git from 1877be8ce9 arch: cxd56xx: Fix a freezing issue caused by power control add d643fb8511 arch: cxd56xx: Fix gnss poll when an event has already occurred No new revisions were added by this update. Summary of changes: arch/arm/src/cxd56xx/cxd56_gnss.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-)
[GitHub] [nuttx] xiaoxiang781216 merged pull request #8677: arch: cxd56xx: Fix gnss poll when an event has already occurred
xiaoxiang781216 merged PR #8677: URL: https://github.com/apache/nuttx/pull/8677 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[nuttx] branch master updated (b96035885a -> 1877be8ce9)
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git from b96035885a stdio: Implement simple buffered out stream for vdprintf add 1877be8ce9 arch: cxd56xx: Fix a freezing issue caused by power control No new revisions were added by this update. Summary of changes: arch/arm/src/cxd56xx/cxd56_clock.c | 193 - 1 file changed, 168 insertions(+), 25 deletions(-)
[GitHub] [nuttx] xiaoxiang781216 merged pull request #8678: arch: cxd56xx: Fix a freezing issue caused by power control
xiaoxiang781216 merged PR #8678: URL: https://github.com/apache/nuttx/pull/8678 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[nuttx] branch master updated: stdio: Implement simple buffered out stream for vdprintf
This is an automated email from the ASF dual-hosted git repository. masayuki pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git The following commit(s) were added to refs/heads/master by this push: new b96035885a stdio: Implement simple buffered out stream for vdprintf b96035885a is described below commit b96035885a294bbfbfdccac45b1b8bdd7e58e834 Author: Huang Qi AuthorDate: Mon Feb 27 18:32:38 2023 +0800 stdio: Implement simple buffered out stream for vdprintf Improve performance for raw fd based printf like operation. Signed-off-by: Huang Qi --- include/nuttx/streams.h | 28 libs/libc/stdio/lib_vdprintf.c | 7 +- libs/libc/stream/Kconfig | 4 ++ libs/libc/stream/Make.defs | 2 +- libs/libc/stream/lib_bufferedoutstream.c | 120 +++ 5 files changed, 159 insertions(+), 2 deletions(-) diff --git a/include/nuttx/streams.h b/include/nuttx/streams.h index c49f6f0718..6ba76492b9 100644 --- a/include/nuttx/streams.h +++ b/include/nuttx/streams.h @@ -217,6 +217,14 @@ struct lib_rawsostream_s intfd; }; +struct lib_bufferedoutstream_s +{ + struct lib_outstream_s public; + FAR struct lib_outstream_s *backend; + int pending; + charbuffer[CONFIG_STREAM_OUT_BUFFER_SIZE]; +}; + /* This is a special stream that does buffered character I/O. NOTE that is * CONFIG_SYSLOG_BUFFER is not defined, it is the same as struct * lib_outstream_s @@ -372,6 +380,26 @@ void lib_rawoutstream(FAR struct lib_rawoutstream_s *outstream, int fd); void lib_rawsistream(FAR struct lib_rawsistream_s *instream, int fd); void lib_rawsostream(FAR struct lib_rawsostream_s *outstream, int fd); +/ + * Name: lib_bufferedoutstream + * + * Description: + * Wrap a raw output stream to a buffered output stream. + * + * Input Parameters: + * outstream - User allocated, uninitialized instance of struct + * lib_bufferedoutstream_s to be initialized. + * backend - User allocated, initialized instance of struct + * lib_outstream_s to be buffered. + * + * Returned Value: + * None (User allocated instance initialized). + * + / + +void lib_bufferedoutstream(FAR struct lib_bufferedoutstream_s *outstream, + FAR struct lib_outstream_s *backend); + / * Name: lib_lowoutstream * diff --git a/libs/libc/stdio/lib_vdprintf.c b/libs/libc/stdio/lib_vdprintf.c index 90a4b2367c..27d94df583 100644 --- a/libs/libc/stdio/lib_vdprintf.c +++ b/libs/libc/stdio/lib_vdprintf.c @@ -50,10 +50,15 @@ int vdprintf(int fd, FAR const IPTR char *fmt, va_list ap) { + int ret; struct lib_rawoutstream_s rawoutstream; + struct lib_bufferedoutstream_s outstream; /* Wrap the fd in a stream object and let lib_vsprintf do the work. */ lib_rawoutstream(, fd); - return lib_vsprintf(, fmt, ap); + lib_bufferedoutstream(, ); + ret = lib_vsprintf(, fmt, ap); + lib_stream_flush(); + return ret; } diff --git a/libs/libc/stream/Kconfig b/libs/libc/stream/Kconfig index 90554aa661..77cb42e3da 100644 --- a/libs/libc/stream/Kconfig +++ b/libs/libc/stream/Kconfig @@ -21,4 +21,8 @@ config STREAM_LZF_BLOG endif +config STREAM_OUT_BUFFER_SIZE + int "Output stream buffer size" + default 64 + endmenu # Locale Support diff --git a/libs/libc/stream/Make.defs b/libs/libc/stream/Make.defs index 868ff05576..0b6757c9bd 100644 --- a/libs/libc/stream/Make.defs +++ b/libs/libc/stream/Make.defs @@ -26,7 +26,7 @@ CSRCS += lib_memsostream.c lib_lowoutstream.c lib_rawinstream.c CSRCS += lib_rawoutstream.c lib_rawsistream.c lib_rawsostream.c CSRCS += lib_zeroinstream.c lib_nullinstream.c lib_nulloutstream.c CSRCS += lib_mtdoutstream.c lib_libnoflush.c lib_libsnoflush.c -CSRCS += lib_syslogstream.c +CSRCS += lib_syslogstream.c lib_bufferedoutstream.c # The remaining sources files depend upon C streams diff --git a/libs/libc/stream/lib_bufferedoutstream.c b/libs/libc/stream/lib_bufferedoutstream.c new file mode 100644 index 00..4018b0cebb --- /dev/null +++ b/libs/libc/stream/lib_bufferedoutstream.c @@ -0,0 +1,120 @@ +/ + * libs/libc/stream/lib_bufferedoutstream.c + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License.
[GitHub] [nuttx] masayuki2009 merged pull request #8641: stdio: Implement simple buffered out stream for vdprintf
masayuki2009 merged PR #8641: URL: https://github.com/apache/nuttx/pull/8641 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] Gary-Hobson commented on a diff in pull request #8619: Implement the trace function and add tracepoints for the startup process
Gary-Hobson commented on code in PR #8619: URL: https://github.com/apache/nuttx/pull/8619#discussion_r1121092170 ## include/nuttx/trace.h: ## @@ -1,4 +1,3 @@ - Review Comment: done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] Gary-Hobson commented on a diff in pull request #8619: Implement the trace function and add tracepoints for the startup process
Gary-Hobson commented on code in PR #8619: URL: https://github.com/apache/nuttx/pull/8619#discussion_r1121091841 ## include/nuttx/sched_note.h: ## @@ -205,6 +251,27 @@ enum note_type_e #endif }; +enum note_tag_e +{ + NOTE_TAG_ALWAYS = 0, + NOTE_TAG_ARCH, + NOTE_TAG_APP, + NOTE_TAG_AUDIO, + NOTE_TAG_BOARD, + NOTE_TAG_CRYPTO, + NOTE_TAG_DRIVERS, + NOTE_TAG_FS, + NOTE_TAG_MM, + NOTE_TAG_NETWORK, Review Comment: done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] qinwei2004 commented on a diff in pull request #8665: arm64: ARMv8-r(Cortex-R82) support
qinwei2004 commented on code in PR #8665: URL: https://github.com/apache/nuttx/pull/8665#discussion_r1121015641 ## arch/arm64/src/common/arm64_gicv3.c: ## @@ -170,7 +196,7 @@ void arm64_gic_irq_enable(unsigned int intid) if (GIC_IS_SPI(intid)) { putreg64(MPIDR_TO_CORE(GET_MPIDR()), - IROUTER(GET_DIST_BASE(intid), intid)); + IROUTER(GET_DIST_BASE(intid), intid)); Review Comment: commit 0fd1de1ceaff0af1495ca3a9370dc102d146afc1 seem change this,please check -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] SPRESENSE opened a new pull request, #8678: arch: cxd56xx: Fix a freezing issue caused by power control
SPRESENSE opened a new pull request, #8678: URL: https://github.com/apache/nuttx/pull/8678 ## Summary - 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 ## Impact Only spresense board. ## Testing Pass: spresense build & test -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] SPRESENSE opened a new pull request, #8677: arch: cxd56xx: Fix gnss poll when an event has already occurred
SPRESENSE opened a new pull request, #8677: URL: https://github.com/apache/nuttx/pull/8677 ## Summary Fix an issue that poll with timeout=0 cannot detect events that have already occurred. ## Impact Only spresense board. ## Testing Spresense GPS works well. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] SPRESENSE opened a new pull request, #8676: arch: cxd56xx: Update miscellaneous cxd56xx drivers
SPRESENSE opened a new pull request, #8676: URL: https://github.com/apache/nuttx/pull/8676 ## Summary * Fix eMMC uninitialize function * Fix a warning in cxd56_serial.c * Disable SubCore to use DMA * Fix emmc pin control on initialization error ## Impact Only spresense board ## Testing Build all spresense defconfigs. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] SPRESENSE opened a new pull request, #8675: tools/Unix.mk: Add VERSION_ARG to argument of version.sh
SPRESENSE opened a new pull request, #8675: URL: https://github.com/apache/nuttx/pull/8675 ## Summary Allow the version argument to be specified externally into the .version that is forced to be created. There is no impact as long as it is used in the same way as before. ## Impact None ## Testing CI: build -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] SPRESENSE opened a new pull request, #8674: tools/cxd56: Fix typo in mkspk tool
SPRESENSE opened a new pull request, #8674: URL: https://github.com/apache/nuttx/pull/8674 ## Summary Fix typo in mkspk tool for cxd56. ## Impact Only spresense board. ## Testing Build all spresense defconfigs. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[nuttx-website] branch asf-site updated: Publishing web: b50f5ca4ed22743959c1160aab5dcc9ae18b3eff docs: e4d219ca0632cfa79a9bdbb970d4596a0ca7e6a0
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/nuttx-website.git The following commit(s) were added to refs/heads/asf-site by this push: new 79c725f7 Publishing web: b50f5ca4ed22743959c1160aab5dcc9ae18b3eff docs: e4d219ca0632cfa79a9bdbb970d4596a0ca7e6a0 79c725f7 is described below commit 79c725f7766e4b8e14af8ee8872e18ef145e5f29 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Wed Mar 1 00:14:38 2023 + Publishing web: b50f5ca4ed22743959c1160aab5dcc9ae18b3eff docs: e4d219ca0632cfa79a9bdbb970d4596a0ca7e6a0 --- content/docs/10.0.0/index.html | 2 +- content/docs/10.0.0/searchindex.js | 2 +- content/docs/10.0.1/index.html | 2 +- content/docs/10.0.1/searchindex.js | 2 +- content/docs/10.1.0/index.html | 2 +- content/docs/10.1.0/searchindex.js | 2 +- content/docs/10.2.0/index.html | 2 +- content/docs/10.2.0/searchindex.js | 2 +- content/docs/10.3.0/index.html | 2 +- content/docs/10.3.0/searchindex.js | 2 +- content/docs/11.0.0/index.html | 2 +- content/docs/11.0.0/searchindex.js | 2 +- content/docs/12.0.0/index.html | 2 +- content/docs/12.0.0/searchindex.js | 2 +- content/docs/latest/index.html | 2 +- content/docs/latest/searchindex.js | 2 +- content/feed.xml | 4 ++-- 17 files changed, 18 insertions(+), 18 deletions(-) diff --git a/content/docs/10.0.0/index.html b/content/docs/10.0.0/index.html index ee0af9cc..9dd44519 100644 --- a/content/docs/10.0.0/index.html +++ b/content/docs/10.0.0/index.html @@ -133,7 +133,7 @@ by following these NuttX Documentation NuttX is a real-time operating system (RTOS) with an emphasis on standards compliance and small footprint. Scalable from 8-bit to 32-bit microcontroller environments, the primary governing standards in NuttX are Posix and ANSI standards. Additional standard APIs from Unix and other common RTOS’s (such as VxWorks) are adopted for functionality not available under these standards, or for functionality that is not appropriate for deeply-embedded environments (such as fork()). -Last Updated: 28 February 23 at 00:10 +Last Updated: 01 March 23 at 00:12 Table of Contents diff --git a/content/docs/10.0.0/searchindex.js b/content/docs/10.0.0/searchindex.js index 206ade9f..4d215634 100644 --- a/content/docs/10.0.0/searchindex.js +++ b/content/docs/10.0.0/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["applications/index","boards/index","components/binfmt","components/drivers/block/index","components/drivers/character/analog","components/drivers/character/can","components/drivers/character/index","components/drivers/character/keypad","components/drivers/character/pwm","components/drivers/character/quadrature","components/drivers/character/rtc","components/drivers/character/serial","components/drivers/character/timer","components/drivers/character/touchscreen [...] \ No newline at end of file +Search.setIndex({docnames:["applications/index","boards/index","components/binfmt","components/drivers/block/index","components/drivers/character/analog","components/drivers/character/can","components/drivers/character/index","components/drivers/character/keypad","components/drivers/character/pwm","components/drivers/character/quadrature","components/drivers/character/rtc","components/drivers/character/serial","components/drivers/character/timer","components/drivers/character/touchscreen [...] \ No newline at end of file diff --git a/content/docs/10.0.1/index.html b/content/docs/10.0.1/index.html index a611eb9e..2ef3b87a 100644 --- a/content/docs/10.0.1/index.html +++ b/content/docs/10.0.1/index.html @@ -147,7 +147,7 @@ by following these NuttX Documentation NuttX is a real-time operating system (RTOS) with an emphasis on standards compliance and small footprint. Scalable from 8-bit to 32-bit microcontroller environments, the primary governing standards in NuttX are Posix and ANSI standards. Additional standard APIs from Unix and other common RTOS’s (such as VxWorks) are adopted for functionality not available under these standards, or for functionality that is not appropriate for deeply-embedded environments (such as fork()). -Last Updated: 28 February 23 at 00:10 +Last Updated: 01 March 23 at 00:12 Table of Contents diff --git a/content/docs/10.0.1/searchindex.js b/content/docs/10.0.1/searchindex.js index 206ade9f..4d215634 100644 --- a/content/docs/10.0.1/searchindex.js +++ b/content/docs/10.0.1/searchindex.js @@ -1 +1 @@
[GitHub] [nuttx] pkarashchenko merged pull request #8673: risc-v/esp32c3: Remove erroneous interrupt disable
pkarashchenko merged PR #8673: URL: https://github.com/apache/nuttx/pull/8673 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[nuttx] branch master updated (f47cb67da6 -> e4d219ca06)
This is an automated email from the ASF dual-hosted git repository. pkarashchenko pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git from f47cb67da6 xtensa/common: Fix Xtensa interrupt stack context restore issue add e4d219ca06 risc-v/esp32c3: Remove erroneous interrupt disable No new revisions were added by this update. Summary of changes: arch/risc-v/src/esp32c3/esp32c3_tim.c | 4 1 file changed, 4 deletions(-)
[nuttx] branch master updated (49a5f02fb1 -> f47cb67da6)
This is an automated email from the ASF dual-hosted git repository. gustavonihei pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git from 49a5f02fb1 esp32c3: Fix missing irq timer add f47cb67da6 xtensa/common: Fix Xtensa interrupt stack context restore issue No new revisions were added by this update. Summary of changes: arch/xtensa/src/common/xtensa_int_handlers.S | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-)
[GitHub] [nuttx] gustavonihei merged pull request #8672: xtensa/common: Fix Xtensa interrupt stack context restore issue
gustavonihei merged PR #8672: URL: https://github.com/apache/nuttx/pull/8672 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] anchao commented on pull request #8129: net/tcp: correct behavior of SO_LINGER
anchao commented on PR #8129: URL: https://github.com/apache/nuttx/pull/8129#issuecomment-1448714017 If SO_LINGER is enabled, tcp_close will not release the conn instance immediately, all pending sent data will wait for tcp_timer() to be sent before releasing it in tcp_close_work -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] gustavonihei opened a new pull request, #8673: risc-v/esp32c3: Remove erroneous interrupt disable
gustavonihei opened a new pull request, #8673: URL: https://github.com/apache/nuttx/pull/8673 ## Summary This PR intends to fix a crash occurring on the ESP32-C3 Timer driver due to a misplaced call for disabling the interrupts. ## Impact Fix for broken driver. ## Testing Internal CI testing on `esp32c3-devkit`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] acassis opened a new pull request, #8672: xtensa/common: Fix Xtensa interrupt stack context restore issue
acassis opened a new pull request, #8672: URL: https://github.com/apache/nuttx/pull/8672 ## Summary Fix Xtensa interrupt stack context restore issue ## Impact Avoid ESP32 sporadic crashing ## Testing esp32-devkitc -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8619: Implement the trace function and add tracepoints for the startup process
xiaoxiang781216 commented on code in PR #8619: URL: https://github.com/apache/nuttx/pull/8619#discussion_r1120490447 ## include/nuttx/sched_note.h: ## @@ -205,6 +251,27 @@ enum note_type_e #endif }; +enum note_tag_e +{ + NOTE_TAG_ALWAYS = 0, + NOTE_TAG_ARCH, + NOTE_TAG_APP, + NOTE_TAG_AUDIO, + NOTE_TAG_BOARD, + NOTE_TAG_CRYPTO, + NOTE_TAG_DRIVERS, + NOTE_TAG_FS, + NOTE_TAG_MM, + NOTE_TAG_NETWORK, Review Comment: NOTE_TAG_NET ## include/nuttx/sched_note.h: ## @@ -439,6 +506,13 @@ struct note_filter_irq_s }; #endif +#ifdef CONFIG_SCHED_INSTRUMENTATION_DUMP +struct note_filter_dump_s Review Comment: tag ## include/nuttx/sched_note.h: ## @@ -673,16 +747,16 @@ void sched_note_filter_irq(FAR struct note_filter_irq_s *oldf, # define sched_note_syscall_enter(n,a,...) # define sched_note_syscall_leave(n,r) # define sched_note_irqhandler(i,h,e) -# define sched_note_string(ip,b) -# define sched_note_dump(ip,e,b,l) -# define sched_note_vprintf(ip,f,v) -# define sched_note_vbprintf(ip,e,f,v) -# define sched_note_printf(ip,f,...) -# define sched_note_bprintf(ip,e,f,...) +# define sched_note_string(t,ip,b) +# define sched_note_dump(t,ip,e,b,l) +# define sched_note_vprintf(t,ip,f,v) +# define sched_note_vbprintf(t,ip,e,f,v) +# define sched_note_printf(t,ip,f,...) +# define sched_note_bprintf(t,ip,e,f,...) #endif /* CONFIG_SCHED_INSTRUMENTATION */ -#define sched_note_begin(ip) sched_note_string(ip, "B") -#define sched_note_end(ip) sched_note_string(ip, "E") +#define sched_note_begin(tag, ip) sched_note_string(NOTE_TAG_ALWAYS, ip, "B") +#define sched_note_end(tag, ip) sched_note_string(NOTE_TAG_ALWAYS, ip, "E") Review Comment: NOTE_TAG_ALWAYS->tag ## include/nuttx/sched_note.h: ## @@ -439,6 +506,13 @@ struct note_filter_irq_s }; #endif +#ifdef CONFIG_SCHED_INSTRUMENTATION_DUMP +struct note_filter_dump_s +{ + uint8_t dump_mask[(NOTE_TAG_MAX + 7) / 8]; Review Comment: tag_mask ## drivers/note/note_driver.c: ## @@ -99,6 +99,9 @@ struct note_filter_s { struct note_filter_mode_s mode; +#ifdef CONFIG_SCHED_INSTRUMENTATION_DUMP + struct note_filter_dump_s dump_mask; Review Comment: dump_ to tag_ ## include/nuttx/sched_note.h: ## @@ -114,25 +127,50 @@ # define SCHED_NOTE_IP \ ({SCHED_NOTE_LABEL: (uintptr_t)&_NOTE_LABEL;}) # define SCHED_NOTE_STRING(buf) \ - sched_note_string(SCHED_NOTE_IP, buf) + sched_note_string(NOTE_TAG_ALWAYS, SCHED_NOTE_IP, buf) # define SCHED_NOTE_DUMP(event, buf, len) \ - sched_note_dump(SCHED_NOTE_IP, event, buf, len) + sched_note_dump(NOTE_TAG_ALWAYS, SCHED_NOTE_IP, event, buf, len) # define SCHED_NOTE_VPRINTF(fmt, va) \ - sched_note_vprintf(SCHED_NOTE_IP, fmt, va) + sched_note_vprintf(NOTE_TAG_ALWAYS, SCHED_NOTE_IP, fmt, va) # define SCHED_NOTE_VBPRINTF(event, fmt, va) \ - sched_note_vbprintf(SCHED_NOTE_IP, event, fmt, va) + sched_note_vbprintf(NOTE_TAG_ALWAYS, SCHED_NOTE_IP, \ + event, fmt, va) # define SCHED_NOTE_PRINTF(fmt, ...) \ - sched_note_printf(SCHED_NOTE_IP, fmt, ##__VA_ARGS__) + sched_note_printf(NOTE_TAG_ALWAYS, SCHED_NOTE_IP, \ +fmt, ##__VA_ARGS__) # define SCHED_NOTE_BPRINTF(event, fmt, ...) \ - sched_note_bprintf(SCHED_NOTE_IP, event, fmt, ##__VA_ARGS__) + sched_note_bprintf(NOTE_TAG_ALWAYS, SCHED_NOTE_IP, \ + event, fmt, ##__VA_ARGS__) # define SCHED_NOTE_BEGINEX(str) \ - sched_note_printf(SCHED_NOTE_IP, "B|%d|%s", gettid(), str) + sched_note_printf(NOTE_TAG_ALWAYS, SCHED_NOTE_IP, \ +"B|%d|%s", gettid(), str) # define SCHED_NOTE_ENDEX(str) \ - sched_note_printf(SCHED_NOTE_IP, "E|%d|%s", gettid(), str) + sched_note_printf(NOTE_TAG_ALWAYS, SCHED_NOTE_IP, \ +"E|%d|%s", gettid(), str) # define SCHED_NOTE_BEGIN() \ - sched_note_begin(SCHED_NOTE_IP) -# define SCHED_NOTE_END() \ - sched_note_end(SCHED_NOTE_IP) + sched_note_begin(NOTE_TAG_ALWAYS, SCHED_NOTE_IP) +#define SCHED_NOTE_END() \ + sched_note_end(NOTE_TAG_ALWAYS, SCHED_NOTE_IP) +# define SCHED_NOTE_STRING_WITH_TAG(buf) \ Review Comment: remove WITH_TAG, let's always add tag as the first argument ## drivers/note/note_driver.c: ## @@ -1870,6 +1874,52 @@ void sched_note_filter_irq(FAR struct note_filter_irq_s *oldf, #endif /* CONFIG_SCHED_INSTRUMENTATION_FILTER */ +/ + * Name: sched_note_filter_dump + * + * Description: + * Set and get syscall filter setting + * (Same as NOTECTL_GETDUMPFILTER / NOTECTL_SETDUMPFILTER ioctls) + * + * Input Parameters: + * oldf - A writable pointer to struct
[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8641: stdio: Implement simple buffered out stream for vdprintf
xiaoxiang781216 commented on code in PR #8641: URL: https://github.com/apache/nuttx/pull/8641#discussion_r1120480425 ## libs/libc/stream/lib_bufferedoutstream.c: ## @@ -0,0 +1,120 @@ +/ + * libs/libc/stream/lib_bufferedoutstream.c + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + / + +/ + * Included Files + / + +#include + +#include +#include +#include + +#include + +#include "libc.h" + +/ + * Private Functions + / + +/ + * Name: bufferedoutstream_flush + / + +static int bufferedoutstream_flush(FAR struct lib_outstream_s *this) +{ + FAR struct lib_bufferedoutstream_s *rthis = +(FAR struct lib_bufferedoutstream_s *)this; + int ret = OK; + + ret = lib_stream_puts(rthis->backend, rthis->buffer, +rthis->pending); + + if (ret == OK) Review Comment: ```suggestion if (ret >= 0) ``` ## libs/libc/stream/lib_bufferedoutstream.c: ## @@ -0,0 +1,120 @@ +/ + * libs/libc/stream/lib_bufferedoutstream.c + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + / + +/ + * Included Files + / + +#include + +#include +#include +#include + +#include + +#include "libc.h" + +/ + * Private Functions + / + +/ + * Name: bufferedoutstream_flush + / + +static int bufferedoutstream_flush(FAR struct lib_outstream_s *this) +{ + FAR struct lib_bufferedoutstream_s *rthis = +(FAR struct lib_bufferedoutstream_s *)this; + int ret = OK; + + ret = lib_stream_puts(rthis->backend, rthis->buffer, +rthis->pending); + + if (ret == OK) +{ + rthis->pending = 0; +} + + return ret; +} + +/ + * Name: bufferedoutstream_puts + / + +static int bufferedoutstream_puts(FAR struct lib_outstream_s *this, + FAR const void *buf, int len) +{ + FAR struct lib_bufferedoutstream_s *rthis = +(FAR struct lib_bufferedoutstream_s *)this; + int ret = len; + + if (rthis->pending + len <= CONFIG_STREAM_OUT_BUFFER_SIZE) +{ + /* If buffer is enough to save incoming data, cache it */ + + memcpy(rthis->buffer + rthis->pending, buf, len); +
[nuttx] branch master updated (5e625b9cdb -> 49a5f02fb1)
This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git from 5e625b9cdb Performance optimizations in connection allocations. add 49a5f02fb1 esp32c3: Fix missing irq timer No new revisions were added by this update. Summary of changes: arch/risc-v/src/esp32c3/esp32c3_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[GitHub] [nuttx] xiaoxiang781216 merged pull request #8671: esp32c3: Fix missing irq timer
xiaoxiang781216 merged PR #8671: URL: https://github.com/apache/nuttx/pull/8671 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8665: arm64: ARMv8-r(Cortex-R82) support
xiaoxiang781216 commented on code in PR #8665: URL: https://github.com/apache/nuttx/pull/8665#discussion_r1120248244 ## arch/arm64/src/common/arm64_gicv3.c: ## @@ -170,7 +196,7 @@ void arm64_gic_irq_enable(unsigned int intid) if (GIC_IS_SPI(intid)) { putreg64(MPIDR_TO_CORE(GET_MPIDR()), - IROUTER(GET_DIST_BASE(intid), intid)); + IROUTER(GET_DIST_BASE(intid), intid)); Review Comment: revert? ## arch/arm64/src/common/arm64_head.S: ## @@ -174,8 +196,14 @@ primary_core: blup_earlyserialinit #endif -cpu_boot: +#ifdef CONFIG_SMP +PRINT(primary_boot, "- Ready to Boot Primary CPU\r\n") +#else PRINT(cpu_boot, "- Ready to Boot CPU\r\n") Review Comment: remove, let's allways: print Ready to Boot Primary CPU -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] chirping78 commented on issue #8616: gdb function info_nxthreads show the PC incorrectly for cortex-m
chirping78 commented on issue #8616: URL: https://github.com/apache/nuttx/issues/8616#issuecomment-1448392878 Take some time look into this today. It seem relates to how the gdb script calculate whether the core has FPU. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] acassis opened a new pull request, #8671: esp32c3: Fix missing irq timer
acassis opened a new pull request, #8671: URL: https://github.com/apache/nuttx/pull/8671 ## Summary Fix missing irq timer ## Impact Only ESP32C3 ## Testing ESP32C3-Devkit -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] Gary-Hobson commented on a diff in pull request #8619: Implement the trace function and add tracepoints for the startup process
Gary-Hobson commented on code in PR #8619: URL: https://github.com/apache/nuttx/pull/8619#discussion_r1120086656 ## binfmt/binfmt_initialize.c: ## @@ -28,6 +28,7 @@ #include #include #include +#include Review Comment: I didn't find a suitable header file to put it in, and it's not a good idea to introduce too many dependencies in the header file ## drivers/note/note_driver.c: ## @@ -223,12 +223,14 @@ static void note_common(FAR struct tcb_s *tcb, FAR struct note_common_s *note, uint8_t length, uint8_t type) { -#ifdef CONFIG_SCHED_INSTRUMENTATION_HIRES struct timespec ts; - +#ifdef CONFIG_SCHED_INSTRUMENTATION_HIRES clock_systime_timespec(); #else clock_t systime = clock_systime_ticks(); +# ifdef CONFIG_SCHED_INSTRUMENTATION_PERFCOUNT + uint32_t count = up_perf_gettime(); Review Comment: done ## Kconfig: ## @@ -2005,6 +2005,90 @@ config FRAME_POINTER endmenu # Debug Options +menuconfig TRACE + bool "Enable tracepoints" + default n + depends on SCHED_INSTRUMENTATION_DUMP && DRIVERS_NOTE + ---help--- + If this option is enabled, tracepoints at critical code in + the kernel will be enabled. + +if TRACE + +config TRACE_BINFMT + bool "Enable tracepoints in binfmt" + default n + +config TRACE_BOARDS + bool "Enable tracepoints in boards" + default n + +config TRACE_CRYPTO + bool "Enable tracepoints in crypto" + default n + +config TRACE_DRIVERS + bool "Enable tracepoints in drivers" + default n + +config TRACE_INPUT + bool "Enable tracepoints in input" Review Comment: Done I added tags to sched_note_string/printf to support runtime filtering, but it is still configurable at compile time -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8641: stdio: Implement simple buffered out stream for vdprintf
xiaoxiang781216 commented on code in PR #8641: URL: https://github.com/apache/nuttx/pull/8641#discussion_r1120008423 ## libs/libc/stream/lib_bufferedoutstream.c: ## @@ -0,0 +1,114 @@ +/ + * libs/libc/stream/lib_bufferedoutstream.c + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + / + +/ + * Included Files + / + +#include + +#include +#include +#include + +#include + +#include "libc.h" + +/ + * Private Functions + / + +/ + * Name: bufferedoutstream_flush + / + +static int bufferedoutstream_flush(FAR struct lib_outstream_s *this) +{ + FAR struct lib_bufferedoutstream_s *rthis = +(FAR struct lib_bufferedoutstream_s *)this; + int ret = OK; + + ret = lib_stream_puts(rthis->backend, rthis->buffer, +rthis->pending); Review Comment: need update pending field -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] qinwei2004 commented on pull request #8665: arm64: ARMv8-r(Cortex-R82) support
qinwei2004 commented on PR #8665: URL: https://github.com/apache/nuttx/pull/8665#issuecomment-1448191250 > @qinwei2004 I think we should divide one commit into smaller ones. For example, PSCI related changs. MPIDR related changes, Cortex-R related changes and so on. all done, please check again and I will submit FVP change in next PR -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[nuttx] branch master updated: Performance optimizations in connection allocations.
This is an automated email from the ASF dual-hosted git repository. jerpelea pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git The following commit(s) were added to refs/heads/master by this push: new 5e625b9cdb Performance optimizations in connection allocations. 5e625b9cdb is described below commit 5e625b9cdb347dabce36e9eefa287a335877a164 Author: Fotis Panagiotopoulos AuthorDate: Tue Feb 28 12:31:21 2023 +0200 Performance optimizations in connection allocations. --- net/bluetooth/bluetooth_conn.c | 6 ++ net/can/can_conn.c | 5 + net/icmp/icmp_conn.c | 5 + net/icmpv6/icmpv6_conn.c | 6 ++ net/ieee802154/ieee802154_conn.c | 5 + net/netlink/netlink_conn.c | 5 + net/pkt/pkt_conn.c | 5 + net/udp/udp_conn.c | 5 + net/usrsock/usrsock_conn.c | 2 +- 9 files changed, 11 insertions(+), 33 deletions(-) diff --git a/net/bluetooth/bluetooth_conn.c b/net/bluetooth/bluetooth_conn.c index 9851710d9b..c0b11a5f9d 100644 --- a/net/bluetooth/bluetooth_conn.c +++ b/net/bluetooth/bluetooth_conn.c @@ -205,13 +205,10 @@ void bluetooth_conn_free(FAR struct bluetooth_conn_s *conn) bluetooth_container_free(container); } - /* Reset structure */ - - memset(conn, 0, sizeof(*conn)); - /* If this is a preallocated or a batch allocated connection store it in * the free connections list. Else free it. */ + #if CONFIG_NET_BLUETOOTH_ALLOC_CONNS == 1 if (conn < g_bluetooth_connections || conn >= (g_bluetooth_connections + CONFIG_NET_BLUETOOTH_PREALLOC_CONNS)) @@ -221,6 +218,7 @@ void bluetooth_conn_free(FAR struct bluetooth_conn_s *conn) else #endif { + memset(conn, 0, sizeof(*conn)); dq_addlast(>bc_conn.node, _free_bluetooth_connections); } diff --git a/net/can/can_conn.c b/net/can/can_conn.c index 4310bc81bb..28f1a46001 100644 --- a/net/can/can_conn.c +++ b/net/can/can_conn.c @@ -182,10 +182,6 @@ void can_free(FAR struct can_conn_s *conn) dq_rem(>sconn.node, _active_can_connections); - /* Reset structure */ - - memset(conn, 0, sizeof(*conn)); - /* If this is a preallocated or a batch allocated connection store it in * the free connections list. Else free it. */ @@ -199,6 +195,7 @@ void can_free(FAR struct can_conn_s *conn) else #endif { + memset(conn, 0, sizeof(*conn)); dq_addlast(>sconn.node, _free_can_connections); } diff --git a/net/icmp/icmp_conn.c b/net/icmp/icmp_conn.c index 2ddcc6903d..a727ce7e1e 100644 --- a/net/icmp/icmp_conn.c +++ b/net/icmp/icmp_conn.c @@ -182,10 +182,6 @@ void icmp_free(FAR struct icmp_conn_s *conn) dq_rem(>sconn.node, _active_icmp_connections); - /* Clear the connection structure */ - - memset(conn, 0, sizeof(*conn)); - /* If this is a preallocated or a batch allocated connection store it * in the free connections list. Else free it. */ @@ -199,6 +195,7 @@ void icmp_free(FAR struct icmp_conn_s *conn) else #endif { + memset(conn, 0, sizeof(*conn)); dq_addlast(>sconn.node, _free_icmp_connections); } } diff --git a/net/icmpv6/icmpv6_conn.c b/net/icmpv6/icmpv6_conn.c index 4299fb62ac..ae5007a2b3 100644 --- a/net/icmpv6/icmpv6_conn.c +++ b/net/icmpv6/icmpv6_conn.c @@ -172,13 +172,10 @@ void icmpv6_free(FAR struct icmpv6_conn_s *conn) dq_rem(>sconn.node, _active_icmpv6_connections); - /* Clear the connection structure */ - - memset(conn, 0, sizeof(*conn)); - /* If this is a preallocated or a batch allocated connection store it in * the free connections list. Else free it. */ + #if CONFIG_NET_ICMPv6_ALLOC_CONNS == 1 if (conn < g_icmpv6_connections || conn >= (g_icmpv6_connections + CONFIG_NET_ICMPv6_PREALLOC_CONNS)) @@ -188,6 +185,7 @@ void icmpv6_free(FAR struct icmpv6_conn_s *conn) else #endif { + memset(conn, 0, sizeof(*conn)); dq_addlast(>sconn.node, _free_icmpv6_connections); } diff --git a/net/ieee802154/ieee802154_conn.c b/net/ieee802154/ieee802154_conn.c index a6133a100f..b7a5e25f81 100644 --- a/net/ieee802154/ieee802154_conn.c +++ b/net/ieee802154/ieee802154_conn.c @@ -194,10 +194,6 @@ void ieee802154_conn_free(FAR struct ieee802154_conn_s *conn) ieee802154_container_free(container); } - /* Enqueue the connection into the active list */ - - memset(conn, 0, sizeof(*conn)); - /* If this is a preallocated or a batch allocated connection store it in * the free connections list. Else free it. */ @@ -211,6 +207,7 @@ void ieee802154_conn_free(FAR struct ieee802154_conn_s *conn) else #endif { + memset(conn, 0, sizeof(*conn)); dq_addlast(>sconn.node, _free_ieee802154_connections); } diff --git a/net/netlink/netlink_conn.c b/net/netlink/netlink_conn.c index 443e004b0b..c31eeaccc9 100644 --- a/net/netlink/netlink_conn.c +++
[GitHub] [nuttx] jerpelea merged pull request #8669: Performance optimizations in connection allocations.
jerpelea merged PR #8669: URL: https://github.com/apache/nuttx/pull/8669 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] masayuki2009 commented on pull request #8641: stdio: Implement simple buffered out stream for vdprintf
masayuki2009 commented on PR #8641: URL: https://github.com/apache/nuttx/pull/8641#issuecomment-1448169739 >OK, let's move the latest commit to another PR. >Emm, but last commit is just rename lib_rawsostream.c to lib_rawoutstream.c, should not causes any issue. @no1wudi Sorry, I noticed that I applied only one commit. (I should have applied two commits). Now I confirmed that the latest commit works. ``` commit bf54e23b03318882876762232f2d5dd436ed4ff2 (HEAD -> master, origin/master, origin/HEAD) Author: Huang Qi Date: Mon Feb 27 18:32:38 2023 +0800 stdio: Implement simple buffered out stream for vdprintf Improve performance for raw fd based printf like operation. Signed-off-by: Huang Qi ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] no1wudi commented on pull request #8641: stdio: Implement simple buffered out stream for vdprintf
no1wudi commented on PR #8641: URL: https://github.com/apache/nuttx/pull/8641#issuecomment-1448130567 > OK, let's move the latest commit to another PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] XiandongHu opened a new pull request, #8670: mtd: Extend isbad and markbad func for mtd_dev_s
XiandongHu opened a new pull request, #8670: URL: https://github.com/apache/nuttx/pull/8670 ## Add isbad and markbad interface in mtd_dev_s to support nand flash. ## Nand device driver must implement it. ## Test on yaffs2 filesystem. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] centurysys closed issue #8537: [RFC] Nim language support
centurysys closed issue #8537: [RFC] Nim language support URL: https://github.com/apache/nuttx/issues/8537 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] masayuki2009 commented on pull request #8641: stdio: Implement simple buffered out stream for vdprintf
masayuki2009 commented on PR #8641: URL: https://github.com/apache/nuttx/pull/8641#issuecomment-1447959277 @no1wudi Hmm, the latest commit causes the issue again. ``` commit ef7278f13fe3b567ba42a315240bc9dd87646ae7 (HEAD -> master, origin/master, origin/HEAD) Author: Huang Qi Date: Tue Feb 28 16:58:18 2023 +0800 libc/stream: Correct filename and implementations with lib_rawoutstream and lib_rawsostream Signed-off-by: Huang Qi ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] fjpanag commented on a diff in pull request #7525: Improvements in TCP connections allocation.
fjpanag commented on code in PR #7525: URL: https://github.com/apache/nuttx/pull/7525#discussion_r1119870510 ## net/ieee802154/ieee802154_conn.c: ## @@ -188,9 +198,22 @@ void ieee802154_conn_free(FAR struct ieee802154_conn_s *conn) memset(conn, 0, sizeof(*conn)); - /* Free the connection */ + /* If this is a preallocated or a batch allocated connection store it in + * the free connections list. Else free it. + */ + +#if CONFIG_NET_IEEE802154_ALLOC_CONNS == 1 + if (conn < g_ieee802154_connections || conn >= (g_ieee802154_connections + + CONFIG_NET_IEEE802154_PREALLOC_CONNS)) +{ + kmm_free(conn); +} + else +#endif +{ + dq_addlast(>sconn.node, _free_ieee802154_connections); Review Comment: @pkarashchenko see #8669. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] fjpanag opened a new pull request, #8669: Performance optimizations in connection allocations.
fjpanag opened a new pull request, #8669: URL: https://github.com/apache/nuttx/pull/8669 ## Summary Implements some performance optimizations, as noted [here](https://github.com/apache/nuttx/pull/7525#discussion_r1113605986). ## Impact Better performance when dynamic connections allocation is enabled. ## Testing Build test only. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] fjpanag commented on a diff in pull request #7525: Improvements in TCP connections allocation.
fjpanag commented on code in PR #7525: URL: https://github.com/apache/nuttx/pull/7525#discussion_r1119846160 ## net/tcp/tcp_conn.c: ## @@ -876,10 +889,26 @@ void tcp_free(FAR struct tcp_conn_s *conn) } #endif - /* Mark the connection available and put it into the free list */ + /* Mark the connection available. */ conn->tcpstateflags = TCP_CLOSED; - dq_addlast(>sconn.node, _free_tcp_connections); + + /* If this is a preallocated or a batch allocated connection store it in + * the free connections list. Else free it. + */ + +#if CONFIG_NET_TCP_ALLOC_CONNS == 1 + if (conn < g_tcp_connections || conn >= (g_tcp_connections + + CONFIG_NET_TCP_PREALLOC_CONNS)) +{ + kmm_free(conn); +} + else +#endif +{ + dq_addlast(>sconn.node, _free_tcp_connections); Review Comment: I think not. It seems that `tcp_free()` sets the contents of `conn` to specific values, for example see [this](https://github.com/apache/nuttx/blob/master/net/tcp/tcp_conn.c#L894). If someone knows for sure how this works, I can add a `memset()` and then set the flags, or whatever else is needed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] yamt commented on pull request #8129: net/tcp: correct behavior of SO_LINGER
yamt commented on PR #8129: URL: https://github.com/apache/nuttx/pull/8129#issuecomment-1447812720 > 1. Remove tcp_txdrain() from close() to avoid indefinitely block after this change, where do we block close() for SO_LINGER? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #8641: stdio: Implement simple buffered out stream for vdprintf
pkarashchenko commented on code in PR #8641: URL: https://github.com/apache/nuttx/pull/8641#discussion_r1119741605 ## include/nuttx/streams.h: ## @@ -217,6 +217,14 @@ struct lib_rawsostream_s intfd; }; +struct lib_bufferedoutstream_s +{ + struct lib_outstream_s public; + struct lib_outstream_s *backend; Review Comment: ```suggestion FAR struct lib_outstream_s *backend; ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nuttx] no1wudi commented on a diff in pull request #8641: stdio: Implement simple buffered out stream for vdprintf
no1wudi commented on code in PR #8641: URL: https://github.com/apache/nuttx/pull/8641#discussion_r1119694810 ## libs/libc/stream/lib_bufferedoutstream.c: ## @@ -0,0 +1,154 @@ +/ + * libs/libc/stream/lib_bufferedoutstream.c + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + / + +/ + * Included Files + / + +#include + +#include +#include +#include + +#include + +#include "libc.h" + +/ + * Private Functions + / + +/ + * Name: bufferedoutstream_flush + / + +static int bufferedoutstream_flush(FAR struct lib_outstream_s *this) +{ + FAR struct lib_bufferedoutstream_s *rthis = +(FAR struct lib_bufferedoutstream_s *)this; + int ret = OK; + int i; + + if (rthis->pending > 0) +{ + /* Try to write full internal buffer to fd */ + + for (i = 0; i < rthis->pending; ) Review Comment: OK -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org