What happens before the first instruction on a µC?
Yesterday, I happened to read the Start process for the ATtiny10 that I'm going to be using in my next project. It has a whole section on what it in particular does. I am sure that more complex processors have all sorts of Built In Test functions and other preparatory work before it jumps to the boot code:


  8.5. Starting
  
  8.5.1. Starting from Reset
  The internal reset is immediately asserted when a reset source goes active. The internal reset is kept asserted until the reset source is released and the start-up sequence is completed. The start-up sequence includes three steps, as follows.
  
  
  The first step after the reset source has been released consists of the device counting the reset start-up time. The purpose of this reset start-up time is to ensure that supply voltage has reached sufficient levels. The reset start-up time is counted using the internal 128 kHz oscillator.
  
  
  Note: The actual supply voltage is not monitored by the start-up logic. The device will count until the reset start-up time has elapsed even if the device has reached sufficient supply voltage levels earlier.
  
  
  The second step is to count the oscillator start-up time, which ensures that the calibrated internal oscillator has reached a stable state before it is used by the other parts of the system. The calibrated internal oscillator needs to oscillate for a minimum number of cycles before it can be considered stable.
  The last step before releasing the internal reset is to load the calibration and the configuration values from the Non-Volatile Memory to configure the device properly. The configuration time is listed in the next table.
  


Table 8-2:  Start-up Times when Using the Internal Calibrated
            Oscillator with Normal start-up time

| Reset | Oscillator | Configuration | Total start-up time         |  
| ----- | ---------- | ------------- | -------------------         |  
| 64 ms | 6 cycles   | 21 cycles     | 64 ms + 6 oscillator cycles |  
|       |            |               | + 21 system clock cycles    |


It then goes on to describe the Reset procedure:


  
  System Control and Reset
  
  
  10.1. Resetting the AVR
  
  During reset, all I/O Registers are set to their initial values, and the program starts execution from the Reset Vector. The instruction placed at the Reset Vector must be an Relative Jump instruction (RJMP) to the reset handling routine.