xref: /openbmc/u-boot/tools/binman/README.entries (revision 3af8e49ceff044021725fc547b19ebac22d0b0f7)
15a5da7ceSSimon GlassBinman Entry Documentation
25a5da7ceSSimon Glass===========================
35a5da7ceSSimon Glass
45a5da7ceSSimon GlassThis file describes the entry types supported by binman. These entry types can
55a5da7ceSSimon Glassbe placed in an image one by one to build up a final firmware image. It is
65a5da7ceSSimon Glassfairly easy to create new entry types. Just add a new file to the 'etype'
75a5da7ceSSimon Glassdirectory. You can use the existing entries as examples.
85a5da7ceSSimon Glass
95a5da7ceSSimon GlassNote that some entries are subclasses of others, using and extending their
105a5da7ceSSimon Glassfeatures to produce new behaviours.
115a5da7ceSSimon Glass
125a5da7ceSSimon Glass
135a5da7ceSSimon Glass
145a5da7ceSSimon GlassEntry: blob: Entry containing an arbitrary binary blob
155a5da7ceSSimon Glass------------------------------------------------------
165a5da7ceSSimon Glass
175a5da7ceSSimon GlassNote: This should not be used by itself. It is normally used as a parent
185a5da7ceSSimon Glassclass by other entry types.
195a5da7ceSSimon Glass
205a5da7ceSSimon GlassProperties / Entry arguments:
215a5da7ceSSimon Glass    - filename: Filename of file to read into entry
225a5da7ceSSimon Glass
235a5da7ceSSimon GlassThis entry reads data from a file and places it in the entry. The
245a5da7ceSSimon Glassdefault filename is often specified specified by the subclass. See for
255a5da7ceSSimon Glassexample the 'u_boot' entry which provides the filename 'u-boot.bin'.
265a5da7ceSSimon Glass
275a5da7ceSSimon Glass
285a5da7ceSSimon Glass
29ec127af0SSimon GlassEntry: blob-named-by-arg: A blob entry which gets its filename property from its subclass
30ec127af0SSimon Glass-----------------------------------------------------------------------------------------
31ec127af0SSimon Glass
32ec127af0SSimon GlassProperties / Entry arguments:
33ec127af0SSimon Glass    - <xxx>-path: Filename containing the contents of this entry (optional,
34ec127af0SSimon Glass        defaults to 0)
35ec127af0SSimon Glass
36ec127af0SSimon Glasswhere <xxx> is the blob_fname argument to the constructor.
37ec127af0SSimon Glass
38ec127af0SSimon GlassThis entry cannot be used directly. Instead, it is used as a parent class
39ec127af0SSimon Glassfor another entry, which defined blob_fname. This parameter is used to
40ec127af0SSimon Glassset the entry-arg or property containing the filename. The entry-arg or
41ec127af0SSimon Glassproperty is in turn used to set the actual filename.
42ec127af0SSimon Glass
43ec127af0SSimon GlassSee cros_ec_rw for an example of this.
44ec127af0SSimon Glass
45ec127af0SSimon Glass
46ec127af0SSimon Glass
47ec127af0SSimon GlassEntry: cros-ec-rw: A blob entry which contains a Chromium OS read-write EC image
48ec127af0SSimon Glass--------------------------------------------------------------------------------
49ec127af0SSimon Glass
50ec127af0SSimon GlassProperties / Entry arguments:
51ec127af0SSimon Glass    - cros-ec-rw-path: Filename containing the EC image
52ec127af0SSimon Glass
53ec127af0SSimon GlassThis entry holds a Chromium OS EC (embedded controller) image, for use in
54ec127af0SSimon Glassupdating the EC on startup via software sync.
55ec127af0SSimon Glass
56ec127af0SSimon Glass
57ec127af0SSimon Glass
58*3af8e49cSSimon GlassEntry: fill: An entry which is filled to a particular byte value
59*3af8e49cSSimon Glass----------------------------------------------------------------
60*3af8e49cSSimon Glass
61*3af8e49cSSimon GlassProperties / Entry arguments:
62*3af8e49cSSimon Glass    - fill-byte: Byte to use to fill the entry
63*3af8e49cSSimon Glass
64*3af8e49cSSimon GlassNote that the size property must be set since otherwise this entry does not
65*3af8e49cSSimon Glassknow how large it should be.
66*3af8e49cSSimon Glass
67*3af8e49cSSimon GlassYou can often achieve the same effect using the pad-byte property of the
68*3af8e49cSSimon Glassoverall image, in that the space between entries will then be padded with
69*3af8e49cSSimon Glassthat byte. But this entry is sometimes useful for explicitly setting the
70*3af8e49cSSimon Glassbyte value of a region.
71*3af8e49cSSimon Glass
72*3af8e49cSSimon Glass
73*3af8e49cSSimon Glass
7411e36cceSSimon GlassEntry: fmap: An entry which contains an Fmap section
7511e36cceSSimon Glass----------------------------------------------------
7611e36cceSSimon Glass
7711e36cceSSimon GlassProperties / Entry arguments:
7811e36cceSSimon Glass    None
7911e36cceSSimon Glass
8011e36cceSSimon GlassFMAP is a simple format used by flashrom, an open-source utility for
8111e36cceSSimon Glassreading and writing the SPI flash, typically on x86 CPUs. The format
8211e36cceSSimon Glassprovides flashrom with a list of areas, so it knows what it in the flash.
8311e36cceSSimon GlassIt can then read or write just a single area, instead of the whole flash.
8411e36cceSSimon Glass
8511e36cceSSimon GlassThe format is defined by the flashrom project, in the file lib/fmap.h -
8611e36cceSSimon Glasssee www.flashrom.org/Flashrom for more information.
8711e36cceSSimon Glass
8811e36cceSSimon GlassWhen used, this entry will be populated with an FMAP which reflects the
8911e36cceSSimon Glassentries in the current image. Note that any hierarchy is squashed, since
9011e36cceSSimon GlassFMAP does not support this.
9111e36cceSSimon Glass
9211e36cceSSimon Glass
9311e36cceSSimon Glass
945a5da7ceSSimon GlassEntry: intel-cmc: Entry containing an Intel Chipset Micro Code (CMC) file
955a5da7ceSSimon Glass-------------------------------------------------------------------------
965a5da7ceSSimon Glass
975a5da7ceSSimon GlassProperties / Entry arguments:
985a5da7ceSSimon Glass    - filename: Filename of file to read into entry
995a5da7ceSSimon Glass
1005a5da7ceSSimon GlassThis file contains microcode for some devices in a special format. An
1015a5da7ceSSimon Glassexample filename is 'Microcode/C0_22211.BIN'.
1025a5da7ceSSimon Glass
1035a5da7ceSSimon GlassSee README.x86 for information about x86 binary blobs.
1045a5da7ceSSimon Glass
1055a5da7ceSSimon Glass
1065a5da7ceSSimon Glass
1075a5da7ceSSimon GlassEntry: intel-descriptor: Intel flash descriptor block (4KB)
1085a5da7ceSSimon Glass-----------------------------------------------------------
1095a5da7ceSSimon Glass
1105a5da7ceSSimon GlassProperties / Entry arguments:
1115a5da7ceSSimon Glass    filename: Filename of file containing the descriptor. This is typically
1125a5da7ceSSimon Glass        a 4KB binary file, sometimes called 'descriptor.bin'
1135a5da7ceSSimon Glass
1145a5da7ceSSimon GlassThis entry is placed at the start of flash and provides information about
1155a5da7ceSSimon Glassthe SPI flash regions. In particular it provides the base address and
1165a5da7ceSSimon Glasssize of the ME (Management Engine) region, allowing us to place the ME
1175a5da7ceSSimon Glassbinary in the right place.
1185a5da7ceSSimon Glass
1195a5da7ceSSimon GlassWith this entry in your image, the position of the 'intel-me' entry will be
1205a5da7ceSSimon Glassfixed in the image, which avoids you needed to specify an offset for that
1215a5da7ceSSimon Glassregion. This is useful, because it is not possible to change the position
1225a5da7ceSSimon Glassof the ME region without updating the descriptor.
1235a5da7ceSSimon Glass
1245a5da7ceSSimon GlassSee README.x86 for information about x86 binary blobs.
1255a5da7ceSSimon Glass
1265a5da7ceSSimon Glass
1275a5da7ceSSimon Glass
1285a5da7ceSSimon GlassEntry: intel-fsp: Entry containing an Intel Firmware Support Package (FSP) file
1295a5da7ceSSimon Glass-------------------------------------------------------------------------------
1305a5da7ceSSimon Glass
1315a5da7ceSSimon GlassProperties / Entry arguments:
1325a5da7ceSSimon Glass    - filename: Filename of file to read into entry
1335a5da7ceSSimon Glass
1345a5da7ceSSimon GlassThis file contains binary blobs which are used on some devices to make the
1355a5da7ceSSimon Glassplatform work. U-Boot executes this code since it is not possible to set up
1365a5da7ceSSimon Glassthe hardware using U-Boot open-source code. Documentation is typically not
1375a5da7ceSSimon Glassavailable in sufficient detail to allow this.
1385a5da7ceSSimon Glass
1395a5da7ceSSimon GlassAn example filename is 'FSP/QUEENSBAY_FSP_GOLD_001_20-DECEMBER-2013.fd'
1405a5da7ceSSimon Glass
1415a5da7ceSSimon GlassSee README.x86 for information about x86 binary blobs.
1425a5da7ceSSimon Glass
1435a5da7ceSSimon Glass
1445a5da7ceSSimon Glass
1455a5da7ceSSimon GlassEntry: intel-me: Entry containing an Intel Management Engine (ME) file
1465a5da7ceSSimon Glass----------------------------------------------------------------------
1475a5da7ceSSimon Glass
1485a5da7ceSSimon GlassProperties / Entry arguments:
1495a5da7ceSSimon Glass    - filename: Filename of file to read into entry
1505a5da7ceSSimon Glass
1515a5da7ceSSimon GlassThis file contains code used by the SoC that is required to make it work.
1525a5da7ceSSimon GlassThe Management Engine is like a background task that runs things that are
1535a5da7ceSSimon Glassnot clearly documented, but may include keyboard, deplay and network
1545a5da7ceSSimon Glassaccess. For platform that use ME it is not possible to disable it. U-Boot
1555a5da7ceSSimon Glassdoes not directly execute code in the ME binary.
1565a5da7ceSSimon Glass
1575a5da7ceSSimon GlassA typical filename is 'me.bin'.
1585a5da7ceSSimon Glass
1595a5da7ceSSimon GlassSee README.x86 for information about x86 binary blobs.
1605a5da7ceSSimon Glass
1615a5da7ceSSimon Glass
1625a5da7ceSSimon Glass
1635a5da7ceSSimon GlassEntry: intel-mrc: Entry containing an Intel Memory Reference Code (MRC) file
1645a5da7ceSSimon Glass----------------------------------------------------------------------------
1655a5da7ceSSimon Glass
1665a5da7ceSSimon GlassProperties / Entry arguments:
1675a5da7ceSSimon Glass    - filename: Filename of file to read into entry
1685a5da7ceSSimon Glass
1695a5da7ceSSimon GlassThis file contains code for setting up the SDRAM on some Intel systems. This
1705a5da7ceSSimon Glassis executed by U-Boot when needed early during startup. A typical filename
1715a5da7ceSSimon Glassis 'mrc.bin'.
1725a5da7ceSSimon Glass
1735a5da7ceSSimon GlassSee README.x86 for information about x86 binary blobs.
1745a5da7ceSSimon Glass
1755a5da7ceSSimon Glass
1765a5da7ceSSimon Glass
1775a5da7ceSSimon GlassEntry: intel-vbt: Entry containing an Intel Video BIOS Table (VBT) file
1785a5da7ceSSimon Glass-----------------------------------------------------------------------
1795a5da7ceSSimon Glass
1805a5da7ceSSimon GlassProperties / Entry arguments:
1815a5da7ceSSimon Glass    - filename: Filename of file to read into entry
1825a5da7ceSSimon Glass
1835a5da7ceSSimon GlassThis file contains code that sets up the integrated graphics subsystem on
1845a5da7ceSSimon Glasssome Intel SoCs. U-Boot executes this when the display is started up.
1855a5da7ceSSimon Glass
1865a5da7ceSSimon GlassSee README.x86 for information about Intel binary blobs.
1875a5da7ceSSimon Glass
1885a5da7ceSSimon Glass
1895a5da7ceSSimon Glass
1905a5da7ceSSimon GlassEntry: intel-vga: Entry containing an Intel Video Graphics Adaptor (VGA) file
1915a5da7ceSSimon Glass-----------------------------------------------------------------------------
1925a5da7ceSSimon Glass
1935a5da7ceSSimon GlassProperties / Entry arguments:
1945a5da7ceSSimon Glass    - filename: Filename of file to read into entry
1955a5da7ceSSimon Glass
1965a5da7ceSSimon GlassThis file contains code that sets up the integrated graphics subsystem on
1975a5da7ceSSimon Glasssome Intel SoCs. U-Boot executes this when the display is started up.
1985a5da7ceSSimon Glass
1995a5da7ceSSimon GlassThis is similar to the VBT file but in a different format.
2005a5da7ceSSimon Glass
2015a5da7ceSSimon GlassSee README.x86 for information about Intel binary blobs.
2025a5da7ceSSimon Glass
2035a5da7ceSSimon Glass
2045a5da7ceSSimon Glass
2055a5da7ceSSimon GlassEntry: section: Entry that contains other entries
2065a5da7ceSSimon Glass-------------------------------------------------
2075a5da7ceSSimon Glass
2085a5da7ceSSimon GlassProperties / Entry arguments: (see binman README for more information)
2095a5da7ceSSimon Glass    - size: Size of section in bytes
2105a5da7ceSSimon Glass    - align-size: Align size to a particular power of two
2115a5da7ceSSimon Glass    - pad-before: Add padding before the entry
2125a5da7ceSSimon Glass    - pad-after: Add padding after the entry
2135a5da7ceSSimon Glass    - pad-byte: Pad byte to use when padding
2145a5da7ceSSimon Glass    - sort-by-offset: Reorder the entries by offset
2155a5da7ceSSimon Glass    - end-at-4gb: Used to build an x86 ROM which ends at 4GB (2^32)
2165a5da7ceSSimon Glass    - name-prefix: Adds a prefix to the name of every entry in the section
2175a5da7ceSSimon Glass        when writing out the map
2185a5da7ceSSimon Glass
2195a5da7ceSSimon GlassA section is an entry which can contain other entries, thus allowing
2205a5da7ceSSimon Glasshierarchical images to be created. See 'Sections and hierarchical images'
2215a5da7ceSSimon Glassin the binman README for more information.
2225a5da7ceSSimon Glass
2235a5da7ceSSimon Glass
2245a5da7ceSSimon Glass
2255a5da7ceSSimon GlassEntry: text: An entry which contains text
2265a5da7ceSSimon Glass-----------------------------------------
2275a5da7ceSSimon Glass
2285a5da7ceSSimon GlassThe text can be provided either in the node itself or by a command-line
2295a5da7ceSSimon Glassargument. There is a level of indirection to allow multiple text strings
2305a5da7ceSSimon Glassand sharing of text.
2315a5da7ceSSimon Glass
2325a5da7ceSSimon GlassProperties / Entry arguments:
2335a5da7ceSSimon Glass    text-label: The value of this string indicates the property / entry-arg
2345a5da7ceSSimon Glass        that contains the string to place in the entry
2355a5da7ceSSimon Glass    <xxx> (actual name is the value of text-label): contains the string to
2365a5da7ceSSimon Glass        place in the entry.
2375a5da7ceSSimon Glass
2385a5da7ceSSimon GlassExample node:
2395a5da7ceSSimon Glass
2405a5da7ceSSimon Glass    text {
2415a5da7ceSSimon Glass        size = <50>;
2425a5da7ceSSimon Glass        text-label = "message";
2435a5da7ceSSimon Glass    };
2445a5da7ceSSimon Glass
2455a5da7ceSSimon GlassYou can then use:
2465a5da7ceSSimon Glass
2475a5da7ceSSimon Glass    binman -amessage="this is my message"
2485a5da7ceSSimon Glass
2495a5da7ceSSimon Glassand binman will insert that string into the entry.
2505a5da7ceSSimon Glass
2515a5da7ceSSimon GlassIt is also possible to put the string directly in the node:
2525a5da7ceSSimon Glass
2535a5da7ceSSimon Glass    text {
2545a5da7ceSSimon Glass        size = <8>;
2555a5da7ceSSimon Glass        text-label = "message";
2565a5da7ceSSimon Glass        message = "a message directly in the node"
2575a5da7ceSSimon Glass    };
2585a5da7ceSSimon Glass
2595a5da7ceSSimon GlassThe text is not itself nul-terminated. This can be achieved, if required,
2605a5da7ceSSimon Glassby setting the size of the entry to something larger than the text.
2615a5da7ceSSimon Glass
2625a5da7ceSSimon Glass
2635a5da7ceSSimon Glass
2645a5da7ceSSimon GlassEntry: u-boot: U-Boot flat binary
2655a5da7ceSSimon Glass---------------------------------
2665a5da7ceSSimon Glass
2675a5da7ceSSimon GlassProperties / Entry arguments:
2685a5da7ceSSimon Glass    - filename: Filename of u-boot.bin (default 'u-boot.bin')
2695a5da7ceSSimon Glass
2705a5da7ceSSimon GlassThis is the U-Boot binary, containing relocation information to allow it
2715a5da7ceSSimon Glassto relocate itself at runtime. The binary typically includes a device tree
2725a5da7ceSSimon Glassblob at the end of it. Use u_boot_nodtb if you want to package the device
2735a5da7ceSSimon Glasstree separately.
2745a5da7ceSSimon Glass
2755a5da7ceSSimon GlassU-Boot can access binman symbols at runtime. See:
2765a5da7ceSSimon Glass
2775a5da7ceSSimon Glass    'Access to binman entry offsets at run time (fdt)'
2785a5da7ceSSimon Glass
2795a5da7ceSSimon Glassin the binman README for more information.
2805a5da7ceSSimon Glass
2815a5da7ceSSimon Glass
2825a5da7ceSSimon Glass
2835a5da7ceSSimon GlassEntry: u-boot-dtb: U-Boot device tree
2845a5da7ceSSimon Glass-------------------------------------
2855a5da7ceSSimon Glass
2865a5da7ceSSimon GlassProperties / Entry arguments:
2875a5da7ceSSimon Glass    - filename: Filename of u-boot.dtb (default 'u-boot.dtb')
2885a5da7ceSSimon Glass
2895a5da7ceSSimon GlassThis is the U-Boot device tree, containing configuration information for
2905a5da7ceSSimon GlassU-Boot. U-Boot needs this to know what devices are present and which drivers
2915a5da7ceSSimon Glassto activate.
2925a5da7ceSSimon Glass
2935a5da7ceSSimon Glass
2945a5da7ceSSimon Glass
2955a5da7ceSSimon GlassEntry: u-boot-dtb-with-ucode: A U-Boot device tree file, with the microcode removed
2965a5da7ceSSimon Glass-----------------------------------------------------------------------------------
2975a5da7ceSSimon Glass
2985a5da7ceSSimon GlassProperties / Entry arguments:
2995a5da7ceSSimon Glass    - filename: Filename of u-boot.dtb (default 'u-boot.dtb')
3005a5da7ceSSimon Glass
3015a5da7ceSSimon GlassSee Entry_u_boot_ucode for full details of the three entries involved in
3025a5da7ceSSimon Glassthis process. This entry provides the U-Boot device-tree file, which
3035a5da7ceSSimon Glasscontains the microcode. If the microcode is not being collated into one
3045a5da7ceSSimon Glassplace then the offset and size of the microcode is recorded by this entry,
3055a5da7ceSSimon Glassfor use by u_boot_with_ucode_ptr. If it is being collated, then this
3065a5da7ceSSimon Glassentry deletes the microcode from the device tree (to save space) and makes
3075a5da7ceSSimon Glassit available to u_boot_ucode.
3085a5da7ceSSimon Glass
3095a5da7ceSSimon Glass
3105a5da7ceSSimon Glass
3115a5da7ceSSimon GlassEntry: u-boot-img: U-Boot legacy image
3125a5da7ceSSimon Glass--------------------------------------
3135a5da7ceSSimon Glass
3145a5da7ceSSimon GlassProperties / Entry arguments:
3155a5da7ceSSimon Glass    - filename: Filename of u-boot.img (default 'u-boot.img')
3165a5da7ceSSimon Glass
3175a5da7ceSSimon GlassThis is the U-Boot binary as a packaged image, in legacy format. It has a
3185a5da7ceSSimon Glassheader which allows it to be loaded at the correct address for execution.
3195a5da7ceSSimon Glass
3205a5da7ceSSimon GlassYou should use FIT (Flat Image Tree) instead of the legacy image for new
3215a5da7ceSSimon Glassapplications.
3225a5da7ceSSimon Glass
3235a5da7ceSSimon Glass
3245a5da7ceSSimon Glass
3255a5da7ceSSimon GlassEntry: u-boot-nodtb: U-Boot flat binary without device tree appended
3265a5da7ceSSimon Glass--------------------------------------------------------------------
3275a5da7ceSSimon Glass
3285a5da7ceSSimon GlassProperties / Entry arguments:
3295a5da7ceSSimon Glass    - filename: Filename of u-boot.bin (default 'u-boot-nodtb.bin')
3305a5da7ceSSimon Glass
3315a5da7ceSSimon GlassThis is the U-Boot binary, containing relocation information to allow it
3325a5da7ceSSimon Glassto relocate itself at runtime. It does not include a device tree blob at
3335a5da7ceSSimon Glassthe end of it so normally cannot work without it. You can add a u_boot_dtb
3345a5da7ceSSimon Glassentry after this one, or use a u_boot entry instead (which contains both
3355a5da7ceSSimon GlassU-Boot and the device tree).
3365a5da7ceSSimon Glass
3375a5da7ceSSimon Glass
3385a5da7ceSSimon Glass
3395a5da7ceSSimon GlassEntry: u-boot-spl: U-Boot SPL binary
3405a5da7ceSSimon Glass------------------------------------
3415a5da7ceSSimon Glass
3425a5da7ceSSimon GlassProperties / Entry arguments:
3435a5da7ceSSimon Glass    - filename: Filename of u-boot-spl.bin (default 'spl/u-boot-spl.bin')
3445a5da7ceSSimon Glass
3455a5da7ceSSimon GlassThis is the U-Boot SPL (Secondary Program Loader) binary. This is a small
3465a5da7ceSSimon Glassbinary which loads before U-Boot proper, typically into on-chip SRAM. It is
3475a5da7ceSSimon Glassresponsible for locating, loading and jumping to U-Boot. Note that SPL is
3485a5da7ceSSimon Glassnot relocatable so must be loaded to the correct address in SRAM, or written
3495a5da7ceSSimon Glassto run from the correct address is direct flash execution is possible (e.g.
3505a5da7ceSSimon Glasson x86 devices).
3515a5da7ceSSimon Glass
3525a5da7ceSSimon GlassSPL can access binman symbols at runtime. See:
3535a5da7ceSSimon Glass
3545a5da7ceSSimon Glass    'Access to binman entry offsets at run time (symbols)'
3555a5da7ceSSimon Glass
3565a5da7ceSSimon Glassin the binman README for more information.
3575a5da7ceSSimon Glass
3585a5da7ceSSimon GlassThe ELF file 'spl/u-boot-spl' must also be available for this to work, since
3595a5da7ceSSimon Glassbinman uses that to look up symbols to write into the SPL binary.
3605a5da7ceSSimon Glass
3615a5da7ceSSimon Glass
3625a5da7ceSSimon Glass
3635a5da7ceSSimon GlassEntry: u-boot-spl-bss-pad: U-Boot SPL binary padded with a BSS region
3645a5da7ceSSimon Glass---------------------------------------------------------------------
3655a5da7ceSSimon Glass
3665a5da7ceSSimon GlassProperties / Entry arguments:
3675a5da7ceSSimon Glass    None
3685a5da7ceSSimon Glass
3695a5da7ceSSimon GlassThis is similar to u_boot_spl except that padding is added after the SPL
3705a5da7ceSSimon Glassbinary to cover the BSS (Block Started by Symbol) region. This region holds
3715a5da7ceSSimon Glassthe various used by SPL. It is set to 0 by SPL when it starts up. If you
3725a5da7ceSSimon Glasswant to append data to the SPL image (such as a device tree file), you must
3735a5da7ceSSimon Glasspad out the BSS region to avoid the data overlapping with U-Boot variables.
3745a5da7ceSSimon GlassThis entry is useful in that case. It automatically pads out the entry size
3755a5da7ceSSimon Glassto cover both the code, data and BSS.
3765a5da7ceSSimon Glass
3775a5da7ceSSimon GlassThe ELF file 'spl/u-boot-spl' must also be available for this to work, since
3785a5da7ceSSimon Glassbinman uses that to look up the BSS address.
3795a5da7ceSSimon Glass
3805a5da7ceSSimon Glass
3815a5da7ceSSimon Glass
3825a5da7ceSSimon GlassEntry: u-boot-spl-dtb: U-Boot SPL device tree
3835a5da7ceSSimon Glass---------------------------------------------
3845a5da7ceSSimon Glass
3855a5da7ceSSimon GlassProperties / Entry arguments:
3865a5da7ceSSimon Glass    - filename: Filename of u-boot.dtb (default 'spl/u-boot-spl.dtb')
3875a5da7ceSSimon Glass
3885a5da7ceSSimon GlassThis is the SPL device tree, containing configuration information for
3895a5da7ceSSimon GlassSPL. SPL needs this to know what devices are present and which drivers
3905a5da7ceSSimon Glassto activate.
3915a5da7ceSSimon Glass
3925a5da7ceSSimon Glass
3935a5da7ceSSimon Glass
3945a5da7ceSSimon GlassEntry: u-boot-spl-nodtb: SPL binary without device tree appended
3955a5da7ceSSimon Glass----------------------------------------------------------------
3965a5da7ceSSimon Glass
3975a5da7ceSSimon GlassProperties / Entry arguments:
3985a5da7ceSSimon Glass    - filename: Filename of spl/u-boot-spl-nodtb.bin (default
3995a5da7ceSSimon Glass        'spl/u-boot-spl-nodtb.bin')
4005a5da7ceSSimon Glass
4015a5da7ceSSimon GlassThis is the U-Boot SPL binary, It does not include a device tree blob at
4025a5da7ceSSimon Glassthe end of it so may not be able to work without it, assuming SPL needs
4035a5da7ceSSimon Glassa device tree to operation on your platform. You can add a u_boot_spl_dtb
4045a5da7ceSSimon Glassentry after this one, or use a u_boot_spl entry instead (which contains
4055a5da7ceSSimon Glassboth SPL and the device tree).
4065a5da7ceSSimon Glass
4075a5da7ceSSimon Glass
4085a5da7ceSSimon Glass
4095a5da7ceSSimon GlassEntry: u-boot-spl-with-ucode-ptr: U-Boot SPL with embedded microcode pointer
4105a5da7ceSSimon Glass----------------------------------------------------------------------------
4115a5da7ceSSimon Glass
4125a5da7ceSSimon GlassSee Entry_u_boot_ucode for full details of the entries involved in this
4135a5da7ceSSimon Glassprocess.
4145a5da7ceSSimon Glass
4155a5da7ceSSimon Glass
4165a5da7ceSSimon Glass
4175a5da7ceSSimon GlassEntry: u-boot-ucode: U-Boot microcode block
4185a5da7ceSSimon Glass-------------------------------------------
4195a5da7ceSSimon Glass
4205a5da7ceSSimon GlassProperties / Entry arguments:
4215a5da7ceSSimon Glass    None
4225a5da7ceSSimon Glass
4235a5da7ceSSimon GlassThe contents of this entry are filled in automatically by other entries
4245a5da7ceSSimon Glasswhich must also be in the image.
4255a5da7ceSSimon Glass
4265a5da7ceSSimon GlassU-Boot on x86 needs a single block of microcode. This is collected from
4275a5da7ceSSimon Glassthe various microcode update nodes in the device tree. It is also unable
4285a5da7ceSSimon Glassto read the microcode from the device tree on platforms that use FSP
4295a5da7ceSSimon Glass(Firmware Support Package) binaries, because the API requires that the
4305a5da7ceSSimon Glassmicrocode is supplied before there is any SRAM available to use (i.e.
4315a5da7ceSSimon Glassthe FSP sets up the SRAM / cache-as-RAM but does so in the call that
4325a5da7ceSSimon Glassrequires the microcode!). To keep things simple, all x86 platforms handle
4335a5da7ceSSimon Glassmicrocode the same way in U-Boot (even non-FSP platforms). This is that
4345a5da7ceSSimon Glassa table is placed at _dt_ucode_base_size containing the base address and
4355a5da7ceSSimon Glasssize of the microcode. This is either passed to the FSP (for FSP
4365a5da7ceSSimon Glassplatforms), or used to set up the microcode (for non-FSP platforms).
4375a5da7ceSSimon GlassThis all happens in the build system since it is the only way to get
4385a5da7ceSSimon Glassthe microcode into a single blob and accessible without SRAM.
4395a5da7ceSSimon Glass
4405a5da7ceSSimon GlassThere are two cases to handle. If there is only one microcode blob in
4415a5da7ceSSimon Glassthe device tree, then the ucode pointer it set to point to that. This
4425a5da7ceSSimon Glassentry (u-boot-ucode) is empty. If there is more than one update, then
4435a5da7ceSSimon Glassthis entry holds the concatenation of all updates, and the device tree
4445a5da7ceSSimon Glassentry (u-boot-dtb-with-ucode) is updated to remove the microcode. This
4455a5da7ceSSimon Glasslast step ensures that that the microcode appears in one contiguous
4465a5da7ceSSimon Glassblock in the image and is not unnecessarily duplicated in the device
4475a5da7ceSSimon Glasstree. It is referred to as 'collation' here.
4485a5da7ceSSimon Glass
4495a5da7ceSSimon GlassEntry types that have a part to play in handling microcode:
4505a5da7ceSSimon Glass
4515a5da7ceSSimon Glass    Entry_u_boot_with_ucode_ptr:
4525a5da7ceSSimon Glass        Contains u-boot-nodtb.bin (i.e. U-Boot without the device tree).
4535a5da7ceSSimon Glass        It updates it with the address and size of the microcode so that
4545a5da7ceSSimon Glass        U-Boot can find it early on start-up.
4555a5da7ceSSimon Glass    Entry_u_boot_dtb_with_ucode:
4565a5da7ceSSimon Glass        Contains u-boot.dtb. It stores the microcode in a
4575a5da7ceSSimon Glass        'self.ucode_data' property, which is then read by this class to
4585a5da7ceSSimon Glass        obtain the microcode if needed. If collation is performed, it
4595a5da7ceSSimon Glass        removes the microcode from the device tree.
4605a5da7ceSSimon Glass    Entry_u_boot_ucode:
4615a5da7ceSSimon Glass        This class. If collation is enabled it reads the microcode from
4625a5da7ceSSimon Glass        the Entry_u_boot_dtb_with_ucode entry, and uses it as the
4635a5da7ceSSimon Glass        contents of this entry.
4645a5da7ceSSimon Glass
4655a5da7ceSSimon Glass
4665a5da7ceSSimon Glass
4675a5da7ceSSimon GlassEntry: u-boot-with-ucode-ptr: U-Boot with embedded microcode pointer
4685a5da7ceSSimon Glass--------------------------------------------------------------------
4695a5da7ceSSimon Glass
4705a5da7ceSSimon GlassProperties / Entry arguments:
4715a5da7ceSSimon Glass    - filename: Filename of u-boot-nodtb.dtb (default 'u-boot-nodtb.dtb')
4725a5da7ceSSimon Glass
4735a5da7ceSSimon GlassSee Entry_u_boot_ucode for full details of the three entries involved in
4745a5da7ceSSimon Glassthis process. This entry updates U-Boot with the offset and size of the
4755a5da7ceSSimon Glassmicrocode, to allow early x86 boot code to find it without doing anything
4765a5da7ceSSimon Glasscomplicated. Otherwise it is the same as the u_boot entry.
4775a5da7ceSSimon Glass
4785a5da7ceSSimon Glass
4795a5da7ceSSimon Glass
4805a5da7ceSSimon GlassEntry: x86-start16: x86 16-bit start-up code for U-Boot
4815a5da7ceSSimon Glass-------------------------------------------------------
4825a5da7ceSSimon Glass
4835a5da7ceSSimon GlassProperties / Entry arguments:
4845a5da7ceSSimon Glass    - filename: Filename of u-boot-x86-16bit.bin (default
4855a5da7ceSSimon Glass        'u-boot-x86-16bit.bin')
4865a5da7ceSSimon Glass
4875a5da7ceSSimon Glassx86 CPUs start up in 16-bit mode, even if they are 32-bit CPUs. This code
4885a5da7ceSSimon Glassmust be placed at a particular address. This entry holds that code. It is
4895a5da7ceSSimon Glasstypically placed at offset CONFIG_SYS_X86_START16. The code is responsible
4905a5da7ceSSimon Glassfor changing to 32-bit mode and jumping to U-Boot's entry point, which
4915a5da7ceSSimon Glassrequires 32-bit mode (for 32-bit U-Boot).
4925a5da7ceSSimon Glass
4935a5da7ceSSimon GlassFor 64-bit U-Boot, the 'x86_start16_spl' entry type is used instead.
4945a5da7ceSSimon Glass
4955a5da7ceSSimon Glass
4965a5da7ceSSimon Glass
4975a5da7ceSSimon GlassEntry: x86-start16-spl: x86 16-bit start-up code for SPL
4985a5da7ceSSimon Glass--------------------------------------------------------
4995a5da7ceSSimon Glass
5005a5da7ceSSimon GlassProperties / Entry arguments:
5015a5da7ceSSimon Glass    - filename: Filename of spl/u-boot-x86-16bit-spl.bin (default
5025a5da7ceSSimon Glass        'spl/u-boot-x86-16bit-spl.bin')
5035a5da7ceSSimon Glass
5045a5da7ceSSimon Glassx86 CPUs start up in 16-bit mode, even if they are 64-bit CPUs. This code
5055a5da7ceSSimon Glassmust be placed at a particular address. This entry holds that code. It is
5065a5da7ceSSimon Glasstypically placed at offset CONFIG_SYS_X86_START16. The code is responsible
5075a5da7ceSSimon Glassfor changing to 32-bit mode and starting SPL, which in turn changes to
5085a5da7ceSSimon Glass64-bit mode and jumps to U-Boot (for 64-bit U-Boot).
5095a5da7ceSSimon Glass
5105a5da7ceSSimon GlassFor 32-bit U-Boot, the 'x86_start16' entry type is used instead.
5115a5da7ceSSimon Glass
5125a5da7ceSSimon Glass
5135a5da7ceSSimon Glass
514