summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-05-19efi_loader: EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.SetState() correct parameterHeinrich Schuchardt
KeyToggleState is a pointer according to UEFI spec 2.8. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-19efi_loader: GetNextMonotonicCount() check parameterHeinrich Schuchardt
Do not write to address indicated by NULL pointer. UEFI SCT II 2.6 (2017), 3.6.5 GetNextMonotonicCount(), 5.1.5.5.1 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-19efi_loader: parameter checks CalculateCrc32()Heinrich Schuchardt
Not checking the parameters may lead reading or writing from NULL. Implement the parameter checks prescribed in the UEFI spec. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-19efi_loader: check device path in InstallMultipleProtocolInterfacesHeinrich Schuchardt
According to the UEFI spec InstallMultipleProtocolInterfaces() must check if a device path has already been installed. In this case it must return EFI_ALREADY_STARTED. Cf. UEFI SCT II 2.6 A (2017), 3.3.16 InstallMultipleProtocolInterfaces(), 5.1.3.16.1. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-19efi_loader: implement deprecated Unicode collation protocolHeinrich Schuchardt
In EFI 1.10 a version of the Unicode collation protocol using ISO 639-2 language codes existed. This protocol is not part of the UEFI specification any longer. Unfortunately it is required to run the UEFI Self Certification Test (SCT) II, version 2.6, 2017. So we implement it here for the sole purpose of running the SCT. It can be removed once a compliant SCT is available. The configuration option defaults to no. Signed-off-by: Rob Clark <robdclark@gmail.com> Most of Rob's original patch is already merged. Only the deprecated protocol is missing. Rebase it and make it configurable. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-19efi_loader: rename Unicode collation protocol 2 variablesHeinrich Schuchardt
Rename variables to make it clear they refer to the Unicode collation protocol identified by the EFI_UNICODE_PROTOCOL2_GUID. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-19efi_loader: merge adjacent sprintf()Heinrich Schuchardt
In the implementation of the device path to text protocol join adjacent sprintf() statements. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-19efi_loader: parameter checks simple network protocolHeinrich Schuchardt
Check buffer pointers are not NULL as required by the UEFI 2.7 spec. Return EFI_UNSUPPORTED instead of EFI_INVALID_PARAMETER when trying to transmit with non-zero header_size. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-19efi_loader: GetVariable set attributes for EFI_BUFFER_TOO_SMALLHeinrich Schuchardt
UEFI spec 2.7 erratum A leaves it undefined if Attributes should be set if GetVariable() returns EFI_BUFFER_TOO_SMALL. UEFI spec 2.8 defines that Attributes should be set if the return value is either EFI_SUCCESS or EFI_BUFFER_TOO_SMALL. Set Attributes if the return value is EFI_BUFFER_TOO_SMALL. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-16Merge branch 'master' of git://git.denx.de/u-boot-samsungTom Rini
- arndale fixes
2019-05-16Merge branch 'master' of git://git.denx.de/u-boot-socfpgaTom Rini
- SoCFPGA DT and reset cleanup, AE MCVEVK board support.
2019-05-16Merge branch 'master' of git://git.denx.de/u-boot-shTom Rini
- Align env position on GR-Peach with downstream U-Boot.
2019-05-16configs: arndale: Use appropriate driver for Asix AX88760Krzysztof Kozlowski
Arndale board has an Asix AX88760 USB 2.0 Hub and Fast Ethernet combo. The appropriate driver for it is USB_ETHER_ASIX. The mistake probably came from misinterpretation of commit e9954b867ce0 ("usb: eth: add ASIX AX88179 DRIVER") which was tested on RECS5250 COM module. This module indeed has Exynos5250 and some similarities with Arndale 5250 board but the USB/Ethernet chip used there is apparently different. Fixes: f58ad98a621c ("usb: net: migrate USB Ethernet adapters to Kconfig") Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-05-16arm: exynos: arndale: Remove unused CONFIG_DM_I2C_COMPATKrzysztof Kozlowski
The CONFIG_DM_I2C_COMPAT was introduced in include/configs/exynos5-common.h in commit 189d80166b31 ("exynos5: enable dm i2c") and then it propagated up to configs/arndale_defconfig. However since beginning the Arndale board (Exynos5250) was not using I2C. In fact, the Arndale board is not configuring its PMIC (S5M8767) which uses I2C bus. This setting can be thus safely removed to fix build warning: This board uses CONFIG_DM_I2C_COMPAT. Please remove (possibly in a subsequent patch in your series) before sending patches to the mailing list. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-05-16arm: exynos: arndale: Remove unused CONFIG_POWER and CONFIG_POWER_I2CKrzysztof Kozlowski
The CONFIG_POWER and CONFIG_POWER_I2C were introduced in include/configs/exynos5-common.h in commit 19bd3aaa5991 ("exynos5: fix build break by adding CONFIG_POWER") and then it propagated up to include/configs/arndale.h. However before that commit, there was no build break at all on Arndale and SMDK5250 boards. It seems the commit fixed nothing and just added unused defines. In fact, the Arndale board is not configuring its PMIC (S5M8767) which uses I2C bus. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2019-05-15Prepare v2019.07-rc2Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-05-15Merge branch 'master' of git://git.denx.de/u-boot-netTom Rini
- micrel, ti PHY fixes - rtl8169, mtk-eth fixes
2019-05-15Merge tag 'u-boot-stm32-mcu-20190514' of https://github.com/pchotard/u-bootTom Rini
STM32 MCUs update: _ Add MPU region for SPI NOR memory mapped region _ Add missing QSPI flash compatible for STM32 F7 boards _ Update spi-tx-bus-width and spi-rx-bus-width properties _ Add QSPI support for STM32F469 Discovery board
2019-05-14eth: mtk-eth: fix incorrect read of phy-handleWeijie Gao
In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the node itself: phy-handle = <&phy0>; phy0: ethernet-phy@0 { reg = <0>; } However the driver used ofnode_find_subnode("phy-handle") to read the node. It will always fail. This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to make sure the node can be read correctly. Cc: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-05-14net: rtl8169: Support RTL-8168h/8111hThierry Reding
This version of the RTL-8168 is present on some development boards and is compatible with this driver. Add support for identifying this version of the chip so that U-Boot won't complain about it being unknown. Signed-off-by: Thierry Reding <treding@nvidia.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-05-14net: rtl8169: Implement ->hwaddr_write() callbackThierry Reding
Implement this callback that allows the MAC address to be set for the Ethernet card. This is necessary in order for the device to be able to receive packets for the MAC address that U-Boot advertises. Signed-off-by: Thierry Reding <treding@nvidia.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-05-14phy: ti: Init node before readingMichal Simek
There is a need to fill node before clk_output_sel is setup. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Reviewed-by: <hannes.schmelzer@br-automation.com>
2019-05-14net: phy: micrel: Allow KSZ8xxx and KSZ90x1 to be used togetherJames Byrne
Commit d397f7c45b0b ("net: phy: micrel: Separate KSZ9000 drivers from KSZ8000 drivers") separated the KSZ8xxx and KSZ90x1 drivers and warns that you shouldn't select both of them due to a device ID clash between the KSZ9021 and the KS8721, asserting that "it is highly unlikely for a system to contain both a KSZ8000 and a KSZ9000 PHY". Unfortunately boards like the SAMA5D3xEK do contain both types of PHY, but fortunately the Linux Micrel PHY driver provides a solution by using different PHY ID and mask values to distinguish these chips. This commit contains the following changes: - The PHY ID and mask values for the KSZ9021 and the KS8721 now match those used by the Linux driver. - The warnings about not enabling both drivers have been removed. - The description for PHY_MICREL_KSZ8XXX has been corrected (these are 10/100 PHYs, not GbE PHYs). - PHY_MICREL_KSZ9021 and PHY_MICREL_KSZ9031 no longer select PHY_GIGE since this is selected by PHY_MICREL_KSZ90X1. - All of the relevant defconfig files have been updated now that PHY_MICREL_KSZ8XXX does not default to 'Y'. Signed-off-by: James Byrne <james.byrne@origamienergy.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-05-14ARM: dts: socfpga: Keep FPGA bridge entries in SPL DTMarek Vasut
Keep the FPGA bridge entries in SPL DT to let do_bridge_reset() toggle the bridges on/off as needed according to the handoff file. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chin Liang See <chin.liang.see@intel.com> Cc: Dinh Nguyen <dinguyen@kernel.org> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tien Fong Chee <tien.fong.chee@intel.com>
2019-05-14ARM: dts: socfpga: Factor out U-Boot specifics from A10 handoff filesMarek Vasut
Pull out the u-boot,dm-pre-reloc from socfpga_arria10_socdk_sdmmc_handoff.dtsi into separate dtsi header file to make it easier to patch in custom handoff dtsi files, without having to manually add the U-Boot bits. Shuffle the include clauses in the A10 DT files to make it obvious what gets included where without having to follow confusing long chain of includes, i.e. board DT file includes everything it needs. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chin Liang See <chin.liang.see@intel.com> Cc: Dinh Nguyen <dinguyen@kernel.org> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tien Fong Chee <tien.fong.chee@intel.com>
2019-05-14arm: socfpga: Re-add support for Aries MCV SoM and MCVEV[KP] boardWolfgang Grandegger
Re-add support for Aries Embedded MCV SoM, which is CycloneV based and the associated MCVEVK and MCVEVP baseboard. The board can boot from eMMC. Ethernet and USB is supported. The Aries Embedded boards have been removed with commit 03b54997d568 ("board/aries: Remove"). I will now take care of them. The device-tree files are from mainline Linux commit e93c9c99a629 ("Linux v5.1)". Signed-off-by: Wolfgang Grandegger <wg@aries-embedded.de> CC: Marek Vasut <marex@denx.de> CC: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2019-05-14arm: sofcpga: s10: remove unused ad-hoc reset codeSimon Goldschmidt
The stratix 10 reset manager ad-hoc code in arch/arm contains an unused function 'reset_deassert_peripherals_handoff' that has been added from the beginning. As this is probably a result of copying the gen5 reset manager and this function has never been used, remove it. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2019-05-14arm: socfpga: remove re-added ad-hoc reset codeSimon Goldschmidt
commit c5de2b7eae68 ("arm: socfpga: implement proper peripheral reset") has removed the call to 'reset_deassert_peripherals_handoff()' from socfpga gen5 SPL since the reset driver now handles resets. However, commit c1d4b464c8b8 ("ARM: socfpga: Disable bridges in SPL unless booting from FPGA") has re-added this ad-hoc reset code, so that all peripherals were now again enabled instead of letting the drivers enable them by request. While at it, remove this function for gen5 as it should not be used. Fixes: commit c1d4b464c8b8 ("ARM: socfpga: Disable bridges in SPL unless booting from FPGA") Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2019-05-14ARM: renesas: grpeach: Align env positionMarek Vasut
Move the U-Boot environment to 0x80000 to match the downstream vendor fork and allow easy migration from one to the other. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Chris Brandt <chris.brandt@renesas.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2019-05-13Merge tag 'efi-2019-07-rc3' of git://git.denx.de/u-boot-efiTom Rini
Pull request for UEFI sub-system for v2019.07-rc3 The development target for the UEFI sub-system is EBBR compliance. We have already implemented some further protocols to enable running the UEFI Shell and the UEFI SCT test suite. As some boards are severely memory constrained make some of these extras customizable. Provide bug fixes. The most prominent ones let us pass the UEFI SCT memory allocation tests.
2019-05-13Merge branch 'master' of git://git.denx.de/u-boot-socfpgaTom Rini
- A10 FPGA programming support, Gen5 livetree conversion
2019-05-13Merge branch 'master' of git://git.denx.de/u-boot-shTom Rini
- SH2, SH3 removal
2019-05-12efi_loader: comments for efi_install_fdt()Heinrich Schuchardt
Describe that efi_install_fdt() defaults to using the device tree indicated by environment variable fdtcontroladdr. ACPI tables and device trees are mutually exclusive. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12efi_loader: deduplicate code in cmd/bootefi.cHeinrich Schuchardt
Move duplicate initialization code to single instance. Adjust comments of concerned functions. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12efi_loader: ACPI device node to textHeinrich Schuchardt
The device path to text protocol renders ACPI device nodes incorrectly. Use capital hexadecimal numbers as shown in the UEFI spec examples. Always output the optional UID. This matches what UEFI SCT expects and saves us an `if`. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12efi_loader: infinite recursion notifying eventsHeinrich Schuchardt
UEFI SCT uses this call sequence to determine the current TPL level inside notification functions: OldTpl = BS->RaiseTPL(TPL_HIGH_LEVEL); BS->RestoreTPL(OldTpl); In RestoreTPL() we trigger the notification function of queued events. If we do not mark the event as non-queued before calling the notification function, this results in an infinite recursive call sequence. Mark the event as non-queued before entering the notification function. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12efi_loader: simplify efi_allocate_pages()Heinrich Schuchardt
Replace unnecessary control structures by using return statements. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12efi_loader: AllocateAdress error handlingHeinrich Schuchardt
If AllocatePages() is called with AllocateAddress, the UEFI spec requires to return EFI_NOT_FOUND in case the memory page does not exist. The UEFI SCT II 2017 spec additionally requires to return EFI_NOT_FOUND if the page is already allocated. Check that *Memory refers to an unallocated page. UEFI SCT II (2017): AllocatePages(), 5.1.2.1.9 - 5.1.2.1.10 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12efi_loader: out of resources in AllocatePages()Heinrich Schuchardt
According to the UEFI AllocatePages() has to return EFI_OUT_OF_RESOURCES if sufficient memory is not available. Change the return value. UEFI SCT II (2017): 3.2.1 AllocatePages(), 5.1.2.1.8 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12efi_loader: check memory address before freeingHeinrich Schuchardt
When we call FreePages() we essentially add memory to our memory map. We shouldn't do this for memory that does not exit. Check if the memory that is to be freed via FreePages() or FreePool() is in our memory map and is not EFI_CONVENTIONAL_MEMORY. This check is mandated by the UEFI specification. Cf. UEFI SCT II (2017), 3.2.2 FreePages(), 5.1.2.1 - 5.1.2.2 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12efi_loader: error code in UninstallProtocolInterface()Heinrich Schuchardt
According to the UEFI specification UninstallProtocolInteface() has to return EFI_NOT_FOUND if the interface is not found. Correct the return value. Cf. UEFI SCT II spec (2017), 3.3.2 UninstallProtocolInterface(), 5.1.3.2.4 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12efi_loader: superfluous check in efi_remove_protocol()Heinrich Schuchardt
efi_search_protocol() already checks that the GUID matches. Don't check a second time. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12efi_loader: LocateDevicePath() incorrect parameter checkHeinrich Schuchardt
A parameter check in LocateDevicePath() does not match the requirements of the UEFI spec. If device is NULL, only return EFI_INVALID_PARAMETER if a matching handle is found. Cf. UEFI SCT II specification (2017)3.3.7 LocateDevicePath(), 5.1.3.7.3 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12efi_loader: fix typo in efi_locate_handle() commentHeinrich Schuchardt
%s/not buffer/no buffer/ Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12efi_loader: make device path to text protocol customizableHeinrich Schuchardt
The device path to text protocol is not needed for EBBR compliance. So let's make it a customizable option. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12efi_loader: make Unicode collation protocol customizableHeinrich Schuchardt
The Unicode collation protocol is not needed for EBBR compliance. So let's make it a customizable option. The Unicode capitalization table is only needed by this protocol. So let it depend on the Unicode collation protocol. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12efi_loader: reword the EFI_LOADER config optionHeinrich Schuchardt
No need to mention U-Boot in brief description. Fix several typos, mention iPXE. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12efi_loader: format KconfigHeinrich Schuchardt
Use if/endif for dependencies to give structure to the configuration menu. Sort important settings to the top. Abbreviate the short description of EFI_LOADER_HII. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12efi_loader: observe CONFIG_EFI_LOADER_HIIHeinrich Schuchardt
If EFI_LOADER_HII is not set, do not unnecessarily compile files for HII protocols. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12MAINTAINERS: assign include/charset.hHeinrich Schuchardt
Assign include/charset.h to EFI PAYLOAD. The functions defined in this include are used by the UEFI sub-system. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>