summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* mtd: spi-nor-ids: Add support for XMC XM25QH64CReto Schneider2021-08-031-0/+1
| | | | | | | | | | This chip has been (briefly) tested on the MediaTek MT7688 based GARDENA smart gateway. Datasheet: http://xmcwh.com/Uploads/2020-12-17/XM25QH64C_Ver1.1.pdf Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
* Merge branch '2021-08-02-numeric-input-cleanups'Tom Rini2021-08-02254-948/+1169
|\ | | | | | | | | | | - Merge in a series that cleans up and makes more consistent how we deal with numeric input on the CLI. This saves a few bytes in a lot of places.
| * lib: Allow using 0x when a decimal value is requestedSimon Glass2021-08-024-17/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot mostly uses hex for value input, largely because addresses are much easier to understand in hex. But in some cases a decimal value is requested, such as where the value is small or hex does not make sense in the context. In these cases it is sometimes useful to be able to provide a hex value in any case, if only to resolve any ambiguity. Add this functionality, for increased flexibility. Signed-off-by: Simon Glass <sjg@chromium.org>
| * doc: Add a note about number representationSimon Glass2021-08-021-0/+31
| | | | | | | | | | | | | | Mention the default base of U-Boot in the command-line section. Add examples for decimal and octal. Signed-off-by: Simon Glass <sjg@chromium.org>
| * doc: Convert command-line info to rSTSimon Glass2021-08-023-41/+57
| | | | | | | | | | | | Take this part of the README and put it into rST format. Signed-off-by: Simon Glass <sjg@chromium.org>
| * lib: Move common digit-parsing code into a functionSimon Glass2021-08-021-7/+24
| | | | | | | | | | | | | | | | The code to convert a character into a digit is repeated twice in this file. Factor it out into a separate function. This also makes the code a little easier to read. Signed-off-by: Simon Glass <sjg@chromium.org>
| * lib: Add octal tests for simple_strtoul/l()Simon Glass2021-08-021-0/+10
| | | | | | | | | | | | | | This function support decoding octal but no tests are included yet. Add some. Signed-off-by: Simon Glass <sjg@chromium.org>
| * lib: Add tests for simple_strtoull()Simon Glass2021-08-021-0/+61
| | | | | | | | | | | | | | Add some tests that check the behaviour of this function. These are the same as for simple_strtoul() but with a few longer values. Signed-off-by: Simon Glass <sjg@chromium.org>
| * lib: Drop unnecessary check for hex digitSimon Glass2021-08-022-1/+3
| | | | | | | | | | | | | | | | | | | | | | If we see 0x then we can assume this is the start of a hex value. It does not seem necessary to check for a hex digit after that since it will happen when parsing the value anyway. Drop this check to simplify the code and reduce size. Add a few more test cases for when a 0x prefix is used. Signed-off-by: Simon Glass <sjg@chromium.org>
| * lib: Comment the base parameter with simple_strtoul/l()Simon Glass2021-08-021-2/+8
| | | | | | | | | | | | | | This parameter is not documented properly since it does not cover the meaning when the base is 0. Update this in both functions. Signed-off-by: Simon Glass <sjg@chromium.org>
| * global: Convert simple_strtoul() with decimal to dectoul()Simon Glass2021-08-02111-230/+255
| | | | | | | | | | | | | | It is a pain to have to specify the value 10 in each call. Add a new dectoul() function and update the code to use it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * global: Convert simple_strtoul() with hex to hextoul()Simon Glass2021-08-02183-659/+692
| | | | | | | | | | | | | | | | | | It is a pain to have to specify the value 16 in each call. Add a new hextoul() function and update the code to use it. Add a proper comment to simple_strtoul() while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
| * hash: Ensure verification hex pairs are terminatedSimon Glass2021-08-021-1/+1
|/ | | | | | | This function seems to assume that the chr[] variable contains zeros at the start, which is not always true. Use strlcpy() to be safe. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge tag 'efi-2021-10-rc2' of ↵Tom Rini2021-08-029-46/+54
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2021-10-rc2 Documentation: * handle 'make htmldocs' warnings as errors * add missing board/ti/index.rst Bug fixes: * avoid buffer overrun in TrueType console * lib: disable CONFIG_SPL_HEXDUMP by default
| * efi_loader: typo cerificateHeinrich Schuchardt2021-08-021-1/+1
| | | | | | | | | | | | %s/cerificate/certificate/ Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * doc: add graphviz imagemagick as build dependenciesHeinrich Schuchardt2021-08-011-3/+3
| | | | | | | | | | | | | | 'make htmldocs' requires graphviz and imagemagick (at least with Sphinx 3.5.4). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * doc: handle 'make htmldocs' warnings as errorsHeinrich Schuchardt2021-08-011-1/+1
| | | | | | | | | | | | | | Parameter -W for sphinx-build turns build warnings into errors. This helps us to avoid bad patches passing Gitlab CI. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * doc: add missing board/ti/index.rstHeinrich Schuchardt2021-08-011-0/+9
| | | | | | | | | | | | | | | | | | Commit 8baeeecbe305 ("doc: board: Move j721e document to doc/board/ti/ directory") introduced 'make htmldocs' build errors due to a missing file board/ti/index.rst. Fixes: 8baeeecbe305 ("doc: board: Move j721e document to doc/board/ti/ directory") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * doc: riscv: flashing SiFive boardsHeinrich Schuchardt2021-08-012-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | We should not use /dev/sda and /dev/sdb in our examples. Users might inadvertently mess up their workstation. Use /dev/sdX instead. Remove console output like '# ' and '> ' which makes copying hard. Set example language to bash for correct syntax-highlighting. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> iewed-by: Bin Meng <bmeng.cn@gmail.com>
| * lib: disable CONFIG_SPL_HEXDUMP by defaultHeinrich Schuchardt2021-08-012-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_HEXDUMP is needed to display UEFI variables using 'printenv -e'. Enabling CONFIG_SPL_HEXDUMP only makes sense for debugging purposes. Hence CONFIG_SPL_HEXDUMP should not be enabled by default. The following boards currently have CONFIG_SPL_HEXDUMP=y. This includes boards that don't use SPL at all. axm_defconfig imx8mm-cl-iot-gate_defconfig imx8mm_venice_defconfig imxrt1020-evk_defconfig imxrt1050-evk_defconfig kontron_sl28_defconfig kp_imx53_defconfig lx2160ardb_tfa_stmm_defconfig mt7622_rfb_defconfig octeon_ebb7304_defconfig octeon_nic23_defconfig qemu_arm64_defconfig qemu_arm_defconfig qemu-riscv32_defconfig qemu-riscv32_smode_defconfig qemu-riscv64_defconfig qemu-riscv64_smode_defconfig qemu-x86_64_defconfig qemu-x86_defconfig sandbox64_defconfig sandbox_defconfig stm32mp15_basic_defconfig stm32mp15_trusted_defconfig synquacer_developerbox_defconfig taurus_defconfig xilinx_versal_virt_defconfig The patch only keeps it enabled on sandbox_spl_defconfig Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * video: buffer overrun in TrueType consoleHeinrich Schuchardt2021-08-011-14/+12
| | | | | | | | | | | | | | | | When scrolling the TrueType console a buffer overrun occurs. Fixes: a29b012037cc ("video: Add a console driver that uses TrueType fonts") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* | Merge tag 'mmc-2021-7-30' of https://source.denx.de/u-boot/custodians/u-boot-mmcTom Rini2021-08-023-29/+38
|\ \ | | | | | | | | | | | | pl180_mmci update and cleanup fix rpmb routing memory alignment
| * | mmc: arm_pl180_mmci: Add configuration for ST-Ericsson Ux500v2Stephan Gerhold2021-07-302-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the eMMC on ST-Ericsson Ux500v2 we need slightly different configuration values. Use the existing switch statement to match the peripheral ID of Ux500v2 (0x10480180) and override the necessary values to make the eMMC work on devices with ST-Ericsson Ux500. Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Tested-by: Patrice Chotard <patrice.chotard@foss.st.com> on stm32f769-disco Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
| * | mmc: arm_pl180_mmci: Simplify code using mmc_of_parse()Stephan Gerhold2021-07-301-15/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify the code a bit by using the common mmc_of_parse() function instead of duplicating the device tree parsing code. We can still get a default value for cfg->f_max by assigning it before calling mmc_of_parse(). Another advantage of this refactoring is that we parse more properties now, e.g. "non-removable" can be used to disable CD entirely. Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Tested-by: Patrice Chotard <patrice.chotard@foss.st.com> on stm32f769-disco Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
| * | mmc: arm_pl180_mmci: Simplify code using dev_read_addr_ptr()Stephan Gerhold2021-07-301-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify the code a bit by using dev_read_addr_ptr() instead of dev_read_addr(). This avoids having to cast explicitly to void*. Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Tested-by: Patrice Chotard <patrice.chotard@foss.st.com> on stm32f769-disco Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
| * | mmc: arm_pl180_mmci: Don't bind to all arm, primecell devicesStephan Gerhold2021-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The arm,primecell compatible is used for lots of different types of devices, e.g. I2C, SPI, coresight, ... We really should not bind the MMC driver to all of them. Looking through the device trees in U-Boot there seems to be always a second compatible string for the pl180 device, either arm,pl180 (already listed) or arm,pl18x. Add the "arm,pl18x" compatible to the list but remove the generic "arm,primecell". Note that on Linux these compatibles cannot be found in drivers because AMBA/primecell devices are matched based on their peripheral ID instead of the compatible. This fixes the following error messages when booting the ST-Ericsson U8500 "stemmy" board with the arm_pl180_mmci driver enabled: MMC: ptm@801ae000 - probe failed: -38 ptm@801af000 - probe failed: -38 funnel@801a6000 - probe failed: -38 tpiu@80190000 - probe failed: -38 etb@801a4000 - probe failed: -38 Cc: Patrice Chotard <patrice.chotard@st.com> Fixes: 6f41d1a17e20 ("mmc: arm_pl180_mmci: Sync compatible with kernel") Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Tested-by: Patrice Chotard <patrice.chotard@foss.st.com> on stm32f769-disco Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
| * | mmc: rpmb: Fix driver routing memory alignment with tmp bufferlitchipi2021-07-301-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix mmc_rpmb_route_frames() implementation to comply with most MMC drivers that expect some alignment of MMC data frames in memory. When called from drivers/tee/optee/rpmb.c, the address passed is not aligned properly. OP-TEE OS inserts a 6-byte header before a raw RPMB frame which makes RPMB data buffer not 32bit aligned. To prevent breaking ABI with OPTEE-OS RPC memrefs, allocate a temporary buffer to copy the data into an aligned memory. Many RPMB drivers implicitly expect 32bit alignment of the eMMC frame including arm_pl180_mmci.c, sandbox_mmc.c and stm32_sdmmc2.c Signed-off-by: Timothée Cercueil <timothee.cercueil@st.com> Signed-off-by: Timothée Cercueil <litchi.pi@protonmail.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
* | | Merge tag 'dm-pull-1aug21' of https://source.denx.de/u-boot/custodians/u-boot-dmTom Rini2021-08-0127-514/+997
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | sandbox TPM-emulator improvements rST documentation and fixes for moveconfig handle empty 'ranges' property in dtoc patman warning for invalid tag clean-ups to 'fdt add' command
| * | dtoc: Support widening a bool valueSimon Glass2021-08-016-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present if we see 'ranges' property (with no value) we assume it is a boolean, as per the devicetree spec. But another node may define 'ranges' with a value, forcing us to widen it to an int array. At present this is not supported and causes an error. Fix this and add some test cases. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Tom Rini <trini@konsulko.com>
| * | dtoc: Fix widening an int array to an intSimon Glass2021-08-014-14/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An int array can hold a single int so we should not need to do anything in the widening operation. However due to a quirk in the code, an int[3] widened with an int produced an int[4]. Fix this and add a test. Fix a comment typo while we are here. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Tom Rini <trini@konsulko.com>
| * | dtoc: Rename is_wider_than() to reduce confusionSimon Glass2021-08-011-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | The current name is confusing because the logic is actually backwards from what you might expect. Rename it to needs_widening() and update the comments. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sandbox: Reduce keyed autoboot delaySimon Glass2021-08-016-3/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The autoboot tests are a recent addition to U-Boot, providing much-needed coverage in this area. A side effect of the keyed autoboot test is that this feature is enabled in sandbox always. This changes the autoboot prompt and confuses the pytests. Some tests become slower, for example the vboot tests take about 27s now instead of 3s. We don't actually need this feature enabled to be able to run the tests. Add a switch to allow sandbox to turn it on and off as needed. Use this in the one test that needs it. Add a command-line flag in case this is desired in normal use. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 25c8b9f298e ("test: add first autoboot unit tests") Reviewed-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
| * | moveconfig: Update to newer kconfiglibSimon Glass2021-08-011-12/+12
| | | | | | | | | | | | | | | | | | | | | Some of the more advanced features of this tool don't work anymore since kconfiglib was update. Update the code accordingly. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | doc: Fix up outdated moveconfig docsSimon Glass2021-08-011-36/+22
| | | | | | | | | | | | | | | | | | | | | The examples here are a bit messed up since the command does not match the documentation. Use a different example instead. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | doc: Add docs for the moveconfig toolSimon Glass2021-08-013-290/+298
| | | | | | | | | | | | | | | | | | Move these docs into htmldocs so they can be read there. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | doc: Move coccinelle into its own sectionSimon Glass2021-08-011-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This tool has nothing to do with testing. It is for refactoring code automatically using a 'semantic patch' tool. Create a new section for 'refactoring' and move it into there. It is likely that other topics may fall under the same heading, such as using moveconfig and search/replace tools. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | doc: Create an intro section for testingSimon Glass2021-08-012-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | At present this information is hidden away. Make it more visible by putting it first, in an intro section. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * | patman: add warning for invalid tagPatrick Delaunay2021-08-012-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | Add a error in patman tool when the commit message contents an invalid tag "Serie-.*" instead of "Series-.*". Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | fdt: Show the type of devicetree with fdt addrSimon Glass2021-08-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | It seems useful to show whether the address of the Control or Working devicetree is being shown. Add support for this. Drop the confusing 0x prefix since the command itself only accepts hex. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | fdt: Tidy up the code a bit with fdt addrSimon Glass2021-08-011-24/+13
| | | | | | | | | | | | | | | | | | Clean up the code a little before changing it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sandbox: tpm: Support extending a PCR multiple timesSimon Glass2021-08-012-15/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is fairly easy to handle this case and it makes the emulator more useful, since PCRs are commonly extended several times. Add support for this, using U-Boot's sha256 support. For now sandbox only supports a single PCR, but that is enough for the tests that currently exist. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sandbox: tpm: Correct handling of SANDBOX_TPM_PCR_NBSimon Glass2021-08-011-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the number of PCRs, so the current check is off by one. Also the map itself should not be checked, just the resulting pcr_index, to avoid confusing people who read the code. Fix these problems. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sandbox: tpm: Support storing device state in tpm2Simon Glass2021-08-011-0/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present the tpm2 emulator does not support storing the device state. Add this so we can handle the normal vboot flow through the sandbox executables (VPL->SPL etc.) with the TPM contents staying in place. Note: sandbox has not yet been converted to use livetree for the state information, since livetree does not yet support writing to the tree. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sandbox: tpm: Support nvdata in TPM2Simon Glass2021-08-012-0/+70
| | | | | | | | | | | | | | | | | | | | | Add support for this feature in the TPM2 emulator, to support Chromium OS vboot. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sandbox: tpm: Track whether the state is validSimon Glass2021-08-011-2/+8
| | | | | | | | | | | | | | | | | | | | | Add checking as to whether the current TPM state is valid, so we can implement reading/writing the state. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sandbox: tpm: Finish comments for struct sandbox_tpm2Simon Glass2021-08-011-4/+16
| | | | | | | | | | | | | | | | | | Tidy up the missing comments for this struct. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sandbox: tpm: Correct handling of get-capabilitySimon Glass2021-08-011-10/+4
| | | | | | | | | | | | | | | | | | | | | This function current handles the kernel case incorrectly. Fix it, and use the shorter TPM_HDR_LEN while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sandbox: tpm: Support the define-space commandSimon Glass2021-08-013-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | Add support for this command, moving away from the previous approach of hard-coding the initial data in the driver, now that the kernel-space data has to be set up by the higher-level vboot code. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sandbox: tpm: Tidy up reading and writing of device stateSimon Glass2021-08-011-11/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present this code assumes that the TPM data has been read but this may not be the case. Refactor the code to use a separate pointer so we know the current state of the data. Add error checking for the data size. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sandbox: tpm: Split out common nvdata codeSimon Glass2021-08-014-105/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to support nvdata in TPM2 as well. To avoid code duplicating the associated code, move it into a common file. Drop the special-case logic for the kernel space. This can be handled by the higher-level code now, i.e. in vboot itself. Signed-off-by: Simon Glass <sjg@chromium.org>