X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=OvmfPkg%2FLibrary%2FVirtioLib%2FVirtioLib.c;h=e09324813c2df8ef83f9e2730d9a6bc1e733e1ed;hb=9854561c085df43139625aa275dd67144c75e432;hp=40ea17dfaf86ad0dc1aed0c2a3dd55bcf64eb992;hpb=b0338c53297cfbabd727f36c4878379c86cf4ddc;p=mirror_edk2.git diff --git a/OvmfPkg/Library/VirtioLib/VirtioLib.c b/OvmfPkg/Library/VirtioLib/VirtioLib.c index 40ea17dfaf..e09324813c 100644 --- a/OvmfPkg/Library/VirtioLib/VirtioLib.c +++ b/OvmfPkg/Library/VirtioLib/VirtioLib.c @@ -6,13 +6,7 @@ Portion of Copyright (C) 2013, ARM Ltd. Copyright (C) 2017, AMD Inc, All rights reserved.
- This program and the accompanying materials are licensed and made available - under the terms and conditions of the BSD License which accompanies this - distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT - WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -189,7 +183,6 @@ VirtioPrepare ( Indices->NextDescIdx = Indices->HeadDescIdx; } - /** Append a contiguous buffer for transmission / reception via the virtio ring. @@ -205,33 +198,34 @@ VirtioPrepare ( The caller is responsible for initializing *Indices with VirtioPrepare() first. - @param[in,out] Ring The virtio ring to append the buffer to, as a - descriptor. + @param[in,out] Ring The virtio ring to append the buffer to, + as a descriptor. - @param[in] BufferPhysAddr (Guest pseudo-physical) start address of the - transmit / receive buffer. + @param[in] BufferDeviceAddress (Bus master device) start address of the + transmit / receive buffer. - @param[in] BufferSize Number of bytes to transmit or receive. + @param[in] BufferSize Number of bytes to transmit or receive. - @param[in] Flags A bitmask of VRING_DESC_F_* flags. The caller - computes this mask dependent on further buffers to - append and transfer direction. - VRING_DESC_F_INDIRECT is unsupported. The - VRING_DESC.Next field is always set, but the host - only interprets it dependent on VRING_DESC_F_NEXT. + @param[in] Flags A bitmask of VRING_DESC_F_* flags. The + caller computes this mask dependent on + further buffers to append and transfer + direction. VRING_DESC_F_INDIRECT is + unsupported. The VRING_DESC.Next field is + always set, but the host only interprets + it dependent on VRING_DESC_F_NEXT. - @param[in,out] Indices Indices->HeadDescIdx is not accessed. - On input, Indices->NextDescIdx identifies the next - descriptor to carry the buffer. On output, - Indices->NextDescIdx is incremented by one, modulo - 2^16. + @param[in,out] Indices Indices->HeadDescIdx is not accessed. + On input, Indices->NextDescIdx identifies + the next descriptor to carry the buffer. + On output, Indices->NextDescIdx is + incremented by one, modulo 2^16. **/ VOID EFIAPI VirtioAppendDesc ( IN OUT VRING *Ring, - IN UINTN BufferPhysAddr, + IN UINT64 BufferDeviceAddress, IN UINT32 BufferSize, IN UINT16 Flags, IN OUT DESC_INDICES *Indices @@ -240,7 +234,7 @@ VirtioAppendDesc ( volatile VRING_DESC *Desc; Desc = &Ring->Desc[Indices->NextDescIdx++ % Ring->QueueSize]; - Desc->Addr = BufferPhysAddr; + Desc->Addr = BufferDeviceAddress; Desc->Len = BufferSize; Desc->Flags = Flags; Desc->Next = Indices->NextDescIdx % Ring->QueueSize; @@ -458,7 +452,7 @@ Virtio10WriteFeatures ( VIRTIO_UNMAP_SHARED. - @retval EFI_SUCCESS The NumberOfBytes is succesfully mapped. + @retval EFI_SUCCESS The NumberOfBytes is successfully mapped. @retval EFI_UNSUPPORTED The HostAddress cannot be mapped as a common buffer. @retval EFI_INVALID_PARAMETER One or more parameters are invalid.