aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* fs: fs-loader: Drop dm.h header fileSimon Glass2020-08-032-1/+2
| | | | | | | This header file should not be included in other header files. Remove it and use a forward declaration instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Drop header files from dm/test.hSimon Glass2020-08-0363-20/+82
| | | | | | | | These header file should not be included in other header files. Remove them and add to each individual file. Add test/test.h to test/ui.h since that is a reasonable place. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Drop dm.h header file from dm-demo.hSimon Glass2020-08-032-2/+1
| | | | | | | This header file should not be included in other header files. Remove it and add it to the cmd file instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* mtd: spi: Drop SPI_XFER_MMAP*Simon Glass2020-08-031-2/+0
| | | | | | These two defines are no-longer supported. Drop them. Signed-off-by: Simon Glass <sjg@chromium.org>
* mtd: spi-mem: Drop dm.h header fileSimon Glass2020-08-034-5/+10
| | | | | | | This header file should not be included in other header files. Remove it and use a forward declaration instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* wdt: Drop dm.h header fileSimon Glass2020-08-031-3/+1
| | | | | | | | | | | | This header file should not be included in other header files. Remove it and use a forward declaration instead. Also remove the other headers that are not needed, since the inline code was removed in a recent commit: b4d9452c4 ("watchdog: move initr_watchdog() to wdt-uclass.c") Signed-off-by: Simon Glass <sjg@chromium.org>
* mtd: spi-nor: Tidy up error handling / debug codeSimon Glass2020-08-033-4/+4
| | | | | | | | | | | | | The -ENODEV error value in spi_nor_read_id() is incorrect since there clearly is a device - it just cannot be supported. Use -ENOMEDIUM instead which has the virtue of being less common. Fix the return value in spi_nor_scan(). Also there are a few printf() statements which should be debug() since they bloat the code with unused strings at present. Fix those while here. Signed-off-by: Simon Glass <sjg@chromium.org>
* spi: Allow separate control of SPI_FLASH_TINY for SPL/TPLSimon Glass2020-08-032-1/+11
| | | | | | | In some cases SPL needs to be able to erase but TPL just needs to read. Allow these to have separate settings for SPI_FLASH_TINY. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86Tom Rini2020-08-039-11/+81
|\ | | | | | | | | | | | | - ApolloLake: add u64 parameters support for FSP2 bindings - ApolloLake: add missing parameters to support full configuration of the latest FSP MR6 release - Append appropriate suffixes in various assembly codes
| * x86: call32: Append appropriate suffixesAndy Shevchenko2020-08-031-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Assembler is not happy: arch/x86/cpu/call32.S: Assembler messages: arch/x86/cpu/call32.S:36: Warning: no instruction mnemonic suffix given and no register operands; using default for `retf' Fix this by adding appropriate suffixes to the assembler commands. Fixes: 6f92ed8f1abf ("x86: Add a way to call 32-bit code from 64-bit mode") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * x86: sipi_vector: Append appropriate suffixesAndy Shevchenko2020-08-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assembler is not happy: arch/x86/cpu/sipi_vector.S: Assembler messages: arch/x86/cpu/sipi_vector.S:134: Warning: no instruction mnemonic suffix given and no register operands; using default for `cmp' arch/x86/cpu/sipi_vector.S:139: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts' arch/x86/cpu/sipi_vector.S:157: Warning: no instruction mnemonic suffix given and no register operands; using default for `cmp' Fix this by adding appropriate suffixes to the assembler commands. Fixes: 45b5a37836d5 ("x86: Add multi-processor init") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * arch: x86: apl: Update FSP parametersBernhard Messerklinger2020-08-035-2/+44
| | | | | | | | | | | | | | | | Add missing parameters to support full configuration of the latest FSP MR6 release. Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * x86: apl: fsp_bindings: Add support for u64 parametersBernhard Messerklinger2020-08-032-0/+29
| | | | | | | | | | | | | | | | Add FSP_UINT64 read support as preparation for FSP-M and FSP-S parameter update. Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * x86: irq: Fix some typosWolfgang Wallner2020-08-031-3/+3
| | | | | | | | | | | | | | Fix some typos in arch/x86/include/asm/irq.h. Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | Merge tag 'efi-2020-10-rc2' of ↵Tom Rini2020-08-0317-194/+245
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2020-10-rc2 This series comprises error corrections for the UEFI subsystem: * make the memory size reserved for the U-Boot stack customizable and reduce it for the MAIX board * correct build dependencies for UEFI unit test * enable read-only UEFI variable are enabled with the TEE backend * add 10 ms wait to sysreset to fix a problem with unit testing
| * efi_selftest: block device test requires CONFIG_DOS_PARTITIONHeinrich Schuchardt2020-08-012-1/+3
| | | | | | | | | | | | | | | | Do not execute the block device test if CONFIG_DOS_PARTITION=n. Imply CONFIG_DOS_PARTITION in Kconfig. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_selftest: SNP test depends on networkHeinrich Schuchardt2020-08-011-1/+2
| | | | | | | | | | | | If CONFIG_NET=n, testing the simple network protocol makes no sense. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * dm: sysreset: wait after reset messageHeinrich Schuchardt2020-08-011-0/+1
| | | | | | | | | | | | | | | | | | | | In our Python tests we expect to see the word "resetting". It may be truncated if we reset before the serial console buffer is transferred. Wait for 100 ms between the "resetting ..." message and the actual reset like we do when powering off. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * configs: reduce stack size of Sipeed MAIXHeinrich Schuchardt2020-08-011-0/+1
| | | | | | | | | | | | | | | | The K210 has only 8 MiB RAM thereof 2 MiB reserved for AI. Allow only 1 MiB for the stack. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: use CONFIG_STACK_SIZE in the UEFI sub-systemHeinrich Schuchardt2020-08-014-26/+11
| | | | | | | | | | | | | | | | | | | | | | The Kconfig symbol CONFIG_STACK_SIZE is used both by ARM and Microblaze with the same meaning. Move it to menu 'General setup' so that we can use it for all architectures. Use the value of CONFIG_STACK_SIZE instead of a hard coded 16 MiB value for reserving memory in the UEFI sub-system. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * x86: rename CONFIG_STACK_SIZEHeinrich Schuchardt2020-08-012-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Configuration variables should have the same meaning independent of the architecture. x86 and ARM both use CONFIG_STACK_SIZE: * x86: U-Boot's runtime stack size during reboot * ARM: max stack size that can be used by U-Boot Rename the x86 configuration variable to CONFIG_STACK_SIZE_REBOOT Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: Enable run-time variable support for tee based variablesIlias Apalodimas2020-08-017-154/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We recently added functions for storing/restoring variables from a file to a memory backed buffer marked as __efi_runtime_data commit f1f990a8c958 ("efi_loader: memory buffer for variables") commit 5f7dcf079de8 ("efi_loader: UEFI variable persistence") Using the same idea we now can support GetVariable() and GetNextVariable() on the OP-TEE based variables as well. So let's re-arrange the code a bit and move the commmon code for accessing variables out of efi_variable.c. Create common functions for reading variables from memory that both implementations can use on run-time. Then just use those functions in the run-time variants of the OP-TEE based EFI variable implementation and initialize the memory buffer on ExitBootServices() Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: Trim output buffer size correctly for tee variablesIlias Apalodimas2020-08-011-10/+3
|/ | | | | | | | | | | | | | | | The current code does not trim the output buffer correctly. In fact it doesn't trim the buffer at all, since it calculates a wrong value for it, which isn't even applied. So let's remove the unused temporary size variable and trim the buffer correctly. Since we are editing efi_get_next_variable_name_int(), fix an indentation error along the way. Fixes: f042e47e8fb43 ("efi_loader: Implement EFI variable handling via OP-TEE") Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Remove superfluous conversion to (u8 *) for memcpy argument. Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* Merge branch '2020-07-31-more-env-updates'Tom Rini2020-07-3133-65/+507
|\ | | | | | | | | | | | | | | | | - Fix EFI selftest to not force setting serial# environment (and also get the U-Boot prompt dynamically). - Support for append only environment and other related features. - Improved ext4 environment support - Fix the case of fw_setenv being used on flash devices that were not already locked.
| * fw_setenv: lock the flash only if it was locked beforeIvan Mikhaylov2020-07-311-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With current implementation of fw_setenv, it is always locks u-boot-env region if lock interface is implemented for such mtd device. You can not control lock of this region with fw_setenv, there is no option for it in config or in application itself. Because of this situation may happen problems like in this thread on xilinx forum: https://forums.xilinx.com/t5/Embedded-Linux/Flash-be-locked-after-use-fw-setenv-from-user-space /td-p/1027851 A short summary of that link is: some person has issue with some spi chip which has lock interface but doesn't locks properly which leads to lock of whole flash memory on lock of u-boot-env region. As resulted solution hack was added into spi-nor.c driver for this chip with lock disablement. Instead fix this problem by adding logic to fw_setenv only lock the flash if it was already locked when we attempted to use it. Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com>
| * env: Add support for explicit write access listMarek Vasut2020-07-314-13/+68
| | | | | | | | | | | | | | | | | | | | | | This option marks any U-Boot variable which does not have explicit 'w' writeable flag set as read-only. This way the environment can be locked down and only variables explicitly configured to be writeable can ever be changed by either 'env import', 'env set' or loading user environment from environment storage. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
| * env: Add option to only ever append environmentMarek Vasut2020-07-313-0/+15
| | | | | | | | | | | | | | | | | | | | Add configuration option which prevents the environment hash table to be ever cleared and reloaded with different content. This is useful in case the first environment loaded into the hash table contains e.g. sensitive content which must not be dropped or reloaded. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
| * env: Discern environment coming from external storageMarek Vasut2020-07-3115-24/+29
| | | | | | | | | | | | | | | | Add another custom environment flag which discerns environment coming from external storage from environment set by U-Boot itself. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
| * env: Add H_DEFAULT flagMarek Vasut2020-07-312-1/+3
| | | | | | | | | | | | | | | | | | Add another internal environment flag which indicates that the operation is resetting the environment to the default one. This allows the env code to discern between import of external environment and reset to default. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
| * env: Warn on force access if ENV_ACCESS_IGNORE_FORCE setMarek Vasut2020-07-311-1/+3
| | | | | | | | | | | | | | | | If the ENV_ACCESS_IGNORE_FORCE is set, inform user that the variable cannot be force-set if such attempt happens. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
| * test: sandbox: add test for erase commandPatrick Delaunay2020-07-315-0/+20
| | | | | | | | | | | | Add test for the erase command tested on ENV in EXT4. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
| * env: ext4: add support of command env erasePatrick Delaunay2020-07-311-0/+19
| | | | | | | | | | | | | | | | | | | | Add support of opts erase for env in ext4, this opts is used by command 'env erase'. This command only fill the env file (CONFIG_ENV_EXT4_FILE) with 0, the CRC and the saved environment becomes invalid. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
| * env: ext4: introduce new function env_ext4_save_bufferPatrick Delaunay2020-07-311-8/+20
| | | | | | | | | | | | Split the function env_ext4_save to prepare the erase support. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
| * test: environment in ext4Patrick Delaunay2020-07-311-1/+96
| | | | | | | | | | | | | | | | | | | | Add basic test to persistent environment in ext4: save and load in host ext4 file 'uboot.env'. On first execution an empty EXT4 file system is created in persistent data dir: env.ext4.img. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
| * configs: sandbox: activate command env select and env loadPatrick Delaunay2020-07-314-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support of environment location with the new env command: 'env select' and 'env load' The ENV backend is selected by priority order - 0 = "nowhere" (default at boot) - 1 = "EXT4" To test EXT4 env support, this backend is selected by name: > env select EXT4 Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
| * configs: sandbox: activate env in ext4 supportPatrick Delaunay2020-07-315-0/+31
| | | | | | | | | | | | | | | | | | | | Activate ENV in EXT4 support in sandbox. The sandbox behavior don't change; the default environment with the nowhere backend (CONFIG_ENV_IS_NOWHERE)is still used: the weak function env_get_location() return ENVL_NOWHERE for priority 0. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
| * cmd: env: add env select commandPatrick Delaunay2020-07-314-1/+69
| | | | | | | | | | | | | | Add the new command 'env select' to force the persistent storage of environment, saved in gd->env_load_prio. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
| * cmd: env: add env load commandPatrick Delaunay2020-07-314-0/+55
| | | | | | | | | | | | | | Add the new command env load to load the environment from the current location gd->env_load_prio. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
| * env: the ops driver load becomes mandatory in struct env_driverPatrick Delaunay2020-07-312-5/+1
| | | | | | | | | | | | | | The ops driver load becomes mandatory in struct env_drive, change the comment for this ops and remove unnecessary test. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
| * env: nowhere: add .load opsPatrick Delaunay2020-07-311-0/+17
| | | | | | | | | | | | | | | | | | Add the ops .load for nowhere ENV backend to load the default environment. This ops is needed for the command 'env load' Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
| * env: correctly handle env_load_prioPatrick Delaunay2020-07-311-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Only update gd->env_load_prio in generic function env_load() and no more in the weak function env_get_location() which is called in many place (for example in env_driver_lookup, even for ENVOP_SAVE operation). This patch is a preliminary step to use env_driver_lookup()/ env_get_location() in new function env_select() without updating gd->env_load_prio. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
| * env: sf: avoid space in backend namePatrick Delaunay2020-07-311-1/+1
| | | | | | | | | | | | | | Remove space in ENV backend name for SPI Flash (SF) to avoid issue with env select command. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
| * env: ext4: set gd->env_validPatrick Delaunay2020-07-311-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | Add a missing initialization of gd->env_valid in env_ext4_load as it is already done in some other env device. Set gd->env_valid = ENV_VALID in env_ext4_save() and env_ext4_load(). This patch allows to have a correct information in 'env info' command. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
| * env: add absolute path at CONFIG_ENV_EXT4_FILEPatrick Delaunay2020-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add the absolute path to the default value of CONFIG_ENV_EXT4_FILE = "/uboot.env". This patch avoid the error : Saving Environment to EXT4... File System is consistent Please supply Absolute path Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
| * env: add prototypes for weak functionPatrick Delaunay2020-07-311-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds prototypes for several weak functions: - env_ext4_get_intf - env_ext4_get_dev_part - env_get_location It solves the following warnings when compiling with W=1 on stm32mp1 board: board/st/stm32mp1/stm32mp1.c:849:19: warning: no previous prototype for 'env_get_location' [-Wmissing-prototypes] enum env_location env_get_location(enum env_operation op, int prio) ^~~~~~~~~~~~~~~~ board/st/stm32mp1/stm32mp1.c:876:13: warning: no previous prototype for 'env_ext4_get_intf' [-Wmissing-prototypes] const char *env_ext4_get_intf(void) ^~~~~~~~~~~~~~~~~ board/st/stm32mp1/stm32mp1.c:889:13: warning: no previous prototype for 'env_ext4_get_dev_part' [-Wmissing-prototypes] const char *env_ext4_get_dev_part(void) ^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
| * test: efi_selftest: Do not force serial# settingTom Rini2020-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | As part of the EFI self test we set and check the serial# variable. However, we should not be forcing this setting. In the case where we are allowed to change the variable it will change, and we will pass the test. In the case where we cannot change it, force may or may not be allowed, depending on further environment restrictions. Drop the -f flag here as we do not need it. Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Tom Rini <trini@konsulko.com>
| * test: do not rely on => being the promptHeinrich Schuchardt2020-07-311-1/+1
|/ | | | | | | | In our tests we should use the customized prompt for testing. Reported-by: Tom Rini <trini@konsulko.com> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Tested-by: Tom Rini <trini@konsulko.com>
* Merge tag 'dm-pull-28jul20' of git://git.denx.de/u-boot-dmTom Rini2020-07-29116-365/+974
|\ | | | | | | | | | | Use binman instead of one of the Rockchip build scripts Refactor to allow any arch to create SPI-flash images New button uclass
| * dm: remove superfluous comment for union ofnode_unionHeinrich Schuchardt2020-07-281-1/+1
| | | | | | | | | | | | "future live tree" does not make sense anymore as we have CONFIG_OF_LIVE. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * test: dm: add a test for class buttonPhilippe Reynes2020-07-282-0/+75
| | | | | | | | | | | | | | Add a test to confirm that we can read button state using the button-gpio driver. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>