X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Fdrc%2Fcmn.c;h=27ff9812eaad40855fe4471e6a718fb620f71dfa;hb=24aab4da7352b5cecad4e09b0dcc0807b14786f2;hp=37f17ce921bfb3606430ccc4199b054f1135580c;hpb=9a1f192a146e9b9752ec1a760745b1261fe9bdec;p=picodrive.git diff --git a/cpu/drc/cmn.c b/cpu/drc/cmn.c index 37f17ce..27ff981 100644 --- a/cpu/drc/cmn.c +++ b/cpu/drc/cmn.c @@ -10,14 +10,20 @@ #include #include "cmn.h" -u8 __attribute__((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)