2002-04-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de>

* rtems/powerpc/cache.h: New file (extracted from
	old-exceptions/cpu.h)
	* Makefile.am: Relect changes above.
This commit is contained in:
Joel Sherrill
2002-05-01 23:05:49 +00:00
parent b97b2202e2
commit 1c07f5821e
3 changed files with 69 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
2002-04-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* rtems/powerpc/cache.h: New file (extracted from
old-exceptions/cpu.h)
* Makefile.am: Relect changes above.
2002-04-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* shared/include/cpu.h: Removed.

View File

@@ -4,6 +4,25 @@
ACLOCAL_AMFLAGS = -I ../../../../../aclocal
nobase_include_HEADERS = rtems/powerpc/cache.h
$(PROJECT_INCLUDE):
$(mkinstalldirs) $@
$(PROJECT_INCLUDE)/rtems:
$(mkinstalldirs) $@
$(PROJECT_INCLUDE)/rtems/powerpc:
$(mkinstalldirs) $@
$(PROJECT_INCLUDE)/%: %
$(INSTALL_DATA) $< $@
TMPINSTALL_FILES = $(PROJECT_INCLUDE) \
$(PROJECT_INCLUDE)/rtems \
$(PROJECT_INCLUDE)/rtems/powerpc \
$(nobase_include_HEADERS:%=$(PROJECT_INCLUDE)/%)
## Check configure.in for conditions to set the conditionals below
if shared
SHARED_LIB = shared
@@ -31,5 +50,7 @@ endif
SUBDIRS = $(SHARED_LIB) $(CPU_SUBDIR) wrapup
all-local: $(TMPINSTALL_FILES)
include $(top_srcdir)/../../../../../automake/subdirs.am
include $(top_srcdir)/../../../../../automake/local.am

View File

@@ -0,0 +1,42 @@
/*
* $Id$
*/
#ifndef _rtems_powerpc_cache_h
#define _rtems_powerpc_cache_h
#include <rtems/score/ppc.h>
#ifdef _OLD_EXCEPTIONS
#if (PPC_D_CACHE != 0)
#define _CPU_Data_Cache_Block_Flush( _address ) \
do { register void *__address = (_address); \
register unsigned32 _zero = 0; \
asm volatile ( "dcbf %0,%1" : \
"=r" (_zero), "=r" (__address) : \
"0" (_zero), "1" (__address) \
); \
} while (0)
#else
#define _CPU_Data_Cache_Block_Flush( _address ) /* nop */
#endif
/*
* FIXME: This is not used anywhere.
*/
#if (PPC_D_CACHE != 0)
#define _CPU_Data_Cache_Block_Invalidate( _address ) \
do { register void *__address = (_address); \
register unsigned32 _zero = 0; \
asm volatile ( "dcbi %0,%1" : \
"=r" (_zero), "=r" (__address) : \
"0" (_zero), "1" (__address) \
); \
} while (0)
#else
#define _CPU_Data_Cache_Block_Invalidate( _address ) /* nop */
#endif
#endif
#endif