diff options
author | Laszlo Ersek <lersek@redhat.com> | 2017-08-26 19:54:49 +0200 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2017-09-01 14:28:17 +0200 |
commit | 5409c6abc8d8b8a7196fee1d4455845aacef23bd (patch) | |
tree | 85ac5c232e010d7d14ed601008bae8e7e850dbe8 /OvmfPkg/VirtioGpuDxe/Gop.c | |
parent | 067b648332790be91d95dd84e2549a0dfe52185a (diff) | |
download | edk2-5409c6abc8d8b8a7196fee1d4455845aacef23bd.tar.gz edk2-5409c6abc8d8b8a7196fee1d4455845aacef23bd.tar.bz2 edk2-5409c6abc8d8b8a7196fee1d4455845aacef23bd.zip |
OvmfPkg/VirtioGpuDxe: take EFI_PHYSICAL_ADDRESS in ResourceAttachBacking()
The RESOURCE_ATTACH_BACKING virtio GPU command assigns guest-side backing
pages to a host-side resource that was created earlier with the
RESOURCE_CREATE_2D command.
We compose the RESOURCE_ATTACH_BACKING command in the
VirtioGpuResourceAttachBacking() function. Currently this function takes
the parameter
IN VOID *FirstBackingPage
This is only appropriate as long as we pass a (guest-phys) system memory
address to the device. In preparation for a mapped bus master device
address, change the above parameter to
IN EFI_PHYSICAL_ADDRESS BackingStoreDeviceAddress
In order to keep the current call site functional, move the (VOID*) to
(UINTN) conversion out of the function, to the call site.
The "Request.Entry.Addr" field already has type UINT64.
This patch is similar to commit 4b725858de68 ("OvmfPkg/VirtioLib: change
the parameter of VirtioAppendDesc() to UINT64", 2017-08-23).
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>
Diffstat (limited to 'OvmfPkg/VirtioGpuDxe/Gop.c')
-rw-r--r-- | OvmfPkg/VirtioGpuDxe/Gop.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OvmfPkg/VirtioGpuDxe/Gop.c b/OvmfPkg/VirtioGpuDxe/Gop.c index 3438bd0322..b3c5dae74d 100644 --- a/OvmfPkg/VirtioGpuDxe/Gop.c +++ b/OvmfPkg/VirtioGpuDxe/Gop.c @@ -313,10 +313,10 @@ GopSetMode ( // Attach backing store to the host resource.
//
Status = VirtioGpuResourceAttachBacking (
- VgpuGop->ParentBus, // VgpuDev
- NewResourceId, // ResourceId
- NewBackingStore, // FirstBackingPage
- NewNumberOfPages // NumberOfPages
+ VgpuGop->ParentBus, // VgpuDev
+ NewResourceId, // ResourceId
+ (UINTN)NewBackingStore, // BackingStoreDeviceAddress
+ NewNumberOfPages // NumberOfPages
);
if (EFI_ERROR (Status)) {
goto FreeBackingStore;
|