cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
245 Views
Registered: ‎10-08-2018

XMPU programming for a secure OS DDR area

Jump to solution

Hi,

I'm trying to use XMPU on a Zynq UltraScale+ ZCU102 rev1.0 to protect the DDR area of my secure OS running in TrustZone. So far I've failed to make anything work.

First of all I have trouble understanding the programming example of UG1085 "Program the DDR XMPUs". It is stated to write 03FFh to DDR_XMPUx_CFG.R00_END register for the address 0x0_3FFF_FFFF. In UG1087 the description of R00_END register says that "Bits [27:8] correspond to address bits [39:20]", so I would have written 03FFFFh for address 0x0_3FFF_FFFF (or maybe 03FF00h as bits [7:0] are ignored). Could someone explain to me what I am missing here?

Back to the use case. Let's say that I reserve DDR from 0x70000000 to 0x80000000 for my secure OS. I did the following:
1) Write 08h in DDR_XMPUx_CFG.CTRL
2) Write 0700h in DDR_XMPUx_CFG.R00_START (I tried both ways discussed above)
3) Write 07FFh in DDR_XMPUx_CFG.R00_END (the same here)
4) Write 0c00080h in DDR_XMPUx_CFG.R00_MASTER (APU master)
5) Write 07h in DDR_XMPUx_CFG.R00_CONFIG
I did this for XPMU1 and XMPU2.

To validate my setting, I boot up to u-boot and use "md" command to display 0x70000000. And on each of my attempts I can display the secure OS area, which is obviously not what I want.

What am I missing and/or doing wrong?

Any help would be welcome.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Visitor
Visitor
211 Views
Registered: ‎10-08-2018

Re: XMPU programming for a secure OS DDR area

Jump to solution

Found my problem: poison must be enabled by setting bit ATTRIB in POISON register: Write 100000h to DDR_XMPUx_CFG.POISON.

Everything then works as expected.

View solution in original post

0 Kudos
1 Reply
Highlighted
Visitor
Visitor
212 Views
Registered: ‎10-08-2018

Re: XMPU programming for a secure OS DDR area

Jump to solution

Found my problem: poison must be enabled by setting bit ATTRIB in POISON register: Write 100000h to DDR_XMPUx_CFG.POISON.

Everything then works as expected.

View solution in original post

0 Kudos