]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/ArmVExpressPkg/Scripts/uefi-aarch64-bootstrap/readme.html
ArmVirtPkg: ArmVirtQemu: expose only 64-bit entry point for v3.0+ SMBIOS
[mirror_edk2.git] / ArmPlatformPkg / ArmVExpressPkg / Scripts / uefi-aarch64-bootstrap / readme.html
CommitLineData
e6f3ed43
LL
1<h1>AArch64 UEFI bootstraps</h1>\r
2\r
3<p>Copyright (c) 2011-2013 ARM Limited. All rights reserved.\r
4See 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
18Level (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
21starting at different exception levels. The ARMv8 models start at EL3 by\r
22default.</p>\r
23\r
24<p>In the case of the Foundation model a bootstrap is required to jump to the\r
25UEFI binary as loaded in RAM. This is required as the Foundation model cannot\r
26load and execute UEFI binaries directly. The Foundation model can only load and\r
27execute 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:&lt;path/to/baremetal-tools/bin/&gt; make clean\r
35PATH=$PATH:&lt;path/to/baremetal-tools/bin/&gt; make\r
36</code></pre>\r
37\r
38<p>To build the bootstraps with a Linux GCC toolchain use the following\r
39commands:</p>\r
40\r
41<pre><code>PATH=$PATH:&lt;path/to/aarch64-linux-gnu-tools/bin/&gt; make clean\r
42PATH=$PATH:&lt;path/to/aarch64-linux-gnu-tools/bin/&gt; CROSS_COMPILE=&lt;gcc-prefix&gt; 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
68bootstrap:</p>\r
69\r
70<pre><code>&lt; ... model start script as described in top-level readme file ... &gt;\r
71 -a &lt;path/to/bootstrap-binary-file&gt;\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
79option to load a binary data blob into RAM. This can be used to run UEFI in the\r
80following manner:</p>\r
81\r
82<pre><code>&lt;PATH_TO_INSTALLED_FOUNDATION_MODEL&gt;/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