Pi physical memory map
Bill Antonia (2466) 120 posts |
Is there a way to find out the physical memory address of logical memory allocated by OS_Module 6? |
Jon Abbott (1421) 2599 posts |
Use OS_Memory 0 to translate from logical to physical. |
Bill Antonia (2466) 120 posts |
Thanks, I’ll have a look, missed that one in my search. |
Bill Antonia (2466) 120 posts |
So…. Page Blocks. I assume this is a structure containing 3 integers in which you set the one you want to be translated, the others to zero, call OS_Memory 0 with the appropriate R1 and R2 values and the two entries which were zero get filled in with what you are trying to find out. Is that correct? |
Jon Abbott (1421) 2599 posts |
No need to assume, it’s detailed on the OS_Memory 0 wiki page. Set the flags in R0 to translate from logical to physical (bit 9 and 13), put the logical address you want to translate in a page block and call OS_Memory with R2=1 to translate one block. eg.
|
Bill Antonia (2466) 120 posts |
Thank you, I was missing the flags. |