Re: Fatal exceptions on context-switching for more than two isolated threads

2020-11-19 Thread Sebastian Huber
On 20/11/2020 00:49, Joel Sherrill wrote: On Thu, Nov 19, 2020, 5:00 PM Utkarsh Rai > wrote: On Thu, Nov 19, 2020 at 11:39 PM Gedare Bloom mailto:ged...@rtems.org>> wrote: Hi Utkarsh, On Thu, Nov 19, 2020 at 4:59 AM Sebastian Huber

Re: [PATCH rtems v3 3/7] cpu/armv7m: Add table based init for ARMV7M_MPU

2020-11-19 Thread Sebastian Huber
On 19/11/2020 23:19, Gedare Bloom wrote: But there is for example _ARMV7M_NVIC_Is_enabled _ARMV7M_NVIC_Set_enable _ARMV7M_DWT_Enable_CYCCNT ARMV7M_MPU_Access_permissions and some others in the same file. So I would lean towards what Sebastian suggested. Otherwise the new functions wouldn't fit

Re: Proposal for hardware configuration dependent performance limits

2020-11-19 Thread Chris Johns
On 19/11/20 7:26 pm, Sebastian Huber wrote: > Hello Chris, > > On 17/11/2020 22:43, Chris Johns wrote: > >> >> On 17/11/20 6:14 pm, Sebastian Huber wrote: >>> On 16/11/2020 23:42, Chris Johns wrote: On 16/11/20 5:40 pm, Sebastian Huber wrote: > On 16/11/2020 00:33, Chris Johns wrote: >>>

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-11-19 Thread Joel Sherrill
On Thu, Nov 19, 2020, 5:00 PM Utkarsh Rai wrote: > > > On Thu, Nov 19, 2020 at 11:39 PM Gedare Bloom wrote: > >> Hi Utkarsh, >> >> On Thu, Nov 19, 2020 at 4:59 AM Sebastian Huber >> wrote: >> > >> > On 19/11/2020 11:47, Utkarsh Rai wrote: >> > >> > > There are a couple of other areas in RTE

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-11-19 Thread Utkarsh Rai
On Thu, Nov 19, 2020 at 11:39 PM Gedare Bloom wrote: > Hi Utkarsh, > > On Thu, Nov 19, 2020 at 4:59 AM Sebastian Huber > wrote: > > > > On 19/11/2020 11:47, Utkarsh Rai wrote: > > > > > There are a couple of other areas in RTEMS in which the stack of > > > another > > > thread may be

Re: [PATCH rtems v3 3/7] cpu/armv7m: Add table based init for ARMV7M_MPU

2020-11-19 Thread Gedare Bloom
On Thu, Nov 19, 2020 at 1:19 PM Christian Mauderer wrote: > > On 19/11/2020 21:14, Gedare Bloom wrote: > > On Thu, Nov 19, 2020 at 1:13 PM Gedare Bloom wrote: > >> > >> Hi Sebastian, Christian: > >> > >> I saw the req > > Oops, gmail shortcuts cut me off. > > > > I saw the request to change the n

Re: libdl: How to debug dl object with GDB

2020-11-19 Thread Chris Johns
On 19/11/20 5:33 pm, Hesham Almatary wrote: > Thanks for the info, Chris. > > On Wed, 18 Nov 2020 at 02:43, Chris Johns wrote: >> On 17/11/20 10:43 pm, Hesham Almatary wrote: >>> Hello, >>> >>> I am trying to debug a dynamically loaded ELF object with GDB: My setup is: >>> rtems-riscv64: >>> GDB:

Re: [PATCH rtems v3 3/7] cpu/armv7m: Add table based init for ARMV7M_MPU

2020-11-19 Thread Christian Mauderer
On 19/11/2020 21:14, Gedare Bloom wrote: > On Thu, Nov 19, 2020 at 1:13 PM Gedare Bloom wrote: >> >> Hi Sebastian, Christian: >> >> I saw the req > Oops, gmail shortcuts cut me off. > > I saw the request to change the names, but I think the _ARMV7M_MPU_yyy > is correct, because MPU is the capital

Re: [PATCH rtems v3 3/7] cpu/armv7m: Add table based init for ARMV7M_MPU

2020-11-19 Thread Gedare Bloom
On Thu, Nov 19, 2020 at 1:13 PM Gedare Bloom wrote: > > Hi Sebastian, Christian: > > I saw the req Oops, gmail shortcuts cut me off. I saw the request to change the names, but I think the _ARMV7M_MPU_yyy is correct, because MPU is the capitalized first "word" of the subgroup there. It is consiste

Re: [PATCH rtems v3 3/7] cpu/armv7m: Add table based init for ARMV7M_MPU

2020-11-19 Thread Gedare Bloom
Hi Sebastian, Christian: I saw the req On Thu, Nov 19, 2020 at 3:17 AM Christian Mauderer wrote: > > Am 19.11.20 um 10:22 schrieb Christian Mauderer: > > Am 19.11.20 um 10:15 schrieb Sebastian Huber: > >> > >> On 19/11/2020 09:51, Christian Mauderer wrote: > >>> + mpu = _ARMV7M_MPU; > >>> + sc

Re: [PATCH v2 2/2] config: Initialize task stack allocator on demand

2020-11-19 Thread Gedare Bloom
On Thu, Nov 19, 2020 at 9:42 AM Sebastian Huber wrote: > > Register a custom task stack allocator initialization handler only if > necessary. > --- > cpukit/include/rtems/confdefs/wkspace.h | 19 +++ > cpukit/score/src/stackallocatorinit.c | 5 + > 2 files changed, 12 inser

Re: [PATCH] c-user: Update internal error list

2020-11-19 Thread Gedare Bloom
ok. On Thu, Nov 19, 2020 at 12:55 AM Sebastian Huber wrote: > > --- > c-user/fatal_error.rst | 37 - > 1 file changed, 8 insertions(+), 29 deletions(-) > > diff --git a/c-user/fatal_error.rst b/c-user/fatal_error.rst > index 2c72deb..81cfa0c 100644 > --- a/c-u

Re: Doubt in rtems_task_wake_after

2020-11-19 Thread Gedare Bloom
On Wed, Nov 18, 2020 at 11:13 PM Richi Dubey wrote: > > Hi, > > In the program tm24, the Init task creates only 1 HIGH task that executes > (after Init task finishes) the High_task function and then the Init task > creates 100 REST or LOOP task which execute (After High_task finishes) the > Tas

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-11-19 Thread Gedare Bloom
Hi Utkarsh, On Thu, Nov 19, 2020 at 4:59 AM Sebastian Huber wrote: > > On 19/11/2020 11:47, Utkarsh Rai wrote: > > > There are a couple of other areas in RTEMS in which the stack of > > another > > thread may be accessed (events, message queues, signals). How did you > > solve thi

[PATCH v2 1/2] config: Simplify task stack allocator init

2020-11-19 Thread Sebastian Huber
Replace runtime checks with compile time assertions. This makes the INTERNAL_ERROR_BAD_STACK_HOOK obsolete. --- v2: Add pragmas to ignore potential warnings from the static assertions. cpukit/include/rtems/confdefs/wkspace.h | 18 ++ cpukit/include/rtems/score/interr.h | 2

[PATCH v2 2/2] config: Initialize task stack allocator on demand

2020-11-19 Thread Sebastian Huber
Register a custom task stack allocator initialization handler only if necessary. --- cpukit/include/rtems/confdefs/wkspace.h | 19 +++ cpukit/score/src/stackallocatorinit.c | 5 + 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cpukit/include/rtems/confdefs/

Re: [PATCH] eng: Rework and clarify Doxygen Guidelines

2020-11-19 Thread Joel Sherrill
OK.I must have been remembering some old Doxygen stuff. I first used it 20 years ago and I am sure plenty has changed over the years. Is there guidance on embedding figures? dot, plantuml, mscgen? I don't recall if there are actual graphic images embedded. But if there are, we should have source i

Re: [PATCH 1/2] config: Simplify task stack allocator init

2020-11-19 Thread Sebastian Huber
On 19/11/2020 08:41, Sebastian Huber wrote: + RTEMS_STATIC_ASSERT( +CONFIGURE_TASK_STACK_ALLOCATOR != NULL, +CONFIGURE_TASK_STACK_ALLOCATOR_MUST_NOT_BE_NULL + ); + const Stack_Allocator_allocate _Stack_Allocator_allocate = CONFIGURE_TASK_STACK_ALLOCATOR; This can lead to wa

Re: [PATCH rtems v3 3/7] cpu/armv7m: Add table based init for ARMV7M_MPU

2020-11-19 Thread Christian Mauderer
Am 19.11.20 um 10:22 schrieb Christian Mauderer: Am 19.11.20 um 10:15 schrieb Sebastian Huber: On 19/11/2020 09:51, Christian Mauderer wrote: +  mpu = _ARMV7M_MPU; +  scb = _ARMV7M_SCB; + +  scb->shcsr &= ~ARMV7M_SCB_SHCSR_MEMFAULTENA; I think it is not necessary to touch the shcsr. Disabling

Re: [PATCH rtems v3 3/7] cpu/armv7m: Add table based init for ARMV7M_MPU

2020-11-19 Thread Christian Mauderer
Am 19.11.20 um 10:15 schrieb Sebastian Huber: On 19/11/2020 09:51, Christian Mauderer wrote: +  mpu = _ARMV7M_MPU; +  scb = _ARMV7M_SCB; + +  scb->shcsr &= ~ARMV7M_SCB_SHCSR_MEMFAULTENA; I think it is not necessary to touch the shcsr. Disabling the MPU should be enough. OK. I'll try it on th

Re: [PATCH rtems v3 3/7] cpu/armv7m: Add table based init for ARMV7M_MPU

2020-11-19 Thread Christian Mauderer
Am 19.11.20 um 10:14 schrieb Sebastian Huber: On 19/11/2020 09:51, Christian Mauderer wrote: +  _Assert(cfg_count > region_count);  _Assert(cfg_count <= region_count) With this change it is fine to check in. Stupid mistake. Sorry. I'll fix it before check in. I'll give the other patches

Re: [PATCH rtems v3 3/7] cpu/armv7m: Add table based init for ARMV7M_MPU

2020-11-19 Thread Sebastian Huber
On 19/11/2020 09:51, Christian Mauderer wrote: + mpu = _ARMV7M_MPU; + scb = _ARMV7M_SCB; + + scb->shcsr &= ~ARMV7M_SCB_SHCSR_MEMFAULTENA; I think it is not necessary to touch the shcsr. Disabling the MPU should be enough. + mpu->ctrl = 0; + + _ARM_Data_synchronization_barrier(); + _ARM_I

Re: [PATCH rtems v3 3/7] cpu/armv7m: Add table based init for ARMV7M_MPU

2020-11-19 Thread Sebastian Huber
On 19/11/2020 09:51, Christian Mauderer wrote: + _Assert(cfg_count > region_count); _Assert(cfg_count <= region_count) With this change it is fine to check in. -- embedded brains GmbH Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de Phone: +49-

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-11-19 Thread Sebastian Huber
On 18/11/2020 18:53, Utkarsh Rai wrote: On Wed, 18 Nov, 2020, 11:20 PM Gedare Bloom, > wrote: Hi Utkarsh, I think I would like to see you try to unify the design so it works the same with or without stack protections. In other words, redesign these iterators to avoi

Re: GMP is now a required dependency for building GDB

2020-11-19 Thread Sebastian Huber
On 19/11/2020 09:33, Sebastian Huber wrote: On 17/11/2020 14:49, Joel Sherrill wrote:     The GMP library is not available by default on FreeBSD systems.     For GCC     we include a fixed version and build it together with GCC. What     should     be do for GDB? I would lean to including t

[PATCH rtems v3 3/7] cpu/armv7m: Add table based init for ARMV7M_MPU

2020-11-19 Thread Christian Mauderer
Modify the MPU functions of the stm32h7 BSP to be table based and available for all ARMV7M BSPs. Update #4180 --- bsps/arm/stm32h7/include/stm32h7/mpu-config.h | 44 +++ bsps/arm/stm32h7/start/bspstarthooks.c| 120 +- bsps/arm/stm32h7/start/mpu-config.c | 7

[PATCH rtems v3 0/7] Add imxrt BSP

2020-11-19 Thread Christian Mauderer
Hello, again an updated version. There haven't been relevant changes beneath patch 3 (some follow up ones in 7) so I'm only sending patch 3. Changes: - renames like suggested by Sebastian - the MPU is now disabled, set up and re-enabled - every MPU region is only set up once due to that - I move

Re: GMP is now a required dependency for building GDB

2020-11-19 Thread Sebastian Huber
On 17/11/2020 14:49, Joel Sherrill wrote: The GMP library is not available by default on FreeBSD systems. For GCC we include a fixed version and build it together with GCC. What should be do for GDB? I would lean to including the same version in GDB that we do in GCC. Is

Re: [PATCH] eng: Rework and clarify Doxygen Guidelines

2020-11-19 Thread Sebastian Huber
On 10/11/2020 13:55, Sebastian Huber wrote: Hello Joel, On 09/11/2020 15:37, Sebastian Huber wrote: On 09/11/2020 15:12, Joel Sherrill wrote: On Mon, Nov 9, 2020 at 8:02 AM Sebastian Huber > wrote:     ---      eng/coding-doxygen.rst  | 210     ++

Re: Proposal for hardware configuration dependent performance limits

2020-11-19 Thread Sebastian Huber
Hello Chris, On 17/11/2020 22:43, Chris Johns wrote: On 17/11/20 6:14 pm, Sebastian Huber wrote: On 16/11/2020 23:42, Chris Johns wrote: On 16/11/20 5:40 pm, Sebastian Huber wrote: On 16/11/2020 00:33, Chris Johns wrote: In the proposal, limits are specified like this: limits:   sp