[LibraryClasses]\r
SerialPortLib|OvmfPkg/Library/XenConsoleSerialPortLib/XenConsoleSerialPortLib.inf\r
RealTimeClockLib|ArmPlatformPkg/ArmVirtualizationPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib.inf\r
- XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLibArm.inf\r
+ XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf\r
\r
[LibraryClasses.AARCH64]\r
ArmLib|ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf\r
--- /dev/null
+/** @file\r
+ Xen Hypercall Library implementation for Intel architecture\r
+\r
+Copyright (c) 2014, Linaro Ltd. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
+The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#include <PiDxe.h>\r
+#include <Library/HobLib.h>\r
+#include <Library/DebugLib.h>\r
+#include <Guid/XenInfo.h>\r
+\r
+STATIC VOID *HyperPage;\r
+\r
+//\r
+// Interface exposed by the ASM implementation of the core hypercall\r
+//\r
+INTN\r
+EFIAPI\r
+__XenHypercall2 (\r
+ IN VOID *HypercallAddr,\r
+ IN OUT INTN Arg1,\r
+ IN OUT INTN Arg2\r
+ );\r
+\r
+/**\r
+ Library constructor: retrieves the Hyperpage address\r
+ from the gEfiXenInfoGuid HOB\r
+**/\r
+\r
+RETURN_STATUS\r
+EFIAPI\r
+XenHypercallLibInit (\r
+ VOID\r
+ )\r
+{\r
+ EFI_HOB_GUID_TYPE *GuidHob;\r
+ EFI_XEN_INFO *XenInfo;\r
+\r
+ GuidHob = GetFirstGuidHob (&gEfiXenInfoGuid);\r
+ if (GuidHob == NULL) {\r
+ return RETURN_NOT_FOUND;\r
+ }\r
+ XenInfo = (EFI_XEN_INFO *) GET_GUID_HOB_DATA (GuidHob);\r
+ HyperPage = XenInfo->HyperPages;\r
+ return RETURN_SUCCESS;\r
+}\r
+\r
+/**\r
+ This function will put the two arguments in the right place (registers) and\r
+ invoke the hypercall identified by HypercallID.\r
+\r
+ @param HypercallID The symbolic ID of the hypercall to be invoked\r
+ @param Arg1 First argument.\r
+ @param Arg2 Second argument.\r
+\r
+ @return Return 0 if success otherwise it return an errno.\r
+**/\r
+INTN\r
+EFIAPI\r
+XenHypercall2 (\r
+ IN UINTN HypercallID,\r
+ IN OUT INTN Arg1,\r
+ IN OUT INTN Arg2\r
+ )\r
+{\r
+ ASSERT (HyperPage != NULL);\r
+\r
+ return __XenHypercall2 ((UINT8*)HyperPage + HypercallID * 32, Arg1, Arg2);\r
+}\r
+++ /dev/null
-/** @file\r
- Xen Hypercall Library implementation for Intel architecture\r
-\r
-Copyright (c) 2014, Linaro Ltd. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under\r
-the terms and conditions of the BSD License that accompanies this distribution.\r
-The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <PiDxe.h>\r
-#include <Library/HobLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Guid/XenInfo.h>\r
-\r
-STATIC VOID *HyperPage;\r
-\r
-//\r
-// Interface exposed by the ASM implementation of the core hypercall\r
-//\r
-INTN\r
-EFIAPI\r
-__XenHypercall2 (\r
- IN VOID *HypercallAddr,\r
- IN OUT INTN Arg1,\r
- IN OUT INTN Arg2\r
- );\r
-\r
-/**\r
- Library constructor: retrieves the Hyperpage address\r
- from the gEfiXenInfoGuid HOB\r
-**/\r
-\r
-RETURN_STATUS\r
-EFIAPI\r
-XenHypercallLibIntelInit (\r
- VOID\r
- )\r
-{\r
- EFI_HOB_GUID_TYPE *GuidHob;\r
- EFI_XEN_INFO *XenInfo;\r
-\r
- GuidHob = GetFirstGuidHob (&gEfiXenInfoGuid);\r
- if (GuidHob == NULL) {\r
- return RETURN_NOT_FOUND;\r
- }\r
- XenInfo = (EFI_XEN_INFO *) GET_GUID_HOB_DATA (GuidHob);\r
- HyperPage = XenInfo->HyperPages;\r
- return RETURN_SUCCESS;\r
-}\r
-\r
-/**\r
- This function will put the two arguments in the right place (registers) and\r
- invoke the hypercall identified by HypercallID.\r
-\r
- @param HypercallID The symbolic ID of the hypercall to be invoked\r
- @param Arg1 First argument.\r
- @param Arg2 Second argument.\r
-\r
- @return Return 0 if success otherwise it return an errno.\r
-**/\r
-INTN\r
-EFIAPI\r
-XenHypercall2 (\r
- IN UINTN HypercallID,\r
- IN OUT INTN Arg1,\r
- IN OUT INTN Arg2\r
- )\r
-{\r
- ASSERT (HyperPage != NULL);\r
-\r
- return __XenHypercall2 ((UINT8*)HyperPage + HypercallID * 32, Arg1, Arg2);\r
-}\r
--- /dev/null
+## @file\r
+# Xen Hypercall abstraction lib for Intel and ARM architectures\r
+#\r
+# Copyright (c) 2014, Linaro Ltd. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+##\r
+\r
+[Defines]\r
+ INF_VERSION = 0x00010005\r
+ BASE_NAME = XenHypercallLib\r
+ FILE_GUID = B5EE9A32-CA5A-49A8-82E3-ADA4CCB77C7C\r
+ MODULE_TYPE = BASE\r
+ VERSION_STRING = 1.0\r
+\r
+[Defines.IA32, Defines.X64]\r
+ LIBRARY_CLASS = XenHypercallLib|DXE_DRIVER UEFI_DRIVER\r
+ CONSTRUCTOR = XenHypercallLibInit\r
+\r
+[Defines.ARM, Defines.AARCH64]\r
+ LIBRARY_CLASS = XenHypercallLib\r
+\r
+#\r
+# The following information is for reference only and not required by the build tools.\r
+#\r
+# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64\r
+#\r
+\r
+[Sources.IA32, Sources.X64]\r
+ X86XenHypercall.c\r
+\r
+[Sources.IA32]\r
+ Ia32/hypercall.nasm\r
+\r
+[Sources.X64]\r
+ X64/hypercall.nasm\r
+\r
+[Sources.ARM]\r
+ Arm/Hypercall.S\r
+\r
+[Sources.AARCH64]\r
+ Aarch64/Hypercall.S\r
+\r
+[Sources]\r
+ XenHypercall.c\r
+\r
+[Packages]\r
+ MdePkg/MdePkg.dec\r
+ OvmfPkg/OvmfPkg.dec\r
+\r
+[LibraryClasses.IA32, LibraryClasses.X64]\r
+ BaseLib\r
+ HobLib\r
+ DebugLib\r
+\r
+[Guids.IA32, Guids.X64]\r
+ gEfiXenInfoGuid\r
+++ /dev/null
-## @file\r
-# Xen Hypercall abstraction lib for ARM architecture\r
-#\r
-# Copyright (c) 2014, Linaro Ltd. All rights reserved.<BR>\r
-# This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-##\r
-\r
-[Defines]\r
- INF_VERSION = 0x00010005\r
- BASE_NAME = XenHypercallLibArm\r
- FILE_GUID = 9607AC2E-FCB9-499B-9475-612282019568\r
- MODULE_TYPE = BASE\r
- VERSION_STRING = 1.0\r
- LIBRARY_CLASS = XenHypercallLib\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-# VALID_ARCHITECTURES = ARM AARCH64\r
-#\r
-\r
-[Sources.ARM]\r
- Arm/Hypercall.S\r
-\r
-[Sources.AARCH64]\r
- Aarch64/Hypercall.S\r
-\r
-[Sources]\r
- XenHypercall.c\r
-\r
-[Packages]\r
- MdePkg/MdePkg.dec\r
- OvmfPkg/OvmfPkg.dec\r
+++ /dev/null
-## @file\r
-# Xen Hypercall abstraction lib for Intel architecture\r
-#\r
-# Copyright (c) 2014, Linaro Ltd. All rights reserved.<BR>\r
-# This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-##\r
-\r
-[Defines]\r
- INF_VERSION = 0x00010005\r
- BASE_NAME = XenHypercallLibIntel\r
- FILE_GUID = B5EE9A32-CA5A-49A8-82E3-ADA4CCB77C7C\r
- MODULE_TYPE = BASE\r
- VERSION_STRING = 1.0\r
- LIBRARY_CLASS = XenHypercallLib|DXE_DRIVER UEFI_DRIVER\r
- CONSTRUCTOR = XenHypercallLibIntelInit\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-# VALID_ARCHITECTURES = IA32 X64\r
-#\r
-\r
-[Sources]\r
- XenHypercallIntel.c\r
-\r
-[Sources.IA32]\r
- Ia32/hypercall.nasm\r
-\r
-[Sources.X64]\r
- X64/hypercall.nasm\r
-\r
-[Sources]\r
- XenHypercall.c\r
-\r
-[Packages]\r
- MdePkg/MdePkg.dec\r
- OvmfPkg/OvmfPkg.dec\r
-\r
-[LibraryClasses]\r
- BaseLib\r
- HobLib\r
- DebugLib\r
-\r
-[Guids]\r
- gEfiXenInfoGuid\r
S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf\r
SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf\r
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf\r
- XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLibIntel.inf\r
+ XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf\r
\r
[LibraryClasses.common]\r
!if $(SECURE_BOOT_ENABLE) == TRUE\r
S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf\r
SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf\r
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf\r
- XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLibIntel.inf\r
+ XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf\r
\r
[LibraryClasses.common]\r
!if $(SECURE_BOOT_ENABLE) == TRUE\r
S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf\r
SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf\r
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf\r
- XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLibIntel.inf\r
+ XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf\r
\r
[LibraryClasses.common]\r
!if $(SECURE_BOOT_ENABLE) == TRUE\r