From patchwork Tue Feb 3 19:20:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 44294 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 44A802034D for ; Tue, 3 Feb 2015 19:21:53 +0000 (UTC) Received: by mail-wi0-f200.google.com with SMTP id fb4sf26957396wid.3 for ; Tue, 03 Feb 2015 11:21:52 -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=awPe4qqZuHpcvmzRCTXzrSNRr1HyEZRhK9lMMRg0qew=; b=VeWAAQAaP63XJxq6aE3Hi3bERY4kmltQ0yCflASZn3DVUHt1GS/UiYoKIMA8DbLYoR FZqQqaQdInDrFBygA6k1XrYKs4kEd2Hmbvat3PbvhU+XqWtXbiksTwjnfJS0ip357Dnv 9kt3s/E/tzODuwemDb0nm9izEZOa0ji3PJ1y8pgPydUwLhNi2n9qn7MgxsPerN/Gt1MH 9kbhF61b9Vx1PRen/hyUjYTGdj991pSAKaCBJSiS6muNtLPjwAiBC1/X6yzv9roAnGYR Di3er6L8nqc+b4p35GTV6+QZEgym/OJYq10TIGAZYVt0t+zDwGMRmKhWqQ4LnmKkrXAN eHzg== X-Gm-Message-State: ALoCoQmu+b37EI8dHsr1GpNmNqn6aZFy4lFugzmB0DuJUC1YR1Ox2jYG3iujrurgj1UJxqr4R/0D X-Received: by 10.112.99.37 with SMTP id en5mr3298993lbb.17.1422991312563; Tue, 03 Feb 2015 11:21:52 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.161.135 with SMTP id xs7ls786925lab.42.gmail; Tue, 03 Feb 2015 11:21:52 -0800 (PST) X-Received: by 10.112.35.165 with SMTP id i5mr26081305lbj.49.1422991312402; Tue, 03 Feb 2015 11:21:52 -0800 (PST) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id q4si20072780lag.103.2015.02.03.11.21.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Feb 2015 11:21:52 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by mail-lb0-f179.google.com with SMTP id 10so40430895lbg.10 for ; Tue, 03 Feb 2015 11:21:52 -0800 (PST) X-Received: by 10.112.63.134 with SMTP id g6mr22882760lbs.52.1422991312285; Tue, 03 Feb 2015 11:21:52 -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 h5csp34184lbj; Tue, 3 Feb 2015 11:21:51 -0800 (PST) X-Received: by 10.50.28.8 with SMTP id x8mr19787948igg.19.1422991309886; Tue, 03 Feb 2015 11:21:49 -0800 (PST) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id fu14si4513020icb.49.2015.02.03.11.21.48 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 03 Feb 2015 11:21:49 -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 1YIj2Z-0002Pf-Ux; Tue, 03 Feb 2015 19:21:39 +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 1YIj2Z-0002PW-0t for edk2-devel@lists.sourceforge.net; Tue, 03 Feb 2015 19:21:39 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of linaro.org designates 74.125.82.172 as permitted sender) client-ip=74.125.82.172; envelope-from=ard.biesheuvel@linaro.org; helo=mail-we0-f172.google.com; Received: from mail-we0-f172.google.com ([74.125.82.172]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1YIj2X-0007h6-Bv for edk2-devel@lists.sourceforge.net; Tue, 03 Feb 2015 19:21:38 +0000 Received: by mail-we0-f172.google.com with SMTP id q59so46783656wes.3 for ; Tue, 03 Feb 2015 11:21:31 -0800 (PST) X-Received: by 10.194.5.37 with SMTP id p5mr59645893wjp.20.1422991291394; Tue, 03 Feb 2015 11:21:31 -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.27 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Feb 2015 11:21:30 -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:01 +0000 Message-Id: <1422991212-9257-17-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 X-Headers-End: 1YIj2X-0007h6-Bv Subject: [edk2] [PATCH v3 16/27] Ovmf/Xen: move XenBusDxe hypercall code to separate library 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.217.179 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 This moves all of the Xen hypercall code that was private to XenBusDxe to a new library class XenHypercallLib. This will allow us to reimplement it for ARM, and to export the Xen hypercall functionality to other parts of the code, such as a Xen console SerialPortLib driver. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Laszlo Ersek Signed-off-by: Ard Biesheuvel --- .../Library/XenHypercallLib.h} | 16 +---- .../XenHypercallLib}/Ia32/hypercall.nasm | 0 .../XenHypercallLib}/X64/hypercall.nasm | 0 .../XenHypercallLib}/XenHypercall.c | 48 +------------- .../Library/XenHypercallLib/XenHypercallIntel.c | 77 ++++++++++++++++++++++ .../XenHypercallLib/XenHypercallLibIntel.inf | 52 +++++++++++++++ OvmfPkg/OvmfPkg.dec | 4 ++ OvmfPkg/OvmfPkgIa32.dsc | 1 + OvmfPkg/OvmfPkgIa32X64.dsc | 1 + OvmfPkg/OvmfPkgX64.dsc | 1 + OvmfPkg/XenBusDxe/EventChannel.c | 3 +- OvmfPkg/XenBusDxe/GrantTable.c | 2 +- OvmfPkg/XenBusDxe/XenBusDxe.c | 9 +-- OvmfPkg/XenBusDxe/XenBusDxe.inf | 11 +--- OvmfPkg/XenBusDxe/XenStore.c | 2 +- 15 files changed, 146 insertions(+), 81 deletions(-) rename OvmfPkg/{XenBusDxe/XenHypercall.h => Include/Library/XenHypercallLib.h} (82%) rename OvmfPkg/{XenBusDxe => Library/XenHypercallLib}/Ia32/hypercall.nasm (100%) rename OvmfPkg/{XenBusDxe => Library/XenHypercallLib}/X64/hypercall.nasm (100%) rename OvmfPkg/{XenBusDxe => Library/XenHypercallLib}/XenHypercall.c (60%) create mode 100644 OvmfPkg/Library/XenHypercallLib/XenHypercallIntel.c create mode 100644 OvmfPkg/Library/XenHypercallLib/XenHypercallLibIntel.inf diff --git a/OvmfPkg/XenBusDxe/XenHypercall.h b/OvmfPkg/Include/Library/XenHypercallLib.h similarity index 82% rename from OvmfPkg/XenBusDxe/XenHypercall.h rename to OvmfPkg/Include/Library/XenHypercallLib.h index 9d49e33eb5af..7a170ff3b90e 100644 --- a/OvmfPkg/XenBusDxe/XenHypercall.h +++ b/OvmfPkg/Include/Library/XenHypercallLib.h @@ -13,8 +13,8 @@ **/ -#ifndef __XENBUS_DXE_HYPERCALL_H__ -#define __XENBUS_DXE_HYPERCALL_H__ +#ifndef __XEN_HYPERCALL_LIB_H__ +#define __XEN_HYPERCALL_LIB_H__ /** This function will put the two arguments in the right place (registers) and @@ -35,18 +35,6 @@ XenHypercall2 ( ); /** - Get the page where all hypercall are from the XenInfo hob. - - @param Dev A XENBUS_DEVICE instance. - - @retval EFI_NOT_FOUND hyperpage could not be found. - @retval EFI_SUCCESS Successfully retrieve the hyperpage pointer. -**/ -EFI_STATUS -XenHyperpageInit ( - ); - -/** Return the value of the HVM parameter Index. @param Index The parameter to get, e.g. HVM_PARAM_STORE_EVTCHN. diff --git a/OvmfPkg/XenBusDxe/Ia32/hypercall.nasm b/OvmfPkg/Library/XenHypercallLib/Ia32/hypercall.nasm similarity index 100% rename from OvmfPkg/XenBusDxe/Ia32/hypercall.nasm rename to OvmfPkg/Library/XenHypercallLib/Ia32/hypercall.nasm diff --git a/OvmfPkg/XenBusDxe/X64/hypercall.nasm b/OvmfPkg/Library/XenHypercallLib/X64/hypercall.nasm similarity index 100% rename from OvmfPkg/XenBusDxe/X64/hypercall.nasm rename to OvmfPkg/Library/XenHypercallLib/X64/hypercall.nasm diff --git a/OvmfPkg/XenBusDxe/XenHypercall.c b/OvmfPkg/Library/XenHypercallLib/XenHypercall.c similarity index 60% rename from OvmfPkg/XenBusDxe/XenHypercall.c rename to OvmfPkg/Library/XenHypercallLib/XenHypercall.c index 19c34bdd0cec..ecc757cf707c 100644 --- a/OvmfPkg/XenBusDxe/XenHypercall.c +++ b/OvmfPkg/Library/XenHypercallLib/XenHypercall.c @@ -14,43 +14,12 @@ **/ #include -#include -#include - -#include "XenBusDxe.h" -#include "XenHypercall.h" #include #include -STATIC VOID *HyperPage; - -// -// Interface exposed by the ASM implementation of the core hypercall -// -INTN -EFIAPI -__XenHypercall2 ( - IN VOID *HypercallAddr, - IN OUT INTN Arg1, - IN OUT INTN Arg2 - ); - -EFI_STATUS -XenHyperpageInit ( - ) -{ - EFI_HOB_GUID_TYPE *GuidHob; - EFI_XEN_INFO *XenInfo; - - GuidHob = GetFirstGuidHob (&gEfiXenInfoGuid); - if (GuidHob == NULL) { - return EFI_NOT_FOUND; - } - XenInfo = (EFI_XEN_INFO *) GET_GUID_HOB_DATA (GuidHob); - HyperPage = XenInfo->HyperPages; - return EFI_SUCCESS; -} +#include +#include UINT64 XenHypercallHvmGetParam ( @@ -92,16 +61,3 @@ XenHypercallEventChannelOp ( return XenHypercall2 (__HYPERVISOR_event_channel_op, Operation, (INTN) Arguments); } - -INTN -EFIAPI -XenHypercall2 ( - IN INTN HypercallID, - IN OUT INTN Arg1, - IN OUT INTN Arg2 - ) -{ - ASSERT (HyperPage != NULL); - - return __XenHypercall2 ((UINT8*)HyperPage + HypercallID * 32, Arg1, Arg2); -} diff --git a/OvmfPkg/Library/XenHypercallLib/XenHypercallIntel.c b/OvmfPkg/Library/XenHypercallLib/XenHypercallIntel.c new file mode 100644 index 000000000000..362640f6a16f --- /dev/null +++ b/OvmfPkg/Library/XenHypercallLib/XenHypercallIntel.c @@ -0,0 +1,77 @@ +/** @file + Xen Hypercall Library implementation for Intel architecture + +Copyright (c) 2014, Linaro Ltd. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that 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. + +**/ + +#include +#include +#include +#include + +STATIC VOID *HyperPage; + +// +// Interface exposed by the ASM implementation of the core hypercall +// +INTN +EFIAPI +__XenHypercall2 ( + IN VOID *HypercallAddr, + IN OUT INTN Arg1, + IN OUT INTN Arg2 + ); + +/** + Library constructor: retrieves the Hyperpage address + from the gEfiXenInfoGuid HOB +**/ + +RETURN_STATUS +EFIAPI +XenHypercallLibIntelInit ( + VOID + ) +{ + EFI_HOB_GUID_TYPE *GuidHob; + EFI_XEN_INFO *XenInfo; + + GuidHob = GetFirstGuidHob (&gEfiXenInfoGuid); + if (GuidHob == NULL) { + return RETURN_NOT_FOUND; + } + XenInfo = (EFI_XEN_INFO *) GET_GUID_HOB_DATA (GuidHob); + HyperPage = XenInfo->HyperPages; + return RETURN_SUCCESS; +} + +/** + This function will put the two arguments in the right place (registers) and + invoke the hypercall identified by HypercallID. + + @param HypercallID The symbolic ID of the hypercall to be invoked + @param Arg1 First argument. + @param Arg2 Second argument. + + @return Return 0 if success otherwise it return an errno. +**/ +INTN +EFIAPI +XenHypercall2 ( + IN INTN HypercallID, + IN OUT INTN Arg1, + IN OUT INTN Arg2 + ) +{ + ASSERT (HyperPage != NULL); + + return __XenHypercall2 ((UINT8*)HyperPage + HypercallID * 32, Arg1, Arg2); +} diff --git a/OvmfPkg/Library/XenHypercallLib/XenHypercallLibIntel.inf b/OvmfPkg/Library/XenHypercallLib/XenHypercallLibIntel.inf new file mode 100644 index 000000000000..2afd608f4a05 --- /dev/null +++ b/OvmfPkg/Library/XenHypercallLib/XenHypercallLibIntel.inf @@ -0,0 +1,52 @@ +## @file +# Xen Hypercall abstraction lib for Intel architecture +# +# Copyright (c) 2014, Linaro Ltd. 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. +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = XenHypercallLibIntel + FILE_GUID = B5EE9A32-CA5A-49A8-82E3-ADA4CCB77C7C + MODULE_TYPE = BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = XenHypercallLib|DXE_DRIVER UEFI_DRIVER + CONSTRUCTOR = XenHypercallLibIntelInit + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 +# + +[Sources] + XenHypercallIntel.c + +[Sources.IA32] + Ia32/hypercall.nasm + +[Sources.X64] + X64/hypercall.nasm + +[Sources] + XenHypercall.c + +[Packages] + MdePkg/MdePkg.dec + OvmfPkg/OvmfPkg.dec + +[LibraryClasses] + BaseLib + HobLib + DebugLib + +[Guids] + gEfiXenInfoGuid diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec index 6eb551a8d436..30a9fb1e9b42 100644 --- a/OvmfPkg/OvmfPkg.dec +++ b/OvmfPkg/OvmfPkg.dec @@ -44,6 +44,10 @@ # SerializeVariablesLib|Include/Library/SerializeVariablesLib.h + ## @libraryclass Invoke Xen hypercalls + # + XenHypercallLib|Include/Library/XenHypercallLib.h + [Guids] gUefiOvmfPkgTokenSpaceGuid = {0x93bb96af, 0xb9f2, 0x4eb8, {0x94, 0x62, 0xe0, 0xba, 0x74, 0x56, 0x42, 0x36}} gEfiXenInfoGuid = {0xd3b46f3b, 0xd441, 0x1244, {0x9a, 0x12, 0x0, 0x12, 0x27, 0x3f, 0xc1, 0x4d}} diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index ca656698754b..90540272745c 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -128,6 +128,7 @@ S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf + XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLibIntel.inf [LibraryClasses.common] !if $(SECURE_BOOT_ENABLE) == TRUE diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index 4b4a1da717c1..0a331eda8be0 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -133,6 +133,7 @@ S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf + XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLibIntel.inf [LibraryClasses.common] !if $(SECURE_BOOT_ENABLE) == TRUE diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index eb3f34b8350b..e2b37c271681 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -133,6 +133,7 @@ S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf + XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLibIntel.inf [LibraryClasses.common] !if $(SECURE_BOOT_ENABLE) == TRUE diff --git a/OvmfPkg/XenBusDxe/EventChannel.c b/OvmfPkg/XenBusDxe/EventChannel.c index a86323e6adfd..6a36dca29911 100644 --- a/OvmfPkg/XenBusDxe/EventChannel.c +++ b/OvmfPkg/XenBusDxe/EventChannel.c @@ -16,7 +16,8 @@ **/ #include "EventChannel.h" -#include "XenHypercall.h" + +#include UINT32 XenEventChannelNotify ( diff --git a/OvmfPkg/XenBusDxe/GrantTable.c b/OvmfPkg/XenBusDxe/GrantTable.c index 53cb99f0e004..a80d5eff39cd 100644 --- a/OvmfPkg/XenBusDxe/GrantTable.c +++ b/OvmfPkg/XenBusDxe/GrantTable.c @@ -34,7 +34,7 @@ #include -#include "XenHypercall.h" +#include #include "GrantTable.h" #include "InterlockedCompareExchange16.h" diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.c b/OvmfPkg/XenBusDxe/XenBusDxe.c index d333b331b6db..cc334c086c1f 100644 --- a/OvmfPkg/XenBusDxe/XenBusDxe.c +++ b/OvmfPkg/XenBusDxe/XenBusDxe.c @@ -26,10 +26,10 @@ #include #include #include +#include #include "XenBusDxe.h" -#include "XenHypercall.h" #include "GrantTable.h" #include "XenStore.h" #include "XenBus.h" @@ -390,13 +390,6 @@ XenBusDxeDriverBindingStart ( MmioAddr = BarDesc->AddrRangeMin; FreePool (BarDesc); - Status = XenHyperpageInit (); - if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "XenBus: Unable to retrieve the hyperpage.\n")); - Status = EFI_UNSUPPORTED; - goto ErrorAllocated; - } - Status = XenGetSharedInfoPage (Dev); if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "XenBus: Unable to get the shared info page.\n")); diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.inf b/OvmfPkg/XenBusDxe/XenBusDxe.inf index 4ce474345452..714607dbd6f8 100644 --- a/OvmfPkg/XenBusDxe/XenBusDxe.inf +++ b/OvmfPkg/XenBusDxe/XenBusDxe.inf @@ -34,8 +34,6 @@ DriverBinding.h ComponentName.c ComponentName.h - XenHypercall.c - XenHypercall.h InterlockedCompareExchange16.c InterlockedCompareExchange16.h GrantTable.c @@ -49,12 +47,10 @@ Helpers.c [Sources.IA32] - Ia32/hypercall.nasm Ia32/InterlockedCompareExchange16.nasm Ia32/TestAndClearBit.nasm [Sources.X64] - X64/hypercall.nasm X64/InterlockedCompareExchange16.nasm X64/TestAndClearBit.nasm @@ -67,8 +63,7 @@ UefiLib DevicePathLib DebugLib - HobLib - + XenHypercallLib [Protocols] gEfiDriverBindingProtocolGuid @@ -77,7 +72,3 @@ gEfiComponentNameProtocolGuid gXenBusProtocolGuid - -[Guids] - gEfiXenInfoGuid - diff --git a/OvmfPkg/XenBusDxe/XenStore.c b/OvmfPkg/XenBusDxe/XenStore.c index 7ec1e634bc5c..9850f1e644fc 100644 --- a/OvmfPkg/XenBusDxe/XenStore.c +++ b/OvmfPkg/XenBusDxe/XenStore.c @@ -60,8 +60,8 @@ #include -#include "XenHypercall.h" #include "EventChannel.h" +#include // // Private Data Structures