X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Fdrc%2Fcmn.c;h=3f174a0311d955d6c81d4b4e0ec0911d282add88;hb=00468b0a9b651d930c06d565f3ffc7e704f0e57c;hp=acff42c8f24f000816b764804a63b8fcb8832f76;hpb=bce144211cd70e1be78b7c1b7424fb4609de1ac8;p=picodrive.git diff --git a/cpu/drc/cmn.c b/cpu/drc/cmn.c index acff42c..3f174a0 100644 --- a/cpu/drc/cmn.c +++ b/cpu/drc/cmn.c @@ -10,17 +10,23 @@ #include #include "cmn.h" -u8 ALIGNED(4096) tcache[DRC_TCACHE_SIZE]; - +u8 ALIGNED(4096) tcache_default[DRC_TCACHE_SIZE]; +u8 *tcache; void drc_cmn_init(void) { - int ret = plat_mem_set_exec(tcache, sizeof(tcache)); + int ret; + + tcache = plat_mem_get_for_drc(DRC_TCACHE_SIZE); + if (tcache == NULL) + tcache = tcache_default; + + ret = plat_mem_set_exec(tcache, DRC_TCACHE_SIZE); elprintf(EL_STATUS, "drc_cmn_init: %p, %zd bytes: %d", - tcache, sizeof(tcache), ret); + tcache, DRC_TCACHE_SIZE, ret); #ifdef __arm__ - if (PicoOpt & POPT_EN_DRC) + if (PicoIn.opt & POPT_EN_DRC) { static int test_done; if (!test_done)