| 1 | IFWI Boot Flow |
| 2 | ============== |
| 3 | |
| 4 | ╔═══════════════════════════════════════════════════════════╗ |
| 5 | ║ BIOS Region (512 KiB maximum) ║ |
| 6 | ║ ╔════════════════════════════════════════════╗ ╔════════╗ ║ |
| 7 | ║ ║ IBBM ║ ║ IBBL ║ ║ |
| 8 | ║ ╚════════════════════════════════════════════╝ ╚════════╝ ║ |
| 9 | ╚═══════════════════════════════════════════════════════════╝ |
| 10 | |
| 11 | When we enter the bootblock, the first 128k will be copied |
| 12 | into the SRAM. This will contain the IBBL partition (bootblock) |
| 13 | and whatever will fit in the IBB partition. |
| 14 | |
| 15 | We can't touch the bootblock as we are running from it. The RBP |
| 16 | can handle a maximum of 0x9be2 per copy, so the contents |
| 17 | of the SRAM is typically copied in 4 equally sized chunks of |
| 18 | 0x8000. |
| 19 | |
| 20 | ╔════════════════════╗ ╔════════════════════╗ |
| 21 | ║ SRAM (128 KiB) ║ ║ CAR ║ |
| 22 | ║ ╔═════╗ ╔════════╗ ║ ║ ╔════╗ ║ |
| 23 | ║ ║>IBBM║ ║ IBBL ║ ║ ║ ║IBBM║ ║ |
| 24 | ║ ╚═════╝ ╚════════╝ ║ ║ ╚════╝ ║ |
| 25 | ╚════════════════════╝ ╚════════════════════╝ |
| 26 | 🠗 🠕 |
| 27 | 🠖🠖🠖🠖🠖🠖🠖🠖🠖🠖🠖🠖🠖🠖🠖🠖🠖🠖 |
| 28 | |
| 29 | This means that from the bootblock, we copy the IBB in chunks of |
| 30 | 0x8000 (or less if the IBB is smaller than a chunk) into CAR. |
| 31 | |
| 32 | ╔════════════════════╗ |
| 33 | ║ CAR ║ |
| 34 | ║ ╔════════════════╗ ║ |
| 35 | ║ ║ IBBM ║ ║ |
| 36 | ║ ╚════════════════╝ ║ |
| 37 | ╚════════════════════╝ |
| 38 | |
| 39 | We mark it as executable by flushing the L1 cache and then jump |
| 40 | to the verstage in CAR. The first thing we do is set the IBBL to |
| 41 | be uncachable, as we no longer have a use for it. |
| 42 | |
| 43 | ╔════════════════════╗ |
| 44 | ║ SRAM (128 KiB) ║ |
| 45 | ║ ╔════════════════╗ ║ |
| 46 | ║ ║ ║ ║ |
| 47 | ║ ╚════════════════╝ ║ |
| 48 | ╚════════════════════╝ |
| 49 | |
| 50 | We keep copying the chunks until there is none left, then send |
| 51 | one final acknowledgement to the CSE - so it can know that the |
| 52 | bootflow is complete. |