0

Thanks for reading this question.

I am very new to arm and computer architectures in general so sorry if this is a basic question.

I have spent plenty of time reading and learning about the MMU and the virtual to physical address translation. I have also learn't about address spaces. Just to be sure all the io peripherals such as Ethernet and USB have there own addresses as well as the external RAM and ROM's right? So i wanted to know the address values specifically so i read this PDF document, here: http://infocenter.arm.com/help/topic/com.arm.doc.den0001c/DEN0001C_principles_of_arm_memory_maps.pdf , but it is very confusing. I cant clearly see where it says the exact address space for the ROM and the address space i have found doesn't add up to 128GB for example on some arm phones.

Can you help me make sense of all this? Am i getting this all wrong? And how do i find out the exact addresses for all the peripherals, RAMs and ROM's so i can do some Load and Store functions for these addresses in my codes. Also how do you find out the Virtual address of certain files and documents if i was going to mess around coding one of my old phones. So for eample address 0x00BA FFFF to 0x0AFF FFFF was for a certain audio file. I learn a lot though exploring in this way.

Thanks again,

Will Smith

  • This isn't really the right forum for this kind of question. I would suggest [***Reverse Engineering***](http://reverseengineering.stackexchange.com/) on the SE network, but that might not be quite right either. Take a look at [*all the Stack Exchange*](http://stackexchange.com/sites) networks and try and find something more suitably related to memory principles and architecture. Also, I took a look at the PDF, it really doesn't seem that hard to understand. Email me (spyk3hh@gmail.com) if you like, but I can be kinda slow to respond, I shouldn't even be here! lol. – SpYk3HH Feb 05 '16 at 14:45
  • Ignore that paper, that's a _suggestion_ of how some system architects at ARM Ltd. think SoC designers should lay out their memory maps, nothing more. You need to look up the reference manual for the actual SoC you're dealing with. On your last point, note that with the possible exception of a NOR flash, you're unlikely to see "a file" directly in your physical address space - getting at storage usually involves talking to some peripheral (disk/MMC/NAND flash/etc. controller) that will relay the data from the storage medium behind it. – Notlikethat Feb 05 '16 at 21:38

1 Answers1

1

ARM makes processor cores they do not make chips. They have or have had a few peripherals you could by but the chip vendors generally have their own. Point being, even if they have the same core, chips from different chip vendors do not have the same memory map, much less peripherals, etc. I didnt read your link (bad idea to put links like that in questions or answers as the link content is not controlled by stackoverflow and can disappear, ruining the question or answer) completely but that example memory map at the end is just one example. The chip and sometimes system vendor documentation is required to get a complete physical address map of the world for that one chip or system. Dont try to re-use that map anywhere else. The information is available just have to ask or dig for it, sometimes protected by an NDA which you may or may not be able to get. Also note there may be more than one bus on the core, and no doubt there is more than one bus outside the core in the system so there are multiple physical address spaces. And then you have the mmu which from an address space perspective just translates some to many of the upper bits of the physical address to a virtual address and in that mode the processor/code operates on the virtual address. (all applications that run on an operating system like linux could for example be compiled to run at address 0x8000, the mmu allows that to happen so that all applications think they have the same space but none of their physical addresses collide)

old_timer
  • 69,149
  • 8
  • 89
  • 168
  • Thank you for that answer that really helps. This makes more sense now. Just a follow up question on that answer, when searching for the memory map for that vendor I will find the physical memory map and then using that in my code won't be a problem? Or do I need to find the virtual addresses for it to work? Also I haven't used this site before so I hope i credited you for your answer correctly. I clicked the green tick. Thank again. – william smith Feb 06 '16 at 12:13
  • yes, checking the green tick marks this as the "answer". you can uncheck it and select another I think if there is a better answer. – old_timer Feb 06 '16 at 12:51
  • it depends on who sets up the mmu, I assume you are wanting to understand and in theory do the setup. In either case 1) is the mmu setup and enabled, if not then physical addresses are used the mmu is bypassed. 2) if the mmu is enabled then virtual to physical mapping is...per the setup of the mmu. It is certainly possible to setup the mmu so that virtual = physical for all or some addresses. each entry in the mmu table is another virtual address space and has a physical behind it. so it is up to you or whomever sets up the mmu as to the overall mapping – old_timer Feb 06 '16 at 12:53
  • Thanks for answer. If I do I will probably just bypass the mmu, it's easier this way. – william smith Feb 07 '16 at 15:28