c6ee36f OvmfPkg/VirtioGpuDxe: helpers for backing store (de)allocation+(un)mapping

Authored and Committed by lersek 6 years ago
    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>
    
        
file modified
+120 -0
file modified
+0 -1