For UBI partitions ("partubi" in dfu_alt_info), dfu_fill_entity_mtd sets
the mtd.ubi flag; however other functions incorrectly check for nand.ubi
instead. Fix this by checking for the correct flag.
Signed-off-by: Guillermo Rodriguez <guille.rodriguez@gmail.com>
Cc: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
The R-Car3 SDHI should set these two bits in DMA_MODE register according
to the specification, to indicate 64bit bus width. No other bus width
options are permitted and the default value is 0, which is incorrect.
Set the bits accordingly.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
DTS files apart from r8a774a1-hihope-rzg2m-u-boot.dts and
r8a774a1-u-boot.dtsi have been imported from linux 5.10
commit 2c85ebc57b3e1817 ("Linux 5.10").
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAmAUhPAACgkQxIHbvCwF
GsQEEA/6A2onIXIcqnl3a0iMXSYy7ByO34jQ8zrFALl6ubrHYDub5/nZavB+knB7
9kT66Aqaffhhke7LenkvpgSCq2v1Ge6zAPPZLOypJ/fll6QMUPmzY/bMgDz7gg2z
9mkCwWUjrvEppef0xHJ8mbxqkBrF42w4luOuFZudzsXS5zX8yGwOYJ4Tm46yKkBc
B6iP0VBQGU9+mOstyrXCGtL8Jgy1lC8Bj2DBbVsoeIuLh45JJzEvJsXXVZlNEMLf
IAg5lgfERirZpdbogntDb+hxQrhQOs8elDdY/IqmV9svimXq0ONPLPiGbv82ZltR
Va/H4AF494ZlyV0QRzFj3nBx1jkGNLVCQhCWfDWrCyJDqVR7Vqw8J3ctXJ+3gjWn
qNRHN/1JDx324FE0DnczDW9vsGkTqod6duU1PS00hYOgowAR9Qt44s6zXQmJwz+x
R3pNPiC3dreO4dBjFMEKDX5SY/+v2GUf6RyccoEBiIJfpcSvCNg4U8LT1VO4Z5Hx
szNtT6ANURoguXz1x5Wfo+UAHsf5hm5LpiisHGinuygCkUxlf+kzOuIayMtUoyUB
ZkKZxCxF9XmnaXY9Uv/A6Y1LQVBXrD5urM1G5YR7TSeIc0DaplcacC5963R9+F04
2+IZK5etTLu7eT8EFD0myAHyozkX8043R3L0XbKvDEYMsMXnzBQ=
=bUWI
-----END PGP SIGNATURE-----
Merge tag 'efi-2021-04-rc1-4' of 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
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>