]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg/VirtioGpuDxe: helpers for backing store (de)allocation+(un)mapping
authorLaszlo Ersek <lersek@redhat.com>
Sat, 26 Aug 2017 20:15:46 +0000 (22:15 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Fri, 1 Sep 2017 12:28:20 +0000 (14:28 +0200)
commit5c8f091bd84d3706e2aad89e13ec00da11f6e5aa
tree24ee42b97e8b81707eaa8532bf30fefb900397bf
parent5409c6abc8d8b8a7196fee1d4455845aacef23bd
OvmfPkg/VirtioGpuDxe: helpers for backing store (de)allocation+(un)mapping

Introduce the VirtioGpuAllocateZeroAndMapBackingStore() and
VirtioGpuUnmapAndFreeBackingStore() helper functions. These functions tie
together the allocation, zeroing and mapping, and unmapping and
deallocation, respectively, of memory that the virtio GPU will permanently
reference after receiving the RESOURCE_ATTACH_BACKING command.

With these functions we can keep the next patch simpler -- the GOP
implementation in "Gop.c" retains its error handling structure, and
remains oblivious to VIRTIO_DEVICE_PROTOCOL and VirtioLib.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Brijesh Singh <brijesh.singh@amd.com>
OvmfPkg/VirtioGpuDxe/Commands.c
OvmfPkg/VirtioGpuDxe/DriverBinding.c
OvmfPkg/VirtioGpuDxe/Gop.c
OvmfPkg/VirtioGpuDxe/VirtioGpu.h