cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
516 Views
Registered: ‎06-10-2019

System Update xapp1224

Jump to solution

Dear All,

 

I am working on ZC702, trying to run system update example provided through note xapp1224-secure-system-update.pdf, I have followig quieries

1) Please help me understand where to modify for the below point

In the Project Explorer pane, modify the hello_update/src/lscript.ld linker
script to locate hello_update at 0x300000.

2) Also for the below point

In the Project Explorer pane, select partition_loader/src/lscript.ld.

Modify the linker script to locate partition_loader at 0x200000.

 

Thanks & Regards,

Vamshi G.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Contributor
Contributor
375 Views
Registered: ‎06-10-2019

Dear All,

I did following modifications & able to run the application successful. 

1) modified the partion_loader linker script as below

- ps7_ddr_0_S_AXI_BASEADDR : ORIGIN = 0x00100000, LENGTH = 0x1FF00000

+ ps7_ddr_0_S_AXI_BASEADDR : ORIGIN = 0x00200000, LENGTH = 0x1FF00000

2) modified hello_update linker script as below

- ps7_ddr_0 : ORIGIN = 0x100000, LENGTH = 0x3FF00000

+ ps7_ddr_0 : ORIGIN = 0x300000, LENGTH = 0x3FF00000

3) enabled FSBL_DEBUG_INFO in partition_loader

4) We have 4 partitions

  • Partition-0: FSBL
  • Partition-1: hello.elf
  • Partition-2: partion_loader.elf
  • Partition-3: hello_update.elf

based on the FSBL log for partition-3 

Partition Number: 3
Header Dump
Image Word Len: 0x00002002
Data Word Len: 0x00002002
Partition Word Len:0x00002002
Load Addr: 0x00300000
Exec Addr: 0x00300000
Partition Start: 0x0000C5F0
Partition Attr: 0x00000010
Partition Checksum Offset: 0x00000000
Section Count: 0x00000001
Checksum: 0xFF9ED788
Application
PCAP:StatusReg = 0x40000A30
PCAP:device ready
PCAP:Clear done
PCAP register dump:
PCAP CTRL 0xF8007000: 0x0C00E07F
PCAP LOCK 0xF8007004: 0x00000002
PCAP CONFIG 0xF8007008: 0x00000508
PCAP ISR 0xF800700C: 0x00023000
PCAP IMR 0xF8007010: 0xFFFFFFFF
PCAP STATUS 0xF8007014: 0x50000A30
PCAP DMA SRC ADDR 0xF8007018: 0xFC0317C1
PCAP DMA DEST ADDR 0xF800701C: 0x00300001
PCAP DMA SRC LEN 0xF8007020: 0x00002002
PCAP DMA DEST LEN 0xF8007024: 0x00002002
PCAP ROM SHADOW CTRL 0xF8007028: 0xFFFFFFFF
PCAP MBOOT 0xF800702C: 0x00000000
PCAP SW ID 0xF8007030: 0x00000000
PCAP UNLOCK 0xF8007034: 0x757BDF0D
PCAP MCTRL 0xF8007080: 0x00000010

DMA Done !

I see Partition start as Partition Start: 0x0000C5F0 & len as 0x00002002, hence modified partition_loader/main.c as follows

start_addr = 0x0000C5F0 < WORD_LENGTH_SHIFT //SourceAddr += Header->PartitionStart<<WORD_LENGTH_SHIFT; based on PartitionMove method implementation

hence start_addr will be 0xFC0317c0

Status = PcapDataTransfer(0xFC0317c0,
0x00300000,
0x00002002,
0x00002002,
0); //disbaled securtity

I see the below working log

First Hello World
Hello Brazil

Xilinx Partition Loader
Release 2013.4 Oct 21 2019-13:07:02

Call FabricInit in main
Level Shifter Value = 0x0
Devcfg Status register = 0x40000A30
PCAP:Fabric is Initialized done
Flush DMA FIFOs

Copy hello_update from QSPI to DDR 0x300000
PCAP:StatusReg = 0x40000A30
PCAP:device ready
PCAP:Clear done
PCAP register dump:
PCAP CTRL 0xF8007000: 0x4C00E07F
PCAP LOCK 0xF8007004: 0x00000002
PCAP CONFIG 0xF8007008: 0x00000508
PCAP ISR 0xF800700C: 0x00023000
PCAP IMR 0xF8007010: 0xFFFFFFFF
PCAP STATUS 0xF8007014: 0x50000A30
PCAP DMA SRC ADDR 0xF8007018: 0xFC0317C1
PCAP DMA DEST ADDR 0xF800701C: 0x00300001
PCAP DMA SRC LEN 0xF8007020: 0x00002002
PCAP DMA DEST LEN 0xF8007024: 0x00002002
PCAP ROM SHADOW CTRL 0xF8007028: 0xFFFFFFFF
PCAP MBOOT 0xF800702C: 0x00000000
PCAP SW ID 0xF8007030: 0x00000000
PCAP UNLOCK 0xF8007034: 0x757BDF0D
PCAP MCTRL 0xF8007080: 0x00000010


Handoff to hello update
Handoff Address: 0x00300000
Hello World from hello_update

I request Xilinx to update the document  xapp1224-secure-system-update.pdf 

Thanks & Regards,

Vamshi G.

View solution in original post

0 Kudos
2 Replies
Highlighted
Contributor
Contributor
435 Views
Registered: ‎06-10-2019

Dear Team,

 

Please help me with you inputs, awaiting your response

 

Thanks.

0 Kudos
Highlighted
Contributor
Contributor
376 Views
Registered: ‎06-10-2019

Dear All,

I did following modifications & able to run the application successful. 

1) modified the partion_loader linker script as below

- ps7_ddr_0_S_AXI_BASEADDR : ORIGIN = 0x00100000, LENGTH = 0x1FF00000

+ ps7_ddr_0_S_AXI_BASEADDR : ORIGIN = 0x00200000, LENGTH = 0x1FF00000

2) modified hello_update linker script as below

- ps7_ddr_0 : ORIGIN = 0x100000, LENGTH = 0x3FF00000

+ ps7_ddr_0 : ORIGIN = 0x300000, LENGTH = 0x3FF00000

3) enabled FSBL_DEBUG_INFO in partition_loader

4) We have 4 partitions

  • Partition-0: FSBL
  • Partition-1: hello.elf
  • Partition-2: partion_loader.elf
  • Partition-3: hello_update.elf

based on the FSBL log for partition-3 

Partition Number: 3
Header Dump
Image Word Len: 0x00002002
Data Word Len: 0x00002002
Partition Word Len:0x00002002
Load Addr: 0x00300000
Exec Addr: 0x00300000
Partition Start: 0x0000C5F0
Partition Attr: 0x00000010
Partition Checksum Offset: 0x00000000
Section Count: 0x00000001
Checksum: 0xFF9ED788
Application
PCAP:StatusReg = 0x40000A30
PCAP:device ready
PCAP:Clear done
PCAP register dump:
PCAP CTRL 0xF8007000: 0x0C00E07F
PCAP LOCK 0xF8007004: 0x00000002
PCAP CONFIG 0xF8007008: 0x00000508
PCAP ISR 0xF800700C: 0x00023000
PCAP IMR 0xF8007010: 0xFFFFFFFF
PCAP STATUS 0xF8007014: 0x50000A30
PCAP DMA SRC ADDR 0xF8007018: 0xFC0317C1
PCAP DMA DEST ADDR 0xF800701C: 0x00300001
PCAP DMA SRC LEN 0xF8007020: 0x00002002
PCAP DMA DEST LEN 0xF8007024: 0x00002002
PCAP ROM SHADOW CTRL 0xF8007028: 0xFFFFFFFF
PCAP MBOOT 0xF800702C: 0x00000000
PCAP SW ID 0xF8007030: 0x00000000
PCAP UNLOCK 0xF8007034: 0x757BDF0D
PCAP MCTRL 0xF8007080: 0x00000010

DMA Done !

I see Partition start as Partition Start: 0x0000C5F0 & len as 0x00002002, hence modified partition_loader/main.c as follows

start_addr = 0x0000C5F0 < WORD_LENGTH_SHIFT //SourceAddr += Header->PartitionStart<<WORD_LENGTH_SHIFT; based on PartitionMove method implementation

hence start_addr will be 0xFC0317c0

Status = PcapDataTransfer(0xFC0317c0,
0x00300000,
0x00002002,
0x00002002,
0); //disbaled securtity

I see the below working log

First Hello World
Hello Brazil

Xilinx Partition Loader
Release 2013.4 Oct 21 2019-13:07:02

Call FabricInit in main
Level Shifter Value = 0x0
Devcfg Status register = 0x40000A30
PCAP:Fabric is Initialized done
Flush DMA FIFOs

Copy hello_update from QSPI to DDR 0x300000
PCAP:StatusReg = 0x40000A30
PCAP:device ready
PCAP:Clear done
PCAP register dump:
PCAP CTRL 0xF8007000: 0x4C00E07F
PCAP LOCK 0xF8007004: 0x00000002
PCAP CONFIG 0xF8007008: 0x00000508
PCAP ISR 0xF800700C: 0x00023000
PCAP IMR 0xF8007010: 0xFFFFFFFF
PCAP STATUS 0xF8007014: 0x50000A30
PCAP DMA SRC ADDR 0xF8007018: 0xFC0317C1
PCAP DMA DEST ADDR 0xF800701C: 0x00300001
PCAP DMA SRC LEN 0xF8007020: 0x00002002
PCAP DMA DEST LEN 0xF8007024: 0x00002002
PCAP ROM SHADOW CTRL 0xF8007028: 0xFFFFFFFF
PCAP MBOOT 0xF800702C: 0x00000000
PCAP SW ID 0xF8007030: 0x00000000
PCAP UNLOCK 0xF8007034: 0x757BDF0D
PCAP MCTRL 0xF8007080: 0x00000010


Handoff to hello update
Handoff Address: 0x00300000
Hello World from hello_update

I request Xilinx to update the document  xapp1224-secure-system-update.pdf 

Thanks & Regards,

Vamshi G.

View solution in original post

0 Kudos