aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-08-02hash: Ensure verification hex pairs are terminatedSimon Glass1-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>
2021-08-02Merge tag 'efi-2021-10-rc2' of ↵Tom Rini9-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
2021-08-02Merge tag 'mmc-2021-7-30' of https://source.denx.de/u-boot/custodians/u-boot-mmcTom Rini3-29/+38
pl180_mmci update and cleanup fix rpmb routing memory alignment
2021-08-02efi_loader: typo cerificateHeinrich Schuchardt1-1/+1
%s/cerificate/certificate/ Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-08-01doc: add graphviz imagemagick as build dependenciesHeinrich Schuchardt1-3/+3
'make htmldocs' requires graphviz and imagemagick (at least with Sphinx 3.5.4). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-08-01doc: handle 'make htmldocs' warnings as errorsHeinrich Schuchardt1-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>
2021-08-01doc: add missing board/ti/index.rstHeinrich Schuchardt1-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>
2021-08-01Merge tag 'dm-pull-1aug21' of https://source.denx.de/u-boot/custodians/u-boot-dmWIP/01Aug2021Tom Rini27-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
2021-08-01dtoc: Support widening a bool valueSimon Glass6-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>
2021-08-01dtoc: Fix widening an int array to an intSimon Glass4-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>
2021-08-01dtoc: Rename is_wider_than() to reduce confusionSimon Glass1-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>
2021-08-01sandbox: Reduce keyed autoboot delaySimon Glass6-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>
2021-08-01moveconfig: Update to newer kconfiglibSimon Glass1-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>
2021-08-01doc: Fix up outdated moveconfig docsSimon Glass1-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>
2021-08-01doc: Add docs for the moveconfig toolSimon Glass3-290/+298
Move these docs into htmldocs so they can be read there. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-01doc: Move coccinelle into its own sectionSimon Glass1-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>
2021-08-01doc: Create an intro section for testingSimon Glass2-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>
2021-08-01patman: add warning for invalid tagPatrick Delaunay2-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>
2021-08-01fdt: Show the type of devicetree with fdt addrSimon Glass1-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>
2021-08-01fdt: Tidy up the code a bit with fdt addrSimon Glass1-24/+13
Clean up the code a little before changing it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-01sandbox: tpm: Support extending a PCR multiple timesSimon Glass2-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>
2021-08-01sandbox: tpm: Correct handling of SANDBOX_TPM_PCR_NBSimon Glass1-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>
2021-08-01sandbox: tpm: Support storing device state in tpm2Simon Glass1-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>
2021-08-01sandbox: tpm: Support nvdata in TPM2Simon Glass2-0/+70
Add support for this feature in the TPM2 emulator, to support Chromium OS vboot. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-01sandbox: tpm: Track whether the state is validSimon Glass1-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>
2021-08-01sandbox: tpm: Finish comments for struct sandbox_tpm2Simon Glass1-4/+16
Tidy up the missing comments for this struct. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-01sandbox: tpm: Correct handling of get-capabilitySimon Glass1-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>
2021-08-01sandbox: tpm: Support the define-space commandSimon Glass3-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>
2021-08-01sandbox: tpm: Tidy up reading and writing of device stateSimon Glass1-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>
2021-08-01sandbox: tpm: Split out common nvdata codeSimon Glass4-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>
2021-08-01common: board_r: print error if binman_init failsTim Harvey1-1/+7
Display an error if binman_init fails. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-08-01doc: riscv: flashing SiFive boardsHeinrich Schuchardt2-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>
2021-08-01lib: disable CONFIG_SPL_HEXDUMP by defaultHeinrich Schuchardt2-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>
2021-08-01video: buffer overrun in TrueType consoleHeinrich Schuchardt1-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>
2021-07-31Merge https://source.denx.de/u-boot/custodians/u-boot-sunxiTom Rini5-4/+38
- Move the PSCI runtime code for H3/A23/A33 into SRAM - Pick the environment from the actual MMC boot device (SD card vs. eMMC) - Plus a small improvement from Icenowy, just for good measure.
2021-08-01sunxi: decide the inclusion of SCP by SCP_ADDR existenceIcenowy Zheng1-2/+2
There are more Allwinner SoCs that do not have a SCP now. When there's no SCP_ADDR macro defined, we can assume there's no SCP available. Drop the scp part of FIT description when SCP_ADDR does not exist. Signed-off-by: Icenowy Zheng <icenowy@sipeed.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2021-08-01sunxi: A23/A33/H3: Move sun8i secure monitor to SRAM A2Samuel Holland2-0/+21
So far for the H3, A23, and A33 SoCs, we use DRAM to hold the secure monitor code (providing PSCI runtime services). And while those SoCs do not have the secure SRAM B like older SoCs, there is enough (secure) SRAM A2 to put the monitor code and data in there instead. Follow the design of 64-bit SoCs and use the first part for the monitor, and the last 16 KiB for the SCP firmware. With this change, the monitor no longer needs to reserve a region in DRAM. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> [Andre: amend commit message, fix R40 and V3s build] Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2021-08-01sunxi: Select environment MMC based on boot deviceSamuel Holland2-2/+15
Currently, the environment is always stored in eMMC if eMMC is enabled in the config. This means images written to SD and eMMC will cross- contaminate their environments unless the configuration is changed. By dropping the device number from the environment location string and implementing mmc_get_env_dev, we will always use the environment from the boot device when booting from SD/eMMC. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2021-07-31Merge https://source.denx.de/u-boot/custodians/u-boot-marvellWIP/31Jul2021Tom Rini49-336/+730
- kwboot / kwbimage improvements reducing image size (Pali & Marek) - a37xx: pinctrl: Correct PWM pins definitions (Marek) - Convert the Dreamplug Ethernet and SATA to Driver Model (Tony) - serial: a37xx: DEBUG_UART improvements / fixes (Pali)
2021-07-31serial: a37xx: Do not call get_ref_clk() in _debug_uart_init()Pali Rohár1-1/+3
Static inline function _debug_uart_init() should avoid calling external (non-inline) functions. Therefore do not call get_ref_clk() in _debug_uart_init() and reimplement its functionality without external function calls. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2021-07-31serial: a37xx: Use CONFIG_BAUDRATE for initializing early debug UARTPali Rohár1-3/+2
CONFIG_BAUDRATE should be used for setting the baudrate for the early debug UART. This replaces current hardcoded 115200 value. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behun <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-07-31arm: kirkwood: Dreamplug: Add DM SATA and remove IDE configsTony Dinh1-2/+10
- Enable DM SATA, removed IDE driver, and add SATA MV driver. - Use ethernet PHY names from device tree in default boot command Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2021-07-31arm: kirkwood: Dreamplug: Use Ethernet PHY name and address from device treeTony Dinh1-14/+48
In DM Ethernet, the old "egiga0" and 'egiga1" names are no longer valid, so replace these with Ethernet PHY names from device tree. Also, read Ethernet PHY address for each port from device tree. Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2021-07-31arm: kirkwood: Dreamplug: Add DM Ethernet and DM SATA configsTony Dinh1-0/+4
Add DM_ETH, SATA_MV and associated configs to dreamplug_defconfig Signed-off-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2021-07-31arm64: a37xx: pinctrl: Correct PWM pins definitionsMarek Behún2-13/+12
The PWM pins on North Bridge on Armada 37xx can be configured into PWM or GPIO functions. When in PWM function, each pin can also be configured to drive low on 0 and tri-state on 1 (LED mode). The current definitions handle this by declaring two pin groups for each pin: - group "pwmN" with functions "pwm" and "gpio" - group "ledN_od" ("od" for open drain) with functions "led" and "gpio" This is semantically incorrect. The correct definition for each pin should be one group with three functions: "pwm", "led" and "gpio". Change the "pwmN" groups to support "led" function. Remove "ledN_od" groups. This cannot break backwards compatibility with older device trees: no device tree uses it since there is no PWM driver for this SOC yet. Also "ledN_od" groups are not even documented. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-07-31kwbimage: Update help message about how to extract from an existing imagePali Rohár1-1/+1
Extracting is now supported by dumpimage, so mention it in help instead of `kwbimage -x`. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-07-31kwbimage: Add support for extracting images via dumpimage toolPali Rohár1-8/+64
The kwbimage library does not support extracting subimages. Implement it. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-07-31arm: mvebu: gdsys: Remove custom spl_board_init()Pali Rohár3-22/+1
The gdsys a38x config file (controlcenterdc_defconfig) uses BootROM to load U-Boot proper. Since it is now possible to do this via U-Boot SPL framework, we do not need to provide custom spl_board_init() which calls return_to_bootrom(). Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2021-07-31arm: mvebu: Remove unused macro CONFIG_SYS_U_BOOT_OFFSPali Rohár12-51/+2
Macro CONFIG_SYS_U_BOOT_OFFS is set but not used anymore. Remove it. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2021-07-31tools: kwbimage: Remove v1 kwbimage SPL padding to CONFIG_SYS_U_BOOT_OFFS bytesPali Rohár2-17/+0
This padding depends on board config file and therefore it makes the mkimage binary tool board specific, which is not correct. One cannot use mkimage tool built as a result for board A to generate images for board B, even if both A and B are on the same platform. This CONFIG_SYS_U_BOOT_OFFS padding was needed when kwbimage v1 contained SPL code which loaded U-Boot proper based on CONFIG_SYS_U_BOOT_OFFS, instead of reading correct offset from kwbimage header. Now that SPL code parses kwbimage header and deterinate correct offset, there is no need for this CONFIG_SYS_U_BOOT_OFFS padding anymore. By removing it we also reduce the size of SPL code and therefore also decrease the final size of v1 kwbimage. This means there is more space for U-Boot proper binary. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>