forked from Imagelibrary/rtems
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:
committed by
Amar Takhar
parent
3a281aca37
commit
c4c3e68790
9
bsps/arm/shared/cache/cache-cp15.h
vendored
9
bsps/arm/shared/cache/cache-cp15.h
vendored
@@ -360,15 +360,6 @@ static inline void arm_cache_l1_unfreeze_instruction( void )
|
|||||||
/* To be implemented as needed, if supported by hardware at all */
|
/* 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 )
|
static inline size_t arm_cache_l1_get_data_cache_size( void )
|
||||||
{
|
{
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|||||||
22
bsps/arm/shared/cache/cache-l2c-310.c
vendored
22
bsps/arm/shared/cache/cache-l2c-310.c
vendored
@@ -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
|
static inline void
|
||||||
_CPU_cache_enable_data( void )
|
_CPU_cache_enable_data( void )
|
||||||
{
|
{
|
||||||
@@ -1182,8 +1163,7 @@ _CPU_cache_enable_data( void )
|
|||||||
static inline void
|
static inline void
|
||||||
_CPU_cache_disable_data( void )
|
_CPU_cache_disable_data( void )
|
||||||
{
|
{
|
||||||
arm_cache_l1_disable_data();
|
_Internal_error( INTERNAL_ERROR_CANNOT_DISABLE_DATA_CACHE );
|
||||||
l2c_310_disable();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void l2c_310_enable_instruction( void *arg )
|
static void l2c_310_enable_instruction( void *arg )
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ copyrights:
|
|||||||
- Copyright (C) 2024 embedded brains GmbH & Co. KG
|
- Copyright (C) 2024 embedded brains GmbH & Co. KG
|
||||||
cppflags: []
|
cppflags: []
|
||||||
cxxflags: []
|
cxxflags: []
|
||||||
enabled-by: true
|
enabled-by:
|
||||||
|
not: bsps/arm/xilinx-zynq
|
||||||
includes: []
|
includes: []
|
||||||
install: []
|
install: []
|
||||||
links: []
|
links: []
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ copyrights:
|
|||||||
- Copyright (C) 2024 embedded brains GmbH & Co. KG
|
- Copyright (C) 2024 embedded brains GmbH & Co. KG
|
||||||
cppflags: []
|
cppflags: []
|
||||||
cxxflags: []
|
cxxflags: []
|
||||||
enabled-by: false
|
enabled-by: bsps/arm/xilinx-zynq
|
||||||
includes: []
|
includes: []
|
||||||
install: []
|
install: []
|
||||||
links: []
|
links: []
|
||||||
|
|||||||
Reference in New Issue
Block a user