Debian Codegraph @

Documentation/getting_started/faq.md

raw symbols SCIP
1 # coreboot FAQ
2
3 ## General coreboot questions
4
5
6 ### What is coreboot?
7
8 coreboot is a free and open software project designed to initialize
9 computers and embedded systems in a fast, secure, and auditable fashion.
10 The focus is on minimal hardware initialization: to do only what is
11 absolutely needed, then pass control to other software (a payload, in
12 coreboot parlance) in order to boot the operating system securely.
13
14
15 ### What is a coreboot payload?
16
17 coreboot itself does not deal with boot media such as hard-drives,
18 SSDs, or USB flash-drives, beyond initializing the underlying hardware.
19 So in order to actually boot an operating system, another piece of
20 software which does do those things must be used. coreboot supports
21 a large number of diverse payloads; see below for more details.
22
23
24 ### Is coreboot the same as UEFI?
25
26 No. coreboot and UEFI are both system firmware that handle the
27 initialization of the hardware, but are otherwise not similar.
28 coreboot’s goal is to **just** initialize the hardware and exit.
29 This makes coreboot smaller and simpler, leading to faster boot times,
30 and making it easier to find and fix bugs. The result is a higher
31 overall security.
32
33
34 ### What's the difference between coreboot and UEFI?
35
36 UEFI is actually a firmware specification, not a specific software
37 implementation. Intel, along with the rest of the Tianocore project,
38 has released an open-source implementation of the overall framework,
39 EDK2, but it does not come with hardware support. Most hardware running
40 UEFI uses a proprietary implementation built on top of EDK2.
41
42 coreboot does not implement the UEFI specification, but it can be used to
43 initialize the system, then launch a UEFI payload such as EDK2 in order
44 to provide UEFI boot services.
45
46 The UEFI specification also defines and allows for many things that are
47 outside of coreboot’s scope, including (but not limited to):
48
49 * Boot device selection
50 * Updating the firmware
51 * A CLI shell
52 * Network communication
53 * An integrated setup menu
54
55
56 ### Can coreboot boot operating systems that require UEFI?
57
58 Yes, but... again, coreboot **just** initializes the hardware. coreboot
59 itself doesn’t load operating systems from storage media other than the
60 flash chip. Unlike UEFI, coreboot does not, and will not contain a Wi-Fi
61 driver or communicate directly with any sort of network. That sort of
62 functionality is not related to hardware initialization.
63
64 To boot operating systems that require UEFI, coreboot can be compiled with
65 EDK2 as the payload. This allows coreboot to perform the hardware init,
66 with EDK2 supplying the UEFI boot interface and runtime services to
67 the operating system.
68
69
70 ### What non-UEFI payloads does coreboot support?
71
72 * SeaBIOS, behaves like a classic BIOS, allowing you to boot operating
73 systems that rely on the legacy interrupts.
74
75 * GRUB can be used as a coreboot payload, and is currently the most
76 common approach to full disk encryption (FDE).
77
78 * A Linux kernel and initramfs stored alongside coreboot in the boot
79 ROM can also be used as a payload. In this scenario coreboot
80 initializes hardware, loads Linux from boot ROM into RAM, and
81 executes it. The embedded Linux environment can look for a target OS
82 kernel to load from local storage or over a network and execute it
83 using kexec. This is sometimes called LinuxBoot.
84
85 * U-boot, depthcharge, FILO, etc.
86
87 There’s [https://doc.coreboot.org/payloads.html](https://doc.coreboot.org/payloads.html)
88 with a list, although it’s not complete.
89
90
91 ### What does coreboot leave in memory after it's done initializing the hardware?
92
93 While coreboot tries to remove itself completely from memory after
94 finishing, some tables and data need to remain for the OS. coreboot
95 reserves an area in memory known as CBMEM, to save this data after it
96 has finished booting. This contains things such as the boot log, tables
97 that get passed to the payload, SMBIOS, and ACPI tables for the OS.
98
99 In addition to CBMEM, on X86 systems, coreboot will typically set up
100 SMM, which will remain resident after coreboot exits.
101
102
103 ## Platforms
104
105 ### What’s the best coreboot platform for a user?
106
107 The choice of the best coreboot platform for a user can vary depending
108 on their specific needs, preferences, and use cases.
109
110 Typically, people who want a system with a minimum of proprietary
111 firmware are restricted to older systems like the Lenovo X220, or more
112 expensive, non-x86 solutions like TALOS, from Raptor Engineering.
113
114 There are a number of companies selling modern systems, but those all
115 require more proprietary binaries in addition to coreboot (e.g., Intel
116 FSP). However, unlike the older ThinkPads, many of these newer devices
117 use open-source embedded controller (EC) firmware, so there are
118 tradeoffs with either option.
119
120 The coreboot project mantains a list of companies selling machines
121 which use coreboot on the [website](https://coreboot.org/users.html).
122
123
124 ### What’s the best platform for coreboot development?
125
126 Similar to the best platform for users, the best platform for
127 developers very much depends on what a developer is trying to do.
128
129 * QEMU is generally the easiest platform for coreboot development, just
130 because it’s easy to run anywhere. However, it’s possible for things
131 to work properly in QEMU but fail miserably on actual hardware.
132
133 While laptops tend to be harder to develop than desktop platforms, a
134 majority of newer platforms on coreboot tend to be laptops. The
135 development difficulty is due to a few different factors:
136
137 1. The EC (Embedded Controller) is a specialized microcontroller that
138 typically handles keyboard and sometimes mouse input for a laptop.
139 It also controls many power management functions such as fans, USB-C
140 power delivery, etc. ECs run mainboard-specific firmware, which is
141 typically undocumented.
142 2. ThinkPads (X230, 30-series, 20-series, T430, T540, T520). Sandy
143 Bridge and Ivy Bridge are well-supported. Some may have
144 difficult-to-reach SPI flash chips. Boards with two flash chips (e.g.
145 30-series ThinkPads) are harder to externally reflash as one needs to
146 make sure the non-targeted flash chip remains disabled at all times.
147 The X230 is notoriously sensitive to external reflashing issues.
148 3. Laptops often lack a convenient method to obtain firmware boot logs.
149 One can use EHCI debug on older systems and Chromebook-specific
150 solutions for Chromebooks, but one often has to resort to flashconsole
151 (writing coreboot logs to the flash chip where coreboot resides). On
152 the other hand, several desktop mainboards still have a RS-232 serial
153 port.
154
155 Some of the easiest physical systems to use for coreboot development
156 are Chromebooks. Newer Chromebooks allow for debug without opening the
157 case. Look for SuzyQ Cables or SuzyQables or instructions on how to
158 build one. These cables only work on a specific port in a specific
159 orientation. Google [supplies
160 specifications](https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/master/docs/ccd.md#SuzyQ-SuzyQable)
161 for these cables.
162
163
164 ### What platforms does coreboot support?
165
166 The most accurate way to determine what systems coreboot supports is by
167 browsing the src/mainboard tree or running “make menuconfig” and going
168 through the “Mainboard” submenu. You can also search Gerrit to see if
169 there are any unmerged ports for your board.
170
171 There is also the board status page
172 ([https://coreboot.org/status/board-status.html](https://coreboot.org/status/board-status.html)),
173 however this does not currently show supported board variants.
174
175
176 ## coreboot Development
177
178 ### Can coreboot be ported to [this board]?
179
180 The best way to determine if coreboot can be ported to a system is to
181 see if the processor and chipset is supported. The next step is to see
182 whether the system is locked to the proprietary firmware which comes
183 with the board.
184
185 Intel Platforms:
186
187 * coreboot only supports a few northbridges (back when northbridges
188 were on a separate package), and there's next to no support for
189 "server" platforms (multi-socket and similar things). Here's a list
190 of more recent supported Intel processors:
191 * Alder Lake (2021 - Core Gen 12)
192 * Apollo Lake (2016 - Atom)
193 * Baytrail (2014 - Atom)
194 * Braswell (2016 - Atom)
195 * Broadwell (2014 - Core Gen 5)
196 * Comet Lake (2019 - Core Gen 10)
197 * Cannon Lake (2018 - Core Gen 8/9)
198 * Denverton (2017)
199 * Elkhart lake (2021 - Atom)
200 * Haswell (2013 - Core Gen 4)
201 * Ivy Bridge (2012 - Core Gen 3)
202 * Jasper Lake (2021 - Atom)
203 * Kaby Lake (2016 - Core Gen 7/8)
204 * Meteor Lake (2023 - Gen 1 Ultra-mobile)
205 * Sandy Bridge (2011 - Core Gen 2)
206 * Sky Lake (2015 - Core Gen 6)
207 * Tiger Lake (2020 - Core Gen 11)
208 * Whiskey Lake (2018 - Core Gen 8)
209
210 * Intel Boot Guard is a security feature which tries to prevent loading
211 unauthorized firmware by the mainboard. If supported by the platform,
212 and the platform is supported by intelmetool, you should check if Boot
213 Guard is enabled. If it is, then getting coreboot to run will be
214 difficult or impossible even if it is ported. You can run
215 `intelmetool -b` on supported platforms to see if Boot Guard is
216 enabled (although it can fail because it wants to probe the ME
217 beforehand).
218
219 AMD Ryzen-based platforms:
220
221 * The AMD platforms Ryzen-based platforms unfortunately are currently
222 not well supported outside of the Chromebooks (and AMD reference
223 boards) currently in the tree.
224 The responsible teams are trying to fix this, but currently it's
225 **very** difficult to do a new port. Recent supported SoCs:
226 * Stoney Ridge
227 * Picasso
228 * Cezanne
229 * Mendocino
230 * Phoenix
231
232 General notes:
233
234 * Check the output of `lspci` to determine what processor/chipset
235 family your system has. Processor/chipset support is the most
236 important to determine if a board can be ported.
237 * Check the output of `superiotool` to see if it detects the Super I/O
238 on the system. You can also check board schematics and/or boardviews
239 if you can find them, or physically look at the mainboard for a chip
240 from one of the common superio vendors.
241 * Check what EC your system has (mostly applicable to laptops, but some
242 desktops have EC-like chips). You will likely need to refer to the
243 actual board or schematics/boardviews for this. Physical observation
244 is the most accurate identification procedure; software detection can
245 then be used to double-check if the chip is correct, but one should
246 not rely on software detection alone to identify an EC.
247
248
249 ### How do I port coreboot to [this board]?
250
251 A critical piece for anyone attempting to do a board port is to make
252 sure that you have a method to recover your system from a failed flash.
253
254 We need an updated motherboard porting guide, but currently the guide
255 on the [wiki](https://www.coreboot.org/Motherboard_Porting_Guide) looks
256 to be the best reference.
257
258 At the moment, the best answer to this question is to ask for help on
259 one of the [various community
260 forums](https://doc.coreboot.org/community/forums.html).
261
262
263 ### What about the Intel ME?
264
265 There seems to be a lot of FUD about what the ME can and can’t do.
266 coreboot currently does not have a clear recommendation on how to
267 handle the ME. We understand that there are serious concerns about the
268 ME, and would like to flatly recommend removing as much as possible,
269 however modifying the ME can cause serious stability issues.
270
271 Additionally, coreboot and the Intel ME are completely separate entites
272 which in many cases simply happen to occupy the same flash chip. It is
273 not necessary to run coreboot to modify the ME, and running coreboot
274 does not imply anything about the ME's operational state.
275
276
277 #### A word of caution about the modifying ME
278
279 Messing with the ME firmware can cause issues, and this is outside the
280 scope of the coreboot project.
281
282 If you do decide to modify the ME firmware, please make sure coreboot
283 works **before** messing with it. Even if the vendor boot firmware
284 works when the ME isn't operating normally, it's possible that coreboot
285 doesn't handle it the same way and something breaks. If someone asks
286 for help with coreboot and we think the ME state may be a factor, we'll
287 ask them to try reproducing the issue with the ME running normally to
288 reduce the number of variables involved. This is especially important
289 when flashing coreboot for the first time, as it's best for newbies to
290 start with small steps: start by flashing coreboot to the BIOS region
291 and leaving the remaining regions untouched, then tinker around with
292 coreboot options (e.g. other payloads, bootsplash, RAM overclock...),
293 or try messing with the ME firmware **without changing coreboot**.
294
295 Most people don't understand the implications of messing with the ME
296 firmware, especially the use of `me_cleaner`. We admit that we don't
297 know everything about the ME, but we try to understand it as much as
298 possible. The ME is designed to operate correctly with the HAP (or
299 AltMeDisable) bit set, and it will gracefully enter a debug state (not
300 normal, but not an error). However, when using `me_cleaner` to remove
301 parts of the ME firmware, the ME will often end up in an error state
302 because parts of its FW are missing. It is known that removing some of
303 these parts ([`EFFS` and `FCRS` on Cougar Point,
304 c.f.](https://review.coreboot.org/c/coreboot/+/27798/6/src/mainboard/asus/p8h61-m_lx/Kconfig#63))
305 can cause problems. We do not know whether the state the ME ends up in
306 after applying `me_cleaner` is as secure as the state the ME goes to
307 when only the HAP bit is set: the removed FW modules could contain
308 steps to lock down important settings for security reasons.
309
310 To sum up, **we do not recommend messing with the ME firmware**. But if
311 you have to, please use `ifdtool` to set the HAP bit initially before
312 progressing to `me_cleaner` if necessary.