e578acd496541f33682541e4354f0ec1f7990db6
[AGL/documentation.git] / docs / 2_Architecture_Guides / 2.2_Security_Blueprint / 2_Secure_Boot / 1.2.2.3_Consoles.md
1 ---
2 edit_link: ''
3 title: Consoles
4 origin_url: >-
5   https://raw.githubusercontent.com/automotive-grade-linux/docs-sources/master/docs/security-blueprint/part-2/3-Consoles.md
6 ---
7
8 <!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/architecture/master/security_blueprint-security-blueprint-book.yml -->
9
10 # Consoles
11
12 ## Disable serial console
13
14 Serial console output shall be disabled. To disable console output in U-Boot,
15 set the following macros:
16
17 <!-- section-config -->
18
19 Domain                 | `Config` name                           | `Value`
20 ---------------------- | --------------------------------------- | ---------
21 Boot-Consoles-Serial-1 | `CONFIG_SILENT_CONSOLE`                 | `Disable`
22 Boot-Consoles-Serial-2 | `CONFIG_SYS_DEVICE_NULLDEV`             | `Disable`
23 Boot-Consoles-Serial-3 | `CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC` | `Disable`
24
25 <!-- end-section-config --> <!-- section-todo -->
26
27 Domain          | Improvement
28 --------------- | ------------------------------------
29 Boot-Consoles-1 | Secure loader: No reference earlier?
30
31 <!-- end-section-todo -->
32
33 And set "**silent**" environment variable. For the Secure loader,
34 disable the traces by not defining the below macro:
35
36 <!-- section-config -->
37
38 Domain                 | `Environment variable` name | _State_
39 ---------------------- | --------------------------- | -------------
40 Boot-Consoles-Serial-1 | `INC_DEBUG_PRINT`           | _Not defined_
41
42 <!-- end-section-config -->
43
44 For sboot proper configuration needs to be done to disable the serial console.
45
46 --------------------------------------------------------------------------------
47
48 <!-- pagebreak -->
49
50 ## Immutable environment variables
51
52 In U-Boot, ensure Kernel command line, boot commands, boot delay and other
53 environment variables are immutable. This will prevent side-loading of alternate
54 images, by restricting the boot selection to only the image in FLASH.
55
56 The environment variables shall be part of the text region in U-Boot as default
57 environment variable and not in non-volatile memory.
58
59 Remove configuration options related to non-volatile memory, such as:
60
61 <!-- section-config -->
62
63 Domain                     | `Config` name                | _State_
64 -------------------------- | ---------------------------- | ---------
65 Boot-Consoles-Variables-1  | `CONFIG_ENV_IS_IN_MMC`       | `#undef`
66 Boot-Consoles-Variables-2  | `CONFIG_ENV_IS_IN_EEPROM`    | `#undef`
67 Boot-Consoles-Variables-3  | `CONFIG_ENV_IS_IN_FLASH`     | `#undef`
68 Boot-Consoles-Variables-4  | `CONFIG_ENV_IS_IN_DATAFLASH` | `#undef`
69 Boot-Consoles-Variables-5  | `CONFIG_ENV_IS_IN_FAT`       | `#undef`
70 Boot-Consoles-Variables-6  | `CONFIG_ENV_IS_IN_NAND`      | `#undef`
71 Boot-Consoles-Variables-7  | `CONFIG_ENV_IS_IN_NVRAM`     | `#undef`
72 Boot-Consoles-Variables-8  | `CONFIG_ENV_IS_IN_ONENAND`   | `#undef`
73 Boot-Consoles-Variables-9  | `CONFIG_ENV_IS_IN_SPI_FLASH` | `#undef`
74 Boot-Consoles-Variables-10 | `CONFIG_ENV_IS_IN_REMOTE`    | `#undef`
75 Boot-Consoles-Variables-11 | `CONFIG_ENV_IS_IN_UBI`       | `#undef`
76 Boot-Consoles-Variables-12 | `CONFIG_ENV_IS_NOWHERE`      | `#define`
77
78 <!-- end-section-config -->
79
80 --------------------------------------------------------------------------------
81
82 <!-- pagebreak -->
83
84 ## (Recommendation) Removal of memory dump commands
85
86 In U-Boot, following commands shall be disabled to avoid memory dumps:
87
88 ```
89 md : Memory Display command.
90 mm : Memory modify command - auto incrementing address.
91 nm : Memory modify command - constant address.
92 mw : Memory write.
93 cp : Memory copy.
94 mwc : Memory write cyclic.
95 mdc : Memory display cyclic.
96 mtest : Simple ram read/write test.
97 loopw : Infinite write loop on address range.
98 ```
99
100 <!-- section-config -->
101
102 Domain                  | `Command` name | _State_
103 ----------------------- | -------------- | ----------
104 Boot-Consoles-MemDump-1 | `md`           | _Disabled_
105 Boot-Consoles-MemDump-2 | `mm`           | _Disabled_
106 Boot-Consoles-MemDump-3 | `nm`           | _Disabled_
107 Boot-Consoles-MemDump-4 | `mw`           | _Disabled_
108 Boot-Consoles-MemDump-5 | `cp`           | _Disabled_
109 Boot-Consoles-MemDump-6 | `mwc`          | _Disabled_
110 Boot-Consoles-MemDump-7 | `mdc`          | _Disabled_
111 Boot-Consoles-MemDump-8 | `mtest`        | _Disabled_
112 Boot-Consoles-MemDump-9 | `loopw`        | _Disabled_
113
114 <!-- end-section-config -->
115
116 Similarly, memory dump support shall be disabled from sboot.