I'm writing a boot loader, based on dwelch's code. I've got it do an XModem load just fine. Now I'd like to do a second stage boot. When the bootloader comes up it waits 5 seconds and then loads a kernel binary from the SD card. At least that's what I want to do. My problem is in finding some good SD card code. The de facto standard seems to be emmc.c in the rip-boot repo. The problem is that this (and every other variant and version I've found) is very entwined with the rest of the system it's embedded in. So I've extracted it and all its support logic and got it building. Now I've turned on the debugging printf's and am starting to look. It fails at the very first step - powering on the card. There seems to be issues accessing the power management mailbox.
So my questions are this:
1) Are there any good mailbox resources (i've looked at https://github.com/raspberrypi/firmware/wiki/Mailboxes, but it's pretty thin)?
2) Are there any simple mailbox examples that I can get working to understand how this should all work?