summaryrefslogtreecommitdiff
path: root/tools/ifdtool.c
Commit message (Collapse)AuthorAgeLines
* tools: ifdtool: Do not write region while its size is negativeBin Meng2015-06-04-1/+1
| | | | | | | | | We should ignore those regions whose size is negative. These are typically optional and unused regions (like GbE and platform data). Change-Id: I65ad01746144604a1dc0588b617af21f2722ebbf Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* x86: Correct ifdtool microcode calculationSimon Glass2015-01-13-2/+2
| | | | | | | | This currently assumes that U-Boot resides at the start of ROM. Update it to remove this assumption. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ifdtool: Add support for early microcode accessSimon Glass2014-12-18-8/+102
| | | | | | | | | | | | | | | | | | | Some Intel CPUs use an 'FSP' binary blob which provides an inflexible means of starting up the CPU. One result is that microcode updates can only be done before RAM is available and therefore parsing of the device tree is impracticle. Worse, the addess of the microcode update must be stored in ROM since a pointer to its start address and size is passed to the 'FSP' blob. It is not possible to perform any calculations to obtain the address and size. To work around this, ifdtool is enhanced to work out the address and size of the first microcode update it finds in the supplied device tree. It then writes these into the correct place in the ROM. U-Boot can then start up the FSP correctly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ifdtool: Use a structure for the file/address listSimon Glass2014-12-18-6/+18
| | | | | | | | | Rather than two independent arrays, use a single array of a suitable structure. Also add a 'type' member since we will shortly add additional types. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ifdtool: Display filename when file errors are reportedSimon Glass2014-12-18-12/+18
| | | | | | | | When a file is missing it helps to know which file. Update the error message to print this information. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ifdtool: Correct a debug() missing parameterSimon Glass2014-12-18-1/+2
| | | | | | | | This is missing a parameter. Fix it to avoid a warning when debug is enabled. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ifdtool: Separate out filenames for -D and -iSimon Glass2014-12-13-6/+6
| | | | | | | To allow these options to be specified together, separate them out. Change-Id: Ib93f11cd51eb3302127f4c82936ff2b44c88d5a2 Signed-off-by: Simon Glass <sjg@chromium.org>
* tools/ifdtool: Support writing multiple files (-w) simultaneouslyBin Meng2014-12-13-7/+24
| | | | | | | | | Currently ifdtool only supports writing one file (-w) at a time. This looks verbose when generating u-boot.rom for x86 targets. This change allows at most 16 files to be written simultaneously. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* x86: ifdtool: Allow creation of an empty ROMSimon Glass2014-11-21-1/+1
| | | | | | | Allow an empty ROM to be created, without needing to provide a descriptor. The descriptor is not needed on some x86 boards. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Add ifdtool for working with Intel Flash Descriptor ROM imagesSimon Glass2014-11-21-0/+1039
Newer Intel chips require a Management Engine which requires a particular format for the SPI flash that contains the boot loader. Add a tool that supports creating and modifying these ROM images. This tool is from Chrome OS but has been cleaned up to use U-Boot style and to add comments. A few features have been added also. Signed-off-by: Simon Glass <sjg@chromium.org>