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: [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: [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 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-

[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