summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
...
| * acpi: Support writing Device Properties objects via _DSDSimon Glass2020-07-172-0/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | | More complex device properties can be provided to drivers via a device-specific data (_DSD) object. To create this we need to build it up in a separate data structure and then generate the ACPI code, due to its recursive nature. Add an implementation of this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * acpi: Support writing a UUIDSimon Glass2020-07-171-0/+13
| | | | | | | | | | | | | | | | | | ACPI supports writing a UUID in a special format. Add a function to handle this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * acpi: Support writing a nameSimon Glass2020-07-172-0/+42
| | | | | | | | | | | | | | | | | | ACPI supports storing names which are made up of multiple path components. Several special cases are supported. Add a function to emit a name. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * acpi: Support writing a stringSimon Glass2020-07-171-0/+10
| | | | | | | | | | | | | | | | | | ACPI supports storing a simple null-terminated string. Add support for this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * acpi: Support writing an integerSimon Glass2020-07-171-0/+17
| | | | | | | | | | | | | | | | | | ACPI supports storing integers in various ways. Add a function to handle this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * acpigen: Support writing a packageSimon Glass2020-07-171-0/+32
| | | | | | | | | | | | | | | | | | A package collects together several elements. Add an easy way of writing a package header and updating its length later. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * acpigen: Support writing a lengthSimon Glass2020-07-172-1/+49
| | | | | | | | | | | | | | | | | | | | | | It is convenient to write a length value for preceding a block of data. Of course the length is not known or is hard to calculate a priori. So add a way to mark the start on a stack, so the length can be updated when known. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * acpi: Support generation of SPI descriptorSimon Glass2020-07-172-2/+41
| | | | | | | | | | | | | | | | Add a function to write a SPI descriptor to the generated ACPI code. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * acpi: Support generation of I2C descriptorSimon Glass2020-07-171-0/+33
| | | | | | | | | | | | | | | | Add a function to write a GPIO descriptor to the generated ACPI code. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * acpi: Support generation of a GPIO/irq for a deviceSimon Glass2020-07-171-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | Some devices use interrupts but some use GPIOs. Since these are fully specified in the device tree we can automatically produce the correct ACPI descriptor for a device. Add a function to handle this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * acpi: Support generation of GPIO descriptorSimon Glass2020-07-171-0/+22
| | | | | | | | | | | | | | | | | | | | Add a function to write a GPIO descriptor to the generated ACPI code. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: Drop comment about the type always being ACPI_GPIO_TYPE_IO] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
| * acpi: Support string outputSimon Glass2020-07-171-0/+19
| | | | | | | | | | | | | | | | Add support for output of strings and streams of bytes. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * gpio: Add a method to convert a GPIO to ACPISimon Glass2020-07-172-0/+117
| | | | | | | | | | | | | | | | | | | | When generating ACPI tables we need to convert GPIOs in U-Boot to the ACPI structures required by ACPI. This is a SoC-specific conversion and cannot be handled by generic code, so add a new GPIO method to do the conversion. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * acpi: Support generation of interrupt descriptorSimon Glass2020-07-171-0/+15
| | | | | | | | | | | | | | | | | | Add a function to write an interrupt descriptor to the generated ACPI code. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * acpi: Support generation of ACPI codeSimon Glass2020-07-172-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new file to handle generating ACPI code programatically. This is used when information must be dynamically added to the tables, e.g. the SSDT. Initial support is just for writing simple values. Also add a 'base' value so that the table can be freed. This likely doesn't happen in normal code, but is nice to do in tests. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * irq: Add a method to convert an interrupt to ACPISimon Glass2020-07-172-0/+102
| | | | | | | | | | | | | | | | | | | | When generating ACPI tables we need to convert IRQs in U-Boot to the ACPI structures required by ACPI. This is a SoC-specific conversion and cannot be handled by generic code, so add a new IRQ method to do the conversion. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * acpi: Add a way to check device statusSimon Glass2020-07-171-0/+28
| | | | | | | | | | | | | | | | | | | | At present U-Boot does not support the different ACPI status values, but it is best to put this logic in a central place. Add a function to get the device status. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * acpi: Add a function to get a device path and scopeSimon Glass2020-07-171-0/+44
| | | | | | | | | | | | | | | | | | Add a function to build up the ACPI path for a device and another for its scope. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * timer: Allow delays with a 32-bit microsecond timerSimon Glass2020-07-171-0/+11
| | | | | | | | | | | | | | | | | | | | | | The current get_timer_us() uses 64-bit arithmetic on 32-bit machines. When implementing microsecond-level timeouts, 32-bits is plenty. Add a new function that uses an unsigned long. On 64-bit machines this is still 64-bit, but this doesn't introduce a penalty. On 32-bit machines it is more efficient. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | Merge tag 'u-boot-imx-20200716' of ↵Tom Rini2020-07-174-43/+46
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-imx i.MX for 2020.10 ---------------- - i.MX DDR driver fix/update for i.MX8M - i.MX pinctrl driver fix. - Use arm_smccc_smc to remove imx sip function - i.MX8M clk update - support booting aarch32 kernel on aarch64 hardware - fused part support for i.MX8MP - imx6: pcm058 to DM Travis: https://travis-ci.org/github/sbabic/u-boot-imx/builds/708734785
| * power: pmic_pca9450: fix PCA9450A I2C addressSébastien Szymanski2020-07-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Quoting Ye Li from NXP: "We have confirmed with PMIC team, 0x35 is used only on early chips and not used any more. 0x25 is the final address." Fix it by merging power_pca9450a_init and power_pca9450b_init into one function power_pca9450_init. Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Ye Li <ye.li@nxp.com>
| * arm: imx6q: pcm058: Convert pcm058 to use DM with DTsNiel Fourie2020-07-141-41/+28
| | | | | | | | | | | | | | | | Convert pcm058 support to use device trees and the driver model. Add rudimentary boot scripts to the environment, expand README. Signed-off-by: Niel Fourie <lusus@denx.de> Cc: Stefano Babic <sbabic@denx.de>
| * dts-bindings: regulator: Add dlg,da9063-regulatorNiel Fourie2020-07-141-0/+16
| | | | | | | | | | | | | | | | Add da9063-regulator bindings from Linux 5.6: commit 7111951b8d49 upstream Signed-off-by: Niel Fourie <lusus@denx.de> Cc: Stefano Babic <sbabic@denx.de>
| * imx8mm_evk: enlarge CONFIG_SYS_BOOTM_LENPeng Fan2020-07-141-0/+1
| | | | | | | | | | | | Enlarge CONFIG_SYS_BOOTM_LEN when booting FIT image with kernel. Signed-off-by: Peng Fan <peng.fan@nxp.com>
* | efi_loader: describe EFI_VAR_FILE_MAGICHeinrich Schuchardt2020-07-161-1/+5
| | | | | | | | | | | | | | Add documentation for EFI_VAR_FILE_MAGIC used in the file format for UEFI variables. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | efi_loader: pre-seed UEFI variablesHeinrich Schuchardt2020-07-162-0/+10
| | | | | | | | | | | | | | | | Include a file with the initial values for non-volatile UEFI variables into the U-Boot binary. If this variable is set, changes to variable PK will not be allowed. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | efi_loader: identify PK, KEK, db, dbx correctlyHeinrich Schuchardt2020-07-161-0/+19
| | | | | | | | | | | | | | | | | | | | To determine if a varible is on the of the authentication variables PK, KEK, db, dbx we have to check both the name and the GUID. Provide a function converting the variable-name/guid pair to an enum and use it consistently. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | efi_loader: restructure code for TEE variablesHeinrich Schuchardt2020-07-161-0/+7
| | | | | | | | | | | | | | When using secure boot functions needed both for file and TEE based UEFI variables have to be moved to the common code module efi_var_common.c. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | efi_loader: display RO attribute with TEE-backed variablesIlias Apalodimas2020-07-161-0/+43
| | | | | | | | | | | | | | | | A previous commit adds support for displaying variables RO flag. Let's add it on the TEE backed variable storage as well. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | Merge tag 'ti-v2020.10-rc1' of ↵Tom Rini2020-07-143-49/+9
|\ \ | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-ti - Sync DMA and CPSW DT bindings for K3 devices - Other minor fixes for mmc and other TI devices
| * | ARM: da850-evm: Unify config options with KconfigAdam Ford2020-07-131-18/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two options that are currently whitelisted, but they are redundant, because there are not necessary since Kconfig options exist to basically state the same thing. CONFIG_DIRECT_NOR_BOOT and CONFIG_USE_NOR are both set together and only used by the da850 when booting from NOR, however the only time CONFIG_MTD_NOR_FLASH is configured is when booting from NOR. Since NOR doesn't need SPL, the options for SPL can be moved to a check for building SPL instead of checking for NOR. This patch removes the checks for these two config options and unifies the checks around the Kconfig option of CONFIG_MTD_NOR_FLASH. Since this board is the only board that uses these two config options, they can be removed from the whitelist table. Signed-off-by: Adam Ford <aford173@gmail.com>
| * | soc: ti: k3-ringacc: Add an API to request pair of ringsVignesh Raghavendra2020-07-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new API k3_ringacc_request_rings_pair() to request pair of rings at once, as in the most case Rings are used with DMA channels which required to request pair of rings - one to feed DMA with descriptors (TX/RX FDQ) and one to receive completions (RX/TX CQ). This will allow to simplify Ringacc API users. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
| * | arm: dts: k3-am65/j721e: Sync DMA DT bindings from Kernel DTVignesh Raghavendra2020-07-131-31/+0
| |/ | | | | | | | | | | | | | | Sync DT bindings from kernel DT and move them to out of -u-boot.dtsi files. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
* | Merge tag 'efi-2020-10-rc1-3' of ↵Tom Rini2020-07-135-7/+219
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2020-10-rc1 (3) Up to now UEFI variables where stored in U-Boot environment variables. Saving UEFI variables was not possible without saving the U-Boot environment variables. With this patch series file ubootefi.var in the EFI system partition is used for saving UEFI variables. Furthermore the UEFI variables are exposed for reading at runtime. Code corrections for UEFI secure boot are provided. A buffer overrun in the RSA library is fixed.
| * efi_loader: memory buffer for variablesHeinrich Schuchardt2020-07-111-0/+54
| | | | | | | | | | | | | | | | | | Saving UEFI variable as encoded U-Boot environment variables does not allow support at runtime. Provide functions to manage a memory buffer with UEFI variables. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: new function efi_memcpy_runtime()Heinrich Schuchardt2020-07-111-0/+3
| | | | | | | | | | | | Provide a memcpy() function that we can use at UEFI runtime. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: optional pointer for ConvertPointerHeinrich Schuchardt2020-07-111-0/+2
| | | | | | | | | | | | | | If the EFI_OPTIONAL_PTR is set in DebugDisposition, a NULL pointer does not constitute an invalid parameter. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: export efi_convert_pointer()Heinrich Schuchardt2020-07-111-0/+3
| | | | | | | | | | | | | | | | | | | | We need ConvertPointer() to adjust pointers when implementing runtime services within U-Boot. After ExitBootServices() gd is not available anymore. So we should not use EFI_ENTRY() and EFI_EXIT(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: UEFI variable persistenceHeinrich Schuchardt2020-07-111-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | Persist non-volatile UEFI variables in a file on the EFI system partition. The file is written whenever a non-volatile UEFI variable is changed after initialization of the UEFI sub-system. The file is read during the UEFI sub-system initialization to restore non-volatile UEFI variables. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: separate UEFI variable API from implemementationHeinrich Schuchardt2020-07-111-0/+39
| | | | | | | | | | | | | | Separate the remaining UEFI variable API functions GetNextVariableName and QueryVariableInfo() from internal functions implementing them. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: prepare for read only OP-TEE variablesHeinrich Schuchardt2020-07-111-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently have two implementations of UEFI variables: * variables provided via an OP-TEE module * variables stored in the U-Boot environment Read only variables are up to now only implemented in the U-Boot environment implementation. Provide a common interface for both implementations that allows handling read-only variables. As variable access is limited to very few source files put variable related definitions into new include efi_variable.h instead of efi_loader. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * lib: rsa: export rsa_verify_with_pkey()AKASHI Takahiro2020-07-111-0/+3
| | | | | | | | | | | | | | | | | | This function will be used to implement public_key_verify_signature() in a later patch. rsa_verify() is not suitable here because calculation of message digest is not necessary. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: image_loader: add digest-based verification for signed imageAKASHI Takahiro2020-07-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case that a type of certificate in "db" or "dbx" is EFI_CERT_X509_SHA256_GUID, it is actually not a certificate which contains a public key for RSA decryption, but a digest of image to be loaded. If the value matches to a value calculated from a given binary image, it is granted for loading. With this patch, common digest check code, which used to be used for unsigned image verification, will be extracted from efi_signature_verify_with_sigdb() into efi_signature_lookup_digest(), and extra step for digest check will be added to efi_image_authenticate(). Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
| * efi_loader: image_loader: verification for all signatures should passAKASHI Takahiro2020-07-111-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A signed image may have multiple signatures in - each WIN_CERTIFICATE in authenticode, and/or - each SignerInfo in pkcs7 SignedData (of WIN_CERTIFICATE) In the initial implementation of efi_image_authenticate(), the criteria of verification check for multiple signatures case is a bit ambiguous and it may cause inconsistent result. With this patch, we will make sure that verification check in efi_image_authenticate() should pass against all the signatures. The only exception would be - the case where a digest algorithm used in signature is not supported by U-Boot, or - the case where parsing some portion of authenticode has failed In those cases, we don't know how the signature be handled and should just ignore them. Please note that, due to this change, efi_signature_verify_with_sigdb()'s function prototype will be modified, taking "dbx" as well as "db" instead of outputing a "certificate." If "dbx" is null, the behavior would be the exact same as before. The function's name will be changed to efi_signature_verify() once current efi_signature_verify() has gone due to further improvement in intermediate certificates support. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
| * lib/crypto: use qualified path for x509_parser.hHeinrich Schuchardt2020-07-111-1/+1
| | | | | | | | | | | | Use the path relative to /include for x509_parser.h in pkcs7_parser.h. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-spiTom Rini2020-07-1111-1798/+0
|\ \ | | | | | | | | | | | | | | | | | | - Enable DM_SPI on siemens omap boards (Jagan) - Dropped some non-dm supported omap3 boards (Jagan) - Dropped non-dm code in omap3 spi driver (Jagan) - Dropped non-dm code in kirkwood spi driver (Bhargav)
| * | arm: Remove mx31pdk boardJagan Teki2020-07-091-141/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DM, OF_CONTROL, DM_SPI and other driver model migration deadlines are expired for this board. Remove it. Acked-by: Magnus Lilja <lilja.magnus@gmail.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
| * | arm: Remove pengwyn boardJagan Teki2020-07-091-166/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OF_CONTROL, DM_SPI and other driver model migration deadlines are expired for this board. Remove it. Cc: Lothar Felten <lothar.felten@gmail.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
| * | arm: Remove pepper boardJagan Teki2020-07-091-78/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OF_CONTROL, DM_SPI and other driver model migration deadlines are expired for this board. Remove it. Cc: Ash Charles <ash@gumstix.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
| * | arm: Remove bav335x boardJagan Teki2020-07-091-475/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OF_CONTROL, DM_SPI and other driver model migration deadlines are expired for this board. Remove it. Cc: Gilles Gameiro <gilles@gigadevices.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>