bsps/arm: Use fatal error for data cache disable

On the Cortex-A cores, at least the L1 data cache is required to provide
support for atomic operations.

Close #5050.
This commit is contained in:
Sebastian Huber
2024-06-24 08:30:49 +02:00
committed by Amar Takhar
parent 3a281aca37
commit c4c3e68790
4 changed files with 4 additions and 32 deletions

View File

@@ -360,15 +360,6 @@ static inline void arm_cache_l1_unfreeze_instruction( void )
/* To be implemented as needed, if supported by hardware at all */
}
static inline void arm_cache_l1_disable_data( void )
{
/* Clean and invalidate the Data cache */
arm_cache_l1_flush_entire_data();
/* Disable the Data cache */
arm_cp15_set_control( arm_cp15_get_control() & ~ARM_CP15_CTRL_C );
}
static inline size_t arm_cache_l1_get_data_cache_size( void )
{
size_t size;

View File

@@ -1154,25 +1154,6 @@ l2c_310_enable( void )
}
}
static inline void
l2c_310_disable( void )
{
volatile L2CC *l2cc = (volatile L2CC *) BSP_ARM_L2C_310_BASE;
rtems_interrupt_lock_context lock_context;
if ( l2cc->ctrl & L2C_310_CTRL_ENABLE ) {
/* Clean and Invalidate L2 Cache */
l2c_310_flush_entire();
rtems_interrupt_lock_acquire( &l2c_310_lock, &lock_context );
l2c_310_wait_for_background_ops( l2cc );
/* Disable the L2 cache */
l2cc->ctrl &= ~L2C_310_CTRL_ENABLE;
rtems_interrupt_lock_release( &l2c_310_lock, &lock_context );
}
}
static inline void
_CPU_cache_enable_data( void )
{
@@ -1182,8 +1163,7 @@ _CPU_cache_enable_data( void )
static inline void
_CPU_cache_disable_data( void )
{
arm_cache_l1_disable_data();
l2c_310_disable();
_Internal_error( INTERNAL_ERROR_CANNOT_DISABLE_DATA_CACHE );
}
static void l2c_310_enable_instruction( void *arg )

View File

@@ -5,7 +5,8 @@ copyrights:
- Copyright (C) 2024 embedded brains GmbH & Co. KG
cppflags: []
cxxflags: []
enabled-by: true
enabled-by:
not: bsps/arm/xilinx-zynq
includes: []
install: []
links: []

View File

@@ -5,7 +5,7 @@ copyrights:
- Copyright (C) 2024 embedded brains GmbH & Co. KG
cppflags: []
cxxflags: []
enabled-by: false
enabled-by: bsps/arm/xilinx-zynq
includes: []
install: []
links: []