summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | disk: part: sandbox support in dev_print()Heinrich Schuchardt2021-01-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Commands like 'fatinfo' call dev_print() to print device information. If the block device is created via 'host bind', we should print accurate information. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | sandbox: fill block device meta informationHeinrich Schuchardt2021-01-301-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | Provide information about host backed block device. Mark the device created by 'host bind' as removable. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | dm: replace auto_alloc_size with autoDario Binacchi2021-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | The auto_alloc_size members of struct driver has been renamed auto. Signed-off-by: Dario Binacchi <dariobin@libero.it> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | do not pass NULL pointer to libfdtStanislav Pinchuk2021-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-send because of line-wraps. Without this patch, u-boot just hangs if the fdt pointer is not initialized. The diagnostic subsystems are not yet initialized, so all you get is a blind hang. Signed-off-by: Stanislav.Pinchuk@kaspersky.com
| * | sandbox: keep time offset when resettingHeinrich Schuchardt2021-01-304-1/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The UEFI Self Certification Test (SCT) checks the SetTime() service with the following steps: * set date * reset * check date matches To be compliant the sandbox should keep the offset to the host RTC during resets. The implementation uses the environment variable UBOOT_SB_TIME_OFFSET to persist the offset. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | binman: Print a debug message when binman selects a nodeSimon Glass2021-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | | Add some debugging to indicate which node the binman library is looking at. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | Add a symlink for ctype.hSimon Glass2021-01-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Libraries that link with U-Boot typically may expect to be able to include ctype.h but this file is in a different place in U-Boot. Add a symlink to make this work. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: core: Update ofnode_read_fmap_entry() to read hashesSimon Glass2021-01-304-9/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | At present this function uses the old format for reading hashes. Add support for the current format. Add a test while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: core: Add a comment about pinctrl_select_state()Simon Glass2021-01-301-0/+9
| | | | | | | | | | | | | | | | | | | | | The use of pinctrl in the core of driver model is useful but can provoke some strange behaviour. Add a comment to aid debugging. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | clk: x86: Correct the driver nameSimon Glass2021-01-301-2/+2
| | | | | | | | | | | | | | | | | | | | | The current driver name does not match its compatible string, so of-platdata does not work correctly. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | clk: Add debugging for return valuesSimon Glass2021-01-301-5/+11
| | | | | | | | | | | | | | | | | | | | | Use the log_msg_ret() mechanism to get error-return information when clocks fail to probe, etc. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: core: Don't inline dev_read...() calls with of-platdataSimon Glass2021-01-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present if these calls are used with of-platdata, a confusing error is produced, referring to a function not actually called by the code causing the problem. Fix this by not inlining, so that the error mentions the dev_read_...() function and it is more obvious what is going on. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sandbox: Disable I2C emulators in SPLSimon Glass2021-01-304-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These cannot work with of-platdata since they currently need the devicetree at runtime. Disable the emulators and the sandbox I2C driver that needs them. We can enable these later, if needed for testing. Switch the of_plat_parent test over to use a simple bus instead. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de>
| * | i2c: desigware: Add an alias for Intel Apollo LakeSimon Glass2021-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | | Add an alias so that this driver can be used in TPL on coral. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de>
| * | x86: coral: Support TPM and RTC in SPLSimon Glass2021-01-302-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | Update the devicetree so that the TPM and RTC can be used in SPL. Also enable the pins used for getting the memory configuration settings while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | spl: Tidy up SPL/TPL malloc sizesSimon Glass2021-01-301-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current help talks about relocation which doesn't apply to SPL and TPL. Update it to avoid confusion. Also make the TPL size default to the same as the SPL size, since this is more likely to be a useful value than the one used by U-Boot proper, which may be quite a bit larger. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | cros_ec: Add vstore supportSimon Glass2021-01-304-2/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The EC can store small amounts of data for the benefit of the verified boot process. Since the EC is seldom reset, this can allow the AP to store data that survives a reboot or a suspend/resume cycle. Add support for this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | cros_ec: Allow use with of-platdataSimon Glass2021-01-301-0/+2
| | | | | | | | | | | | | | | | | | Avoid reading the device tree when of-platdata is in use. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | cros_ec: Show events in human-readable formSimon Glass2021-01-303-7/+112
| | | | | | | | | | | | | | | | | | | | | Add a command to show the current events as a list of names. This is easier to decipher than a bit mask. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | cros_ec: Add support for switchesSimon Glass2021-01-307-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | On x86 platforms the EC provides a way to read 'switches', which are on/off values determined by the EC. Add a new driver method for this and implement it for LPC. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | cros_ec: Add documentation for cros_ec driver operationsSimon Glass2021-01-301-0/+40
| | | | | | | | | | | | | | | | | | | | | Add comments to these methods so it is documented in this central place, not just in each driver. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | cros_ec: Support reading EC featuresSimon Glass2021-01-306-10/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The EC can support a variety of features and provides a way to find out what is available. Add support for this. Also update the feature list to the lastest available while we are here. This is at: https://chromium.googlesource.com/chromiumos/platform/ec/+/refs/heads/master/include/ec_commands.h Signed-off-by: Simon Glass <sjg@chromium.org>
| * | cros_ec: Add support for reading the SKU IDSimon Glass2021-01-305-0/+55
| | | | | | | | | | | | | | | | | | | | | This allows reading strapping pins attached to the EC. Add an implementation for this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | cros_ec: Add run-time check for input buffer overflowSimon Glass2021-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | | This should not happen in normal operation, but the EC might have a bug, so add a run-time check just in case. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | cros_ec: Tidy up a few delaysSimon Glass2021-01-301-7/+17
| | | | | | | | | | | | | | | | | | | | | Allow a longer time for the EC to reboot. Also use a constant for the hash delay time, so it is clear what it is for. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | cros_ec: Add a function for the hello messageSimon Glass2021-01-306-15/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is used several times in this file. Put it in a function to avoid code duplication. Also add a test for this function. There are no cros_ec tests at present, so it is time to update the code. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | doc/sandbox: improve formatting of command line optionsHeinrich Schuchardt2021-01-301-14/+14
| | | | | | | | | | | | | | | | | | | | | Show the command line options in bold. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | sandbox: fix sandbox_cmdline_cb_test_fdt()Heinrich Schuchardt2021-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | fmt does not foresee any parameter. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | x86: typo segementHeinrich Schuchardt2021-01-302-2/+2
| | | | | | | | | | | | | | | | | | | | | %s/segement/segment/ Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | binman: Allow for skip_at_start when reading entriesSimon Glass2021-01-303-4/+48
| | | | | | | | | | | | | | | | | | | | | The offset of an entry needs to be adjusted by its skip-at-start value. This is currently missing when reading entry data. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | binman: Support alignment of filesSimon Glass2021-01-307-1/+53
| | | | | | | | | | | | | | | | | | | | | | | | When packing files it is sometimes useful to align the start of each file, e.g. if the flash driver can only access 32-bit-aligned data. Provides a new property to support this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | binman: Allow vblock to include devicetree blobsSimon Glass2021-01-305-10/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present if a devicetree blob is included in a vblock it does not deal with updates. This is because the vblock is created once at the start and does not have a method to update itself later, after all the entry contents are finalised. Fix this by adjusting how the vblock is created. Also simplify Image.ProcessEntryContents() since it effectively duplicates the code in Section.ProcessContents(). Signed-off-by: Simon Glass <sjg@chromium.org>
| * | binman: Support reading an image with entry argsSimon Glass2021-01-305-4/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally when an entry is created, any entry arguments it has are required to be provided, so it can actually generate its contents correctly. However when an existing image is read, Entry objects are created for each of the entries in the image. This happens as part of the process of reading the image into binman. In this case we don't need the entry arguments, since we do not intend to regenerate the entries, or at least not unless requested. So there is no sense in reporting an error for missing entry arguments. Add a new property for the Image to handle this case. Update the error reporting to be conditional on this property. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | binman: Support finding symbols in sub-sectionsSimon Glass2021-01-306-7/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present binman only supports resolving symbols in the same section as the binary that uses it. This is quite limited because we often need to group entries into different sections. Enhance the algorithm to search the entire image for symbols. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | binman: Fix a few file commentsSimon Glass2021-01-302-2/+1
| | | | | | | | | | | | | | | | | | Two files have the wrong comment at the top of them. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | binman: Show the size when writing entriesSimon Glass2021-01-301-1/+2
| | | | | | | | | | | | | | | | | | Update the log output to show the size, since this is useful information. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | binman: Update the TODO listSimon Glass2021-01-301-2/+1
| | | | | | | | | | | | | | | | | | | | | Two of the items have been completed and I thought of another one. Update the list. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | patman: Correct lz4 compression parametersSimon Glass2021-01-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present on large files, lz4 uses a larger block size (e.g. 256KB) than the 64KB supported by the U-Boot decompression implementation. Also it is optimised for maximum compression speed, producing larger output than we would like. Update the parameters to correct these problems. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dtoc: binman: Drop Python 2 codeSimon Glass2021-01-302-4/+3
| | | | | | | | | | | | | | | | | | Drop a few more Python 2 relics that are no-longer needed. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | x86: coral: Enable CONFIG_BOOTARGS_SUBSTSimon Glass2021-01-301-0/+1
| | | | | | | | | | | | | | | | | | | | | Enable this option so that the boot-script substitutions of %U works as expected. With this, it can boot into Chrome OS. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | x86: coral: Update an unused pin to reduce powerSimon Glass2021-01-301-0/+1
| | | | | | | | | | | | | | | | | | GPIO_25 is not used on coral, so set it up in deep sleep. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | tpm: cr50: Rename driver to work with of-platdataSimon Glass2021-01-301-2/+2
| | | | | | | | | | | | | | | | | | | | | Update the driver name to match the compatible string, so it can work with of-platdata. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | tpm: cr50: Add a better description and more debugSimon Glass2021-01-301-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | Update the TPM description to include the interrupt mechanicm since this is useful to know. Also add a warning if the TPM cannot be found and a debug line if it succeeds. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | tpm: cr50: Check for valid localitySimon Glass2021-01-301-4/+12
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | When the Cr50 starts up it doesn't have a valid locality. The driver sets it to -1 to indicate that. Tracking this allows cr50_i2c_cleanup() to avoid releasing a locality that was not claimed. However the helper functions that generate the flags use a u8 type which cannot support -1, so they return a locality of 0xff. Fix this by updating the type. With this, 'tpm startup TPM2_SU_CLEAR' works as expected. Signed-off-by: Simon Glass <sjg@chromium.org>
* | Merge tag 'efi-2021-04-rc1-4' of ↵Tom Rini2021-01-308-10/+38
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2021-04-rc1-4 Bug fixes: * re-read the partition table after writing GPT * fix a problem booting ARMv7 boards with PSCI without UEFI * make aarch64 UEFI test programs compatible with GRUB linux command * correct the alignment check in the EFI_BLOCK_IO_PROTOCOL * check EFI_BLOCK_IO_PROTOCOL.Media->LastBlock in unit test
| * efi_loader: add Linux magic to aarch64 crt0Heinrich Schuchardt2021-01-292-1/+4
| | | | | | | | | | | | | | | | Add the Linux magic to the EFI file header to allow running our test programs with GRUB's linux command. Now we can dump the fixed-up device tree with our dtbdump.efi tool. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * tools: add mkeficapsule to .gitignoreHeinrich Schuchardt2021-01-291-0/+1
| | | | | | | | | | | | mkeficapsule is a build product. Add it to .gitignore Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * disk: part_efi: update partition table entries after writeGary Bisson2021-01-291-0/+3
| | | | | | | | | | | | | | Fixes fastboot issues when switching from mbr to gpt partition tables. Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: switch to non-secure mode laterHeinrich Schuchardt2021-01-292-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Some ARMv7 boards using PSCI require to be in secure-mode when booted via 'bootz' or 'bootm'. During distro-boot 'bootefi bootmgr' is called to check if booting via UEFI is possible. With the change we change the switch from secure mode to non-secure mode is moved from the UEFI subsystem setup to just before calling StartImage(). Cc: Jernej Škrabec <jernej.skrabec@gmail.com> Reported by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: correct block IO alignment checkHeinrich Schuchardt2021-01-291-4/+6
| | | | | | | | | | | | | | | | | | | | If the field Media->IoAlign of the EFI block IO protocol is zero, no alignment is required. Our code required 4 GiB alignment in this case. Don't check buffer alignment if Media->IoAlign == 0. Fixes: f59f0825e8b9 ("efi_loader: parameter checks BLOCK_IO_PROTOCOL") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>