From patchwork Tue Feb 3 19:20:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 44296 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 517F32034D for ; Tue, 3 Feb 2015 19:22:03 +0000 (UTC) Received: by mail-la0-f71.google.com with SMTP id s18sf22230783lam.2 for ; Tue, 03 Feb 2015 11:22:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:reply-to:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=HfuGS4SMj8h/fmFOkNwvbM0CGqZipLXXlI2rSPAEtcs=; b=SSjoAFxwbGI8FG5iFYTyLheoWg4AMj9I0emlmUMSFcP8q3J6pFd7WWBrylRdIjb246 PjchRHyS9xY4cQzCmDql6MARNROIhu41aj40KcP2AsMmpO701BHdpLV2g3lJ+PFWrpdD 4Ij9dkBBXL7O5Q4BpEESb8Nj4NLyZ/wbNAOTtdjhzwwCVMVhrUtsDhBngRpcTifqhL3A hNincttB9AtxcJ+rHBb6K/kMBGcaC/HsSzGtrgGirZLJx5u+AXNzZ2QHiJQLivNKSsNF 1StXNv4HWvWN+ARKZPIAru9uKWQBHRf81MCgyWajtvOhBRQLYDQ4ewrpqR7vaaaon3ou 0T+g== X-Gm-Message-State: ALoCoQnzIDIFYU7Hcl8VQjR1zv/5ktTfoM0fxaw5ZIns/OP6kBiGefYIXmUviXGCDms9Eic9AUeW X-Received: by 10.152.121.65 with SMTP id li1mr3356605lab.0.1422991322328; Tue, 03 Feb 2015 11:22:02 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.234 with SMTP id r10ls271331lal.94.gmail; Tue, 03 Feb 2015 11:22:02 -0800 (PST) X-Received: by 10.112.137.38 with SMTP id qf6mr9180648lbb.59.1422991322186; Tue, 03 Feb 2015 11:22:02 -0800 (PST) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id oq8si6635010lbb.74.2015.02.03.11.22.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Feb 2015 11:22:01 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by mail-la0-f52.google.com with SMTP id ge10so54210667lab.11 for ; Tue, 03 Feb 2015 11:22:01 -0800 (PST) X-Received: by 10.152.245.44 with SMTP id xl12mr26597657lac.81.1422991321742; Tue, 03 Feb 2015 11:22:01 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp34261lbj; Tue, 3 Feb 2015 11:22:00 -0800 (PST) X-Received: by 10.50.79.202 with SMTP id l10mr19545858igx.24.1422991319952; Tue, 03 Feb 2015 11:21:59 -0800 (PST) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id n10si10380796icg.81.2015.02.03.11.21.59 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 03 Feb 2015 11:21:59 -0800 (PST) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YIj2l-0002RS-6F; Tue, 03 Feb 2015 19:21:51 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YIj2j-0002RC-O6 for edk2-devel@lists.sourceforge.net; Tue, 03 Feb 2015 19:21:49 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of linaro.org designates 209.85.212.170 as permitted sender) client-ip=209.85.212.170; envelope-from=ard.biesheuvel@linaro.org; helo=mail-wi0-f170.google.com; Received: from mail-wi0-f170.google.com ([209.85.212.170]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1YIj2i-0007hK-5X for edk2-devel@lists.sourceforge.net; Tue, 03 Feb 2015 19:21:49 +0000 Received: by mail-wi0-f170.google.com with SMTP id bs8so24724618wib.1 for ; Tue, 03 Feb 2015 11:21:42 -0800 (PST) X-Received: by 10.180.102.69 with SMTP id fm5mr27385798wib.61.1422991302172; Tue, 03 Feb 2015 11:21:42 -0800 (PST) Received: from ards-macbook-pro.local (73.233.28.37.rev.vodafone.pt. [37.28.233.73]) by mx.google.com with ESMTPSA id eb7sm25860139wic.11.2015.02.03.11.21.38 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Feb 2015 11:21:41 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.sourceforge.net, lersek@redhat.com, olivier.martin@arm.com, roy.franz@linaro.org, leif.lindholm@linaro.org, stefano.stabellini@eu.citrix.com, ian.campbell@citrix.com, anthony.perard@citrix.com, christoffer.dall@linaro.org, xen-devel@lists.xen.org, ilias.biris@linaro.org, julien.grall@linaro.org Date: Tue, 3 Feb 2015 19:20:04 +0000 Message-Id: <1422991212-9257-20-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1422991212-9257-1-git-send-email-ard.biesheuvel@linaro.org> References: <1422991212-9257-1-git-send-email-ard.biesheuvel@linaro.org> X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1YIj2i-0007hK-5X Subject: [edk2] [PATCH v3 19/27] Ovmf/Xen: move XenBusDxe to abstract XENIO_PROTOCOL X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 While Xen on Intel uses a virtual PCI device to communicate the base address of the grant table, the ARM implementation uses a DT node, which is fundamentally incompatible with the way XenBusDxe is implemented, i.e., as a UEFI Driver Model implementation for a PCI device. Contributed-under: TianoCore Contribution Agreement 1.0 Acked-by: Laszlo Ersek Signed-off-by: Ard Biesheuvel --- OvmfPkg/OvmfPkgIa32.dsc | 1 + OvmfPkg/OvmfPkgIa32.fdf | 1 + OvmfPkg/OvmfPkgIa32X64.dsc | 1 + OvmfPkg/OvmfPkgIa32X64.fdf | 1 + OvmfPkg/OvmfPkgX64.dsc | 1 + OvmfPkg/OvmfPkgX64.fdf | 1 + OvmfPkg/XenBusDxe/ComponentName.c | 2 +- OvmfPkg/XenBusDxe/GrantTable.c | 5 ++-- OvmfPkg/XenBusDxe/GrantTable.h | 3 +-- OvmfPkg/XenBusDxe/XenBus.c | 6 ++--- OvmfPkg/XenBusDxe/XenBusDxe.c | 55 +++++++++------------------------------ OvmfPkg/XenBusDxe/XenBusDxe.h | 8 ++---- OvmfPkg/XenBusDxe/XenBusDxe.inf | 2 +- 13 files changed, 29 insertions(+), 58 deletions(-) diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index 90540272745c..8c880613851d 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -444,6 +444,7 @@ OvmfPkg/VirtioBlkDxe/VirtioBlk.inf OvmfPkg/VirtioScsiDxe/VirtioScsi.inf OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf + OvmfPkg/XenIoPciDxe/XenIoPciDxe.inf OvmfPkg/XenBusDxe/XenBusDxe.inf OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf { diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf index f47e7ddc7834..ecef963d1e85 100644 --- a/OvmfPkg/OvmfPkgIa32.fdf +++ b/OvmfPkg/OvmfPkgIa32.fdf @@ -227,6 +227,7 @@ INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf INF OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf INF OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf +INF OvmfPkg/XenIoPciDxe/XenIoPciDxe.inf INF OvmfPkg/XenBusDxe/XenBusDxe.inf INF OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index 0a331eda8be0..ff32ecefd07b 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -451,6 +451,7 @@ OvmfPkg/VirtioBlkDxe/VirtioBlk.inf OvmfPkg/VirtioScsiDxe/VirtioScsi.inf OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf + OvmfPkg/XenIoPciDxe/XenIoPciDxe.inf OvmfPkg/XenBusDxe/XenBusDxe.inf OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf { diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf index 4c034460d5d2..29414ff04082 100644 --- a/OvmfPkg/OvmfPkgIa32X64.fdf +++ b/OvmfPkg/OvmfPkgIa32X64.fdf @@ -227,6 +227,7 @@ INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf INF OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf INF OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf +INF OvmfPkg/XenIoPciDxe/XenIoPciDxe.inf INF OvmfPkg/XenBusDxe/XenBusDxe.inf INF OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index e2b37c271681..8bac6dc313f0 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -449,6 +449,7 @@ OvmfPkg/VirtioBlkDxe/VirtioBlk.inf OvmfPkg/VirtioScsiDxe/VirtioScsi.inf OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf + OvmfPkg/XenIoPciDxe/XenIoPciDxe.inf OvmfPkg/XenBusDxe/XenBusDxe.inf OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf { diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf index 2323eb2edf33..f1feb698ba66 100644 --- a/OvmfPkg/OvmfPkgX64.fdf +++ b/OvmfPkg/OvmfPkgX64.fdf @@ -227,6 +227,7 @@ INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf INF OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf INF OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf +INF OvmfPkg/XenIoPciDxe/XenIoPciDxe.inf INF OvmfPkg/XenBusDxe/XenBusDxe.inf INF OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf diff --git a/OvmfPkg/XenBusDxe/ComponentName.c b/OvmfPkg/XenBusDxe/ComponentName.c index 4530509e65dc..3f2dd406c77d 100644 --- a/OvmfPkg/XenBusDxe/ComponentName.c +++ b/OvmfPkg/XenBusDxe/ComponentName.c @@ -155,7 +155,7 @@ XenBusDxeComponentNameGetControllerName ( Status = EfiTestManagedDevice ( ControllerHandle, gXenBusDxeDriverBinding.DriverBindingHandle, - &gEfiPciIoProtocolGuid + &gXenIoProtocolGuid ); if (EFI_ERROR (Status)) { return Status; diff --git a/OvmfPkg/XenBusDxe/GrantTable.c b/OvmfPkg/XenBusDxe/GrantTable.c index a80d5eff39cd..19117fbe0373 100644 --- a/OvmfPkg/XenBusDxe/GrantTable.c +++ b/OvmfPkg/XenBusDxe/GrantTable.c @@ -139,8 +139,7 @@ XenGrantTableEndAccess ( VOID XenGrantTableInit ( - IN XENBUS_DEVICE *Dev, - IN UINT64 MmioAddr + IN XENBUS_DEVICE *Dev ) { xen_add_to_physmap_t Parameters; @@ -155,7 +154,7 @@ XenGrantTableInit ( XenGrantTablePutFreeEntry ((grant_ref_t)Index); } - GrantTable = (VOID*)(UINTN) MmioAddr; + GrantTable = (VOID*)(UINTN) Dev->XenIo->GrantTableAddress; for (Index = 0; Index < NR_GRANT_FRAMES; Index++) { Parameters.domid = DOMID_SELF; Parameters.idx = Index; diff --git a/OvmfPkg/XenBusDxe/GrantTable.h b/OvmfPkg/XenBusDxe/GrantTable.h index 5772c56662df..194275ba7ed5 100644 --- a/OvmfPkg/XenBusDxe/GrantTable.h +++ b/OvmfPkg/XenBusDxe/GrantTable.h @@ -29,8 +29,7 @@ **/ VOID XenGrantTableInit ( - IN XENBUS_DEVICE *Dev, - IN UINT64 MmioAddr + IN XENBUS_DEVICE *Dev ); /** diff --git a/OvmfPkg/XenBusDxe/XenBus.c b/OvmfPkg/XenBusDxe/XenBus.c index f69c27dd184a..ee9526c33252 100644 --- a/OvmfPkg/XenBusDxe/XenBus.c +++ b/OvmfPkg/XenBusDxe/XenBus.c @@ -138,7 +138,7 @@ XenBusAddDevice ( XENBUS_PRIVATE_DATA *Private; EFI_STATUS Status; XENBUS_DEVICE_PATH *TempXenBusPath; - VOID *ChildPciIo; + VOID *ChildXenIo; AsciiSPrint (DevicePath, sizeof (DevicePath), "device/%a/%a", Type, Id); @@ -208,8 +208,8 @@ XenBusAddDevice ( } Status = gBS->OpenProtocol (Dev->ControllerHandle, - &gEfiPciIoProtocolGuid, - &ChildPciIo, Dev->This->DriverBindingHandle, + &gXenIoProtocolGuid, + &ChildXenIo, Dev->This->DriverBindingHandle, Private->Handle, EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER); if (EFI_ERROR (Status)) { diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.c b/OvmfPkg/XenBusDxe/XenBusDxe.c index cc334c086c1f..2c4a08673ce6 100644 --- a/OvmfPkg/XenBusDxe/XenBusDxe.c +++ b/OvmfPkg/XenBusDxe/XenBusDxe.c @@ -23,8 +23,6 @@ **/ -#include -#include #include #include @@ -233,34 +231,22 @@ XenBusDxeDriverBindingSupported ( ) { EFI_STATUS Status; - EFI_PCI_IO_PROTOCOL *PciIo; - PCI_TYPE00 Pci; + XENIO_PROTOCOL *XenIo; Status = gBS->OpenProtocol ( ControllerHandle, - &gEfiPciIoProtocolGuid, - (VOID **)&PciIo, + &gXenIoProtocolGuid, + (VOID **)&XenIo, This->DriverBindingHandle, ControllerHandle, EFI_OPEN_PROTOCOL_BY_DRIVER ); + if (EFI_ERROR (Status)) { return Status; } - Status = PciIo->Pci.Read (PciIo, EfiPciIoWidthUint32, 0, - sizeof Pci / sizeof (UINT32), &Pci); - - if (Status == EFI_SUCCESS) { - if (Pci.Hdr.VendorId == PCI_VENDOR_ID_XEN && - Pci.Hdr.DeviceId == PCI_DEVICE_ID_XEN_PLATFORM) { - Status = EFI_SUCCESS; - } else { - Status = EFI_UNSUPPORTED; - } - } - - gBS->CloseProtocol (ControllerHandle, &gEfiPciIoProtocolGuid, + gBS->CloseProtocol (ControllerHandle, &gXenIoProtocolGuid, This->DriverBindingHandle, ControllerHandle); return Status; @@ -326,19 +312,18 @@ XenBusDxeDriverBindingStart ( { EFI_STATUS Status; XENBUS_DEVICE *Dev; - EFI_PCI_IO_PROTOCOL *PciIo; - EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *BarDesc; - UINT64 MmioAddr; + XENIO_PROTOCOL *XenIo; EFI_DEVICE_PATH_PROTOCOL *DevicePath; Status = gBS->OpenProtocol ( ControllerHandle, - &gEfiPciIoProtocolGuid, - (VOID **) &PciIo, + &gXenIoProtocolGuid, + (VOID**)&XenIo, This->DriverBindingHandle, ControllerHandle, EFI_OPEN_PROTOCOL_BY_DRIVER ); + if (EFI_ERROR (Status)) { return Status; } @@ -360,7 +345,7 @@ XenBusDxeDriverBindingStart ( Dev->Signature = XENBUS_DEVICE_SIGNATURE; Dev->This = This; Dev->ControllerHandle = ControllerHandle; - Dev->PciIo = PciIo; + Dev->XenIo = XenIo; Dev->DevicePath = DevicePath; InitializeListHead (&Dev->ChildList); @@ -376,20 +361,6 @@ XenBusDxeDriverBindingStart ( mMyDevice = Dev; EfiReleaseLock (&mMyDeviceLock); - // - // The BAR1 of this PCI device is used for shared memory and is supposed to - // look like MMIO. The address space of the BAR1 will be used to map the - // Grant Table. - // - Status = PciIo->GetBarAttributes (PciIo, PCI_BAR_IDX1, NULL, (VOID**) &BarDesc); - ASSERT_EFI_ERROR (Status); - ASSERT (BarDesc->ResType == ACPI_ADDRESS_SPACE_TYPE_MEM); - - /* Get a Memory address for mapping the Grant Table. */ - DEBUG ((EFI_D_INFO, "XenBus: BAR at %LX\n", BarDesc->AddrRangeMin)); - MmioAddr = BarDesc->AddrRangeMin; - FreePool (BarDesc); - Status = XenGetSharedInfoPage (Dev); if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "XenBus: Unable to get the shared info page.\n")); @@ -397,7 +368,7 @@ XenBusDxeDriverBindingStart ( goto ErrorAllocated; } - XenGrantTableInit (Dev, MmioAddr); + XenGrantTableInit (Dev); Status = XenStoreInit (Dev); ASSERT_EFI_ERROR (Status); @@ -417,7 +388,7 @@ ErrorAllocated: gBS->CloseProtocol (ControllerHandle, &gEfiDevicePathProtocolGuid, This->DriverBindingHandle, ControllerHandle); ErrorOpenningProtocol: - gBS->CloseProtocol (ControllerHandle, &gEfiPciIoProtocolGuid, + gBS->CloseProtocol (ControllerHandle, &gXenIoProtocolGuid, This->DriverBindingHandle, ControllerHandle); return Status; } @@ -507,7 +478,7 @@ XenBusDxeDriverBindingStop ( gBS->CloseProtocol (ControllerHandle, &gEfiDevicePathProtocolGuid, This->DriverBindingHandle, ControllerHandle); - gBS->CloseProtocol (ControllerHandle, &gEfiPciIoProtocolGuid, + gBS->CloseProtocol (ControllerHandle, &gXenIoProtocolGuid, This->DriverBindingHandle, ControllerHandle); mMyDevice = NULL; diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.h b/OvmfPkg/XenBusDxe/XenBusDxe.h index 9b7219906a69..6c306e017b07 100644 --- a/OvmfPkg/XenBusDxe/XenBusDxe.h +++ b/OvmfPkg/XenBusDxe/XenBusDxe.h @@ -39,7 +39,7 @@ // // Consumed Protocols // -#include +#include // @@ -73,10 +73,6 @@ extern EFI_COMPONENT_NAME_PROTOCOL gXenBusDxeComponentName; // #include -#define PCI_VENDOR_ID_XEN 0x5853 -#define PCI_DEVICE_ID_XEN_PLATFORM 0x0001 - - typedef struct _XENBUS_DEVICE_PATH XENBUS_DEVICE_PATH; typedef struct _XENBUS_DEVICE XENBUS_DEVICE; @@ -86,7 +82,7 @@ struct _XENBUS_DEVICE { UINT32 Signature; EFI_DRIVER_BINDING_PROTOCOL *This; EFI_HANDLE ControllerHandle; - EFI_PCI_IO_PROTOCOL *PciIo; + XENIO_PROTOCOL *XenIo; EFI_EVENT ExitBootEvent; EFI_DEVICE_PATH_PROTOCOL *DevicePath; LIST_ENTRY ChildList; diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.inf b/OvmfPkg/XenBusDxe/XenBusDxe.inf index 714607dbd6f8..31553ac5a64a 100644 --- a/OvmfPkg/XenBusDxe/XenBusDxe.inf +++ b/OvmfPkg/XenBusDxe/XenBusDxe.inf @@ -67,8 +67,8 @@ [Protocols] gEfiDriverBindingProtocolGuid - gEfiPciIoProtocolGuid gEfiComponentName2ProtocolGuid gEfiComponentNameProtocolGuid gXenBusProtocolGuid + gXenIoProtocolGuid