Files
raspberrypi/blinker05/pi2/README

40 lines
1.5 KiB
Plaintext

See the top level README for information on where to find the
schematic and programmers reference manual for the ARM processor
on the raspberry pi. Also find information on how to load and run
these programs.
Same as blinker05 in the directory above, except the raspberry pi 2
has two leds one on gpio47 the other gpio35
Also note to make more room for ram the raspberry pi 2 uses a base
address for peripherals of 0x3F000000 where the raspberry pi used
0x20000000.
Also note that for the raspberry pi 2 the arm file copied from the
sd card to ram is kernel7.img the older raspberry pis still use
kernel.img.
A new develoment late 2015 is that the raspberry pi start.elf code now
puts the rpi 2 in HYP mode. The two changes I needed to make were
to set the HVBAR, might as well set it to 0x00008000 rather than copy
the vector table to 0x00000000. so the lines up front that copied
the vector table are now replaced with remapping.
mov r0,#0x8000
MCR p15, 4, r0, c12, c0, 0
The other change being you are supposed to return from hypervisor
exceptions using the eret instruction.
;@subs pc,lr,#4
eret
For the purpose of this example my desire is to use the stock
bootcode.bin and start.elf from the raspberry pi foundation, as well as
running without a config.txt, so I have not gone backward to older
files to see if there are any nuances or changes for the rpi2 with
respect to exceptions (irq in this case). My guess is if they leave
you in supervisor mode instead of hypervisor mode, then it may work
just like it used to.