blob: d155fcbfb845ca73a1cf9fd289bd6397287bb270 [file] [log] [blame]
Paul Beesleyf3653a62019-05-22 11:22:44 +01001Raspberry Pi 3
2==============
Antonio Nino Diaz8869b482017-12-01 11:11:26 +00003
Antonio Nino Diaz8869b482017-12-01 11:11:26 +00004The `Raspberry Pi 3`_ is an inexpensive single-board computer that contains four
Antonio Nino Diaz7c4ab212018-07-14 02:03:38 +01005Arm Cortex-A53 cores.
Antonio Nino Diaz8869b482017-12-01 11:11:26 +00006
Dan Handley610e7e12018-03-01 18:44:00 +00007The following instructions explain how to use this port of the TF-A with the
8default distribution of `Raspbian`_ because that's the distribution officially
9supported by the Raspberry Pi Foundation. At the moment of writing this, the
10officially supported kernel is a AArch32 kernel. This doesn't mean that this
11port of TF-A can't boot a AArch64 kernel. The `Linux tree fork`_ maintained by
12the Foundation can be compiled for AArch64 by following the steps in
13`AArch64 kernel build instructions`_.
Antonio Nino Diaz8869b482017-12-01 11:11:26 +000014
15**IMPORTANT NOTE**: This port isn't secure. All of the memory used is DRAM,
16which is available from both the Non-secure and Secure worlds. This port
17shouldn't be considered more than a prototype to play with and implement
18elements like PSCI to support the Linux kernel.
19
20Design
21------
22
23The SoC used by the Raspberry Pi 3 is the Broadcom BCM2837. It is a SoC with a
24VideoCore IV that acts as primary processor (and loads everything from the SD
25card) and is located between all Arm cores and the DRAM. Check the `Raspberry Pi
263 documentation`_ for more information.
27
28This explains why it is possible to change the execution state (AArch64/AArch32)
29depending on a few files on the SD card. We only care about the cases in which
30the cores boot in AArch64 mode.
31
32The rules are simple:
33
34- If a file called ``kernel8.img`` is located on the ``boot`` partition of the
35 SD card, it will load it and execute in EL2 in AArch64. Basically, it executes
36 a `default AArch64 stub`_ at address **0x0** that jumps to the kernel.
37
38- If there is also a file called ``armstub8.bin``, it will load it at address
39 **0x0** (instead of the default stub) and execute it in EL3 in AArch64. All
40 the cores are powered on at the same time and start at address **0x0**.
41
42This means that we can use the default AArch32 kernel provided in the official
Dan Handley610e7e12018-03-01 18:44:00 +000043`Raspbian`_ distribution by renaming it to ``kernel8.img``, while TF-A and
44anything else we need is in ``armstub8.bin``. This way we can forget about the
45default bootstrap code. When using a AArch64 kernel, it is only needed to make
46sure that the name on the SD card is ``kernel8.img``.
Antonio Nino Diaz8869b482017-12-01 11:11:26 +000047
48Ideally, we want to load the kernel and have all cores available, which means
49that we need to make the secondary cores work in the way the kernel expects, as
50explained in `Secondary cores`_. In practice, a small bootstrap is needed
Dan Handley610e7e12018-03-01 18:44:00 +000051between TF-A and the kernel.
Antonio Nino Diaz8869b482017-12-01 11:11:26 +000052
53To get the most out of a AArch32 kernel, we want to boot it in Hypervisor mode
54in AArch32. This means that BL33 can't be in EL2 in AArch64 mode. The
55architecture specifies that AArch32 Hypervisor mode isn't present when AArch64
56is used for EL2. When using a AArch64 kernel, it should simply start in EL2.
57
58Placement of images
59~~~~~~~~~~~~~~~~~~~
60
61The file ``armstub8.bin`` contains BL1 and the FIP. It is needed to add padding
62between them so that the addresses they are loaded to match the ones specified
Antonio Nino Diaz7c4ab212018-07-14 02:03:38 +010063when compiling TF-A. This is done automatically by the build system.
Antonio Nino Diaz8869b482017-12-01 11:11:26 +000064
65The device tree block is loaded by the VideoCore loader from an appropriate
66file, but we can specify the address it is loaded to in ``config.txt``.
67
68The file ``kernel8.img`` contains a kernel image that is loaded to the address
69specified in ``config.txt``. The `Linux kernel tree`_ has information about how
70a AArch32 Linux kernel image is loaded in ``Documentation/arm/Booting``:
71
72::
73
74 The zImage may also be placed in system RAM and called there. The
75 kernel should be placed in the first 128MiB of RAM. It is recommended
76 that it is loaded above 32MiB in order to avoid the need to relocate
77 prior to decompression, which will make the boot process slightly
78 faster.
79
80There are no similar restrictions for AArch64 kernels, as specified in the file
81``Documentation/arm64/booting.txt``.
82
83This means that we need to avoid the first 128 MiB of RAM when placing the
Dan Handley610e7e12018-03-01 18:44:00 +000084TF-A images (and specially the first 32 MiB, as they are directly used to
85place the uncompressed AArch32 kernel image. This way, both AArch32 and
Antonio Nino Diaz8869b482017-12-01 11:11:26 +000086AArch64 kernels can be placed at the same address.
87
88In the end, the images look like the following diagram when placed in memory.
89All addresses are Physical Addresses from the point of view of the Arm cores.
90Again, note that this is all just part of the same DRAM that goes from
91**0x00000000** to **0x3F000000**, it just has different names to simulate a real
92secure platform!
93
94::
95
96 0x00000000 +-----------------+
97 | ROM | BL1
Ying-Chun Liu (PaulLiu)51b146f2018-07-04 02:32:27 +080098 0x00020000 +-----------------+
Antonio Nino Diaz8869b482017-12-01 11:11:26 +000099 | FIP |
100 0x00200000 +-----------------+
101 | |
102 | ... |
103 | |
104 0x01000000 +-----------------+
Antonio Nino Diaz85135962018-07-15 11:54:42 +0100105 | DTB | (Loaded by the VideoCore)
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000106 +-----------------+
107 | |
108 | ... |
109 | |
110 0x02000000 +-----------------+
Antonio Nino Diaz85135962018-07-15 11:54:42 +0100111 | Kernel | (Loaded by the VideoCore)
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000112 +-----------------+
113 | |
114 | ... |
115 | |
116 0x10000000 +-----------------+
117 | Secure SRAM | BL2, BL31
118 0x10100000 +-----------------+
Ying-Chun Liu (PaulLiu)64c6ff12018-06-13 20:53:08 +0800119 | Secure DRAM | BL32 (Secure payload)
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000120 0x11000000 +-----------------+
Antonio Nino Diaz50c5a9e2018-07-15 11:56:33 +0100121 | Non-secure DRAM | BL33
122 +-----------------+
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000123 | |
124 | ... |
125 | |
126 0x3F000000 +-----------------+
127 | I/O |
128 0x40000000 +-----------------+
129
Antonio Nino Diaz85135962018-07-15 11:54:42 +0100130The area between **0x10000000** and **0x11000000** has to be manually protected
Antonio Nino Diazf96582a2018-10-19 00:57:16 +0100131so that the kernel doesn't use it. The current port tries to modify the live DTB
132to add a memreserve region that reserves the previously mentioned area.
133
134If this is not possible, the user may manually add ``memmap=16M$256M`` to the
135command line passed to the kernel in ``cmdline.txt``. See the `Setup SD card`_
136instructions to see how to do it. This system is strongly discouraged.
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000137
138The last 16 MiB of DRAM can only be accessed by the VideoCore, that has
139different mappings than the Arm cores in which the I/O addresses don't overlap
140the DRAM. The memory reserved to be used by the VideoCore is always placed at
141the end of the DRAM, so this space isn't wasted.
142
Dan Handley610e7e12018-03-01 18:44:00 +0000143Considering the 128 MiB allocated to the GPU and the 16 MiB allocated for
144TF-A, there are 880 MiB available for Linux.
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000145
146Boot sequence
147~~~~~~~~~~~~~
148
Dan Handley610e7e12018-03-01 18:44:00 +0000149The boot sequence of TF-A is the usual one except when booting an AArch32
150kernel. In that case, BL33 is booted in AArch32 Hypervisor mode so that it
151can jump to the kernel in the same mode and let it take over that privilege
152level. If BL33 was running in EL2 in AArch64 (as in the default bootflow of
153TF-A) it could only jump to the kernel in AArch32 in Supervisor mode.
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000154
155The `Linux kernel tree`_ has instructions on how to jump to the Linux kernel
156in ``Documentation/arm/Booting`` and ``Documentation/arm64/booting.txt``. The
157bootstrap should take care of this.
158
Antonio Nino Diaz7c4ab212018-07-14 02:03:38 +0100159This port support a direct boot of the Linux kernel from the firmware (as a BL33
160image). Alternatively, U-Boot or other bootloaders may be used.
161
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000162Secondary cores
163~~~~~~~~~~~~~~~
164
Antonio Nino Diaz7c4ab212018-07-14 02:03:38 +0100165This port of the Trusted Firmware-A supports ``PSCI_CPU_ON``,
Paul Beesleyf3653a62019-05-22 11:22:44 +0100166``PSCI_SYSTEM_RESET`` and ``PSCI_SYSTEM_OFF``. The last one doesn't really turn
Antonio Nino Diaz7c4ab212018-07-14 02:03:38 +0100167the system off, it simply reboots it and asks the VideoCore firmware to keep it
168in a low power mode permanently.
169
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000170The kernel used by `Raspbian`_ doesn't have support for PSCI, so it is needed to
171use mailboxes to trap the secondary cores until they are ready to jump to the
172kernel. This mailbox is located at a different address in the AArch32 default
173kernel than in the AArch64 kernel.
174
Antonio Nino Diaz7c4ab212018-07-14 02:03:38 +0100175Kernels with PSCI support can use the PSCI calls instead for a cleaner boot.
176
Dan Handley610e7e12018-03-01 18:44:00 +0000177Also, this port of TF-A has another Trusted Mailbox in Shared BL RAM. During
178cold boot, all secondary cores wait in a loop until they are given given an
179address to jump to in this Mailbox (``bl31_warm_entrypoint``).
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000180
181Once BL31 has finished and the primary core has jumped to the BL33 payload, it
182has to call ``PSCI_CPU_ON`` to release the secondary CPUs from the wait loop.
183The payload then makes them wait in another waitloop listening from messages
184from the kernel. When the primary CPU jumps into the kernel, it will send an
185address to the mailbox so that the secondary CPUs jump to it and are recognised
186by the kernel.
187
188Build Instructions
189------------------
190
191To boot a AArch64 kernel, only the AArch64 toolchain is required.
192
193To boot a AArch32 kernel, both AArch64 and AArch32 toolchains are required. The
194AArch32 toolchain is needed for the AArch32 bootstrap needed to load a 32-bit
195kernel.
196
Antonio Nino Diazdfe895d2018-07-12 08:58:38 +0100197The build system concatenates BL1 and the FIP so that the addresses match the
198ones in the memory map. The resulting file is ``armstub8.bin``, located in the
Antonio Nino Diaz7c4ab212018-07-14 02:03:38 +0100199build folder (e.g. ``build/rpi3/debug/armstub8.bin``). To know how to use this
200file, follow the instructions in `Setup SD card`_.
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000201
202The following build options are supported:
203
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000204- ``RPI3_BL33_IN_AARCH32``: This port can load a AArch64 or AArch32 BL33 image.
Dan Handley610e7e12018-03-01 18:44:00 +0000205 By default this option is 0, which means that TF-A will jump to BL33 in EL2
206 in AArch64 mode. If set to 1, it will jump to BL33 in Hypervisor in AArch32
207 mode.
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000208
Antonio Nino Diaz7c4ab212018-07-14 02:03:38 +0100209- ``PRELOADED_BL33_BASE``: Used to specify the address of a BL33 binary that has
210 been preloaded by any other system than using the firmware. ``BL33`` isn't
211 needed in the build command line if this option is used. Specially useful
212 because the file ``kernel8.img`` can be loaded anywhere by modifying the file
213 ``config.txt``. It doesn't have to contain a kernel, it could have any
214 arbitrary payload.
215
216- ``RPI3_DIRECT_LINUX_BOOT``: Disabled by default. Set to 1 to enable the direct
217 boot of the Linux kernel from the firmware. Option ``RPI3_PRELOADED_DTB_BASE``
218 is mandatory when the direct Linux kernel boot is used. Options
219 ``PRELOADED_BL33_BASE`` will most likely be needed as well because it is
220 unlikely that the kernel image will fit in the space reserved for BL33 images.
221 This option can be combined with ``RPI3_BL33_IN_AARCH32`` in order to boot a
222 32-bit kernel. The only thing this option does is to set the arguments in
223 registers x0-x3 or r0-r2 as expected by the kernel.
224
225- ``RPI3_PRELOADED_DTB_BASE``: Auxiliary build option needed when using
226 ``RPI3_DIRECT_LINUX_BOOT=1``. This option allows to specify the location of a
227 DTB in memory.
228
Pete Batardc9acd6c2018-11-13 13:14:26 +0000229- ``RPI3_RUNTIME_UART``: Indicates whether the UART should be used at runtime
230 or disabled. ``-1`` (default) disables the runtime UART. Any other value
231 enables the default UART (currently UART1) for runtime messages.
232
Pete Batardf820cad2018-11-15 22:29:59 +0000233- ``RPI3_USE_UEFI_MAP``: Set to 1 to build ATF with the altername memory
Pete Batard3fabc882018-11-20 16:25:15 +0000234 mapping required for an UEFI firmware payload. These changes are needed
235 to be able to run Windows on ARM64. This option, which is disabled by
236 default, results in the following memory mappings:
Pete Batardf820cad2018-11-15 22:29:59 +0000237
238::
239
240 0x00000000 +-----------------+
241 | ROM | BL1
242 0x00010000 +-----------------+
243 | DTB | (Loaded by the VideoCore)
244 0x00020000 +-----------------+
245 | FIP |
246 0x00030000 +-----------------+
247 | |
248 | UEFI PAYLOAD |
249 | |
250 0x00200000 +-----------------+
251 | Secure SRAM | BL2, BL31
252 0x00300000 +-----------------+
253 | Secure DRAM | BL32 (Secure payload)
254 0x00400000 +-----------------+
255 | |
256 | |
257 | Non-secure DRAM | BL33
258 | |
259 | |
260 0x01000000 +-----------------+
261 | |
262 | ... |
263 | |
264 0x3F000000 +-----------------+
265 | I/O |
266
Ying-Chun Liu (PaulLiu)64c6ff12018-06-13 20:53:08 +0800267- ``BL32``: This port can load and run OP-TEE. The OP-TEE image is optional.
268 Please use the code from `here <https://github.com/OP-TEE/optee_os>`__.
269 Build the Trusted Firmware with option ``BL32=tee-header_v2.bin
270 BL32_EXTRA1=tee-pager_v2.bin BL32_EXTRA2=tee-pageable_v2.bin``
271 to put the binaries into the FIP.
272
Antonio Nino Diaz9abd78d2018-07-11 21:00:32 +0100273 Note: If OP-TEE is used it may be needed to add the following options to the
274 Linux command line so that the USB driver doesn't use FIQs:
275 ``dwc_otg.fiq_enable=0 dwc_otg.fiq_fsm_enable=0 dwc_otg.nak_holdoff=0``.
276 This will unfortunately reduce the performance of the USB driver. It is needed
277 when using Raspbian, for example.
278
Antonio Nino Diaz7c4ab212018-07-14 02:03:38 +0100279- ``TRUSTED_BOARD_BOOT``: This port supports TBB. Set this option to 1 to enable
280 it. In order to use TBB, you might want to set ``GENERATE_COT=1`` to let the
281 contents of the FIP automatically signed by the build process. The ROT key
282 will be generated and output to ``rot_key.pem`` in the build directory. It is
283 able to set ROT_KEY to your own key in PEM format. Also in order to build,
284 you need to clone mbed TLS from `here <https://github.com/ARMmbed/mbedtls>`__.
285 ``MBEDTLS_DIR`` must point at the mbed TLS source directory.
286
287- ``ENABLE_STACK_PROTECTOR``: Disabled by default. It uses the hardware RNG of
288 the board.
Ying-Chun Liu (PaulLiu)4176e0f2018-07-05 14:55:21 +0800289
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000290The following is not currently supported:
291
Dan Handley610e7e12018-03-01 18:44:00 +0000292- AArch32 for TF-A itself.
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000293
294- ``EL3_PAYLOAD_BASE``: The reason is that you can already load anything to any
295 address by changing the file ``armstub8.bin``, so there's no point in using
Dan Handley610e7e12018-03-01 18:44:00 +0000296 TF-A in this case.
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000297
Antonio Nino Diaz1f470022018-03-27 09:39:47 +0100298- ``MULTI_CONSOLE_API=0``: The multi console API must be enabled. Note that the
299 crash console uses the internal 16550 driver functions directly in order to be
300 able to print error messages during early crashes before setting up the
301 multi console API.
302
Antonio Nino Diaz7c4ab212018-07-14 02:03:38 +0100303Building the firmware for kernels that don't support PSCI
304~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
305
306This is the case for the 32-bit image of Raspbian, for example. 64-bit kernels
307always support PSCI, but they may not know that the system understands PSCI due
308to an incorrect DTB file.
309
310First, clone and compile the 32-bit version of the `Raspberry Pi 3 TF-A
311bootstrap`_. Choose the one needed for the architecture of your kernel.
312
313Then compile TF-A. For a 32-bit kernel, use the following command line:
314
315.. code:: shell
316
317 CROSS_COMPILE=aarch64-linux-gnu- make PLAT=rpi3 \
318 RPI3_BL33_IN_AARCH32=1 \
319 BL33=../rpi3-arm-tf-bootstrap/aarch32/el2-bootstrap.bin
320
321For a 64-bit kernel, use this other command line:
322
323.. code:: shell
324
325 CROSS_COMPILE=aarch64-linux-gnu- make PLAT=rpi3 \
326 BL33=../rpi3-arm-tf-bootstrap/aarch64/el2-bootstrap.bin
327
328However, enabling PSCI support in a 64-bit kernel is really easy. In the
329repository `Raspberry Pi 3 TF-A bootstrap`_ there is a patch that can be applied
330to the Linux kernel tree maintained by the Raspberry Pi foundation. It modifes
331the DTS to tell the kernel to use PSCI. Once this patch is applied, follow the
332instructions in `AArch64 kernel build instructions`_ to get a working 64-bit
333kernel image and supporting files.
334
335Building the firmware for kernels that support PSCI
336~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
337
338For a 64-bit kernel:
339
340.. code:: shell
341
342 CROSS_COMPILE=aarch64-linux-gnu- make PLAT=rpi3 \
Antonio Nino Diaz85135962018-07-15 11:54:42 +0100343 PRELOADED_BL33_BASE=0x02000000 \
344 RPI3_PRELOADED_DTB_BASE=0x01000000 \
Antonio Nino Diaz7c4ab212018-07-14 02:03:38 +0100345 RPI3_DIRECT_LINUX_BOOT=1
346
347For a 32-bit kernel:
348
349.. code:: shell
350
351 CROSS_COMPILE=aarch64-linux-gnu- make PLAT=rpi3 \
Antonio Nino Diaz85135962018-07-15 11:54:42 +0100352 PRELOADED_BL33_BASE=0x02000000 \
353 RPI3_PRELOADED_DTB_BASE=0x01000000 \
Antonio Nino Diaz7c4ab212018-07-14 02:03:38 +0100354 RPI3_DIRECT_LINUX_BOOT=1 \
355 RPI3_BL33_IN_AARCH32=1
356
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000357AArch64 kernel build instructions
358---------------------------------
359
360The following instructions show how to install and run a AArch64 kernel by
361using a SD card with the default `Raspbian`_ install as base. Skip them if you
362want to use the default 32-bit kernel.
363
364Note that this system won't be fully 64-bit because all the tools in the
365filesystem are 32-bit binaries, but it's a quick way to get it working, and it
366allows the user to run 64-bit binaries in addition to 32-bit binaries.
367
3681. Clone the `Linux tree fork`_ maintained by the Raspberry Pi Foundation. To
369 speed things up, do a shallow clone of the desired branch.
370
371.. code:: shell
372
Antonio Nino Diaz7c4ab212018-07-14 02:03:38 +0100373 git clone --depth=1 -b rpi-4.18.y https://github.com/raspberrypi/linux
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000374 cd linux
375
3762. Configure and compile the kernel. Adapt the number after ``-j`` so that it is
377 1.5 times the number of CPUs in your computer. This may take some time to
378 finish.
379
380.. code:: shell
381
382 make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bcmrpi3_defconfig
383 make -j 6 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
384
3853. Copy the kernel image and the device tree to the SD card. Replace the path
386 by the corresponding path in your computers to the ``boot`` partition of the
387 SD card.
388
389.. code:: shell
390
391 cp arch/arm64/boot/Image /path/to/boot/kernel8.img
392 cp arch/arm64/boot/dts/broadcom/bcm2710-rpi-3-b.dtb /path/to/boot/
Antonio Nino Diaz7c4ab212018-07-14 02:03:38 +0100393 cp arch/arm64/boot/dts/broadcom/bcm2710-rpi-3-b-plus.dtb /path/to/boot/
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000394
3954. Install the kernel modules. Replace the path by the corresponding path to the
396 filesystem partition of the SD card on your computer.
397
398.. code:: shell
399
400 make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
401 INSTALL_MOD_PATH=/path/to/filesystem modules_install
402
4035. Follow the instructions in `Setup SD card`_ except for the step of renaming
404 the existing ``kernel7.img`` (we have already copied a AArch64 kernel).
405
406Setup SD card
407-------------
408
409The instructions assume that you have an SD card with a fresh install of
410`Raspbian`_ (or that, at least, the ``boot`` partition is untouched, or nearly
Antonio Nino Diaz1f470022018-03-27 09:39:47 +0100411untouched). They have been tested with the image available in 2018-03-13.
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000412
4131. Insert the SD card and open the ``boot`` partition.
414
4152. Rename ``kernel7.img`` to ``kernel8.img``. This tricks the VideoCore
Dan Handley610e7e12018-03-01 18:44:00 +0000416 bootloader into booting the Arm cores in AArch64 mode, like TF-A needs,
417 even though the kernel is not compiled for AArch64.
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000418
4193. Copy ``armstub8.bin`` here. When ``kernel8.img`` is available, The VideoCore
420 bootloader will look for a file called ``armstub8.bin`` and load it at
421 address **0x0** instead of a predefined one.
422
Antonio Nino Diazf96582a2018-10-19 00:57:16 +01004234. To enable the serial port "Mini UART" in Linux, open ``cmdline.txt`` and add
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000424 ``console=serial0,115200 console=tty1``.
425
Antonio Nino Diaz8869b482017-12-01 11:11:26 +00004265. Open ``config.txt`` and add the following lines at the end (``enable_uart=1``
427 is only needed to enable debugging through the Mini UART):
428
429::
430
431 enable_uart=1
Antonio Nino Diaz85135962018-07-15 11:54:42 +0100432 kernel_address=0x02000000
433 device_tree_address=0x01000000
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000434
435If you connect a serial cable to the Mini UART and your computer, and connect
436to it (for example, with ``screen /dev/ttyUSB0 115200``) you should see some
437text. In the case of an AArch32 kernel, you should see something like this:
438
439::
440
441 NOTICE: Booting Trusted Firmware
442 NOTICE: BL1: v1.4(release):v1.4-329-g61e94684-dirty
443 NOTICE: BL1: Built : 00:09:25, Nov 6 2017
444 NOTICE: BL1: Booting BL2
445 NOTICE: BL2: v1.4(release):v1.4-329-g61e94684-dirty
446 NOTICE: BL2: Built : 00:09:25, Nov 6 2017
447 NOTICE: BL1: Booting BL31
448 NOTICE: BL31: v1.4(release):v1.4-329-g61e94684-dirty
449 NOTICE: BL31: Built : 00:09:25, Nov 6 2017
450 [ 0.266484] bcm2835-aux-uart 3f215040.serial: could not get clk: -517
451
452 Raspbian GNU/Linux 9 raspberrypi ttyS0
453 raspberrypi login:
454
455Just enter your credentials, everything should work as expected. Note that the
456HDMI output won't show any text during boot.
457
458.. _default Arm stub: https://github.com/raspberrypi/tools/blob/master/armstubs/armstub7.S
459.. _default AArch64 stub: https://github.com/raspberrypi/tools/blob/master/armstubs/armstub8.S
460.. _Linux kernel tree: https://github.com/torvalds/linux
461.. _Linux tree fork: https://github.com/raspberrypi/linux
462.. _Raspberry Pi 3: https://www.raspberrypi.org/products/raspberry-pi-3-model-b/
Dan Handley610e7e12018-03-01 18:44:00 +0000463.. _Raspberry Pi 3 TF-A bootstrap: https://github.com/AntonioND/rpi3-arm-tf-bootstrap
Antonio Nino Diaz8869b482017-12-01 11:11:26 +0000464.. _Raspberry Pi 3 documentation: https://www.raspberrypi.org/documentation/
465.. _Raspbian: https://www.raspberrypi.org/downloads/raspbian/