51 #include "IfxSrc_reg.h"
52 #include "IfxScu_reg.h"
71 #define IFXCPU_GLB_ADDR_DSPR(cpu, address) ((((((unsigned)(address) & 0xF0000000) == 0xD0000000) ? ((((unsigned)(address) & 0x000fffff) | 0x70000000) - ((cpu) * 0x10000000)) : (unsigned)(address))))
84 #define IFXCPU_GLB_ADDR_PSPR(cpu, address) ((((unsigned)(address) & 0x000fffff) | 0x70100000) - ((cpu) * 0x10000000))
573 return reg.B.IE != 0;
596 uint16 checkRestrictionMask;
602 checkRestrictionMask = ((
uint16)1 << (7 - coreId)) | ((
uint16)1 << 0xC);
604 if ((segmentNumberMask & checkRestrictionMask) != 0)
606 segmentNumberMask |= checkRestrictionMask;
609 cpu_pmaVal =
__mfcr(CPU_PMA0);
611 cpu_pmaVal = enable ? (cpu_pmaVal | segmentNumberMask) : (cpu_pmaVal & ~segmentNumberMask);
618 __mtcr(CPU_PMA0, cpu_pmaVal);
627 uint16 checkRestrictionMask;
633 checkRestrictionMask = ((
uint16)1 << (7 - coreId)) | ((
uint16)1 << 0xD);
635 if ((segmentNumberMask & checkRestrictionMask) != 0)
637 segmentNumberMask |= checkRestrictionMask;
640 cpu_pmaVal =
__mfcr(CPU_PMA1);
642 cpu_pmaVal = enable ? (cpu_pmaVal | segmentNumberMask) : (cpu_pmaVal & ~segmentNumberMask);
649 __mtcr(CPU_PMA1, cpu_pmaVal);
677 reg.U =
__mfcr(CPU_CORE_ID);
685 reg.U =
__mfcr(CPU_CORE_ID);
706 return ccnt.B.CountValue;
725 uint32 *nxtCsa = csaBegin;
727 for (k = 0; k < (((
uint32)csaEnd - (
uint32)csaBegin) / 64); k++)
729 nxt_cxi_val = ((
uint32)nxtCsa & (0XFU << 28)) >> 12 | ((
uint32)nxtCsa & (0XFFFFU << 6)) >> 6;
733 __mtcr(CPU_FCX, nxt_cxi_val);
737 *prvCsa = nxt_cxi_val;
740 prvCsa = (
uint32 *)nxtCsa;
745 __mtcr(CPU_LCX, nxt_cxi_val);
755 pcon1.U =
__mfcr(CPU_PCON1);
757 __mtcr(CPU_PCON1, pcon1.U);
773 cctrl.U =
__mfcr(CPU_CCTRL);
776 __mtcr(CPU_CCTRL, cctrl.U);
788 __mtcr(CPU_CCTRL, cctrl.U);
794 if (enabled !=
FALSE)
810 dcon0.B.DCBYP = enable ? 0 : 1;
811 __mtcr(CPU_DCON0, dcon0.U);
822 cctrl.U =
__mfcr(CPU_CCTRL);
824 __mtcr(CPU_CCTRL, cctrl.U);
835 __mtcr(CPU_PCON1, pcon1.U);
845 pcon0.B.PCBYP = enable ? 0 : 1;
846 __mtcr(CPU_PCON0, pcon0.U);
872 ccnt.U =
__mfcr(CPU_CCNT);
877 icnt.U =
__mfcr(CPU_ICNT);
882 m1cnt.U =
__mfcr(CPU_M1CNT);
887 m2cnt.U =
__mfcr(CPU_M2CNT);
892 m3cnt.U =
__mfcr(CPU_M3CNT);
901 MODULE_SCU.SWRSTCON.B.SWRSTREQ = 1;
926 cctrl.U =
__mfcr(CPU_CCTRL);
927 enableBit = cctrl.B.CE;
929 __mtcr(CPU_CCTRL, cctrl.U);
932 count &= ~(1U << 31);
936 cctrl.B.CE = enableBit;
937 __mtcr(CPU_CCTRL, cctrl.U);