[PATCH] bsp/atsam: Reserve one region for applications.

Christian Mauderer christian.mauderer at embedded-brains.de
Thu May 24 13:10:25 UTC 2018


Am 24.05.2018 um 14:54 schrieb Gedare Bloom:
> This seems OK. I would like to see progress toward somewhat uniform
> handling of different kinds of hw: MPU, MMU, nothing. I guess this
> doesn't really add an API for the user to define the region? Just some
> capability to hack it in?

Hello Gedare,

thanks for the OK. I'll check that in tomorrow.

You are right: This is only a kind of "reservation" that allows the user
to use that region without having to fear that some future BSP change
will use it.

In the ATSAM BSP the interface is more or less defined by the library
that has been originally provided by Atmel: There is a function called
MPU_UpdateRegions(dwRegionNum, dwRegionBaseAddr, dwRegionAttr) that
allows to set one specific region. But that interface is only designed
to work with that controller and it needs a lot of knowledge how the MPU
on this ARM Core works. A general purpose interface would need a lot
more flexibility and abstraction.

Best regards

Christian

> 
> On Thu, May 24, 2018 at 4:32 AM, Christian Mauderer
> <christian.mauderer at embedded-brains.de> wrote:
>> This allows a user to overwrite some MPU settings. That can for example
>> be usefull for devices with special requirements that are connected to
>> the external bus interface.
>> ---
>>  bsps/arm/atsam/include/libchip/include/mpu.h | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/bsps/arm/atsam/include/libchip/include/mpu.h b/bsps/arm/atsam/include/libchip/include/mpu.h
>> index 06f70d5d62..a5d00a681b 100644
>> --- a/bsps/arm/atsam/include/libchip/include/mpu.h
>> +++ b/bsps/arm/atsam/include/libchip/include/mpu.h
>> @@ -55,6 +55,10 @@
>>         #define MPU_NOCACHE_SRAM_REGION                 (11)
>>  #endif
>>  #define MPU_SYSTEM_REGION                       (12)
>> +#ifdef __rtems__
>> +/* Reserve the region with highest priority for user applications */
>> +#define MPU_USER_DEFINED_REGION                 (15)
>> +#endif /* __rtems__ */
>>
>>  #define MPU_REGION_VALID                        (0x10)
>>  #define MPU_REGION_ENABLE                       (0x01)
>> --
>> 2.13.6
>>
>> _______________________________________________
>> devel mailing list
>> devel at rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel

-- 
--------------------------------------------
embedded brains GmbH
Herr Christian Mauderer
Dornierstr. 4
D-82178 Puchheim
Germany
email: christian.mauderer at embedded-brains.de
Phone: +49-89-18 94 741 - 18
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list