Add stub for dma_memcpy() and dma_get_device when CONFIG_DMA is
disabled. This avoids ifdefs in driver code using DMA APIs
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Add i.MXRT compatible string and cpu type support to lpuart driver,
to use little endian 32 bits configurations.
Also according to RM, the Receive RX FIFO Enable (RXFE) field in LPUART
FIFO register is bit 3, so this definition should change to 0x08 as done
for i.MX8. It needs also to set baudrate the same way as i.MX8 does.
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
This target is out of maintenance and can be removed.
Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
CC: Stefan Roese <sr@denx.de>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
Reviewed-by: Stefan Roese <sr@denx.de>
All platforms currently use the "MCFTMR" DMA timer rather than the PIT
timer, so drop the MCFPIT code.
Cc: Huan Wang <alison.wang@nxp.com>
Cc: Angelo Dureghello <angelo@sysam.it>
Cc: TsiChung Liew <Tsi-Chung.Liew@nxp.com>
Cc: Wolfgang Wegner <w.wegner@astro-kom.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Angelo Dureghello <angelo@sysam.it>
This pull request provides:
* support for FIT images for UEFI binaries
* drivers for hardware random number generators
* an implementation of the EFI_RNG_PROTOCOL
* a sub-command for efidebug to display configuration tables
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAl4UvR4ACgkQxIHbvCwF
GsRJZhAAmlsRBUS3fvFV5GtB8bkWcSU4/s3TVYJui0fOhY02ZDIKkrubZzDx/Lgv
9OaVwjQ3JSmq5XkDmXqzNDzYkxitQ5Qf/cFiBF5HpA3USkOttb3GIfgj0qD6DGzM
cKyhgJm7bZoMN/mkIzkWsry1ASwYpB3ipyoJAfRfryw9ok4j9RfJ7pPieeycGWGJ
0sZsJI0v7e6xt5Qsytk5sZNvlCFhyhl2OMYliAlRKBryh31Ahr2e6KEwsJh7VyCP
4K12eBTqIJq1qHk7Lr0g1CnMCdeOT8J7qvX1+kvt3HupxTMkYRv2AR5CQWRKck5E
RsmcKmiTHz/76w6Gk7kLan7y0UCSHnfHQ3aSEkkx4O/v4OC85VteyLAEriS7J9Hx
xSNyoj01U2wG3SLrUjkAZv6JgyC8uCezRzOHOqN25Q2mRROVq781mcMfRXwdq6cD
L4rrTsIDPzNF19wDa7P5tK6JMF8BDifLNuMTQj5LdJYMHJTJZBWG/vTNFPEldaIP
D9RPoCibTolpiuCYneeXJURHGm5yme7KoxAPiMU+fAWO1F6SO25zxYA7MAiY4OYw
zk7Ipaat0luIu1gC2ICYxrLnsMBq9glABrdq99i0DpUg9n9N/7SpcJSj2DMrFGmY
u4yenWM1KTgjLoVHRhpTbCzF15GlYN4SHXV5iYO+Pof5WQYnv8w=
=SjPV
-----END PGP SIGNATURE-----
Merge tag 'efi-2020-04-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for efi-2020-04-rc1
This pull request provides:
* support for FIT images for UEFI binaries
* drivers for hardware random number generators
* an implementation of the EFI_RNG_PROTOCOL
* a sub-command for efidebug to display configuration tables
- Various fixups for amlogic boards
- Unnecessary header includes drop into video/meson
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAl4V0PgACgkQd9zb2sjI
SdEuPw//c0APhovWXXCsRckccBF8SK3WRsVcj5M36g7WXVdUo+MXaPzDUEyDAMfU
xS51FaN7lJJ7ntxEvJ3loFDYh0WrYoanCW+9KxMnJ0GVTdWg6nL0u4yq4exD9f4d
N9Tv8NaN0y2Jn97Y3L70qlutVJjTzUd1oRKWmGDESvXj3+WrJdffEL0uBrCcbmF/
kyEQ3RiDuGhfNrC/mSdhQFG2kmeQc43+Fb1OYq8Wm28zwtYvZuJpdn7FTtwGQk0+
iCjIUN0RKcD+HedJVxHmSnOOTehydk6xQX9215ebo/tTz+WtoqXrFPjEr1mgAhRV
ojEdJcEKAFGwTYuRDmeO6lwAv+k0fkF4drGi7uAOQa3JwD90aKgR0Ig80CzVq1vW
m79WDHFbaQnpIGf94kONF8X0M9nWN9/XYmpJe6KuQaO7YEsIIBsbFP657pJp1J1m
xfwzl2xlx7yaDeR8xv4/N67REuSF/ILeJA0tykkm7NEWkkBrz1d+dXiOaTceY/Wu
z7s3QGpHINMOzuxMZKEZazt+0KQ4UlbAxYRQU3oNRkW3WaCoGimpbjC9FJa4FpoA
Cx2PBRunzx8rK87ZS/X7VUa2v454MSkCGwpmqP+PrekoL2rsRNx/3gWHpzb+Z7E/
nAd0uukYy/WSlzv6bfpRdemQi27gSvDnERf4dj/4kiAiMoKkeiA=
=rkHZ
-----END PGP SIGNATURE-----
Merge tag 'u-boot-amlogic-20200108' of https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic
- Khadas VIM3L based on Amlogic S905D3 support
- Various fixups for amlogic boards
- Unnecessary header includes drop into video/meson
As previous CONFIG_SYS_UBOOT_START is now set by default to
CONFIG_SYS_TEXT_BASE when not defined, CONFIG_SYS_UBOOT_START
can be removed from include/configs board files.
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Acked-by: Lukasz Majewski <lukma@denx.de>
PCA9450 PMIC series is used to support iMX8MM (PCA9450A) and
iMX8MN (PCA9450B). Add the PMIC driver for both PCA9450A and PCA9450B.
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
This complements commit 068789773d which did the conversion for
mpc85xx.
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Mario Six <mario.six@gdsys.cc>
The devres functionality has very few users in U-Boot, but it still should
have tests. Add a few basic tests of the main functions.
Signed-off-by: Simon Glass <sjg@chromium.org>
At present when CONFIG_DEBUG_DEVRES is enabled, U-Boot prints log messages
to the console with every devres allocation/free event. This causes most
tests to fail since the console output is not as expected.
In particular this prevents us from adding a device to sandbox which uses
devres in its bind method.
Move devres over to use U-Boot's logging feature instead, and add a new
category for devres.
Signed-off-by: Simon Glass <sjg@chromium.org>
The malloc() implementations provides a way of finding out the approximate
amount of memory that is allocated. Add helper functions to make it easier
to access this and see changes over time. This is useful for tests that
want to check if memory has been allocated or freed.
Signed-off-by: Simon Glass <sjg@chromium.org>
At present these functions are lumped in with the core device functions.
They have their own #ifdef to control their availability, so it seems
better to split them out.
Move them into their own header file.
Signed-off-by: Simon Glass <sjg@chromium.org>
We want to avoid allocating platform data twice. This could happen if
device_probe() is called after device_ofdata_to_platdata() for the same
device.
Add a flag to track whether device_ofdata_to_platdata() has been called on
a device. Check the flag to make sure it doesn't happen twice, and clear
the flag when the data is freed.
Signed-off-by: Simon Glass <sjg@chromium.org>
Add a new internal function, device_ofdata_to_platdata() to handle
allocating private space associated with each device and reading the
platform data from the device tree.
Call this new function from device_probe().
Signed-off-by: Simon Glass <sjg@chromium.org>
Some U-Boot code uses BUG_ON() and WARN_ON() macros. These use __FILE__
which can include quite a large path, depending on how U-Boot is built.
The existing assert() is only checked if DEBUG is enabled. Add a new one
which is always checked, and prints a (smaller) error in that case.
Signed-off-by: Simon Glass <sjg@chromium.org>
Install the EFI_RNG_PROTOCOL implementation for it's subsequent use by
the kernel for features like kaslr.
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Add support for the EFI_RNG_PROTOCOL routines for the qemu arm64
platform. EFI_RNG_PROTOCOL is an uefi boottime service which is
invoked by the efi stub in the kernel for getting random seed for
kaslr.
The routines are platform specific, and use the virtio-rng device on
the platform to get random data.
The feature can be enabled through the following config
CONFIG_EFI_RNG_PROTOCOL
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Changed SPDX header to use /* instead of //.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Add a driver for the virtio-rng device on the qemu platform. The
device uses pci as a transport medium. The driver can be enabled with
the following configs
CONFIG_VIRTIO
CONFIG_DM_RNG
CONFIG_VIRTIO_PCI
CONFIG_VIRTIO_RNG
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Add a uclass for reading a random number seed from a random number
generator device.
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Add a new OS type to be used for chain-loading an EFI compatible
firmware or boot loader like GRUB2, possibly in a verified boot
scenario.
Bellow is sample ITS file that generates a FIT image supporting
secure boot. Please note the presence of 'os = "efi";' line, which
identifies the currently introduced OS type:
/ {
#address-cells = <1>;
images {
efi-grub {
description = "GRUB EFI";
data = /incbin/("bootarm.efi");
type = "kernel_noload";
arch = "arm";
os = "efi";
compression = "none";
load = <0x0>;
entry = <0x0>;
hash-1 {
algo = "sha256";
};
};
};
configurations {
default = "config-grub";
config-grub {
kernel = "efi-grub";
signature-1 {
algo = "sha256,rsa2048";
sign-images = "kernel";
};
};
};
};
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Of all warning status codes up to now only EFI_WARN_DELETE_FAILURE is
defined.
The patch adds the missing definitions for later usage.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Add guidcpy function to copy the source guid to the destination
guid. Use this function instead of memcpy for copying to the
destination guid.
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Use void * instead of efi_guid_t * for arguments to allow copying unaligned
GUIDs. The GUIDs of configuration tables are __packed.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Add a comment indicating that the value of GPT_HEADER_SIGNATURE_UBOOT
equals the ASCII string 'EFI PART'.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Use a pointer to addressable memory instead of a "physical" address in the
virtual address space of the sandbox to efi_install_fdt().
Export the efi_install_fdt() function.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
As part of moving the parsing of command line arguments to do_bootefi()
call efi_install_fdt() with the address of the device tree instead of a
string.
If the address is EFI_FDT_USE_INTERNAL (= 0), the internal device tree
is used.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
The index (IMAGE_DIRECTORY_ENTRY_SECURITY) in a table points to
a region containing authentication information (image's signature)
in PE format.
WIN_CERTIFICATE structure defines an embedded signature format.
Those definitions will be used in my UEFI secure boot patch.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
There is black magic in the file conftest.py that list
all the test unit. Then, all those test unit are called
in pytest. This call is done with the end of the name
(for example checksum if the full name is bloblist_test_checksum).
The result is that only test for dm are really executed.
by pytest, all others tests are listed but never executed.
This behaviour happens because the dm test unit only check
the end of the name and others tests checks the full name.
To fix this issue, I've added a prefix to the function
cmd_ut_category, and this prefix is removed when looking
for the unit test.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>