]> git.baikalelectronics.ru Git - uboot.git/commit
efi_loader: correctly aligned transmit buffer
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 30 Nov 2018 23:16:32 +0000 (00:16 +0100)
committerAlexander Graf <agraf@suse.de>
Sun, 2 Dec 2018 20:59:37 +0000 (21:59 +0100)
commit299df3669ca539f09f152ca03d14466965cdcbe0
tree4e700daaf20366cd8358f4411b99bcf3dfb22e48
parent90f83f42a495098f0295f0b59a1755a59a5cac6e
efi_loader: correctly aligned transmit buffer

Calling net_send_packet() requires that the buffer is aligned to a multiple
of PKTALIGN (= ARCH_DMA_MINALIGN). The UEFI spec does not require
efi_net_transmit() to be called with a buffer with any special alignment.
So we have to copy to an aligned buffer. The current coding copies to an
aligned buffer only if CONFIG_EFI_LOADER_BOUNCE_BUFFER=y. Many boards
like the Odroid C2 do not use a bounce buffer.

With the patch we copy to a correctly aligned buffer in all cases.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
lib/efi_loader/efi_net.c