[PATCH 02/17] bsp/arm: Separate setup for translation table

Gedare Bloom gedare at rtems.org
Wed Feb 26 19:03:34 UTC 2014


Perhaps the function should be split in two:
arm_cp15_setup_translation_table()
arm_cp15_enable_mmu_and_cache()
?

On Wed, Feb 26, 2014 at 5:51 AM, Ralf Kirchner
<ralf.kirchner at embedded-brains.de> wrote:
> ---
>  .../lib/libbsp/arm/shared/include/arm-cp15-start.h |   26 ++++++++++++++++----
>  1 Datei geändert, 21 Zeilen hinzugefügt(+), 5 Zeilen entfernt(-)
>
> diff --git a/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h b/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h
> index 54f2963..a0fe9b1 100644
> --- a/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h
> +++ b/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h
> @@ -129,12 +129,11 @@ arm_cp15_start_set_translation_table_entries(
>  }
>
>  BSP_START_TEXT_SECTION static inline void
> -arm_cp15_start_setup_translation_table_and_enable_mmu_and_cache(
> -  uint32_t ctrl,
> -  uint32_t *ttb,
> -  uint32_t client_domain,
> +arm_cp15_start_setup_translation_table(
> +  uint32_t                            *ttb,
> +  const uint32_t                       client_domain,
>    const arm_cp15_start_section_config *config_table,
> -  size_t config_count
> +  const size_t                         config_count
>  )
>  {
>    uint32_t dac = ARM_CP15_DAC_DOMAIN(client_domain, ARM_CP15_DAC_CLIENT);
> @@ -151,7 +150,24 @@ arm_cp15_start_setup_translation_table_and_enable_mmu_and_cache(
>    for (i = 0; i < config_count; ++i) {
>      arm_cp15_start_set_translation_table_entries(ttb, &config_table [i]);
>    }
> +}
>
> +BSP_START_TEXT_SECTION static inline void
> +arm_cp15_start_setup_translation_table_and_enable_mmu_and_cache(
> +  uint32_t ctrl,
> +  uint32_t *ttb,
> +  uint32_t client_domain,
> +  const arm_cp15_start_section_config *config_table,
> +  size_t config_count
> +)
> +{
> +  arm_cp15_start_setup_translation_table(
> +    ttb,
> +    client_domain,
> +    config_table,
> +    config_count
> +  );
> +
>    /* Enable MMU and cache */
>    ctrl |= ARM_CP15_CTRL_I | ARM_CP15_CTRL_C | ARM_CP15_CTRL_M;
>
> --
> 1.7.10.4
>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel




More information about the devel mailing list