summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* binman: Rename 'position' to 'offset'Simon Glass2018-08-0144-263/+267
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After some thought, I believe there is an unfortunate naming flaw in binman. Entries have a position and size, but now that we support hierarchical sections it is unclear whether a position should be an absolute position within the image, or a relative position within its parent section. At present 'position' actually means the relative position. This indicates a need for an 'image position' for code that wants to find the location of an entry without having to do calculations back through parents to discover this image position. A better name for the current 'position' or 'pos' is 'offset'. It is not always an absolute position, but it is always an offset from its parent offset. It is unfortunate to rename this concept now, 18 months after binman was introduced. However I believe it is the right thing to do. The impact is mostly limited to binman itself and a few changes to in-tree users to binman: tegra sunxi x86 The change makes old binman definitions (e.g. downstream or out-of-tree) incompatible if they use the 'pos = <...>' property. Later work will adjust binman to generate an error when it is used. Signed-off-by: Simon Glass <sjg@chromium.org>
* binman: Don't depend on dict order in ELF testOutsideFile()Simon Glass2018-08-011-1/+3
| | | | | | | | | | | At present this test assumes that the symbols are returned in address order. However, objdump can list symbols in any order and dictionaries do not guarantee any particular order when iterating through item. Update elf.GetSymbols() to return an OrderedDict, sorted by address, to avoid any problems. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge tag 'arc-updates-for-2018.09-rc2' of git://git.denx.de/u-boot-arcTom Rini2018-08-0114-26/+416
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | That's a set of prety minor changes and fixes for ARC. Among them: * Improvement in CREG GPIO driver used on ARC dev boards that allow us to re-use the driver for SPI's chip select * Enable SPI-flsh on AXS10x boards which allows to update U-Boot binary that gets loaded by boot-ROM * Fix accommodating always utilized unaligned access by GCC for ARC starting from 8.1.0
| * ARC: Enable unaligned access in hardware if compiler uses itAlexey Brodkin2018-07-312-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even if ARC core might handle unaligned access to data this hardware feature by default is disabled. But GCC starting from 8.1.0 unconditionally uses it for ARC HS cores. Which leads to quite strange and fatal run-time failures like the one below if HW is not configured properly: | hsdk# sf probe | Misaligned data access exception @ 0xbff794d4 | ECR: 0x000d0000 | RET: 0xbff794d4 | BLINK: 0xbff79644 | STAT32: 0x00000800 | GP: 0x1003e000 r25: 0xbfd58f08 | BTA: 0xbff794a4 SP: 0xbfd58cd4 FP: 0xbfd58ef0 | LPS: 0xbff90240 LPE: 0xbff90244 LPC: 0x00000000 | r00: 0x00000000 r01: 0x00000003 r02: 0x000026bf | r03: 0x00000000 r04: 0x00000100 r05: 0x00000000 | r06: 0x00000001 r07: 0x00000000 r08: 0x1dcd6500 | r09: 0x00000000 r10: 0x00200000 r11: 0x00000000 | r12: 0x1b3d4440 r13: 0xbff9eca4 r14: 0xbfd59d68 | r15: 0xbfd60cd0 r16: 0x00000000 r17: 0x00000000 | r18: 0xbff9ed14 r19: 0xbfd59c78 r20: 0xbfd58d40 | r21: 0xbfd58d44 r22: 0x00000000 r23: 0x00000000 | r24: 0xbfd59ba8 | Resetting CPU ... Now we're checking for __ARC_UNALIGNED__ define emitted by the compiler if it's going to use unaligned access and then we force-enable it in hardware too. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
| * HSDK: Fixes and improvements in READMEAlexey Brodkin2018-07-311-2/+8
| | | | | | | | | | | | | | 1. Explained prerequisites for "make bsp-generate" command. 2. Cleaned-up duplicates Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
| * ARC: AXS10x/HSDK: Use our own version of mkimageAlexey Brodkin2018-07-312-2/+2
| | | | | | | | | | | | | | | | Since U-Boot tools are being built anyways it's much nicer to use them instead of relying on some of them bein installed on build host (which might easily not be the case). Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
| * ARC: AXS10x: add tool and make target to generate bspEugeniy Paltsev2018-07-313-0/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | AXS10x boards have preloader that reads SPI flash pages and searches special image header to fetch and load binary. Add tool, make target (bsp-generate) to generate update script and u-boot binary image with header for preloader. Also add script to default environment to apply updates. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
| * AXS10x: add spi flash supportEugeniy Paltsev2018-07-313-0/+58
| | | | | | | | | | | | | | | | | | AXS10x boards have n25q512 spi flash IC, so add corresponding nodes to device tree and enaple corresponding options in defconfig. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
| * CREG GPIO: add device tree bindingsEugeniy Paltsev2018-07-312-0/+44
| | | | | | | | | | Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
| * GPIO: CREG: improve flexibility of hsdk-creg-gpio driverEugeniy Paltsev2018-07-312-23/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CREG GPIO is a driver for weird soc-specific output ports, which are controlled by some fields in memory mapped register. Example: 31 9 7 5 0 < bit number | | | | | [ not used | gpio-1 | gpio-0 | <-shift-> ] < 32 bit register ^ ^ | | write 0x2 == set output to "1" (activate) write 0x3 == set output to "0" (deactivate) As of tooday we only support fixed (hardcoded) bit per gpio line, activate / deactivatei and shift values. Fix that by read them from device tree to be able to use this driver for other boards. Remove "hsdk" prefix from compatible string as this driver can be used with different boards like HSDK, AXS101, AXS103, etc. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* | Merge git://git.denx.de/u-boot-mpc85xxTom Rini2018-07-312-2/+0
|\ \
| * | Revert "powerpc/T104xRDB: Fix endian access issue on EHCI intinalization"Ran Wang2018-07-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was an EHCI endian accessor issue. Now it's fixed by commit 9829ce2ff25c ("usb: ehci: Fix accessors for big-endian platforms and descriptors"). Revert commit e6a727fffec7 ("powerpc/T104xRDB: Fix endian access issue on EHCI intinalization"). On T104x platform, USB EHCI register use little endian. Signed-off-by: Ran Wang <ran.wang_1@nxp.com> [YS: revised commit message] Reviewed-by: York Sun <york.sun@nxp.com>
| * | Revert "powerpc/p1_p2_rdb_pc: Fix endian access issue on EHCI intinalization"Ran Wang2018-07-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was an EHCI endian accessor issue. Now it's fixed by commit 9829ce2ff25c ("usb: ehci: Fix accessors for big-endian platforms and descriptors"). Revert commit 0f2296bab141 ("powerpc/p1_p2_rdb_pc: Fix endian access issue on EHCI intinalization"). On P1 P2 platforms, USB EHCI register use little endian. Signed-off-by: Ran Wang <ran.wang_1@nxp.com> [YS: revised commit message] Reviewed-by: York Sun <york.sun@nxp.com>
* | | .travis.yml: Exclude openrd platformsTom Rini2018-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The openrd platforms are currently orphaned, and are constantly on-edge or overflowing their binary limit. Exclude them from travis for now. Cc: Vagrant Cascadian <vagrant@debian.org> Cc: Chris Packham <judge.packham@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* | | .travis.yml: Exclude kirkwood machines from the arm926ejs jobTom Rini2018-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | We have a specific job for kirkwood platforms so exclude them from this job. Signed-off-by: Tom Rini <trini@konsulko.com>
* | | openrd: Mark as OrphanedTom Rini2018-07-311-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After talking with Albert, mark these boards as orphaned as he no longer has one. Cc: Albert ARIBAUD <albert-u-boot@aribaud.net> Cc: Vagrant Cascadian <vagrant@debian.org> Cc: Chris Packham <judge.packham@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* | | ls1046ardb: Add qspi_spl variant to the MAINTAINERS fileTom Rini2018-07-311-0/+1
| | | | | | | | | | | | Signed-off-by: Tom Rini <trini@konsulko.com>
* | | pico-pi: Add Otavio as maintainerTom Rini2018-07-311-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Update the MAINTAINERS file to list Otavio Salvador as the maintainer for this board. Acked-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Tom Rini <trini@konsulko.com>
* | | dm: Fix CMD_DM enablingMichal Simek2018-07-311-1/+1
| |/ |/| | | | | | | | | | | | | | | | | The patch "dm: Change CMD_DM enabling" (sha1: 08a00cba06a7e608ae65e3d7ea225cf8c639429d) was incorrectly updated and PICO_IMX7D is missing imply CMD_DM and WARP7 has it twice. This patch is fixing it. Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | Prepare v2017.09-rc1v2018.09-rc1Tom Rini2018-07-301-2/+2
| | | | | | | | Signed-off-by: Tom Rini <trini@konsulko.com>
* | fs-test.sh: Update expected result outputTom Rini2018-07-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | Given 0dc1bfb7302d ("fs: fat: cannot write to subdirectories") we have changed how the FAT code works from creating the illegal file "./file" and instead rejecting the path. The correct behavior would be to write "file" to "." but not writing an illegal file is a step in the right direction. For now, update the expected output to account for the failure. Signed-off-by: Tom Rini <trini@konsulko.com>
* | Merge tag 'signed-efi-next' of git://github.com/agraf/u-bootTom Rini2018-07-3070-402/+1172
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch queue for efi - 2018-07-25 Highlights this time: - Many small fixes to improve spec compatibility (found by SCT) - Almost enough to run with sandbox target - GetTime() improvements - Enable EFI_LOADER and HYP entry on ARMv7 with NONSEC=y
| * | MAINTAINERS: assign lib/charset.cHeinrich Schuchardt2018-07-251-0/+1
| | | | | | | | | | | | | | | | | | | | | lib/charset.c is only used by the EFI subsystem. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_selftest: unit test for GetTime()Heinrich Schuchardt2018-07-252-0/+68
| | | | | | | | | | | | | | | | | | | | | Provide a unit test for the GetTime() runtime service. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_selftest: support printing leading zeroesHeinrich Schuchardt2018-07-251-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | Allow specifying the precision when printing integers, e.g. efi_st_printf("%.4u-%.2u-%.2u\n", year, month, day); Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: complete implementation of GetTime()Heinrich Schuchardt2018-07-251-12/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the missing parts of the GetTime() runtime service. Fill seconds. Fill daylight saving time flag correctly. Provide dummy values for capabilities. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: remove unused efi_get_time_init()Heinrich Schuchardt2018-07-253-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unused function efi_get_time_init(). Initialization of the RTC has to be done in board bring up not in the EFI subsystem. There is no RTC device in the UEFI spec. The RTC is only accessed through the runtime services. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | rtc: remove CONFIG_CMD_DATE dependencyHeinrich Schuchardt2018-07-2524-89/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The EFI subsystem accesses the real time clock and is enabled by default. So we should drop any CONFIG_CMD_DATE dependency from the real time clock drivers. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_selftest: unit test for CalculateCrc32()Heinrich Schuchardt2018-07-252-0/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | This unit test checks the CalculateCrc32 bootservice and checks the headers of the system table, the boot services tablle, and the runtime services table before and after ExitBootServices(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_selftest: check crc32 for InstallConfigurationTableHeinrich Schuchardt2018-07-251-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InstallConfigurationTable() may change the number of installed configuration tables. Check the crc32 of the system table. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: update crc32 in InstallConfigurationTableHeinrich Schuchardt2018-07-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | If the number of installed tables is changed in InstallConfigurationTable() update the crc32 of the system table. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: correct signature of CalculateCrc32()Heinrich Schuchardt2018-07-252-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use const for the buffer. We are not changing the buffer. Use efi_uintn_t where prescribed by the UEFI spec. Prefer u32 over uint32_t. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_selftest: test InstallConfigurationTable()Heinrich Schuchardt2018-07-252-0/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide a unit test for InstallConfigurationTable(). A table is installed, updated, removed. The table entry and the triggering of events is checked. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: allocate configuration table arrayHeinrich Schuchardt2018-07-252-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The system table contains a link to the list of configurations tables. These include the device tree, SMBIOS table, and the ACPI table. This array is currently statically linked. With the patch it is allocated as EFI_RUNTIME_SERVICES_DATA. Due to the structure of the system table we cannot work with a linked list here. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: calculate crc32 for EFI tablesHeinrich Schuchardt2018-07-253-4/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | For the boot and runtime services tables and for the system table the crc32 has to be set in the header. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: provide firmware revisionHeinrich Schuchardt2018-07-253-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide a firmware revision in the system table using the Makefile variables VERSION and PATCHLEVEL, e.g. 0x20180700 for v2018.07. Correct the type of the firmware vendor. It is a u16* pointer. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: correct headersize EFI tablesHeinrich Schuchardt2018-07-252-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The headersize field has to be set to the size of the whole table including the header. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: correct EFI_RUNTIME_SERVICES_SIGNATUREHeinrich Schuchardt2018-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The value for EFI_RUNTIME_SERVICES_SIGNATURE does not match the UEFI spec 2.7. Reported-by: Takahiro Akashi <takahiro.akashi@linaro.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: specify UEFI spec revisionHeinrich Schuchardt2018-07-253-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both in the boot and the runtime services tables we have to specify the UEFI spec revision. The same value is already used for the system table. So let's use a common constant. In the boot services table we have to provide the header signature. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: clear screen has to reset cursor positionHeinrich Schuchardt2018-07-251-0/+2
| | | | | | | | | | | | | | | | | | | | | After clearing the screen the cursor position is row 0, column 0. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: EFI_SIMPLE_TEXT_INPUT_PROTOCOL.Reset()Heinrich Schuchardt2018-07-251-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the reset service of the EFI_SIMPLE_TEXT_INPUT_PROTOCOL. This should resolve the error reported by the SCT in Protocol/SimpleTextIn/BlackBoxTest/SimpleTextInBBTestFunction.c:193 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: set revision in loaded image protocolHeinrich Schuchardt2018-07-252-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The revision number has to be set in the loaded image protocol. The problem was detected by running the SCT in Protocol/LoadedImage/BlackBoxTest/LoadedImageBBTestMain.c:890 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_driver: set DM_FLAG_NAME_ALLOCED flagHeinrich Schuchardt2018-07-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Set the DM_FLAG_NAME_ALLOCED flag to avoid a memory leak when the block device is removed. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_selftest: test writing to fileHeinrich Schuchardt2018-07-251-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | Provide a unit test for writing to a FAT file system. Add some additional comments in block device unit test. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | fs: fat: cannot write to subdirectoriesHeinrich Schuchardt2018-07-251-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fs_fat_write() is not able to write to subdirectories. Currently if a filepath with a leading slash is passed, the slash is treated as part of the filename to be created in the root directory. Strip leading (back-)slashes. Check that the remaining filename does not contain any illegal characters (<>:"/\|?*). This way we will throw an error when trying to write to a subdirectory. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: check map_key in ExitBootServicesHeinrich Schuchardt2018-07-253-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | The UEFI spec requires that the memory map key is checked in ExitBootServices(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: check parameters of GetMemoryMapHeinrich Schuchardt2018-07-251-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | Check the parameters of boottime service GetMemoryMap(). Return EFI_INVALID_PARAMETER where required by the UEFI spec. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: check parameters in memory allocationHeinrich Schuchardt2018-07-251-0/+6
| | | | | | | | | | | | | | | | | | | | | If no pointer is provided throw an error. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: check parameters of CreateEventHeinrich Schuchardt2018-07-251-3/+32
| | | | | | | | | | | | | | | | | | | | | Rigorously check the TPL level and the event type. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | x86: Add efi_loader bits to x86_64 linker scriptAlexander Graf2018-07-251-1/+33
| | | | | | | | | | | | | | | | | | The x86_64 linker script was missing efi runtime information. Add it. Signed-off-by: Alexander Graf <agraf@suse.de>