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