Dear NXP team,
I am developing a multi-core project on MPC5746C, instruction cache and data cache of Z4 core is enabled at startup. To avoid cache coherency problem, SMPU is enabled and a region in system RAM is set as cache inhibited for inter-core communication. A machine check exception occurs with MAV/LD/BUS_RDERR set in MCSR, the example code of Z4 core and Z2 core are as follows:
/************************************
* Z4 core Code
***********************************/
#pragma ghs section data = ".NONE_CACHE_RAM" /*NONE_CACHE_RAM refers the cache inhibited region of SMPU*/
unsigned int z4_write_var = 1;
#pragma ghs section data = default
void test_code_z4(void)
{
while(1)
{
z4_write_var++;
}
}
/************************************
* Z2 core Code
***********************************/
extern unsigned int z4_write_var;
unsigned int z2_read_var;
void test_code_z2(void)
{
while(1)
{
z2_read_var = z4_write_var;
}
}
The running result of the program is that a machine check exception occurs, MAV/LD/BUS_RDERR are set in MCSR, and MCAR indicates the address of z4_write_var, I have checked .map file and I’m sure that z4_write_var locates within the cache inhibit region ".NONE_CACHE_RAM". And I have checked MEMU module, there is nothing indicating an ECC or EDC error.
I want to know what is the reason for the exception , and how to deal with it.
Looking forward for a reply!
Best Regards!
Victor