How do power state changes work, anyway? Does the software issue a special instruction or write some specific value to a particular register and the SoC does the rest? Or does the software have to handle some management around it, too?
Back in the day when I messed around with PIC16f, pretty much all of the power related stuff was implemented with magic registers. For instance, changing the clock rate was writing a divider value to an oscillator configuration register and 1 (or 2, I can't remember what the manual said off the top of my head) clock cycles later the processor was using the new frequency. If you needed precise timing then you would calculate the time it took to reconfigure the oscillator by using the old frequency. When I went through a PIC class one of our first tasks was to make a cycle-accurate delay function, which involved looking up and verifying the precise execution time of every instruction we used (including setup and execution of function calls).
Now an ARM is far more complex than a PIC, but they both have roots in old RISC designs so it's not impossible the same workflow simply got inherited from the existing designs.