This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
MIPS32 Cache FLUSH/STORE macros not defined for writeback caches?
- From: "David Marqvar (DAM)" <DAM at tt dot dk>
- To: ecos-discuss at sources dot redhat dot com
- Date: Mon, 22 Jul 2002 14:59:58 +0200
- Subject: [ECOS] MIPS32 Cache FLUSH/STORE macros not defined for writeback caches?
In mips/mips32/include/var_cache.h is written
#error HAL_DCACHE_FLUSH undefined for MIPS32 writeback cache
#error HAL_DCACHE_STORE undefined for MIPS32 writeback cache
Why can't the macros for HAL_DCACHE_FLUSH/STORE in
mips/arch/include/hal_cache.h be used?
For example the definition for HAL_DCACHE_FLUSH (see below)
It seems to me that it will result in the correct cache-instruction.
Best regards,
David Marqvar.
#ifndef HAL_DCACHE_FLUSH_DEFINED
#define HAL_DCACHE_FLUSH( _base_ , _asize_ ) \
CYG_MACRO_START \
register CYG_ADDRESS _baddr_ = (CYG_ADDRESS)(_base_); \
register CYG_ADDRESS _addr_ = (CYG_ADDRESS)(_base_); \
register CYG_WORD _size_ = HAL_DCACHE_ADJUST_SIZE(_asize_); \
register CYG_WORD _state_; \
HAL_DCACHE_IS_ENABLED( _state_ ); \
if( _state_ ) { \
_HAL_ASM_SET_MIPS_ISA(3); \
for( ; _addr_ <= _baddr_+_size_; _addr_ += HAL_DCACHE_LINE_SIZE ) \
{ _HAL_ASM_DCACHE_ALL_WAYS(0x15, _addr_); } \
_HAL_ASM_SET_MIPS_ISA(0); \
} \
CYG_MACRO_END
#endif
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss