I am using IMX6UL EVK board, I was working with secure ram(CAAM) read/write. I used following code.
//You can access to physical address from user space using mmap.
#define PHY_ADDR 0x00100000
int j = 0;
unsigned int *addr;
int fd = open( "/dev/mem", O_RDWR | O_SYNC );
if( fd < 0 )
perror( "Error opening file /dev/mem" );
addr = (unsigned int *) mmap( 0, getpagesize(), PROT_READ | PROT_WRITE, MAP_SHARED, fd, PHY_ADDR );
if( addr == NULL )
perror( "Error mapping" );
for( i = 0; i < 1024; i++,j++ )
//*(addr + i) = j;
printf( "addr: %X\tval: %X\n", addr + i, *( addr + i ) );
if( munmap( addr, getpagesize() ) == -1 )
perror( "Error unmaping" );
I was trying to write in secure ram of caam, it happened. but when i restarted the board it didnt boot. there comes nothing on the terminal. I checked the secure ram address from imx6ul evk reference manual. Can someone please tell me what should i do about it?