I just started the Baking Pi tutorials and the first lesson is already very confusing.
The very first thing we do is
ldr r0,=0x20200000
The author explains that 0x20200000 is the address of the GPIO controller. Not to just want to blindly believe this, I decided to cross-check the BCM2835 ARM Peripherals guide. Here, the first GPIO register is listed as 0x7E200000 (page 90).
I go back to the tutorial, where in a footnote, the author identifies this difference, and says
the manual uses a different addressing system. An address listed as 0x7E200000 would be 0x20200000 in our OS.
So my question therefore is: What is an "addressing system" and how do these two different numbers reconcile under their respective systems?
Edit: Shortly after posting this, I read in the manual that:
Physical addresses range from 0x20000000 to 0x20FFFFFF for peripherals. The bus addresses for peripherals are set up to map onto the peripheral bus address range starting at 0x7E000000. Thus a peripheral advertised here at bus address 0x7Ennnnnn is available at physical address 0x20nnnnnn.
I guess it's easy to Google the difference now that I know the terms. But now my question becomes:
What's the purpose of having a separate bus addresses? I understand most of the benefits of having virtual memory in user land, but why virtualize the memory from the device's point of view?