mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-08 22:12:49 +00:00
87b8f095af
With gcc10 the variables are placed more tightly to each other, which uncovers a long existing bug in the lantiq DMA code. It can be observed when using tftpboot with the filename parameter, which gets reset during the tftpboot execution. NetRxPackets[] points to cache line size aligned addresses. In ltq_eth_rx_packet_align() the address NetRxPackets[] points to is increased by LTQ_ETH_IP_ALIGN and the resulting not cache aligned address is used further on. While doing so, the length/size is never updated. The "not cache aligned address" + len/size for a cache aligned address is passed to invalidate_dcache_range(). Hence, invalidate_dcache_range() invalidates the next 32 bit as well, which flashes the BootFile variable as well. variable BootFile is at address: 0x83ffe12c NetRxPackets[] points to 0x83ffdb20 (len is 0x600) data points to: 0x83ffdb22 (len is 0x600) ltq_dma_dcache_inv: 0x83ffdb22 (for len 0x600) invalidate_dcache_range: 0x83ffdb20 to 0x83ffe120 (size: 32) invalidate_dcache_range: 0x83ffdb20 to 0x83ffdb40 (Bootfile: a.bin) ... invalidate_dcache_range: 0x83ffe100 to 0x83ffe120 (Bootfile: a.bin) invalidate_dcache_range: 0x83ffe120 to 0x83ffe140 (Bootfile: ) In ltq_dma_tx_map() and ltq_dma_rx_map() the start address passed to ltq_dma_dcache_wb_inv() is incorrect. By considering the offset, the start address passed to flush_dcache_range() is always aligned to 32, 64 or 128 bytes dependent on configured DMA burst size. Fixes: FS#4113 Signed-off-by: Mathias Kresin <dev@kresin.me> |
||
---|---|---|
.. | ||
100-portability.patch | ||
101-fix-crypt-header-clash.patch | ||
200-fix-dtc-header-guard.patch | ||
0001-sf-fix-out-of-order-calls-for-spi_claim_bus-and-spi_.patch | ||
0002-sf-consistently-use-debug-for-warning-error-messages.patch | ||
0003-sf-move-malloc-of-spi_flash-to-spi_flash_probe.patch | ||
0004-sf-add-slim-probe-funtions-for-SPL.patch | ||
0005-sf-make-calculatiom-of-address-bytes-completely-conf.patch | ||
0006-sf-add-support-for-4-byte-addressing.patch | ||
0007-sf-add-support-for-EN25QH256.patch | ||
0008-sf-fix-sector-layout-of-S25FL256S_256K-and-S25FL512S.patch | ||
0009-net-switchlib-add-framework-for-ethernet-switch-driv.patch | ||
0010-net-switchlib-add-driver-for-Lantiq-PSB697X-switch-f.patch | ||
0011-net-switchlib-add-driver-for-Lantiq-ADM6996I-switch-.patch | ||
0012-net-switchlib-add-driver-for-Atheros-AR8216.patch | ||
0013-net-switchlib-add-driver-for-REALTEK-RTL8306.patch | ||
0014-MIPS-add-support-for-Lantiq-XWAY-SoCs.patch | ||
0015-MIPS-lantiq-add-support-for-Lantiq-XWAY-ARX100-SoC-f.patch | ||
0016-net-add-driver-for-Lantiq-XWAY-ARX100-switch.patch | ||
0017-tools-add-some-helper-tools-for-Lantiq-SoCs.patch | ||
0018-tools-lantiq-add-NAND-SPL-support.patch | ||
0019-Makefile-add-Lantiq-NAND-SPL-images.patch | ||
0020-MIPS-lantiq-add-NAND-SPL-support.patch | ||
0021-MIPS-vrx200-add-NAND-SPL-support.patch | ||
0022-MIPS-lantiq-add-default-openwrt-config.patch | ||
0023-lzma-fixup.patch | ||
0024-Makefile-prepare-u-boot-lantiq-v2013.10-openwrt4.patch | ||
0025-arx100-cgu-fixes.patch | ||
0026-no_extern_inline.patch | ||
0027-no_weak_alias.patch | ||
0028-gcc-compat.patch | ||
0029-net-Use_packed_structures-for_networking.patch | ||
0030-lzma-force-8bit-reads.patch | ||
0031-dma-lantiq-fix-out-of-bounds-cache-invalidate.patch | ||
0100-MIPS-add-board-support-for-Easy-50712.patch | ||
0101-MIPS-add-board-support-for-Easy-80920.patch | ||
0102-MIPS-add-board-support-for-Arcadyan-ARV4519PW.patch | ||
0103-MIPS-add-board-support-for-Arcadyan-ARV7518PW.patch | ||
0104-MIPS-add-board-support-for-AudioCodes-MP-252.patch | ||
0105-MIPS-add-board-support-for-AVM-FritzBox-3370.patch | ||
0106-MIPS-add-board-support-for-Gigaset-SX76X.patch | ||
0107-MIPS-add-board-support-for-ZyXEL-P-2812HNU-Fx.patch | ||
0108-MIPS-add-board-support-for-Arcadyan-ARV752DPW.patch | ||
0109-MIPS-add-board-support-for-Arcadyan-ARV752DPW22.patch | ||
0110-MIPS-add-board-support-for-Arcadyan-ARV7510PW.patch | ||
0111-MIPS-add-board-support-for-Arcadyan-ARV7510PW22.patch | ||
0112-MIPS-add-board-support-for-Arcadyan-VGV7510KW22.patch | ||
0113-MIPS-add-board-support-for-Arcadyan-ARV8539PW22.patch | ||
0114-MIPS-add-board-support-for-Arcadyan-VGV7519.patch | ||
0115-MIPS-add-board-support-for-Arcadyan-ARV7506PW11.patch | ||
0116-MIPS-add-board-support-for-BT-Home-Hub-5A.patch |