UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer kknd2104
Observer
7,633 Views
Registered: ‎02-18-2015

Memory management in bare metal mode

Jump to solution

Hello guys,

 

I came up with several questions on memory management in bare metal mode.

 

1. When we compile and run a SW on zynq, the SW is loaded on DDR. 

I came up with a question "What if DMA buffer overwrite the SW area?".

Is there a way to know the range of the SW in DDR to avoid this problem?

I have checked with lscript.ld file but it seems like it does not show the range of memory.

 

2. What should I do if I want to secure a large memory space(i.e 200MB) in DDR?

I was accessing the memory directly without any memory allocation and guess it is not a good idea.  

Is malloc enough to get such a large continuous memory space?

 

Thank for reading :)

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Participant pete_128
Participant
13,857 Views
Registered: ‎04-02-2016

Re: Memory management in bare metal mode

Jump to solution

Does the linker script (or the linker wizard thing in SDK) give any information on stack and heap? These, (along with the other fixed sections) define the bounds of your program, although bear in mind there may not be runtime protections against overflow of the stack.

 

I am assuming you do not have virtual memory enabled, which means if you want to statically pre-allocate memory then you can just cast the magic address to a pointer type in software and have hardware use the same.

View solution in original post

0 Kudos
1 Reply
Highlighted
Participant pete_128
Participant
13,858 Views
Registered: ‎04-02-2016

Re: Memory management in bare metal mode

Jump to solution

Does the linker script (or the linker wizard thing in SDK) give any information on stack and heap? These, (along with the other fixed sections) define the bounds of your program, although bear in mind there may not be runtime protections against overflow of the stack.

 

I am assuming you do not have virtual memory enabled, which means if you want to statically pre-allocate memory then you can just cast the magic address to a pointer type in software and have hardware use the same.

View solution in original post

0 Kudos