diff options
author | Alexander Graf <agraf@suse.de> | 2016-09-06 14:26:27 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2016-10-19 09:01:50 +0200 |
commit | 712cd2987489fe62aedeb24730e730871b1eb627 (patch) | |
tree | 147f33a36b7d6496ef06bbe72988e08f53b72969 /lib/efi_loader/efi_net.c | |
parent | b6575f34e20ddc40baa391c2db0e1e015e942af2 (diff) |
efi_loader: Allow bouncing for network
So far bounce buffers were only used for disk I/O, but network I/O
may suffer from the same problem.
On platforms that have problems doing DMA on high addresses, let's
also bounce outgoing network packets. Incoming ones always already
get bounced.
This patch fixes EFI PXE boot on ZynqMP for me.
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'lib/efi_loader/efi_net.c')
-rw-r--r-- | lib/efi_loader/efi_net.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c index dd3b48570d..6a8a0d7b1d 100644 --- a/lib/efi_loader/efi_net.c +++ b/lib/efi_loader/efi_net.c @@ -152,7 +152,14 @@ static efi_status_t EFIAPI efi_net_transmit(struct efi_simple_network *this, return EFI_EXIT(EFI_INVALID_PARAMETER); } +#ifdef CONFIG_EFI_LOADER_BOUNCE_BUFFER + /* Ethernet packets always fit, just bounce */ + memcpy(efi_bounce_buffer, buffer, buffer_size); + net_send_packet(efi_bounce_buffer, buffer_size); +#else net_send_packet(buffer, buffer_size); +#endif + new_tx_packet = buffer; return EFI_EXIT(EFI_SUCCESS); |