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