]>
Commit | Line | Data |
---|---|---|
e6f3ed43 LL |
1 | <h1>AArch64 UEFI bootstraps</h1>\r |
2 | \r | |
3 | <p>Copyright (c) 2011-2013 ARM Limited. All rights reserved.\r | |
4 | See the <code>LICENSE.TXT</code> file for more information.</p>\r | |
5 | \r | |
6 | <p>Contents:</p>\r | |
7 | \r | |
8 | <ul>\r | |
9 | <li>Introduction</li>\r | |
10 | <li>Build</li>\r | |
11 | <li>Use on ARMv8 RTSM and FVP models</li>\r | |
12 | <li>Use on ARMv8 Foundation model</li>\r | |
13 | </ul>\r | |
14 | \r | |
15 | <h2>Introduction</h2>\r | |
16 | \r | |
17 | <p>A bootstrap can be used to change the model state, like the Exception\r | |
18 | Level (EL), before executing the UEFI binary.</p>\r | |
19 | \r | |
20 | <p>For the ARMv8 RTSM and FVP models this can be used to show/test the UEFI binary\r | |
21 | starting at different exception levels. The ARMv8 models start at EL3 by\r | |
22 | default.</p>\r | |
23 | \r | |
24 | <p>In the case of the Foundation model a bootstrap is required to jump to the\r | |
25 | UEFI binary as loaded in RAM. This is required as the Foundation model cannot\r | |
26 | load and execute UEFI binaries directly. The Foundation model can only load and\r | |
27 | execute ELF binaries.</p>\r | |
28 | \r | |
29 | <h2>Build</h2>\r | |
30 | \r | |
31 | <p>Build the bootstraps using a AArch64 GCC cross-compiler. By default the\r | |
32 | <code>Makefile</code> is configured to assume a GCC bare-metal toolchain:</p>\r | |
33 | \r | |
34 | <pre><code>PATH=$PATH:<path/to/baremetal-tools/bin/> make clean\r | |
35 | PATH=$PATH:<path/to/baremetal-tools/bin/> make\r | |
36 | </code></pre>\r | |
37 | \r | |
38 | <p>To build the bootstraps with a Linux GCC toolchain use the following\r | |
39 | commands:</p>\r | |
40 | \r | |
41 | <pre><code>PATH=$PATH:<path/to/aarch64-linux-gnu-tools/bin/> make clean\r | |
42 | PATH=$PATH:<path/to/aarch64-linux-gnu-tools/bin/> CROSS_COMPILE=<gcc-prefix> make\r | |
43 | </code></pre>\r | |
44 | \r | |
45 | <p>The <code>gcc-prefix</code> depends on the specific toolchain distribution used. It can be\r | |
46 | "aarch64-linux-gnu-" for example.</p>\r | |
47 | \r | |
48 | <p>This will result in four <code>axf</code> files:</p>\r | |
49 | \r | |
50 | <ul>\r | |
51 | <li><p>uefi-bootstrap-el3 : The bootstrap jumps to the UEFI code in FLASH without\r | |
52 | changing anything.</p></li>\r | |
53 | <li><p>uefi-bootstrap-el2 : Setup EL3 and switch the model to EL2 before jumping to the\r | |
54 | UEFI code in FLASH.</p></li>\r | |
55 | <li><p>uefi-bootstrap-el1 : Setup EL3 and prepare to run at non-secure EL1. Switch to\r | |
56 | non-secure EL1 and run the UEFI code in FLASH.</p></li>\r | |
57 | <li><p>uefi-bootstrap-el3-foundation : The bootstrap jumps to the UEFI code in RAM\r | |
58 | without changing anything. Only to be used with the\r | |
59 | Foundation model. The Foundation model does not have\r | |
60 | non-secure memory at address <code>0x0</code> and thus the UEFI image\r | |
61 | should be pre-loaded into non-secure RAM at address\r | |
62 | <code>0xA0000000</code>.</p></li>\r | |
63 | </ul>\r | |
64 | \r | |
65 | <h2>Use on ARMv8 RTSM and FVP models</h2>\r | |
66 | \r | |
67 | <p>Add the '-a' option to the model start script and point to the required\r | |
68 | bootstrap:</p>\r | |
69 | \r | |
70 | <pre><code>< ... model start script as described in top-level readme file ... >\r | |
71 | -a <path/to/bootstrap-binary-file>\r | |
72 | </code></pre>\r | |
73 | \r | |
74 | <p>NOTE: The Foundation model bootstrap should not be used with these models.</p>\r | |
75 | \r | |
76 | <h2>Use on ARMv8 Foundation model</h2>\r | |
77 | \r | |
78 | <p>The Foundation model takes an option for an ELF file to be loaded as well as an\r | |
79 | option to load a binary data blob into RAM. This can be used to run UEFI in the\r | |
80 | following manner:</p>\r | |
81 | \r | |
82 | <pre><code><PATH_TO_INSTALLED_FOUNDATION_MODEL>/Foundation_v8 --cores=2 --visualization\r | |
83 | --image=uefi-bootstrap-el3-foundation.axf --nsdata=RTSM_VE_FOUNDATIONV8_EFI.fd@0xA0000000\r | |
84 | </code></pre>\r | |
85 | \r | |
86 | <p>NOTE: The RTSM version of the bootstraps and UEFI image will not work as\r | |
87 | expected on the Foundation model. Foundation model specific versions\r | |
88 | should be used.</p>\r |