Hi all,
I have a questions:
1, How use the DDR ecc fuction? After DDR ecc enabled, it must read/write DDR by 64bit aligned. How control this, In my option we should enable L2 cache, L2 cache will maintenance the cache line 64bit align. This will can meet the DDR ECC 64bit align requirement.
Are there any other suggestion for this?
2, After I enable DDR ECC and enable L2 cache, used below test code. After CACHE_wbInvL2(), the exception Event 110 happened.
I want to know why it will trigger event 110? The DDR_ECC_Test address is 0x88000000, well aligned.
thanks!
BR,
Denny
code like below:
puts("make the test data space cacheable");
gpCGEM_regs->MAR[((Uint32)DDR_ECC_Test)/(16*1024*1024)]=1;
#if 1
//clear the ECC errot status
gpDDR_regs->IRQSTATUS_SYS= CSL_EMIF4F_IRQSTATUS_SYS_REG_RD_ECC_ERR_SYS_MASK
|CSL_EMIF4F_IRQSTATUS_SYS_REG_WR_ECC_ERR_SYS_MASK;
printf("Fill (STDW, 64-bit aligned) test buffer from 0x%x with 0 ...\n", DDR_ECC_Test);
/*memset is implemented with STDW (64-bit aligned). Since L2 cache is enabled,
data line will be read into cache, and then new data will be written in the cache*/
memset((void *)DDR_ECC_Test, 0x59, 128);
puts("!!!CACHE_wbInvL2 on the test data buffer, a spurious write ECC error and MDMA error will be generated, these should be ignored in real application...");
CACHE_wbInvL2((void *)DDR_ECC_Test, 128, CACHE_NOWAIT);
/*normally, exception is captured about 10~100 cycles after the
access violation. Dummy operations added here to wait for it.*/
asm(" nop 5");
asm(" nop 5");
asm(" nop 5");
asm(" nop 5");
asm(" nop 5");
asm(" nop 5");
asm(" nop 5");
asm(" nop 5");
asm(" nop 5");
asm(" nop 5");
asm(" nop 5");
asm(" nop 5");
asm(" nop 5");
asm(" nop 5");
asm(" nop 5");
asm(" nop 5");
asm(" nop 5"); /*NRP should be around the address of this instruction*/
asm(" nop 5");
_mfence();
_mfence();