I've been playing around with some bare-metal examples on the Raspberry Pi 3 for a while now and considering the changes to the ACT LED, the first thing you need to do is implement mailbox communication with the VideoCore.
Whilst the mailbox documentation (https://github.com/raspberrypi/firmware/wiki/Mailboxes) is a great start (as are all the implementations I've found whilst browsing source code), I would still like some things clarified. Now, I have manged to "correctly" implement the mailbox communication (given I can successfully control the ACT LED), but still feel confused about a few things.
The wiki states that the ARM should never write to mailbox 0 and never read from mailbox 1. In my head I model this as 2 separate mailboxes (in a real-world sense): Mailbox 0 being ours (ARM) and Mailbox 1 being theirs (VideoCore). Before sending a message, we should check that their mailbox is not full (check mailbox 1 status at offset 0x38). When reading a message, we should check that our mailbox is not empty (check mailbox 0 status at offset 0x18). However, all implementations seem to only check mailbox 0 status before both reading and writing (some places even stating that mailbox 0 write is the same as mailbox 1 read).
As I can't find any written documentation on mailboxes besides the wiki, I am basically wondering how I should be thinking about the mailboxes logically and how is it all being treated from the GPU side?