bsps/aarch64: Add AARCH64_MMU_PHYSICAL_ADDRESS_RANGE_BITS

This avoids dead code in the MMU setup.
This commit is contained in:
Sebastian Huber
2024-10-11 01:27:48 +02:00
parent 269f4ca5db
commit bb2cd445e1
3 changed files with 36 additions and 0 deletions
+4
View File
@@ -229,6 +229,9 @@ BSP_START_TEXT_SECTION static inline rtems_status_code aarch64_mmu_map_block(
BSP_START_TEXT_SECTION static inline uint64_t
aarch64_mmu_get_cpu_pa_bits( void )
{
#ifdef AARCH64_MMU_PHYSICAL_ADDRESS_RANGE_BITS
return AARCH64_MMU_PHYSICAL_ADDRESS_RANGE_BITS;
#else
uint64_t id_reg = _AArch64_Read_id_aa64mmfr0_el1();
switch ( AARCH64_ID_AA64MMFR0_EL1_PARANGE_GET( id_reg ) ) {
@@ -250,6 +253,7 @@ aarch64_mmu_get_cpu_pa_bits( void )
return 48;
}
return 48;
#endif
}
BSP_START_TEXT_SECTION rtems_status_code