~funderscore blog cgit wiki get in touch
aboutsummaryrefslogtreecommitdiff
blob: 2e22ca2360bbb1affc39a59ddb8c3162a85419d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Amlogic SoCs use a proprietary fork of Arm Trusted Firmware-A with added 
GPL-2.0+-licensed plugins for board-specific init, and a BL1 implementing 
a proprietary 'worldcup' USB protocol:


        ╭─────────────────────────────────────────────────────────────────────────────────────────────────┤ Secure World ├───────╮
        │                                                                                                                        │
        │       ╭─────┌────────────────╮           ╭─────┌───────────────────────╮                                               │
        │       │ BL1 │ AP Trusted ROM │──┤ L&R ├──┤ BL2 │ Trusted Boot firmware │                                               │
        │       ╰─────└────────────────╯           ╰─────└───────────────────────╯                                               │
        │                                             │                                                                          │
        │          ╭───────┤ Loads and runs¹ ├────────┤                                                                          │
        │          │                                  ╰┬──────────┤ Loads and runs ├──────────╮                                  │
        │          │                                   │                                      │                                  │
        │       ╭──┴──────┌──────────────╮             │                                   ╭──┴───┌──────────────────────╮       │
        │       │ SCP_BL2 │ SCP Firmware │             │                                   │ BL31 │ EL3 Runtime Software │       │
        │       ╰─────────└──────────────╯             │                                   ╰──────└──────────────────────╯       │
        │                                              │                                      │                                  │
        │                                              │                     ╭────┤ Runs ├────╯                                  │
        │                                              │                     │                                                   │
        │                                              ╰──────────┤ Loads ├──┴────────────────╮                                  │
        │                                                                                     │                                  │
        ╰─────────────────────────────────────────────────────────────────────────────────────│──────────────────────────────────╯
                                                                                              │
                                                                                       ╭──────│───────────┤ Normal World ├───────╮
                                                                                       │      │                                  │
                                                                                       │   ╭──┴───┌──────────────────────╮       │
                                                                                       │   │ BL33 │ Non-trusted Firmware │       │
                                                                                       │   │      │    Usually U-Boot    │       │
                                                                                       │   ╰──────└──────────────────────╯       │
                                                                                       │      │                                  │
                                                                                       │  ╭───┴───╮                              │
                                                                                       │  │  ...  │                              │
                                                                                       │  ╰───────╯                              │
                                                                                       ╰─────────────────────────────────────────╯

        ¹: SCP_BL2 is ran on the SCP.
           Also note that on GXL, BL31 runs the SCP firmware instead of BL2.

There are multiple 'plugins':
* BL2: BL21 plugin, ACS
* SCP_BL2: BL301 plugin

Another ASCII representation:

                              ___________________________________                      ___________________________________
                             |                                   |                    |                                   |_______________________________________________________________________
                             |   BL1: AP Trusted ROM             | ----------------\  |   BL2: Trusted Boot Firmware      |                        |                                              |
                             |     Does arch and platform init   |  Loads and runs  ) |     Inits DRAM and PLL and loads  |   BL21: Board Plugin   |   ACS: C struct injected in BL2 binary       |
                             |     and loads BL2 (or USB mode)   | ----------------/  |     further images into DRAM      |    Power init          |     DRAM settings, timings, and PLL config   |
                             |___________________________________|                    |___________________________________|________________________|______________________________________________|
      _______________________|                                   |                                  |   |
     |                       |   SCP_BL2/BL30: SCP Firmware      |  /-------------------------------+   |
     |   BL301: Board Plugin |     Platform-specific SCP init    | (  Sends to SCP and runs             |
     |    DVFS and suspend   |     for power management          |  \-----------------------------------+
     |_______________________|___________________________________|                                  |   |
                             |                                   |                                  |   |
           +---------------- |   BL31: EL3 Runtime Software      |  /-------------------------------+   |
           |                 |     Inits runtime services such   | (  Loads and runs                    |
           |   +------------ |     as PSCI and invokes BL33      |  \-----------------------------------+
           |   |             |___________________________________|                                  |   | 
           |   |             |                                   |                                  |   |
           |   +----------\  |   BL33: Non-trusted Firmware      |  /-------------------------------+   |
           |         Runs  ) |     Bootloader (U-Boot in most    | (  Loads                             |
           +--------------/  |     cases) which loads Linux      |  \-----------------------------------+
                             |___________________________________|