forked from Imagelibrary/rtems
Move CPU cache support from mcf5225x BSP to libcpu
This commit is contained in:
@@ -42,6 +42,7 @@ libbsp_a_SOURCES += timer/timer.c
|
||||
|
||||
libbsp_a_LIBADD = \
|
||||
../../../libcpu/@RTEMS_CPU@/shared/cache.rel \
|
||||
../../../libcpu/@RTEMS_CPU@/mcf5225x/cachepd.rel \
|
||||
../../../libcpu/@RTEMS_CPU@/shared/misc.rel
|
||||
|
||||
include $(srcdir)/preinstall.am
|
||||
|
||||
@@ -18,30 +18,6 @@
|
||||
#include <bsp.h>
|
||||
#include <bsp/bootcard.h>
|
||||
|
||||
/*
|
||||
* Cannot be frozen
|
||||
*/
|
||||
void _CPU_cache_freeze_data(void) {}
|
||||
void _CPU_cache_unfreeze_data(void) {}
|
||||
void _CPU_cache_freeze_instruction(void) {}
|
||||
void _CPU_cache_unfreeze_instruction(void) {}
|
||||
|
||||
/*
|
||||
* Write-through data cache -- flushes are unnecessary
|
||||
*/
|
||||
void _CPU_cache_flush_1_data_line(const void *d_addr) {}
|
||||
void _CPU_cache_flush_entire_data(void) {}
|
||||
|
||||
void _CPU_cache_enable_instruction(void) {}
|
||||
void _CPU_cache_disable_instruction(void) {}
|
||||
void _CPU_cache_invalidate_entire_instruction(void) {}
|
||||
void _CPU_cache_invalidate_1_instruction_line(const void *addr) {}
|
||||
|
||||
void _CPU_cache_enable_data(void) {}
|
||||
void _CPU_cache_disable_data(void) {}
|
||||
void _CPU_cache_invalidate_entire_data(void) {}
|
||||
void _CPU_cache_invalidate_1_data_line(const void *addr) {}
|
||||
|
||||
void __attribute__((weak)) bsp_start(void)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -11,9 +11,10 @@ include_libcpudir = $(includedir)/libcpu
|
||||
include_libcpu_HEADERS = ../shared/include/cache.h
|
||||
|
||||
noinst_PROGRAMS += shared/cache.rel
|
||||
shared_cache_rel_SOURCES = shared/cache/cache.c shared/cache/cache_.h \
|
||||
../shared/src/cache_aligned_malloc.c \
|
||||
../shared/src/cache_manager.c
|
||||
shared_cache_rel_SOURCES = shared/cache/cache.c
|
||||
shared_cache_rel_SOURCES += shared/cache/cache_.h
|
||||
shared_cache_rel_SOURCES += ../shared/src/cache_aligned_malloc.c
|
||||
shared_cache_rel_SOURCES += ../shared/src/cache_manager.c
|
||||
shared_cache_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shared/cache
|
||||
shared_cache_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
|
||||
@@ -108,7 +109,7 @@ include_mcf5223x_HEADERS = mcf5223x/include/mcf5223x.h
|
||||
## mcf5223x/cache
|
||||
noinst_PROGRAMS += mcf5223x/cachepd.rel
|
||||
mcf5223x_cachepd_rel_SOURCES = mcf5223x/cache/cachepd.c
|
||||
mcf5223x_cachepd_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
mcf5223x_cachepd_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shared/cache
|
||||
mcf5223x_cachepd_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
endif
|
||||
|
||||
@@ -116,6 +117,13 @@ if mcf5225x
|
||||
## mcf5225x/include
|
||||
include_mcf5225xdir = $(includedir)/mcf5225x
|
||||
include_mcf5225x_HEADERS = mcf5225x/include/mcf5225x.h
|
||||
|
||||
# mcf5225x/cache
|
||||
noinst_PROGRAMS += mcf5225x/cachepd.rel
|
||||
mcf5225x_cachepd_rel_SOURCES = mcf5225x/cache/cachepd.c
|
||||
mcf5225x_cachepd_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shared/cache
|
||||
mcf5225x_cachepd_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
|
||||
# Network
|
||||
if HAS_NETWORKING
|
||||
include_mcf5225x_HEADERS += mcf5225x/include/fec.h
|
||||
@@ -130,7 +138,7 @@ include_mcf5235_HEADERS = mcf5235/include/mcf5235.h
|
||||
## mcf5235/cache
|
||||
noinst_PROGRAMS += mcf5235/cachepd.rel
|
||||
mcf5235_cachepd_rel_SOURCES = mcf5235/cache/cachepd.c
|
||||
mcf5235_cachepd_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
mcf5235_cachepd_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shared/cache
|
||||
mcf5235_cachepd_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
endif
|
||||
|
||||
@@ -142,7 +150,7 @@ include_mcf532x_HEADERS = mcf532x/include/mcf532x.h
|
||||
## mcf532x/cache
|
||||
noinst_PROGRAMS += mcf532x/cachepd.rel
|
||||
mcf532x_cachepd_rel_SOURCES = mcf532x/cache/cachepd.c
|
||||
mcf532x_cachepd_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
mcf532x_cachepd_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shared/cache
|
||||
mcf532x_cachepd_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
endif
|
||||
|
||||
|
||||
32
c/src/lib/libcpu/m68k/mcf5225x/cache/cachepd.c
vendored
Normal file
32
c/src/lib/libcpu/m68k/mcf5225x/cache/cachepd.c
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* Cache Management Support Routines for the MCF5225x
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
#include "cache_.h"
|
||||
|
||||
/*
|
||||
* Cannot be frozen
|
||||
*/
|
||||
void _CPU_cache_freeze_data(void) {}
|
||||
void _CPU_cache_unfreeze_data(void) {}
|
||||
void _CPU_cache_freeze_instruction(void) {}
|
||||
void _CPU_cache_unfreeze_instruction(void) {}
|
||||
|
||||
/*
|
||||
* Write-through data cache -- flushes are unnecessary
|
||||
*/
|
||||
void _CPU_cache_flush_1_data_line(const void *d_addr) {}
|
||||
void _CPU_cache_flush_entire_data(void) {}
|
||||
|
||||
void _CPU_cache_enable_instruction(void) {}
|
||||
void _CPU_cache_disable_instruction(void) {}
|
||||
void _CPU_cache_invalidate_entire_instruction(void) {}
|
||||
void _CPU_cache_invalidate_1_instruction_line(const void *addr) {}
|
||||
|
||||
void _CPU_cache_enable_data(void) {}
|
||||
void _CPU_cache_disable_data(void) {}
|
||||
void _CPU_cache_invalidate_entire_data(void) {}
|
||||
void _CPU_cache_invalidate_1_data_line(const void *addr) {}
|
||||
Reference in New Issue
Block a user