# USB Libraries\r
UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf\r
\r
+ XenIoMmioLib|OvmfPkg/Library/XenIoMmioLib/XenIoMmioLib.inf\r
+\r
[LibraryClasses.common.SEC]\r
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
ArmPlatformSecExtraActionLib|ArmPlatformPkg/Library/DebugSecExtraActionLib/DebugSecExtraActionLib.inf\r
#include <Library/DxeServicesLib.h>\r
#include <Library/HobLib.h>\r
#include <libfdt.h>\r
+#include <Library/XenIoMmioLib.h>\r
\r
#include <Guid/Fdt.h>\r
#include <Guid/VirtioMmioTransport.h>\r
PropertyTypeFwCfg,\r
PropertyTypePciHost,\r
PropertyTypeGicV3,\r
+ PropertyTypeXen,\r
} PROPERTY_TYPE;\r
\r
typedef struct {\r
{ PropertyTypeFwCfg, "qemu,fw-cfg-mmio" },\r
{ PropertyTypePciHost, "pci-host-ecam-generic" },\r
{ PropertyTypeGicV3, "arm,gic-v3" },\r
+ { PropertyTypeXen, "xen,xen" },\r
{ PropertyTypeUnknown, "" }\r
};\r
\r
}\r
break;\r
\r
+ case PropertyTypeXen:\r
+ ASSERT (Len == 16);\r
+\r
+ //\r
+ // Retrieve the reg base from this node and wire it up to the\r
+ // MMIO flavor of the XenBus root device I/O protocol\r
+ //\r
+ RegBase = fdt64_to_cpu (((UINT64 *)RegProp)[0]);\r
+ Handle = NULL;\r
+ Status = XenIoMmioInstall (&Handle, RegBase);\r
+ if (EFI_ERROR (Status)) {\r
+ DEBUG ((EFI_D_ERROR, "%a: XenIoMmioInstall () failed on a new handle "\r
+ "(Status == %r)\n", __FUNCTION__, Status));\r
+ break;\r
+ }\r
+\r
+ DEBUG ((EFI_D_INFO, "Found Xen node with Grant table @ 0x%Lx\n", RegBase));\r
+\r
+ break;\r
+\r
default:\r
break;\r
}\r