summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-05-26doc: qemu-arm: Drop highmem=off referencesTuomas Tynkkynen
Now that U-Boot works fine with highmem enabled, there is no need to tell users to disable highmem. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-05-26ARM: qemu-arm: Bump RAM size in AArch64 MMU tableTuomas Tynkkynen
Now that PCI devices work with highmem-enabled QEMU emulation, bump up the RAM size in the MMU tables to gain access to the full 255 GB of RAM potential instead of the puny 3 GB. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-05-26PCI: dm: Ignore 64-bit memory regions if CONFIG_SYS_PCI_64BIT not setTuomas Tynkkynen
Currently, qemu_arm_defconfig and qemu_arm64_defconfig only work with the 'highmem=off' parameter passed to QEMU's virt machine. The reason is that when 'highmem' is not disabled, QEMU appends 64-bit a memory resource to the PCI controller's regions property in DT in addition to the 32-bit PCI memory window in low memory. And the current DT parsing code picks the last (thus the 64-bit one) memory resource, whose address eventually gets silently truncated to 32 bits because CONFIG_SYS_PCI_64BIT is not set, which obviously causes PCI to break. Avoid this problem by ignoring memory regions whose addresses are above the 32-bit boundary when CONFIG_SYS_PCI_64BIT is not set. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-05-25configs: add TPMv2.x support in SandboxMiquel Raynal
Enable the Sandbox TPMv2 driver in all possible configurations. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-25sandbox: dts: add Sandbox TPMv2.x nodeMiquel Raynal
This node declares the presence of the Sandbox TPMv2.x emulated chip, available for testing. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-25doc: device-tree-bindings: add Sandbox TPMv2.0 module infoMiquel Raynal
Add Sandbox TPMv2.0 module bindings. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-25tpm: add a Sandbox TPMv2.x driverMiquel Raynal
This driver can emulate all the basic functionalities of a TPMv2.x chip and should behave like them during regular testing. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-25test/py: add TPMv2.x test suiteMiquel Raynal
Add tests for the TPMv2.x commands. These commands may run both on a physical TPM and with the sandbox driver. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-25doc: device-tree-bindings: add TIS TPMv2.0 SPI module infoMiquel Raynal
Add TIS TPMv2.0 SPI module bindings. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-25tpm2: tis_spi: add the possibility to reset the chip with a gpioMiquel Raynal
On some designs, the reset line could not be connected to the SoC reset line, in this case, request the GPIO and ensure the chip gets reset. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-05-25tpm: add support for TPMv2.x SPI modulesMiquel Raynal
Add the tpm2_tis_spi driver that should support any TPMv2 compliant (SPI) module. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-05-25tpm: add PCR authentication commands supportMiquel Raynal
Add support for the TPM2_PCR_SetAuthPolicy and TPM2_PCR_SetAuthValue commands. Change the command file and the help accordingly. Note: These commands could not be tested because the TPMs available do not support them, however they could be useful for someone else. The user is warned by the command help. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-25tpm: add TPM2_HierarchyChangeAuth command supportMiquel Raynal
Add support for the TPM2_HierarchyChangeAuth command. Change the command file and the help accordingly. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-25tpm: add dictionary attack mitigation commands supportMiquel Raynal
Add support for the TPM2_DictionaryAttackParameters and TPM2_DictionaryAttackLockReset commands. Change the command file and the help accordingly. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-25tpm: add TPM2_GetCapability command supportMiquel Raynal
Add support for the TPM2_GetCapability command. Change the command file and the help accordingly. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-25tpm: add TPM2_PCR_Read command supportMiquel Raynal
Add support for the TPM2_PCR_Read command. Change the command file and the help accordingly. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-25tpm: add TPM2_PCR_Extend command supportMiquel Raynal
Add support for the TPM2_PCR_Extend command. Change the command file and the help accordingly. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-25tpm: add TPM2_Clear command supportMiquel Raynal
Add support for the TPM2_Clear command. Change the command file and the help accordingly. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-25tpm: add TPM2_SelfTest command supportMiquel Raynal
Add support for the TPM2_Selftest command. Change the command file and the help accordingly. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-25tpm: add TPM2_Startup command supportMiquel Raynal
Add support for the TPM2_Startup command. Change the command file and the help accordingly. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-25tpm: report driver error code to upper layerMiquel Raynal
Instead of returning a generic 'library' error, report back the actual error code so it can be displayed to the user by the regular error path. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-25tpm: add possible traces to analyze buffers returned by the TPMMiquel Raynal
When debugging, it is welcome to get more information about what the TPM returns. Add the possibility to print the packets received to show their exact content. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-25tpm: add macros to enhance TPM commands readabilityMiquel Raynal
TPM commands are much easier to read/write with these macros that will transform words or integers into byte strings. This way, there is no need to call pack_byte_string() while all variable length in a command are known (and at must 4 bytes, which is a lot of them). Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-25tpm: prepare support for TPMv2.x commandsMiquel Raynal
Choice between v1 and v2 compliant functions is done with the configuration. Create the various files that will receive TPMv2-only code on the same scheme as for the TPMv1 code. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-25tpm: add missing parameter in private data structure descriptionMiquel Raynal
Both parameters 'duration_ms' and 'retry_time_ms' of the tpm_chip_priv structure are documented is the comment above the declaration but 'buf' was forgotten. Add the missing description. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-05-25tpm: disociate TPMv1.x specific and generic codeMiquel Raynal
There are no changes in this commit but a new organization of the code as follow. * cmd/ directory: > move existing code from cmd/tpm.c in cmd/tpm-common.c > move specific code in cmd/tpm-v1.c > create a specific header file with generic definitions for commands only called cmd/tpm-user-utils.h * lib/ directory: > move existing code from lib/tpm.c in lib/tpm-common.c > move specific code in lib/tpm-v1.c > create a specific header file with generic definitions for the library itself called lib/tpm-utils.h * include/ directory: > move existing code from include/tpm.h in include/tpm-common.h > move specific code in include/tpm-v1.h Code designated as 'common' is compiled if TPM are used. Code designated as 'specific' is compiled only if the right specification has been selected. All files include tpm-common.h. Files in cmd/ include tpm-user-utils.h. Files in lib/ include tpm-utils.h. Depending on the specification, files may include either (not both) tpm-v1.h or tpm-v2.h. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> [trini: Fix a few more cases of tpm.h -> tpm-v1.h, some Kconfig logic] Signed-off-by: Tom Rini <trini@konsulko.com>
2018-05-25tpm: prepare introduction of TPMv2.x support in KconfigMiquel Raynal
Because both major revisions are not compatible at all, let's make them mutually exclusive in Kconfig. This way we will be sure, when using a command or a library function that it is supported by the right revision. Current drivers are currently prefixed by "tpm_", we will prefix TPMv2.x files by "tpm2_" to make the distinction without moving everything. The Kconfig menu about TPM drivers is now divided into two sections, one for each specification. Compliant drivers with one specification will only show up if this specification _only_ has been selected, otherwise a comment is displayed. Once a driver is selected by the user, it selects automatically a boolean value, that is needed in order to activate the TPM commands. Selecting the TPM commands will automatically select the right command/library files. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> [trini: Rework deps as TPM_V1 and TPM_V2 depend on TPM, drop TPM_DRIVER_SELECTED] Signed-off-by: Tom Rini <trini@konsulko.com>
2018-05-25tpm: add Revision ID field in the chip structureMiquel Raynal
TPM are shipped with a few read-only register from which we can retrieve for instance: - vendor ID - product ID - revision ID Product and vendor ID share the same register and are already referenced in the tpm_chip structure. Add the revision ID entry which is missing. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-25tpm: add extra blank lines between declarations and codeMiquel Raynal
Fix following checkpatch.pl issue in TPM-related code: WARNING: Missing a blank line after declarations Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-05-25tpm: fix spellingMiquel Raynal
Fix following checkpatch.pl issues in TPM-related code: CHECK: '<x>' may be misspelled - perhaps '<y>'? Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-05-25tpm: use the BIT() macro where applicableMiquel Raynal
Fix following checkpatch.pl issue in TPM-related code: CHECK: Prefer using the BIT macro Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-05-25tpm: align arguments with open parenthesisMiquel Raynal
Fix following checkpatch.pl issue in TPM-related code: CHECK: Alignment should match open parenthesis Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-05-25tpm: substitute deprecated uint<x>_t types with their u<x> equivalentMiquel Raynal
Fix following checkpatch.pl issues in TPM-related code: CHECK: Prefer kernel type 'u8' over 'uint8_t' CHECK: Prefer kernel type 'u16' over 'uint16_t' CHECK: Prefer kernel type 'u32' over 'uint32_t' Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-05-25tpm: remove extra spaces between a function and its opening bracketMiquel Raynal
Fix following checkpatch.pl issue in TPM-related code: WARNING: space prohibited between function name and open parenthesis '(' Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-05-25tpm: remove redundant blank lineMiquel Raynal
Fix following checkpatch.pl issue in TPM-related code: CHECK: Please don't use multiple blank lines Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-05-24Merge tag 'arc-uart-updates-for-2018.07-rc1' of git://git.denx.de/u-boot-arcTom Rini
Add support for DEBUG_UART on ARC devboards This required us to do 2 things: 1) Insert a call to debug_uart_init() in early boot code 2) Convert serial_arc to Kconfig Once both items above are done we just patched defconfigs.
2018-05-24Merge tag 'signed-rpi-next' of git://github.com/agraf/u-bootTom Rini
Patch queue for rpi - 2018-05-24 Some minor fixes for the Raspberry Pi: - Fix SD writes on new sdhost controller - Sanitize default load addresses, allowing for better payload placement
2018-05-24ARC: Enable debug UART on nSIM boardsAlexey Brodkin
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2018-05-24serial/serial_arc: Implement debug serialAlexey Brodkin
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2018-05-24serial: Convert ARC_SERIAL to KconfigAlexey Brodkin
One step closer to completely Kconfig-driven target configuration in U-Boot :) Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2018-05-24ARC: enable debug uart for HSDK and AXS10x boardsEugeniy Paltsev
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2018-05-24ARC: init debug uart in early common arc codeEugeniy Paltsev
The debug UART is intended for use very early in U-Boot to debug problems before serial drivers are up. Call debug_uart_init right before board_init_f. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2018-05-24rpi: Change load addresses to make more room for the kernel & DTBTuomas Tynkkynen
As of Linux 4.16, a multiplatform AArch64 kernel with our distro config takes 26M. The current space reservation leaves only 17M for the kernel and if it goes over it, the initrd gets overwritten when loading the kernel from the filesystem. A similar problem happens on ARMv7 with the DTBs taken from the downstream Raspberry Pi foundation kernel. I guess they compile them with DT overlay support enabled which grows them just enough. Fix both of these problems by rewriting the memory map, which now allows kernels to be up to 36M and DTBs up to 1M. Also the comment block was kind of obsolete ever since the introduction of AArch64 support and the firmware-loaded DTB doesn't get placed at 0x100 anymore either, so that is fixed as well. Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-05-23spl: Add full fitImage supportMarek Vasut
Add support for loading U-Boot and optionally FDT from a fitImage in SPL by using the full fitImage support from U-Boot. While we do have limited SPL loading support in SPL with a small footprint, it is missing a lot of important features, like checking signatures. This support has all the fitImage features, while the footprint is obviously larger. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-05-23pylibfdt: Add missing CC and LD to MakefileMarek Vasut
Add missing CC and LDSHARED variables to the Makefile to pass the correct C compiler and linker path to the build of _libfdt.so . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@konsulko.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-05-23scripts: add decodecode from LinuxHeinrich Schuchardt
The script decodecode can be used to disassemble the 'Code:' line written when an exception occurs. The script is copied from Linux v4.16. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-05-23arm: print instructions pointed to by pcHeinrich Schuchardt
If an exception occurs in a loaded image and the relocation offset is unknown, it is helful to know the instructions pointed to by the program counter. This patch adds the missing output. A possible output is: Code: e1c560d0 e12fff1e e120077b e12fff1e (e7f7defb) The parentheses indicate the instruction causing the exception. The output can be disassembled using the decodecode script provided by the Linux kernel project. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-05-23arm64: timer: Create timer_get_bootus for bootstage supportMichal Simek
Implement timer_get_boot_us() based on available functions to support bootstage command. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-05-23Makefile: adopt --std=gnu11 for HOSTCFLAGS on LinuxPhilipp Tomsich
Following the conversion of the SPDX license tags, a number of files compiled with -pedantic now generate warnings similar to the following for using C99-style '//' comments in ISO C90 code: tools/gen_eth_addr.c:1:1: warning: C++ style comments are not allowed in ISO C90 // SPDX-License-Identifier: GPL-2.0+ ^ The SPDX comment-style change means that these files have adopted C99, so need to change the language-standard to --std=gnu99 or --std=gnu11 to let the compiler know this. As we now require GCC 6 or newer for the cross-compiler, the project has implicitly moved the project to GNU11: let older GCC versions on various Linux distros know to treat our host tools as GNU11 as well. References: commit 83d290c56fab ("SPDX: Convert all of our single license tags to Linux Kernel style") Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-23twister: Let SPL load U-Boot from MMCLadislav Michl
MMC is not initialized in SPL, so it cannot load u-boot.img preventing boot from MMC. Also driver specific functions are guarded with generic configuration options which leads to build failures when device driver is not enabled in config. Fix that by using driver specific defines. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Acked-by: Stefano Babic <sbabic@denx.de>