Commit Graph

63594 Commits

Author SHA1 Message Date
Madalin Bucur
00160cf32e armv8/ls1043ardb: RGMII ports require internal delay
The correct setting for the RGMII ports on LS1043ARDB is to
enable delay on both Rx and Tx so the interface mode used must
be PHY_INTERFACE_MODE_RGMII_ID. There is a pull-up that turns
on Rx internal delay by default and the u-boot does not
override that (yet) so in u-boot the interface is functional.
In Linux the PHY driver is clearing the Rx delay for the
"rgmii-txid" mode and the reception does not work.
Changing the RGMII mode to internal delay here ensures that
device tree fix-ups for the PHY connection type turn on both
Tx and Rx internal delay in Linux.

Fixes: 5a78a472f6 ("armv8/ls1043a: RGMII PHY requires internal
	delay on Tx")
Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:52 +05:30
Madalin Bucur
e219d7d0f1 net: fman: add support for all RGMII delay modes
The RGMII modes that include internal delay were not all
properly treated in the memac code. Add support for all
RGMII delay modes.

Fixes: 111fd19e3b ("fm/mEMAC: add mEMAC frame work")
Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:52 +05:30
Meenakshi Aggarwal
c5076a021e lx2160a: Add dhcp in boot_targets
Add dhcp in supported boot_targets for lx2160.

Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:52 +05:30
Yuantian Tang
81d9e55097 armv8: ls1028a: add dhcp boot target device
Add DHCP boot target device to enable command bootcmd_dhcp.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:52 +05:30
Yuantian Tang
c40ebf7e43 board: ls1028ardb: add BOARD_LATE_INIT config
Select BOARD_LATE_INIT config so that many board works can be done
in late init stage.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:52 +05:30
Meenakshi Aggarwal
224899d273 lx2160a : Remove default VID setting
Set VID to 800 mV for Rev1 and set VID as per switch settings
for Rev2.

Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:52 +05:30
Priyanka Singh
160e2b88df armv8: ls1028a: Update secure boot headers offset
Update the secure boot headers offsets of Kernel and other
    firmware images for SD and XSPI boot sources used by
    esbc_validate command.

Signed-off-by: Priyanka Singh <priyanka.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:52 +05:30
Meenakshi Aggarwal
b7e7a46e10 lx2160a : Add emmc in boot_targets environment variable
Add emmc in supported boot_targets and
Add bootcmd environment variable for emmc boot.

Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:52 +05:30
Yuantian Tang
e9d9c2e573 arm64: ls1046a: remove fdt_high environment variable
Setting fdt_high and initrd_high to 0xffffffffffffffff leads to
various difficulty to resolve bugs.
Remove them and use bootm_size instead to safely contain a kernel,
device tree and initrd for relocation.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:52 +05:30
Yuantian Tang
395b52127a arm64: ls1028a: remove fdt_high environment variable
Setting fdt_high and initrd_high to 0xffffffffffffffff leads to
various difficulty to resolve bugs.
Remove them and use bootm_size instead to safely contain a kernel,
device tree and initrd for relocation.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:51 +05:30
Wasim Khan
8cf113f473 board: fsl: lx2160a: Add GIC LPI memory reserve fixup
Reserve DDR memory region used for GIC LPI configuration table.

Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:51 +05:30
Wasim Khan
e07f30f681 configs: lx2160a: Enable GIC_V3_ITS config
Enable GIC_V3_ITS config to program GIC LPI
configuration table.

Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:51 +05:30
Wasim Khan
a4625d494b board: fsl: lx2160a: Program GIC LPI configuration table
Program GIC LPI configuration table:

1. Redistributor PROCBASER configuration table (which
is common for all redistributors)

2. Redistributor pending table (PENDBASER), for all the
available redistributors.

Signed-off-by: Manish Tomar <manish.tomar@nxp.com>
Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:51 +05:30
Vikas Singh
297d48857a board: lx2160a: Correct board fixup for PCIe nodes
Update "board_fix_fdt" with correct counter value "i".
This will fix the issue while fetching the "reg_names"
resource from fdt after fixup.

Signed-off-by: Vikas Singh <vikas.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:51 +05:30
Alison Wang
c463eeb4b6 ls1021a: Set CONFIG_SYS_BOOTMAPSZ to the memory for relocation
This patch sets CONFIG_SYS_BOOTMAPSZ to the amount of memory available
to safely contain a kernel, device tree and initrd for relocation. The
way to set fdt_high as 0xffffffff to disable device tree relocation is
removed.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-03-30 08:06:51 +05:30
Tom Rini
350c44dfb9 Merge branch '2020-03-27-master-imports'
- Update a few MAINTAINERS entries
- cache alignment fix in ext4 code
- Two small test fixes
2020-03-27 17:54:38 -04:00
Heinrich Schuchardt
6cc8e545b7 test: typo decompression
%s/decopmression/decompression/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-03-27 15:42:04 -04:00
Marek Behún
3e29bd268d MAINTAINERS: add myself as maintainer of fs/btrfs
Signed-off-by: Marek Behún <marek.behun@nic.cz>
2020-03-27 15:42:04 -04:00
Jan Kiszka
7b83060b1e fs: ext4: Fix alignment of cache buffers
We need to align the cache buffer to ARCH_DMA_MINALIGN in order to avoid
access errors like

CACHE: Misaligned operation at range [be0231e0, be0235e0]

seen on the MCIMX7SABRE.

Fixes: d5aee659f2 ("fs: ext4: cache extent data")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
2020-03-27 15:42:04 -04:00
Marek Vasut
cb11eed23d MAINTAINERS: Add usb.h entry to usb
Add usb.h file into the USB list.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
2020-03-27 15:42:04 -04:00
Harald Seiler
6748a1f2a3 test/py: mmc: Fix 'mmc info' testcase
Commit 41e30dcf87 ("cmd: mmc: Make Mode: printout consistent") fixed
the layout of `mmc info` output.  Reflect this change in the respective
testcase.

Also fix a typo in the documentation.

Fixes: 41e30dcf87 ("cmd: mmc: Make Mode: printout consistent")
Signed-off-by: Harald Seiler <hws@denx.de>
Acked-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-03-27 15:42:04 -04:00
Tom Rini
39984d2213 Revert "vexpress_ca9x4: Enable use of correct DTB file and restore EFI loader."
Currently this causes failures of the platform when running the EFI
loader tests, so disable it for now.

This reverts commit af827140e5.

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-03-27 11:47:04 -04:00
Tom Rini
fa041198a8 Merge tag 'u-boot-rockchip-20200327' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip
- Fixed for rv1108 and elgin-rv1108 board
- Fix the keyboard from USB instead of CrOS EC
2020-03-26 21:39:59 -04:00
Miquel Raynal
e5a405583f rockchip: mkimage: Use an existing macro instead of a decimal value
Depending on the SoC, a header of four characters is prepended to the
image. There is already a macro defining the number of characters:
RK_SPL_HDR_SIZE, so use it instead of hardcoding "4".

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-03-26 22:58:46 +08:00
Otavio Salvador
99f946976e rv1108: Fix boot regression
Since commit 79030a4861 ("rockchip: Add Single boot image
(with binman, pad_cat)") the following boot regression is seen:

U-Boot 2020.04-rc3-00050-gd16e18ca6c-dirty (Mar 09 2020 - 11:40:07 -0300)

Model: Elgin RV1108 R1 board
DRAM:  128 MiB
initcall sequence 67fd12a0 failed at call 6000b927 (err=-22)

This happens because the above commit missed to include the
"rockchip-u-boot.dtsi" for rv1108, so include this file
like it done for other Rockchip SoC dtsi's.

Fixes: 79030a4861 ("rockchip: Add Single boot image (with binman, pad_cat)")
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-03-26 22:58:46 +08:00
Otavio Salvador
2dcbeb3568 elgin-rv1108: Avoid adc_channel_single_shot error
Currently the following error message is seen during boot:

U-Boot 2020.01-08751-g55759ae141 (Mar 09 2020 - 14:44:52 -0300)

Model: Elgin RV1108 R1 board
DRAM:  128 MiB
APLL: 600000000 DPLL:1200000000 GPLL:1188000000
ACLK_BUS: 148500000 ACLK_PERI:148500000 HCLK_PERI:148500000 PCLK_PERI:74250000
MMC:   dwmmc@30110000: 0
Loading Environment from MMC... OK
In:    serial@10210000
Out:   serial@10210000
Err:   serial@10210000
Model: Elgin RV1108 R1 board
rockchip_dnl_key_pressed: adc_channel_single_shot fail!
....

Since the elgin-rv1108 does not use ADC to read the download
key status, select CONFIG_ROCKCHIP_BOOT_MODE_REG=0 to avoid
such error.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-03-26 22:58:46 +08:00
Otavio Salvador
1ac0d52a9b elgin-rv1108: Use rk_board_late_init() for GPIO settings
Since commit 8e9a8d0d0c ("rockchip: elgin-rv1108: use board_early_init_f
for per-boar init") the function that configure the board GPIOs is no
longer called since CONFIG_BOARD_EARLY_INIT_F=y is not selected.

These GPIOs do not need to be configured in such early stagem, so change it
to rk_board_late_init() and also select CONFIG_BOARD_LATE_INIT=y
to fix the regression.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-03-26 22:58:46 +08:00
Otavio Salvador
af84b3327a ARM: dts: Activate pullups in the console pins on rv1108-elgin-r1
In order to make the console pins more robust to noise, activate
the pullups and increase its drive strength.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-03-26 22:58:46 +08:00
Peter Robinson
23cb61761b rockchip: Change keyboard input from CrOS EC keyboard to a USB keyboard
These boards aren't ChromeOS devices so won't have a cros-ec-keyb
input as it's the keyboard available via the ChromeOS Embedded
Controller. Update them to use a USB keyboard which would actually
be available. Also enable the usb keyboard option for those devices
that don't have it enabled already.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-03-26 22:58:46 +08:00
Kever Yang
9cec336708 rockchip: evb-rv1108: Use syscon API to get grf base
Use syscon API to get grf base instead of get from dts.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-03-26 22:58:46 +08:00
Kever Yang
4aa33690fc rockchip: elgin-rv1108: Use syscon API to get grf base
Use syscon API to get grf base instead of get from dts.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
2020-03-26 22:58:46 +08:00
Kristian Amlie
af827140e5 vexpress_ca9x4: Enable use of correct DTB file and restore EFI loader.
EFI was disabled in f95b8a4b5f because of the missing DTB file,
and indeed, the DTB file is required to load recent versions of GRUB
(2.04) correctly.

Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
2020-03-23 16:11:46 -04:00
Tom Rini
0aadc0786e Pull request for UEFI sub-system for efi-2020-04-rc4 (5)
This series contains bug fixes for the UEFI sub-system:
 
 * report correct variable length in GetNextVariable()
 * correct copying direction if freestanding memmove()
 * remove const for parameter of GetNextVariableName()
 * correct function descriptions
 
 Unit tests are added and adjusted.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAl54VuoACgkQxIHbvCwF
 GsR1RA//bddiizl6PPaqJqykM4I6yEEv/V0skc/tPcPlpYBH5369Rda/mrIfTWfV
 FMlO0Z2qFQrKwD6qog+6/YMImSzUTH220A8yI/TItDdPODvEDRkhjQBEhBjz7FYe
 nNxrhl9A1r8IGfUztlv2mhxmIVvXEtq4cQvNOlO3bkkKue69A9E/tqCQCrSdido5
 rNIbrXSwo9LK++/U9sk9e/zTvZLW/LvwuFogiGJGhYuRi7JDMzI3OzEqfiCIgyPj
 l35xhvBxWDyZEaUKkY92lLqDuO0dMmUORW3GfLHcSqF/agTMm1i4oBn76uroHBcD
 Vb4Getu7kaBEPCreSZHdtuuUULAT5PC/iogDYS1cQE1uggpzrweC9OZUVQS/2O7I
 KeHgEdMUkLxmuXpUDGvQqoz7j73es3yM6DUUPDIRx3klNZrBOQ367ExGh9jHeS+8
 8R+iMmOcdVuwvwX0kMrZ6TwrmUtT02HFPUa7GczXT/SR06LOjKfnJnb1sswScloZ
 f7dZ1uTPLVkNhVmm3/o0qzMBaXCgu5QrDivWOqOqfYOTTPJFalVwNa4ybzB/cM5o
 4toy1SRMml1PDH3lOzDOveN0R5l46+zeRFeyemtbqDePat9z64KKAk2HM0k+d2qf
 4jP9KErghJiLzftrLtJqWqWQZlGCbEuR1SQt8O3cu6DIsUXbpLI=
 =+Nkf
 -----END PGP SIGNATURE-----

Merge tag 'efi-2020-04-rc4-5' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-04-rc4 (5)

This series contains bug fixes for the UEFI sub-system:

* report correct variable length in GetNextVariable()
* correct copying direction if freestanding memmove()
* remove const for parameter of GetNextVariableName()
* correct function descriptions

Unit tests are added and adjusted.
2020-03-23 10:14:31 -04:00
Heinrich Schuchardt
7a4e717b9c efi_loader: definition of GetNextVariableName()
'vendor' is both an input and an output parameter. So it cannot be
constant.

Fixes: 0bda81bfdc ("efi_loader: use const efi_guid_t * for variable services")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-03-22 18:38:02 +01:00
Heinrich Schuchardt
cde162e766 efi_selftest: test CalculateCrc32, CopyMem, SetMem
Provide unit tests for CalculateCrc32(), CopyMem(), SetMem().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-03-22 11:06:23 +01:00
Heinrich Schuchardt
72291a9d83 efi_loader: fix freestanding memmove()
For EFI binaries we have to provide an implementation of memmove() in
efi_freestanding.c.

Before this patch the memmove() function was copying in the wrong
direction.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-03-22 11:06:23 +01:00
Heinrich Schuchardt
7aeceffb25 efi_loader: description efi_convert_pointer()
Correct the description of function efi_convert_pointer().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-03-22 11:06:23 +01:00
Heinrich Schuchardt
9f888969fd efi_loader: simplify logical expression in efi_disk_add_dev()
To check if a variable is non-zero there is no need for '!= 0'.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-03-22 11:06:23 +01:00
Heinrich Schuchardt
e1089765b5 efi_selftest: check length reported by GetNextVariableName()
GetNextVariableName should report the length of the variable including the
final 0x0000 in bytes.

Check this in the unit test.

Increase the buffer size for variable names. 40 bytes is too short.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-03-22 11:06:23 +01:00
Heinrich Schuchardt
4d7f5af841 efi_loader: correct reported length in GetNextVariable()
The runtime service GetNextVariable() returns the length of the next
variable including the closing 0x0000. This length should be in bytes.

Comparing the output of EDK2 and U-Boot shows that this is currently not
correctly implemented:

EDK2:
OsIndicationsSupported: 46
PlatformLang: 26
PlatformLangCodes: 36

U-Boot:
OsIndicationsSupported: 23
PlatformLang: 13
PlatformLangCodes: 18

Provide correct length in GetNextVariable().

Fixes: d99a87f84b ("efi_loader: implement GetNextVariableName()")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-03-22 11:06:23 +01:00
Heinrich Schuchardt
47a9596354 efi_loader: fix function descriptions in efi_disk.c
Use Sphinx style for function descriptions.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-03-22 11:06:23 +01:00
Heinrich Schuchardt
f0b0f7fe0e efi_loader: description of efi_variable.c
Correct the file description.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-03-22 11:06:23 +01:00
Tom Rini
14eb12a3c8 Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi
- Revert "sunxi: psci: avoid error address-of-packed-member"
2020-03-18 07:48:53 -04:00
Tom Rini
40e82bb97c Pull request for UEFI sub-system for efi-2020-04-rc4 (4)
This series fixes several bugs:
 
 * consider the /reserved-memory node in the device tree
 * consider memory reservations created in ft_board_setup()
 * correct output of 'efidebug memmap' on the sandbox
 * correct the definition of efi_capsule_header()
 
 Furthermore some definitions needed for future patches are added to
 header files.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAl5x6bIACgkQxIHbvCwF
 GsSTYQ//fyixmgA7x6uD3222BAq000Y5bQ2jkt5Pd4dlg4Nv3FdNvElfSTOt9whT
 CCAGKMKafB7jkqXRohlPAmO4JG9bZmpJD26Wd1J+XWwax5q5ngFYFbWYZyymb4OQ
 xD8pxHkwwrF6D0VrVCbk3CMn+7sGIaGxm+0zZXDPQ1ZS2zbEkJlWGn6dGXy00yJY
 DWc+9P4e+bPGCKLU2xzADpY9seCg52OQ+C66aCj/f2qeMhOykgWG1B/GhvryljMl
 rbueOClQEbPdB6mAm7xyvOEDQ1K5Iy1JNf/4v5kL07jDiO/7rWP6ptXflaPIJP9y
 qhQ7Ozige/VpTUHauv9BE2oREPaSArJNhetyV4tWcNtS2+9vk+JLHoGWNK/8LtrE
 fTwL8tUyvTDA2YPQKy0TTJ0swLV3Y+Iwv7n51SxbAR7uMeRT9acs9ljciQtF5CQh
 S3i5ZN5+45utS6Gv8kVAwYsbFAs1CIuRAVleCu9OcnfWj61X5gvtkgNlbG5P1gGS
 WHsteTxB4gCQIyS+n0H9MhJFLzYFvj0WQWmJGULmEqgnWO06+gUsTLli9yt/ytoS
 a03VLMx/EZn2W48366OgH/dqrzVFT17IyrAehz08Uu7mk127OGggSJm5j2JRHqUf
 aBDn8K8+rf0zdaFtLDh8DagPX2fV97cPvmMQ/x2r+Ahqoc2rWhI=
 =zB6g
 -----END PGP SIGNATURE-----

Merge tag 'efi-2020-04-rc4-4' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-04-rc4 (4)

This series fixes several bugs:

* consider the /reserved-memory node in the device tree
* consider memory reservations created in ft_board_setup()
* correct output of 'efidebug memmap' on the sandbox
* correct the definition of efi_capsule_header()

Furthermore some definitions needed for future patches are added to
header files.
2020-03-18 07:48:39 -04:00
Tom Rini
78176d408b Merge https://gitlab.denx.de/u-boot/custodians/u-boot-riscv
- Fix sbi_remote_sfence_vma{,_asid}.
- Avoid calling sbi_clear_ipi().
- Add new SBI v0.2 extensions support.
2020-03-18 07:48:11 -04:00
Tomasz Duszynski
3586cb8227 Revert "sunxi: psci: avoid error address-of-packed-member"
Using memcpy() for some MMIO access is generally frowned upon and might
break things on some platforms. Allwinner H3, which fails to boot, being
an example here.

Moreover, fields being accessed are naturally aligned and warnings
produced by GCC have been quiesced for some time already by:

53dc8ae ("gcc-9: silence 'address-of-packed-member' warning")

That said, it should be okay to revert this commit.

This reverts commit 9bd34a69a4.

Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tomasz Duszynski <tduszyns@gmail.com>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
2020-03-18 15:37:08 +05:30
AKASHI Takahiro
74b4487535 efi_loader: correct a definition of struct efi_capsule_header
See UEFI specification, section 8.5.3.
In addition, the structure, efi_capsule_header, should be "packed"
as it is a serialized binary format in a capsule file.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2020-03-17 08:29:52 +01:00
AKASHI Takahiro
b51ec63978 efi_loader: export a couple of protocol related functions
This is a preparatory patch.
Those functions will be used in an implementation of UEFI firmware
management protocol as part of my capsule update patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2020-03-17 08:29:52 +01:00
AKASHI Takahiro
b74d568d83 efi_loader: define System Resource Table macros
Some of those values will be used in an implementation of UEFI firmware
management protocol as part of my capsule update patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2020-03-17 08:29:52 +01:00
AKASHI Takahiro
7cceef7bde efi_loader: define OsIndicationsSupported flags
These flags are expected to be set in OsIndicationsSupported variable
if corresponding features are supported. See UEFI specification,
section 8.5.4.

In particular, capsule-related flags will be used in my capsule
update patch.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>

Fix misspelled EFI_OS_INDICATIONS_BOOT_TO_FW_UI.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-03-17 08:29:52 +01:00