Commit graph

67917 commits

Author SHA1 Message Date
Tom Rini
b01ba776c9 Pull request for UEFI sub-system for efi-2020-10-rc5
The following bugs are fixed:
 
 * unaligned access in br_i32_decode()
 * missing restore of global data pointer in UEFI selftest
 * missing restore of global data pointer on RISC-V in UEfI subsystem
 * efi_var_mem_notify_exit_boot_services() should not be __efi_runtime
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAl9f4MgACgkQxIHbvCwF
 GsSVcQ/9HmXBg+0SEJpbDB5s8SOP0zUQ6K3IRu+FyVhcGuowo5Zh2Y4vUN+8cTFZ
 WLsuu5JJd+HIMRKD6iRYcx2KsbhUZgFhv6l93uKoQF2jettM2T+OPHFriqas1Vd4
 F93bZXda2jnYxrPA3PgB4BqGUoiYk3OiE2esUSYSIdawoF8FXBKP7O3OTUBxYyxu
 B/OCzjQ+k1lwHg+lKky3+MIShMIC9p46UB+vR67ICmHwHxbKTsqjy/4b3eRwdhjY
 uFIC9xkiUJ5VmMiPu6nous3wlgojfCBRBPhFobFG3SwPNMh63Ht82NFH1eGvO8G2
 6xw9Ug5/2DshJi2asAPy/adYX665bkm/58PeKauSimF/ePSxQY33AsUc0olS5dTt
 mxNdkeU8zrl49XQYfNE/m29p0jdAoXgEo49uDnZO2vLobMYXVWzoEy8y9VaUQObn
 ayxk+z295nNIzYJw65Nxhrkr2i8h3CZQMBNAI+UWNVCiU0fBqIF9L8ka0L7xB2Zz
 8OtErGRjX1KR5VQWmhWHf5vQWhI+B3seAkx6KGGWABujoffTPZtRK7viUzE328Hc
 HZ2YiFARcVr//z5dBIbeHukXyLwT2nPKfrvUJnP91b40LCaeloCRlwJ21JzOIz8P
 kkUd0oT45a/ApZXpV/ZOnhSg9Wh2g2TgmwFwazwCL9xA2c1L+QA=
 =BNos
 -----END PGP SIGNATURE-----

Merge tag 'efi-2020-10-rc5' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-10-rc5

The following bugs are fixed:

* unaligned access in br_i32_decode()
* missing restore of global data pointer in UEFI selftest
* missing restore of global data pointer on RISC-V in UEfI subsystem
* efi_var_mem_notify_exit_boot_services() should not be __efi_runtime
2020-09-16 08:08:06 -04:00
Tom Rini
0487bb5ecd Merge tag 'u-boot-rockchip-20200916' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip
- Fix rv1108 grf access issue
- make_fit_atf: ignore empty PT_LOAD segment
2020-09-16 08:07:49 -04:00
Heinrich Schuchardt
5b861eea79 rockchip: make_fit_atf: ignore empty PT_LOAD segment
The linker sometimes creates PT_LOAD segments with length (p_filesz) zero
as described in https://man7.org/linux/man-pages/man5/elf.5.html. This
leads to build failures. We should ignore empty segments.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-09-16 16:41:30 +08:00
Kever Yang
454b792afe rockchip: rv1108: enable board early init
Enable board early init callback to init board specific hardware.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2020-09-16 16:32:01 +08:00
Kever Yang
fe4931c09a rockchip: rv1108: Enable grf as pre-reloc node
The grf node will be used before relocate, enable it in dts.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2020-09-16 16:31:18 +08:00
Kever Yang
f11f138ebf rockchip: rv1108: use correct API for board callback
Use board_early_init_f() instead of mach_cpu_init() for board, the
board_early_init_f() is used for board init and after dm_initf, while
the mach_cpu_init() is used for CPU/SOC and before dm_initf()(not able
to use syscon API).

Fixes: 9cec336708 ("rockchip: evb-rv1108: Use syscon API to get grf base")
Fixes: 4aa33690fc {"rockchip: elgin-rv1108: Use syscon API to get grf base")

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2020-09-16 16:31:17 +08:00
Tom Rini
4dcced1169 Merge tag 'mmc-2020-9-15' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
- Use mmc_of_parse for msm_sdhci
- Add missing common host caps for xenon_sdhci.
2020-09-15 08:59:32 -04:00
Marek Vasut
0e12575645 Azure/GitLab/Travis: Add SH4 r2dplus machine with various PCI ethernet options
Add SH4 R2Dplus machine configured to test various U-Boot PCI ethernet
options -- RTL8139, EEPRO100, AMD PCnet, DEC Tulip.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-09-15 08:59:06 -04:00
Andre Heider
e79c59c0e2 mmc: xenon_sdhci: Add missing common host capabilities
Use mmc_of_parse() to set the common host properties. That includes
"bus-width", so parsing it can be removed from the driver.

But more importantly, "non-removable" is now respected, which fixes
the usage of eMMC.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Reviewed-by: Konstantin Porotchkin <kostap@marvell.com>
Tested-by: Marek Behún <marek.behun@nic.cz>
2020-09-15 10:15:56 +08:00
Manivannan Sadhasivam
8505147403 mmc: msm_sdhci: Use mmc_of_parse for setting host_caps
Since the introduction of 'get_cd' callback in sdhci core,
dragonboard410c's MMC interface is broken. It turns out that 'get_cd'
callback checks for the host_caps for validating the chip select. And
since the msm_sdhci driver is not parsing the host_caps from DT, not
all of the cababilities are parsed properly. This results in the MMC
interfaces to be broken.

Hence, fix this by adding a call to 'mmc_of_parse' during driver probe.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Tested-by: Aníbal Limón <anibal.limon@linaro.org>
Reviewed-By: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2020-09-15 10:13:37 +08:00
Heinrich Schuchardt
5bf12a7859 efi_selftest: restore gd before do_reset()
Before calling do_reset() in the EFI selftest we must restore the global
data pointer.

Fixes: fa63753f86 ("efi_selftest: substitute ResetSystem() by do_reset()")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-14 23:28:52 +02:00
Heinrich Schuchardt
d68d7f47a9 efi_loader: save global data pointer on RISC-V
On RISC-V the global data pointer is stored in register gp. When a UEFI
binary calls the EFI API we have to restore it.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-14 23:28:52 +02:00
Heinrich Schuchardt
6b9966e1aa riscv: define function set_gd()
Function set_gd() is needed in the UEFI sub-system if the global data
pointer is stored in a register.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-14 23:28:52 +02:00
Heinrich Schuchardt
e5a31376ac efi_loader: efi_var_mem_notify_exit_boot_services
efi_var_mem_notify_exit_boot_services() is invoked when ExitBootServices()
is called by the UEFI payload.

efi_var_mem_notify_exit_boot_services() should not be defined as
__efi_runtime as it is invoking EFI_ENTRY() and EFI_EXIT() which themselves
are not __efi_runtime.

Fixes: f1f990a8c9 ("efi_loader: memory buffer for variables")
Fixes: e01aed47d6 ("efi_loader: Enable run-time variable support for tee based variables")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2020-09-14 23:28:52 +02:00
Robert Reither
8479333ce7 rsa: crash in br_i32_decode() called from rsa_gen_key_prop()
Fixes problem for unaligned 32bit big-endian access in
lib/rsa/rsa-keyprop.c.

Exchanges br_i32_decode() with get_unaligned_be32().

This will keep the unaligned access for architectures capable and will do
some byte-shift magic for the not so capable ones.

Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-by: Robert Reither <robert.reither@external.thalesgroup.com>
Remove unused include.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-14 23:28:52 +02:00
Tom Rini
00e5fda006 Merge branch '2020-09-12-assorted-bugfixes'
- A large assortment of minor fixes
- Documentation improvements
2020-09-14 15:39:46 -04:00
Heinrich Schuchardt
185440ffc4 test: do no assume hush parser in validate_empty()
The environment variable test uses function validate_empty() to check that
a variable is not defined. If the hush parser is not enabled, we cannot
refer to a variable by $var_name but only by ${var_name}.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Stephen Warren <swarren@nvidia.com>
2020-09-12 10:53:01 -04:00
Heinrich Schuchardt
9a97314b5b Makefile: mrproper shall delete doc/output/
HTML documentation is generated in doc/output/. This directory shall be
deleted by 'make mrproper'

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-09-12 10:53:01 -04:00
Heinrich Schuchardt
70e38eea3a doc: describe building with GCC
Provide a description of the U-Boot build process with GCC in the HTML
documentation.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-12 10:53:01 -04:00
Heinrich Schuchardt
2974ba4f65 doc: describe source repository
Add a chapter to the HTML documentation describing how to retrieve the
U-Boot sources.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-12 10:53:01 -04:00
Mingming Lee
75fb7b9163 ARM: MediaTek: amend IC description for MediaTek MT8512
The description for MT8512  has some mistake, so correct it.

Signed-off-by: Mingming Lee <Mingming.Lee@mediatek.com>
2020-09-12 10:53:01 -04:00
Reuben Dowle
eb39d8ba5f Fix data abort caused by mis-aligning FIT data
Attempting to place device tree immediately after an image in memory can lead
to mis-aligned data accesses if that image size is not divisible by the
alignment requirements of the architecture.

Data aborts caused by this were observed on a custom Marvel A388 based system,
where the image was a uboot FIT file. The total size varies depending on the
uboot device tree size, which does not always lead to correct alignment.

The minimum alignment specified for ARM [1] and ARM64 [2] linux booting has been
used

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm/booting.rst#n126
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm64/booting.rst#n45

Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
2020-09-11 17:13:56 -04:00
T Karthik Reddy
1e2c5bb9e7 mtd: nand: Fix nand write error with bad block addresses above 32-bit
Nand writes should skip the bad blocks with "nand write" command.
In case of bad blocks with above 32-bit address, nand_block_isbad()
returns false due to truncated bad block address.

In below code segment,

	if (nand_block_isbad(mtd, offset & ~(mtd->erasesize - 1)))

offset is 64-bit and mtd->erasesize is 32-bit, hence the truncation is
happening. Cast 'mtd->erasesize' with loff_t to fix this issue.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-09-11 17:13:56 -04:00
Pedro Aguilar
142775a52b env: Crash in 'env import' when using checksum and a specific size
This patch adds a sanity check that avoids 'size' to overflow and crash when
importing an environment that contains a checksum. Example with the wrong size
that causes the crash:

=> env import -c 0x4100000 3 v1

This assumes that v1 has already been successfully exported with
'env export -c -s 0x100 0x4100000 v1'

Signed-off-by: Pedro Aguilar <pedro.aguilar@vimar.com>
2020-09-11 17:13:56 -04:00
Heinrich Schuchardt
21d3946840 bootm: update image OS image size when decompressing
In bootm_load_os() the OS image is decompressed. In later stages of the
boot process we need the decompressed size of the image.

Update images->os.image_len after decompression.

Passing the correct size is necessary if we want to check loaded EFI
binararies for file truncation by comparing the loaded size to the header
field SizeOfImage.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-09-11 17:13:56 -04:00
Michal Simek
91b735d11f common: Kconfig: Add dependency for default variables strings
Kconfig provides several config options for setting up default variables
but these are unused when variables are passed to U-Boot via file.
That's why cover this dependency in Kconfig.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-09-11 17:13:55 -04:00
Chuanjia Liu
9250d0bad5 PCI: mediatek: Release the resource when PCIe enable port fail
On the mt7623 platform, if one port enable fail and other port
enable succeed. It will hang on when using pci enum
because the resource was not released correctly.

Signed-off-by: Chuanjia Liu <Chuanjia.Liu@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
2020-09-10 15:32:09 -04:00
Tom Rini
3dd52dd69e - enables HDMI output & USB keyboard for Odroid-N2
- setups HDMI output background & enables USB keyboard
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAl9Z6a0ACgkQd9zb2sjI
 SdGoog//UfuvCnlrZIhKIcRCxKvulZW8ljGGBfskrOCU3R8uTx5ksRQZzF9jPkrE
 BRXLMSZ3X+jHrLXCNehxyxlROsp5bxPdZ4uVydwNU6q3lPWxzoD15tg4F923xBF5
 3dV2NukA7mNM0IKHBijDabnUGmOUxVJtR1S5ykEzwSLE2lIUivvn2CjxdHJ91FQM
 /666fKdY3RHn+IzqRqcl2+JuR2IccN13IIhfistJF5o9PsW2n2fUq8NQW8CdvTur
 Ap5HsRcJLsqOdM/tkUanIA21OBODL7rxduYejpCFyJyWQYFBi2X6Eqj5NuLJKT/2
 oymEuvw/BnS62SK1AuAtGJmF0K/QRy+ayb3WIligi7+aq8jNdlWdm9AQhT4HsOk+
 DU7kz/+9XmSkVhPBt5YztizXLGloflQRPzgOmCH1FAGmfVG/z/71YmodVXocy9RE
 NYFQ2Jczb8jhdsectCPBi40+6oQln2hfQG1OQwNZPXvC675HYdvBGSKVX5oF4WSa
 5E5LvTj77Bp0YmGesUlcSnwMIjR20NaAsCQjBvTTON5/KbETCAcIZePLLtIWFANj
 b1xCbYGPpDkzdSh7SmPQDfdv0sfaHLANYaKEGmVTQp/2p6halkR2uwSVhx46zy5Z
 JE/ts6Tw62RESMoUo9oXWXfBL0ZWuv5sRMDEbpRcjbyhIvSkl2Q=
 =0ijp
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-amlogic-20200910' of https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic

- enables HDMI output & USB keyboard for Odroid-N2
- setups HDMI output background & enables USB keyboard
2020-09-10 09:04:02 -04:00
Anand Moon
92f10e6135 configs: odroid-c4: update for HDMI output background & USB keyboard
Enable options SYS_WHITE_ON_BLACK to permit HDMI background
screen from white to back, also enable USB_KEYBOARD.

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-09-10 10:51:36 +02:00
Anand Moon
3b3c048697 configs: odroid-n2: update for HDMI output & USB keyboard
Enable options to permit HDMI output on Odroid-N2 G12B boards.
Enable VPU Power Domain.
Enable USB_KEYBOARD.

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-09-10 10:51:36 +02:00
Tom Rini
a34746b86e - fixes on AV96 board: pull up on UART4 RX and adjust PLL4
-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEE56Yx6b9SnloYCWtD4rK92eCqk3UFAl9Y2ScACgkQ4rK92eCq
 k3WD1wf9FdSNzXaGSezIc1PNF9KnoSDsPD+K1ipw3hJbn5M+PkuTAoy3UcLmWedI
 mBSoU+l9qDJhK2ady2zXI2qrOglvIX6OcHnoEGtUqikCV+Il7A8CWtDkd0m2ajyI
 EixCAGw8GikrrYZITPMV1wfJJSROT4jHgfK5M92mETtSGff0X+3OjsaJiTzGk5jl
 CBPVtLIF4meqggMlOeB4FOQ4fywSZZPv0pvnwjiwIqm00tHG85qiWo9H+W18NuD6
 dXPii2xzUIeBkynKurC/dD8zmLQUX5nyydKnY16Hkpl0NQxwtWSHFOUouOEaXLK+
 xo+9cxHRv/aK+34CcIU2okv4R0Pu5w==
 =O+jw
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-stm32-20200909' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm

- fixes on AV96 board: pull up on UART4 RX and adjust PLL4
2020-09-09 12:59:02 -04:00
Marek Vasut
b6055945d6 ARM: dts: stm32: Adjust PLL4 settings on AV96 again
PLL4Q is supplying both FDCAN and LTDC. In case HDMI is in use, the
50 MHz generated from PLL4Q cannot be divided well enough to produce
accurate clock for HDMI pixel clock. Adjust it to generate 74.25 MHz
instead. The PLL4P/PLL4R are generating 99 MHz instead of 100 MHz,
which is in tolerance for the SDMMC.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Gerald Baeza <gerald.baeza@st.com>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
2020-09-09 15:02:23 +02:00
Marek Vasut
43e2d1dd47 ARM: dts: stm32: Pull UART4 RX high on AV96
There is no dedicated pull resistor on the AV96 UART4 (console UART)
pin. In case there is no UART adapter installed on the AV96, the line
is floating and can trigger reception of garbage characters, which in
turn can abort U-Boot autoboot. Add default pull up to mitigate this
problem.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
2020-09-09 15:01:53 +02:00
Patrick Delaunay
cf8df34015 arm: stm32mp: cleanup test on eth_env_set_enetaddr result
Remove the unnecessary inversion on the eth_env_set_enetaddr() result which
only make complex the code of setup_mac_address() and display an invalid
value in the associated pr_err.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Marek Vasut <marex@denx.de>
2020-09-09 14:19:12 +02:00
Tom Rini
a14b71d0c2 - fixes for bcmgenet
- enable USB keyboard for RPi4 32 bit
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEEUdvKHhzqrUYPB/u8L21+TfbCqH4FAl9Yi7gSHG1icnVnZ2Vy
 QHN1c2UuY29tAAoJEC9tfk32wqh+WLMP/3zqbD9xh0xenYqlgjaKfcWV+y3LydFS
 ZCWGaklRYIdJQdA8/CgIAA3/yeWDYadAUhWzlEyQBJ5s/eNIs6efi78ZyknSNWOC
 i2zKNsn1cEWngIrO5i3zAO6MoC0deai3hdOsqUidhB2eWd2SIq7pRZwjwoP4dbQH
 hOjN/IHSCZu+AYxp8hzSf/Y2fIbwoXcYodlqiu1HKPQkHCOW3GO0hd4rch8dTUOB
 elZCZqJdNvE8DFJAscK+b7oTg4QOzLXnKOO3YGuYK6/d9LDuOucUIaSv4Q1LwIZ9
 utzdGSOfdOLa5BqxbiR8caAuOWd15fAZMO/4AL0SC8JqsJuEpQq+uXvRH2yU7BAP
 GKMEyiENhH7mRi0O+7KLcRh3jkSQM2XRPujVUZ5HY4u2cTwpKxI/R517xgOoXma1
 hRreaYZLcf8r7voQWPJ2v68b1mk457Yf0FH8VigPppvONhz6YJePVh4qr7vS2Awc
 OCugE9flnFWNWvhzTfADCaX015tCjSYV0UM6+M3If5kd/G7w/UL4Mbm6MG5j38yY
 wdxren01bgoKxeZEL4fsPJE4InbMt27+p1LYruXtFOCX+VxNEGJnAX4fOwfFsTRQ
 Mc6Rf+gLge92Tk5sq21nBreGLAJRPA8z6lIwzUYONC06p0SFyFppWpHDWkmSjs0w
 YVND90qtoEWF
 =AG/D
 -----END PGP SIGNATURE-----

Merge tag 'rpi-next-2020.10.2' of https://gitlab.denx.de/u-boot/custodians/u-boot-raspberrypi

- fixes for bcmgenet
- enable USB keyboard for RPi4 32 bit
2020-09-09 08:17:53 -04:00
Matthias Brugger
40877a1a94 config: Enable USB Keyboard suuport on RPi4 32 bit
Supporting USB keyboards out of the box is both handy for development
and production. Notably if u-boot is used to boot into GRUB. This patch
adds USB keyboard support for 32 bit RPi4 config.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2020-09-08 16:45:01 +02:00
Jason Wessel
34873f46ba bcmgenet: Add support for rgmii-rxid
The commit 57805f2270 ("net: bcmgenet: Don't set ID_MODE_DIS when
not using RGMII") needed to be extended for the case of using the
rgmii-rxid.  The latest version of the Rasbperry Pi4 dtb files for the
5.4 now specify the rgmii-rxid.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Tested-by: Petr Tesarik <ptesarik@suse.com>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2020-09-08 16:43:48 +02:00
Jason Wessel
ac458dc823 bcmgenet: fix DMA buffer management
This commit fixes a serious issue occurring when several network
commands are run on a raspberry pi 4 board: for instance a "dhcp"
command and then one or several "tftp" commands. In this case,
packet recv callbacks were called several times on the same packets,
and send function was failing most of the time.

note: if the boot procedure is made of a single network
command, the issue is not visible.

The issue is related to management of the packet ring buffers
(producer / consumer) and DMA.
Each time a packet is received, the ethernet device stores it
in the buffer and increments an index called RDMA_PROD_INDEX.
Each time the driver outputs a received packet, it increments
another index called RDMA_CONS_INDEX.

Between each pair of network commands, as part of the driver
'start' function, previous code tried to reset both RDMA_CONS_INDEX
and RDMA_PROD_INDEX to 0. But RDMA_PROD_INDEX cannot be written from
driver side, thus its value was actually not updated, and only
RDMA_CONS_INDEX was reset to 0. This was resulting in a major
synchronization issue between the driver and the device. Most
visible behavior was that the driver seemed to receive again the
packets from the previous commands (e.g. DHCP response packets
"received" again when performing the first TFTP command).

This fix consists in setting RDMA_CONS_INDEX to the same
value as RDMA_PROD_INDEX, when resetting the driver.

The same kind of fix was needed on the TX side, and a few variables
had to be reset accordingly (c_index, tx_index, rx_index).

The rx_index and tx_index have only 256 entries so the bottom 8 bits
must be masked off.

Originated-by: Etienne Dublé <etienne.duble@imag.fr>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Tested-by: Petr Tesarik <ptesarik@suse.com>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2020-09-08 16:43:02 +02:00
Tom Rini
96d66a9b8c Prepare v2020.10-rc4
Signed-off-by: Tom Rini <trini@konsulko.com>
2020-09-07 14:17:33 -04:00
Tom Rini
a475ad7f9e configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-09-07 14:05:55 -04:00
Tom Rini
06193ca210 Pull request for UEFI sub-system for efi-2020-10-rc4
Bug fixes are provided in the following areas:
 
 * convert file system debug and print messages go log messages
 * convert UEFI booting messages to log messages
 * UEFI related code clean up and simplification
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAl9VNw4ACgkQxIHbvCwF
 GsS7yA/+LX1HwNao+m+JNylGN9zdhr9S964Y2HHTKeicDbN2ejSVvEgrnHble9wp
 WNmxu+2AQUapKgPU6QlNBulGvwBL+3GGtESENHcV5gg9tW1dvvVNFoPLtg+LTgL1
 0R35Gk5OHiWJb5pV1ogYuXwb8i8qca7EbZoP281jnY4+VTvkjrevR7fYOdKRhdAz
 b/KWX53wiIYi09BXO7ADIoN2aBBWvK4aQRvZOoiNJuaDGC7OxveCos54hOcQxWqE
 QSpYY6HbOD8G50qZCSb6puCxzqK0bsuswvHDpoofkyjQxeXf2Z7pUXkeBl0DxO8b
 QlUUP+XRSsvH0jMOCidFXiKlhM6356oYIWy/vXqnMkvCKOzdBEBQ5i1OnU2SSPMe
 zPc1Pc46G3yaYpoE+MvW2xSv6Zm6C0TV8kZIYQmd48IcbLL9fbU+v5HaJHi3yPEN
 UyX9Kt/eLwEgJbUXb95vpTGSeErt5OBdLhfDtw2Hr22vmeVKQ3Zgs6rnXM7+m0Kx
 xFDHAglm9NI8prZoxZ43S1ISLDpHDuhxJdieFt2C0f1He/aDLBcuPGtOQa2DXsJM
 J/08soX/YBPpREr0nsd4Komimq6tsL2EY4jue/3zbXByAWwH5chSt/nhm2LKd/31
 TPCcBOdzsCghcRT/K76VNzknE9b8dds56gJJBr/CyQ2CulXsB1A=
 =XqjX
 -----END PGP SIGNATURE-----

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

Pull request for UEFI sub-system for efi-2020-10-rc4

Bug fixes are provided in the following areas:

* convert file system debug and print messages go log messages
* convert UEFI booting messages to log messages
* UEFI related code clean up and simplification
2020-09-07 08:49:50 -04:00
Heinrich Schuchardt
d2a885720b efi_selftest: simplify Makefile
CONFIG_EFI_LOADER cannot be selected for ARMv7-M CPUs. So don't check it in
the Makefile.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-06 21:21:41 +02:00
Heinrich Schuchardt
578d7cc8fa efi_loader: remove duplicate image size check
The image size is checked in efi_load_pe(). Avoid checking it twice.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-06 21:21:41 +02:00
Heinrich Schuchardt
5b94e26f1a efi: clean up efi command
* Eliminate superfluous enum value EFI_TABLE_END.
* Use correct variable type for the memory type.
* Check validity of memory type.
* Make efi_build_mem_table static.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-06 21:21:41 +02:00
Heinrich Schuchardt
0f7878b853 efi_loader: error message if image not authenticated
Currently if the bootefi command fails due to missing authentication, the
user gets no feedback.

Write a log message 'Image not authenticated' if LoadImage() fails due to
missing authentication.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-06 21:21:41 +02:00
Heinrich Schuchardt
24586059d3 efi_loader: log function in image loader
Use log_err() for error messages.
Replace debug() by EFI_PRINT().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-06 21:21:41 +02:00
Heinrich Schuchardt
c2f010393b efi_loader: log messages for bootefi command
Write log messages when booting via the bootefi command to allow tracking
on the syslog server. Example messages are

    Booting /snp.efi

or

    Booting /MemoryMapped(0x0,0x4fe00000,0x35a40)
    Loading image failed

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-06 21:21:41 +02:00
Heinrich Schuchardt
0d32d8cf9d fs: convert error and debug messages to log
Use log functions for error and debug messages of the file-system.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-09-06 21:21:41 +02:00
Tom Rini
e5df264e7a Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
- Fix SATA issue on Armada 3720
- Enable more SPI NOR chips in espressobin defconfig
2020-09-04 10:09:14 -04:00
Konstantin Porotchkin
3e5420e99a defconfig: espressobin: Add support for ISSI SPI flashes
Enable support of ISSI SPI flashes found on EspressoBIN boards

Change-Id: I6de61c48f108fb4f410f321b9db45887d23212e5
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Reviewed-on: http://vgitil04.il.marvell.com:8080/61455
Tested-by: iSoC Platform CI <ykjenk@marvell.com>
Reviewed-by: Grzegorz Jaszczyk <jaz@semihalf.com>
Reviewed-by: Stefan Chulski <stefanc@marvell.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2020-09-04 14:02:00 +02:00