Revision: 16980
http://sourceforge.net/p/edk2/code/16980
Author: lersek
Date: 2015-02-28 20:34:26 +0000 (Sat, 28 Feb 2015)
Log Message:
-----------
ArmVirtualizationPkg/VirtFdtDxe: wire up XenBusDxe to "xen,xen" DT node
This patchs adds support to VirtFdtDxe for the Xen DT node which
contains the base address of the Grant Table. This data is communicated
to XenBusDxe using a XENIO_PROTOCOL instance.
Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Laszlo Ersek <[email protected]>
Reviewed-by: Olivier Martin <[email protected]>
Signed-off-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Laszlo Ersek <[email protected]>
Modified Paths:
--------------
trunk/edk2/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualization.dsc.inc
trunk/edk2/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.c
trunk/edk2/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf
Modified:
trunk/edk2/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualization.dsc.inc
===================================================================
--- trunk/edk2/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualization.dsc.inc
2015-02-28 20:34:16 UTC (rev 16979)
+++ trunk/edk2/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualization.dsc.inc
2015-02-28 20:34:26 UTC (rev 16980)
@@ -107,6 +107,8 @@
# USB Libraries
UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
+ XenIoMmioLib|OvmfPkg/Library/XenIoMmioLib/XenIoMmioLib.inf
+
[LibraryClasses.common.SEC]
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
ArmPlatformSecExtraActionLib|ArmPlatformPkg/Library/DebugSecExtraActionLib/DebugSecExtraActionLib.inf
Modified: trunk/edk2/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.c
===================================================================
--- trunk/edk2/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.c
2015-02-28 20:34:16 UTC (rev 16979)
+++ trunk/edk2/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.c
2015-02-28 20:34:26 UTC (rev 16980)
@@ -26,6 +26,7 @@
#include <Library/DxeServicesLib.h>
#include <Library/HobLib.h>
#include <libfdt.h>
+#include <Library/XenIoMmioLib.h>
#include <Guid/Fdt.h>
#include <Guid/VirtioMmioTransport.h>
@@ -50,6 +51,7 @@
PropertyTypeFwCfg,
PropertyTypePciHost,
PropertyTypeGicV3,
+ PropertyTypeXen,
} PROPERTY_TYPE;
typedef struct {
@@ -68,6 +70,7 @@
{ PropertyTypeFwCfg, "qemu,fw-cfg-mmio" },
{ PropertyTypePciHost, "pci-host-ecam-generic" },
{ PropertyTypeGicV3, "arm,gic-v3" },
+ { PropertyTypeXen, "xen,xen" },
{ PropertyTypeUnknown, "" }
};
@@ -523,6 +526,26 @@
}
break;
+ case PropertyTypeXen:
+ ASSERT (Len == 16);
+
+ //
+ // Retrieve the reg base from this node and wire it up to the
+ // MMIO flavor of the XenBus root device I/O protocol
+ //
+ RegBase = fdt64_to_cpu (((UINT64 *)RegProp)[0]);
+ Handle = NULL;
+ Status = XenIoMmioInstall (&Handle, RegBase);
+ if (EFI_ERROR (Status)) {
+ DEBUG ((EFI_D_ERROR, "%a: XenIoMmioInstall () failed on a new handle "
+ "(Status == %r)\n", __FUNCTION__, Status));
+ break;
+ }
+
+ DEBUG ((EFI_D_INFO, "Found Xen node with Grant table @ 0x%Lx\n",
RegBase));
+
+ break;
+
default:
break;
}
Modified:
trunk/edk2/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf
===================================================================
--- trunk/edk2/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf
2015-02-28 20:34:16 UTC (rev 16979)
+++ trunk/edk2/ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf
2015-02-28 20:34:26 UTC (rev 16980)
@@ -42,6 +42,7 @@
FdtLib
VirtioMmioDeviceLib
HobLib
+ XenIoMmioLib
[Guids]
gFdtTableGuid
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits