blob: 2e6aea1e84c45cead2bcfff2b25d4b9bfe8f86d2 [file] [log] [blame]
Simon Glass5a5da7c2018-07-17 13:25:37 -06001Binman Entry Documentation
2===========================
3
4This file describes the entry types supported by binman. These entry types can
5be placed in an image one by one to build up a final firmware image. It is
6fairly easy to create new entry types. Just add a new file to the 'etype'
7directory. You can use the existing entries as examples.
8
9Note that some entries are subclasses of others, using and extending their
10features to produce new behaviours.
11
12
13
14Entry: blob: Entry containing an arbitrary binary blob
15------------------------------------------------------
16
17Note: This should not be used by itself. It is normally used as a parent
18class by other entry types.
19
20Properties / Entry arguments:
21 - filename: Filename of file to read into entry
Simon Glass83d73c22018-09-14 04:57:26 -060022 - compress: Compression algorithm to use:
23 none: No compression
24 lz4: Use lz4 compression (via 'lz4' command-line utility)
Simon Glass5a5da7c2018-07-17 13:25:37 -060025
26This entry reads data from a file and places it in the entry. The
27default filename is often specified specified by the subclass. See for
28example the 'u_boot' entry which provides the filename 'u-boot.bin'.
29
Simon Glass83d73c22018-09-14 04:57:26 -060030If compression is enabled, an extra 'uncomp-size' property is written to
31the node (if enabled with -u) which provides the uncompressed size of the
32data.
33
Simon Glass5a5da7c2018-07-17 13:25:37 -060034
35
Simon Glass6ed45ba2018-09-14 04:57:24 -060036Entry: blob-dtb: A blob that holds a device tree
37------------------------------------------------
38
39This is a blob containing a device tree. The contents of the blob are
40obtained from the list of available device-tree files, managed by the
41'state' module.
42
Simon Glass5a5da7c2018-07-17 13:25:37 -060043
44
Simon Glassec127af2018-07-17 13:25:39 -060045Entry: blob-named-by-arg: A blob entry which gets its filename property from its subclass
46-----------------------------------------------------------------------------------------
47
48Properties / Entry arguments:
49 - <xxx>-path: Filename containing the contents of this entry (optional,
50 defaults to 0)
51
52where <xxx> is the blob_fname argument to the constructor.
53
54This entry cannot be used directly. Instead, it is used as a parent class
55for another entry, which defined blob_fname. This parameter is used to
56set the entry-arg or property containing the filename. The entry-arg or
57property is in turn used to set the actual filename.
58
59See cros_ec_rw for an example of this.
60
61
62
Simon Glassac62fba2019-07-08 13:18:53 -060063Entry: cbfs: Entry containing a Coreboot Filesystem (CBFS)
64----------------------------------------------------------
65
66A CBFS provides a way to group files into a group. It has a simple directory
67structure and allows the position of individual files to be set, since it is
68designed to support execute-in-place in an x86 SPI-flash device. Where XIP
69is not used, it supports compression and storing ELF files.
70
71CBFS is used by coreboot as its way of orgnanising SPI-flash contents.
72
73The contents of the CBFS are defined by subnodes of the cbfs entry, e.g.:
74
75 cbfs {
76 size = <0x100000>;
77 u-boot {
78 cbfs-type = "raw";
79 };
80 u-boot-dtb {
81 cbfs-type = "raw";
82 };
83 };
84
85This creates a CBFS 1MB in size two files in it: u-boot.bin and u-boot.dtb.
86Note that the size is required since binman does not support calculating it.
87The contents of each entry is just what binman would normally provide if it
88were not a CBFS node. A blob type can be used to import arbitrary files as
89with the second subnode below:
90
91 cbfs {
92 size = <0x100000>;
93 u-boot {
94 cbfs-name = "BOOT";
95 cbfs-type = "raw";
96 };
97
98 dtb {
99 type = "blob";
100 filename = "u-boot.dtb";
101 cbfs-type = "raw";
102 cbfs-compress = "lz4";
103 };
104 };
105
106This creates a CBFS 1MB in size with u-boot.bin (named "BOOT") and
107u-boot.dtb (named "dtb") and compressed with the lz4 algorithm.
108
109
110Properties supported in the top-level CBFS node:
111
112cbfs-arch:
113 Defaults to "x86", but you can specify the architecture if needed.
114
115
116Properties supported in the CBFS entry subnodes:
117
118cbfs-name:
119 This is the name of the file created in CBFS. It defaults to the entry
120 name (which is the node name), but you can override it with this
121 property.
122
123cbfs-type:
124 This is the CBFS file type. The following are supported:
125
126 raw:
127 This is a 'raw' file, although compression is supported. It can be
128 used to store any file in CBFS.
129
130 stage:
131 This is an ELF file that has been loaded (i.e. mapped to memory), so
132 appears in the CBFS as a flat binary. The input file must be an ELF
133 image, for example this puts "u-boot" (the ELF image) into a 'stage'
134 entry:
135
136 cbfs {
137 size = <0x100000>;
138 u-boot-elf {
139 cbfs-name = "BOOT";
140 cbfs-type = "stage";
141 };
142 };
143
144 You can use your own ELF file with something like:
145
146 cbfs {
147 size = <0x100000>;
148 something {
149 type = "blob";
150 filename = "cbfs-stage.elf";
151 cbfs-type = "stage";
152 };
153 };
154
155 As mentioned, the file is converted to a flat binary, so it is
156 equivalent to adding "u-boot.bin", for example, but with the load and
157 start addresses specified by the ELF. At present there is no option
158 to add a flat binary with a load/start address, similar to the
159 'add-flat-binary' option in cbfstool.
160
161
162The current implementation supports only a subset of CBFS features. It does
163not support other file types (e.g. payload), adding multiple files (like the
164'files' entry with a pattern supported by binman), putting files at a
165particular offset in the CBFS and a few other things.
166
167Of course binman can create images containing multiple CBFSs, simply by
168defining these in the binman config:
169
170
171 binman {
172 size = <0x800000>;
173 cbfs {
174 offset = <0x100000>;
175 size = <0x100000>;
176 u-boot {
177 cbfs-type = "raw";
178 };
179 u-boot-dtb {
180 cbfs-type = "raw";
181 };
182 };
183
184 cbfs2 {
185 offset = <0x700000>;
186 size = <0x100000>;
187 u-boot {
188 cbfs-type = "raw";
189 };
190 u-boot-dtb {
191 cbfs-type = "raw";
192 };
193 image {
194 type = "blob";
195 filename = "image.jpg";
196 };
197 };
198 };
199
200This creates an 8MB image with two CBFSs, one at offset 1MB, one at 7MB,
201both of size 1MB.
202
203
204
Simon Glassec127af2018-07-17 13:25:39 -0600205Entry: cros-ec-rw: A blob entry which contains a Chromium OS read-write EC image
206--------------------------------------------------------------------------------
207
208Properties / Entry arguments:
209 - cros-ec-rw-path: Filename containing the EC image
210
211This entry holds a Chromium OS EC (embedded controller) image, for use in
212updating the EC on startup via software sync.
213
214
215
Simon Glass0a98b282018-09-14 04:57:28 -0600216Entry: files: Entry containing a set of files
217---------------------------------------------
218
219Properties / Entry arguments:
220 - pattern: Filename pattern to match the files to include
221 - compress: Compression algorithm to use:
222 none: No compression
223 lz4: Use lz4 compression (via 'lz4' command-line utility)
224
225This entry reads a number of files and places each in a separate sub-entry
226within this entry. To access these you need to enable device-tree updates
227at run-time so you can obtain the file positions.
228
229
230
Simon Glass3af8e492018-07-17 13:25:40 -0600231Entry: fill: An entry which is filled to a particular byte value
232----------------------------------------------------------------
233
234Properties / Entry arguments:
235 - fill-byte: Byte to use to fill the entry
236
237Note that the size property must be set since otherwise this entry does not
238know how large it should be.
239
240You can often achieve the same effect using the pad-byte property of the
241overall image, in that the space between entries will then be padded with
242that byte. But this entry is sometimes useful for explicitly setting the
243byte value of a region.
244
245
246
Simon Glass11e36cc2018-07-17 13:25:38 -0600247Entry: fmap: An entry which contains an Fmap section
248----------------------------------------------------
249
250Properties / Entry arguments:
251 None
252
253FMAP is a simple format used by flashrom, an open-source utility for
254reading and writing the SPI flash, typically on x86 CPUs. The format
255provides flashrom with a list of areas, so it knows what it in the flash.
256It can then read or write just a single area, instead of the whole flash.
257
258The format is defined by the flashrom project, in the file lib/fmap.h -
259see www.flashrom.org/Flashrom for more information.
260
261When used, this entry will be populated with an FMAP which reflects the
262entries in the current image. Note that any hierarchy is squashed, since
263FMAP does not support this.
264
265
266
Simon Glass0ef87aa2018-07-17 13:25:44 -0600267Entry: gbb: An entry which contains a Chromium OS Google Binary Block
268---------------------------------------------------------------------
269
270Properties / Entry arguments:
271 - hardware-id: Hardware ID to use for this build (a string)
272 - keydir: Directory containing the public keys to use
273 - bmpblk: Filename containing images used by recovery
274
275Chromium OS uses a GBB to store various pieces of information, in particular
276the root and recovery keys that are used to verify the boot process. Some
277more details are here:
278
279 https://www.chromium.org/chromium-os/firmware-porting-guide/2-concepts
280
281but note that the page dates from 2013 so is quite out of date. See
282README.chromium for how to obtain the required keys and tools.
283
284
285
Simon Glass5a5da7c2018-07-17 13:25:37 -0600286Entry: intel-cmc: Entry containing an Intel Chipset Micro Code (CMC) file
287-------------------------------------------------------------------------
288
289Properties / Entry arguments:
290 - filename: Filename of file to read into entry
291
292This file contains microcode for some devices in a special format. An
293example filename is 'Microcode/C0_22211.BIN'.
294
295See README.x86 for information about x86 binary blobs.
296
297
298
299Entry: intel-descriptor: Intel flash descriptor block (4KB)
300-----------------------------------------------------------
301
302Properties / Entry arguments:
303 filename: Filename of file containing the descriptor. This is typically
304 a 4KB binary file, sometimes called 'descriptor.bin'
305
306This entry is placed at the start of flash and provides information about
307the SPI flash regions. In particular it provides the base address and
308size of the ME (Management Engine) region, allowing us to place the ME
309binary in the right place.
310
311With this entry in your image, the position of the 'intel-me' entry will be
312fixed in the image, which avoids you needed to specify an offset for that
313region. This is useful, because it is not possible to change the position
314of the ME region without updating the descriptor.
315
316See README.x86 for information about x86 binary blobs.
317
318
319
320Entry: intel-fsp: Entry containing an Intel Firmware Support Package (FSP) file
321-------------------------------------------------------------------------------
322
323Properties / Entry arguments:
324 - filename: Filename of file to read into entry
325
326This file contains binary blobs which are used on some devices to make the
327platform work. U-Boot executes this code since it is not possible to set up
328the hardware using U-Boot open-source code. Documentation is typically not
329available in sufficient detail to allow this.
330
331An example filename is 'FSP/QUEENSBAY_FSP_GOLD_001_20-DECEMBER-2013.fd'
332
333See README.x86 for information about x86 binary blobs.
334
335
336
337Entry: intel-me: Entry containing an Intel Management Engine (ME) file
338----------------------------------------------------------------------
339
340Properties / Entry arguments:
341 - filename: Filename of file to read into entry
342
343This file contains code used by the SoC that is required to make it work.
344The Management Engine is like a background task that runs things that are
345not clearly documented, but may include keyboard, deplay and network
346access. For platform that use ME it is not possible to disable it. U-Boot
347does not directly execute code in the ME binary.
348
349A typical filename is 'me.bin'.
350
Simon Glassfa1c9372019-07-08 13:18:38 -0600351The position of this entry is generally set by the intel-descriptor entry.
352
Simon Glass5a5da7c2018-07-17 13:25:37 -0600353See README.x86 for information about x86 binary blobs.
354
355
356
357Entry: intel-mrc: Entry containing an Intel Memory Reference Code (MRC) file
358----------------------------------------------------------------------------
359
360Properties / Entry arguments:
361 - filename: Filename of file to read into entry
362
363This file contains code for setting up the SDRAM on some Intel systems. This
364is executed by U-Boot when needed early during startup. A typical filename
365is 'mrc.bin'.
366
367See README.x86 for information about x86 binary blobs.
368
369
370
Simon Glass5385f5a2019-05-17 22:00:53 -0600371Entry: intel-refcode: Entry containing an Intel Reference Code file
372-------------------------------------------------------------------
373
374Properties / Entry arguments:
375 - filename: Filename of file to read into entry
376
377This file contains code for setting up the platform on some Intel systems.
378This is executed by U-Boot when needed early during startup. A typical
379filename is 'refcode.bin'.
380
381See README.x86 for information about x86 binary blobs.
382
383
384
Simon Glass5a5da7c2018-07-17 13:25:37 -0600385Entry: intel-vbt: Entry containing an Intel Video BIOS Table (VBT) file
386-----------------------------------------------------------------------
387
388Properties / Entry arguments:
389 - filename: Filename of file to read into entry
390
391This file contains code that sets up the integrated graphics subsystem on
392some Intel SoCs. U-Boot executes this when the display is started up.
393
394See README.x86 for information about Intel binary blobs.
395
396
397
398Entry: intel-vga: Entry containing an Intel Video Graphics Adaptor (VGA) file
399-----------------------------------------------------------------------------
400
401Properties / Entry arguments:
402 - filename: Filename of file to read into entry
403
404This file contains code that sets up the integrated graphics subsystem on
405some Intel SoCs. U-Boot executes this when the display is started up.
406
407This is similar to the VBT file but in a different format.
408
409See README.x86 for information about Intel binary blobs.
410
411
412
Jagdish Gediya9d368f32018-09-03 21:35:08 +0530413Entry: powerpc-mpc85xx-bootpg-resetvec: PowerPC mpc85xx bootpg + resetvec code for U-Boot
414-----------------------------------------------------------------------------------------
415
416Properties / Entry arguments:
417 - filename: Filename of u-boot-br.bin (default 'u-boot-br.bin')
418
419This enrty is valid for PowerPC mpc85xx cpus. This entry holds
420'bootpg + resetvec' code for PowerPC mpc85xx CPUs which needs to be
421placed at offset 'RESET_VECTOR_ADDRESS - 0xffc'.
422
423
424
Simon Glass5a5da7c2018-07-17 13:25:37 -0600425Entry: section: Entry that contains other entries
426-------------------------------------------------
427
428Properties / Entry arguments: (see binman README for more information)
429 - size: Size of section in bytes
430 - align-size: Align size to a particular power of two
431 - pad-before: Add padding before the entry
432 - pad-after: Add padding after the entry
433 - pad-byte: Pad byte to use when padding
434 - sort-by-offset: Reorder the entries by offset
435 - end-at-4gb: Used to build an x86 ROM which ends at 4GB (2^32)
436 - name-prefix: Adds a prefix to the name of every entry in the section
437 when writing out the map
438
439A section is an entry which can contain other entries, thus allowing
440hierarchical images to be created. See 'Sections and hierarchical images'
441in the binman README for more information.
442
443
444
445Entry: text: An entry which contains text
446-----------------------------------------
447
448The text can be provided either in the node itself or by a command-line
449argument. There is a level of indirection to allow multiple text strings
450and sharing of text.
451
452Properties / Entry arguments:
453 text-label: The value of this string indicates the property / entry-arg
454 that contains the string to place in the entry
455 <xxx> (actual name is the value of text-label): contains the string to
456 place in the entry.
Simon Glassaa88b502019-07-08 13:18:40 -0600457 <text>: The text to place in the entry (overrides the above mechanism).
458 This is useful when the text is constant.
Simon Glass5a5da7c2018-07-17 13:25:37 -0600459
460Example node:
461
462 text {
463 size = <50>;
464 text-label = "message";
465 };
466
467You can then use:
468
469 binman -amessage="this is my message"
470
471and binman will insert that string into the entry.
472
473It is also possible to put the string directly in the node:
474
475 text {
476 size = <8>;
477 text-label = "message";
478 message = "a message directly in the node"
479 };
480
Simon Glassaa88b502019-07-08 13:18:40 -0600481or just:
482
483 text {
484 size = <8>;
485 text = "some text directly in the node"
486 };
487
Simon Glass5a5da7c2018-07-17 13:25:37 -0600488The text is not itself nul-terminated. This can be achieved, if required,
489by setting the size of the entry to something larger than the text.
490
491
492
493Entry: u-boot: U-Boot flat binary
494---------------------------------
495
496Properties / Entry arguments:
497 - filename: Filename of u-boot.bin (default 'u-boot.bin')
498
499This is the U-Boot binary, containing relocation information to allow it
500to relocate itself at runtime. The binary typically includes a device tree
501blob at the end of it. Use u_boot_nodtb if you want to package the device
502tree separately.
503
504U-Boot can access binman symbols at runtime. See:
505
506 'Access to binman entry offsets at run time (fdt)'
507
508in the binman README for more information.
509
510
511
512Entry: u-boot-dtb: U-Boot device tree
513-------------------------------------
514
515Properties / Entry arguments:
516 - filename: Filename of u-boot.dtb (default 'u-boot.dtb')
517
518This is the U-Boot device tree, containing configuration information for
519U-Boot. U-Boot needs this to know what devices are present and which drivers
520to activate.
521
Simon Glass6ed45ba2018-09-14 04:57:24 -0600522Note: This is mostly an internal entry type, used by others. This allows
523binman to know which entries contain a device tree.
524
Simon Glass5a5da7c2018-07-17 13:25:37 -0600525
526
527Entry: u-boot-dtb-with-ucode: A U-Boot device tree file, with the microcode removed
528-----------------------------------------------------------------------------------
529
530Properties / Entry arguments:
531 - filename: Filename of u-boot.dtb (default 'u-boot.dtb')
532
533See Entry_u_boot_ucode for full details of the three entries involved in
534this process. This entry provides the U-Boot device-tree file, which
535contains the microcode. If the microcode is not being collated into one
536place then the offset and size of the microcode is recorded by this entry,
537for use by u_boot_with_ucode_ptr. If it is being collated, then this
538entry deletes the microcode from the device tree (to save space) and makes
539it available to u_boot_ucode.
540
541
542
Simon Glassfe1ae3e2018-09-14 04:57:35 -0600543Entry: u-boot-elf: U-Boot ELF image
544-----------------------------------
545
546Properties / Entry arguments:
547 - filename: Filename of u-boot (default 'u-boot')
548
549This is the U-Boot ELF image. It does not include a device tree but can be
550relocated to any address for execution.
551
552
553
Simon Glass5a5da7c2018-07-17 13:25:37 -0600554Entry: u-boot-img: U-Boot legacy image
555--------------------------------------
556
557Properties / Entry arguments:
558 - filename: Filename of u-boot.img (default 'u-boot.img')
559
560This is the U-Boot binary as a packaged image, in legacy format. It has a
561header which allows it to be loaded at the correct address for execution.
562
563You should use FIT (Flat Image Tree) instead of the legacy image for new
564applications.
565
566
567
568Entry: u-boot-nodtb: U-Boot flat binary without device tree appended
569--------------------------------------------------------------------
570
571Properties / Entry arguments:
572 - filename: Filename of u-boot.bin (default 'u-boot-nodtb.bin')
573
574This is the U-Boot binary, containing relocation information to allow it
575to relocate itself at runtime. It does not include a device tree blob at
576the end of it so normally cannot work without it. You can add a u_boot_dtb
577entry after this one, or use a u_boot entry instead (which contains both
578U-Boot and the device tree).
579
580
581
582Entry: u-boot-spl: U-Boot SPL binary
583------------------------------------
584
585Properties / Entry arguments:
586 - filename: Filename of u-boot-spl.bin (default 'spl/u-boot-spl.bin')
587
588This is the U-Boot SPL (Secondary Program Loader) binary. This is a small
589binary which loads before U-Boot proper, typically into on-chip SRAM. It is
590responsible for locating, loading and jumping to U-Boot. Note that SPL is
591not relocatable so must be loaded to the correct address in SRAM, or written
Simon Glassb8ef5b62018-07-17 13:25:48 -0600592to run from the correct address if direct flash execution is possible (e.g.
Simon Glass5a5da7c2018-07-17 13:25:37 -0600593on x86 devices).
594
595SPL can access binman symbols at runtime. See:
596
597 'Access to binman entry offsets at run time (symbols)'
598
599in the binman README for more information.
600
601The ELF file 'spl/u-boot-spl' must also be available for this to work, since
602binman uses that to look up symbols to write into the SPL binary.
603
604
605
606Entry: u-boot-spl-bss-pad: U-Boot SPL binary padded with a BSS region
607---------------------------------------------------------------------
608
609Properties / Entry arguments:
610 None
611
612This is similar to u_boot_spl except that padding is added after the SPL
613binary to cover the BSS (Block Started by Symbol) region. This region holds
614the various used by SPL. It is set to 0 by SPL when it starts up. If you
615want to append data to the SPL image (such as a device tree file), you must
616pad out the BSS region to avoid the data overlapping with U-Boot variables.
617This entry is useful in that case. It automatically pads out the entry size
618to cover both the code, data and BSS.
619
620The ELF file 'spl/u-boot-spl' must also be available for this to work, since
621binman uses that to look up the BSS address.
622
623
624
625Entry: u-boot-spl-dtb: U-Boot SPL device tree
626---------------------------------------------
627
628Properties / Entry arguments:
629 - filename: Filename of u-boot.dtb (default 'spl/u-boot-spl.dtb')
630
631This is the SPL device tree, containing configuration information for
632SPL. SPL needs this to know what devices are present and which drivers
633to activate.
634
635
636
Simon Glassfe1ae3e2018-09-14 04:57:35 -0600637Entry: u-boot-spl-elf: U-Boot SPL ELF image
638-------------------------------------------
639
640Properties / Entry arguments:
Simon Glassa6a520e2019-07-08 13:18:45 -0600641 - filename: Filename of SPL u-boot (default 'spl/u-boot-spl')
Simon Glassfe1ae3e2018-09-14 04:57:35 -0600642
643This is the U-Boot SPL ELF image. It does not include a device tree but can
644be relocated to any address for execution.
645
646
647
Simon Glass5a5da7c2018-07-17 13:25:37 -0600648Entry: u-boot-spl-nodtb: SPL binary without device tree appended
649----------------------------------------------------------------
650
651Properties / Entry arguments:
652 - filename: Filename of spl/u-boot-spl-nodtb.bin (default
653 'spl/u-boot-spl-nodtb.bin')
654
655This is the U-Boot SPL binary, It does not include a device tree blob at
656the end of it so may not be able to work without it, assuming SPL needs
657a device tree to operation on your platform. You can add a u_boot_spl_dtb
658entry after this one, or use a u_boot_spl entry instead (which contains
659both SPL and the device tree).
660
661
662
663Entry: u-boot-spl-with-ucode-ptr: U-Boot SPL with embedded microcode pointer
664----------------------------------------------------------------------------
665
Simon Glassf0253632018-09-14 04:57:32 -0600666This is used when SPL must set up the microcode for U-Boot.
667
Simon Glass5a5da7c2018-07-17 13:25:37 -0600668See Entry_u_boot_ucode for full details of the entries involved in this
669process.
670
671
672
Simon Glassb8ef5b62018-07-17 13:25:48 -0600673Entry: u-boot-tpl: U-Boot TPL binary
674------------------------------------
675
676Properties / Entry arguments:
677 - filename: Filename of u-boot-tpl.bin (default 'tpl/u-boot-tpl.bin')
678
679This is the U-Boot TPL (Tertiary Program Loader) binary. This is a small
680binary which loads before SPL, typically into on-chip SRAM. It is
681responsible for locating, loading and jumping to SPL, the next-stage
682loader. Note that SPL is not relocatable so must be loaded to the correct
683address in SRAM, or written to run from the correct address if direct
684flash execution is possible (e.g. on x86 devices).
685
686SPL can access binman symbols at runtime. See:
687
688 'Access to binman entry offsets at run time (symbols)'
689
690in the binman README for more information.
691
692The ELF file 'tpl/u-boot-tpl' must also be available for this to work, since
693binman uses that to look up symbols to write into the TPL binary.
694
695
696
697Entry: u-boot-tpl-dtb: U-Boot TPL device tree
698---------------------------------------------
699
700Properties / Entry arguments:
701 - filename: Filename of u-boot.dtb (default 'tpl/u-boot-tpl.dtb')
702
703This is the TPL device tree, containing configuration information for
704TPL. TPL needs this to know what devices are present and which drivers
705to activate.
706
707
708
Simon Glassf0253632018-09-14 04:57:32 -0600709Entry: u-boot-tpl-dtb-with-ucode: U-Boot TPL with embedded microcode pointer
710----------------------------------------------------------------------------
711
712This is used when TPL must set up the microcode for U-Boot.
713
714See Entry_u_boot_ucode for full details of the entries involved in this
715process.
716
717
718
Simon Glass4c650252019-07-08 13:18:46 -0600719Entry: u-boot-tpl-elf: U-Boot TPL ELF image
720-------------------------------------------
721
722Properties / Entry arguments:
723 - filename: Filename of TPL u-boot (default 'tpl/u-boot-tpl')
724
725This is the U-Boot TPL ELF image. It does not include a device tree but can
726be relocated to any address for execution.
727
728
729
Simon Glassf0253632018-09-14 04:57:32 -0600730Entry: u-boot-tpl-with-ucode-ptr: U-Boot TPL with embedded microcode pointer
731----------------------------------------------------------------------------
732
733See Entry_u_boot_ucode for full details of the entries involved in this
734process.
735
736
737
Simon Glass5a5da7c2018-07-17 13:25:37 -0600738Entry: u-boot-ucode: U-Boot microcode block
739-------------------------------------------
740
741Properties / Entry arguments:
742 None
743
744The contents of this entry are filled in automatically by other entries
745which must also be in the image.
746
747U-Boot on x86 needs a single block of microcode. This is collected from
748the various microcode update nodes in the device tree. It is also unable
749to read the microcode from the device tree on platforms that use FSP
750(Firmware Support Package) binaries, because the API requires that the
751microcode is supplied before there is any SRAM available to use (i.e.
752the FSP sets up the SRAM / cache-as-RAM but does so in the call that
753requires the microcode!). To keep things simple, all x86 platforms handle
754microcode the same way in U-Boot (even non-FSP platforms). This is that
755a table is placed at _dt_ucode_base_size containing the base address and
756size of the microcode. This is either passed to the FSP (for FSP
757platforms), or used to set up the microcode (for non-FSP platforms).
758This all happens in the build system since it is the only way to get
759the microcode into a single blob and accessible without SRAM.
760
761There are two cases to handle. If there is only one microcode blob in
762the device tree, then the ucode pointer it set to point to that. This
763entry (u-boot-ucode) is empty. If there is more than one update, then
764this entry holds the concatenation of all updates, and the device tree
765entry (u-boot-dtb-with-ucode) is updated to remove the microcode. This
766last step ensures that that the microcode appears in one contiguous
767block in the image and is not unnecessarily duplicated in the device
768tree. It is referred to as 'collation' here.
769
770Entry types that have a part to play in handling microcode:
771
772 Entry_u_boot_with_ucode_ptr:
773 Contains u-boot-nodtb.bin (i.e. U-Boot without the device tree).
774 It updates it with the address and size of the microcode so that
775 U-Boot can find it early on start-up.
776 Entry_u_boot_dtb_with_ucode:
777 Contains u-boot.dtb. It stores the microcode in a
778 'self.ucode_data' property, which is then read by this class to
779 obtain the microcode if needed. If collation is performed, it
780 removes the microcode from the device tree.
781 Entry_u_boot_ucode:
782 This class. If collation is enabled it reads the microcode from
783 the Entry_u_boot_dtb_with_ucode entry, and uses it as the
784 contents of this entry.
785
786
787
788Entry: u-boot-with-ucode-ptr: U-Boot with embedded microcode pointer
789--------------------------------------------------------------------
790
791Properties / Entry arguments:
792 - filename: Filename of u-boot-nodtb.dtb (default 'u-boot-nodtb.dtb')
Simon Glassf0693032018-09-14 04:57:07 -0600793 - optional-ucode: boolean property to make microcode optional. If the
794 u-boot.bin image does not include microcode, no error will
795 be generated.
Simon Glass5a5da7c2018-07-17 13:25:37 -0600796
797See Entry_u_boot_ucode for full details of the three entries involved in
798this process. This entry updates U-Boot with the offset and size of the
799microcode, to allow early x86 boot code to find it without doing anything
800complicated. Otherwise it is the same as the u_boot entry.
801
802
803
Simon Glass24d0d3c2018-07-17 13:25:47 -0600804Entry: vblock: An entry which contains a Chromium OS verified boot block
805------------------------------------------------------------------------
806
807Properties / Entry arguments:
Simon Glass5385f5a2019-05-17 22:00:53 -0600808 - content: List of phandles to entries to sign
Simon Glass24d0d3c2018-07-17 13:25:47 -0600809 - keydir: Directory containing the public keys to use
810 - keyblock: Name of the key file to use (inside keydir)
811 - signprivate: Name of provide key file to use (inside keydir)
812 - version: Version number of the vblock (typically 1)
813 - kernelkey: Name of the kernel key to use (inside keydir)
814 - preamble-flags: Value of the vboot preamble flags (typically 0)
815
Simon Glassa326b492018-09-14 04:57:11 -0600816Output files:
817 - input.<unique_name> - input file passed to futility
818 - vblock.<unique_name> - output file generated by futility (which is
819 used as the entry contents)
820
Jagdish Gediya9d368f32018-09-03 21:35:08 +0530821Chromium OS signs the read-write firmware and kernel, writing the signature
Simon Glass24d0d3c2018-07-17 13:25:47 -0600822in this block. This allows U-Boot to verify that the next firmware stage
823and kernel are genuine.
824
825
826
Simon Glass5a5da7c2018-07-17 13:25:37 -0600827Entry: x86-start16: x86 16-bit start-up code for U-Boot
828-------------------------------------------------------
829
830Properties / Entry arguments:
831 - filename: Filename of u-boot-x86-16bit.bin (default
832 'u-boot-x86-16bit.bin')
833
834x86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
835must be placed at a particular address. This entry holds that code. It is
836typically placed at offset CONFIG_SYS_X86_START16. The code is responsible
837for changing to 32-bit mode and jumping to U-Boot's entry point, which
838requires 32-bit mode (for 32-bit U-Boot).
839
840For 64-bit U-Boot, the 'x86_start16_spl' entry type is used instead.
841
842
843
844Entry: x86-start16-spl: x86 16-bit start-up code for SPL
845--------------------------------------------------------
846
847Properties / Entry arguments:
848 - filename: Filename of spl/u-boot-x86-16bit-spl.bin (default
849 'spl/u-boot-x86-16bit-spl.bin')
850
851x86 CPUs start up in 16-bit mode, even if they are 64-bit CPUs. This code
852must be placed at a particular address. This entry holds that code. It is
853typically placed at offset CONFIG_SYS_X86_START16. The code is responsible
854for changing to 32-bit mode and starting SPL, which in turn changes to
85564-bit mode and jumps to U-Boot (for 64-bit U-Boot).
856
857For 32-bit U-Boot, the 'x86_start16' entry type is used instead.
858
859
860
Simon Glass35b384c2018-09-14 04:57:10 -0600861Entry: x86-start16-tpl: x86 16-bit start-up code for TPL
862--------------------------------------------------------
863
864Properties / Entry arguments:
865 - filename: Filename of tpl/u-boot-x86-16bit-tpl.bin (default
866 'tpl/u-boot-x86-16bit-tpl.bin')
867
868x86 CPUs start up in 16-bit mode, even if they are 64-bit CPUs. This code
869must be placed at a particular address. This entry holds that code. It is
870typically placed at offset CONFIG_SYS_X86_START16. The code is responsible
871for changing to 32-bit mode and starting TPL, which in turn jumps to SPL.
872
873If TPL is not being used, the 'x86_start16_spl or 'x86_start16' entry types
874may be used instead.
875
876
877