aboutsummaryrefslogtreecommitdiffstats
path: root/roms/edk2/OvmfPkg/Include/Protocol
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/edk2/OvmfPkg/Include/Protocol
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/edk2/OvmfPkg/Include/Protocol')
-rw-r--r--roms/edk2/OvmfPkg/Include/Protocol/Legacy8259.h291
-rw-r--r--roms/edk2/OvmfPkg/Include/Protocol/OvmfLoadedX86LinuxKernel.h32
-rw-r--r--roms/edk2/OvmfPkg/Include/Protocol/VirtioDevice.h520
-rw-r--r--roms/edk2/OvmfPkg/Include/Protocol/XenBus.h410
-rw-r--r--roms/edk2/OvmfPkg/Include/Protocol/XenIo.h42
5 files changed, 1295 insertions, 0 deletions
diff --git a/roms/edk2/OvmfPkg/Include/Protocol/Legacy8259.h b/roms/edk2/OvmfPkg/Include/Protocol/Legacy8259.h
new file mode 100644
index 000000000..7fde1c853
--- /dev/null
+++ b/roms/edk2/OvmfPkg/Include/Protocol/Legacy8259.h
@@ -0,0 +1,291 @@
+/** @file
+ This protocol abstracts the 8259 interrupt controller. This includes
+ PCI IRQ routing needed to program the PCI Interrupt Line register.
+
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+ @par Revision Reference:
+ This protocol is defined in Framework for EFI Compatibility Support Module spec
+ Version 0.97.
+
+**/
+
+#ifndef _EFI_LEGACY_8259_H_
+#define _EFI_LEGACY_8259_H_
+
+
+#define EFI_LEGACY_8259_PROTOCOL_GUID \
+ { \
+ 0x38321dba, 0x4fe0, 0x4e17, {0x8a, 0xec, 0x41, 0x30, 0x55, 0xea, 0xed, 0xc1 } \
+ }
+
+typedef struct _EFI_LEGACY_8259_PROTOCOL EFI_LEGACY_8259_PROTOCOL;
+
+typedef enum {
+ Efi8259Irq0,
+ Efi8259Irq1,
+ Efi8259Irq2,
+ Efi8259Irq3,
+ Efi8259Irq4,
+ Efi8259Irq5,
+ Efi8259Irq6,
+ Efi8259Irq7,
+ Efi8259Irq8,
+ Efi8259Irq9,
+ Efi8259Irq10,
+ Efi8259Irq11,
+ Efi8259Irq12,
+ Efi8259Irq13,
+ Efi8259Irq14,
+ Efi8259Irq15,
+ Efi8259IrqMax
+} EFI_8259_IRQ;
+
+typedef enum {
+ Efi8259LegacyMode,
+ Efi8259ProtectedMode,
+ Efi8259MaxMode
+} EFI_8259_MODE;
+
+/**
+ Get the 8259 interrupt masks for Irq0 - Irq15. A different mask exists for
+ the legacy mode mask and the protected mode mask. The base address for the 8259
+ is different for legacy and protected mode, so two masks are required.
+
+ @param This The protocol instance pointer.
+ @param MasterBase The base vector for the Master PIC in the 8259 controller.
+ @param SlaveBase The base vector for the Slave PIC in the 8259 controller.
+
+ @retval EFI_SUCCESS The new bases were programmed.
+ @retval EFI_DEVICE_ERROR A device error occurred programming the vector bases.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_LEGACY_8259_SET_VECTOR_BASE)(
+ IN EFI_LEGACY_8259_PROTOCOL *This,
+ IN UINT8 MasterBase,
+ IN UINT8 SlaveBase
+ );
+
+/**
+ Get the 8259 interrupt masks for Irq0 - Irq15. A different mask exists for
+ the legacy mode mask and the protected mode mask. The base address for the 8259
+ is different for legacy and protected mode, so two masks are required.
+
+ @param This The protocol instance pointer.
+ @param LegacyMask Bit 0 is Irq0 - Bit 15 is Irq15.
+ @param LegacyEdgeLevel Bit 0 is Irq0 - Bit 15 is Irq15.
+ @param ProtectedMask Bit 0 is Irq0 - Bit 15 is Irq15.
+ @param ProtectedEdgeLevel Bit 0 is Irq0 - Bit 15 is Irq15.
+
+ @retval EFI_SUCCESS 8259 status returned.
+ @retval EFI_DEVICE_ERROR Error reading 8259.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_LEGACY_8259_GET_MASK)(
+ IN EFI_LEGACY_8259_PROTOCOL *This,
+ OUT UINT16 *LegacyMask, OPTIONAL
+ OUT UINT16 *LegacyEdgeLevel, OPTIONAL
+ OUT UINT16 *ProtectedMask, OPTIONAL
+ OUT UINT16 *ProtectedEdgeLevel OPTIONAL
+ );
+
+/**
+ Set the 8259 interrupt masks for Irq0 - Irq15. A different mask exists for
+ the legacy mode mask and the protected mode mask. The base address for the 8259
+ is different for legacy and protected mode, so two masks are required.
+ Also set the edge/level masks.
+
+ @param This The protocol instance pointer.
+ @param LegacyMask Bit 0 is Irq0 - Bit 15 is Irq15.
+ @param LegacyEdgeLevel Bit 0 is Irq0 - Bit 15 is Irq15.
+ @param ProtectedMask Bit 0 is Irq0 - Bit 15 is Irq15.
+ @param ProtectedEdgeLevel Bit 0 is Irq0 - Bit 15 is Irq15.
+
+ @retval EFI_SUCCESS 8259 status returned.
+ @retval EFI_DEVICE_ERROR Error writing 8259.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_LEGACY_8259_SET_MASK)(
+ IN EFI_LEGACY_8259_PROTOCOL *This,
+ IN UINT16 *LegacyMask, OPTIONAL
+ IN UINT16 *LegacyEdgeLevel, OPTIONAL
+ IN UINT16 *ProtectedMask, OPTIONAL
+ IN UINT16 *ProtectedEdgeLevel OPTIONAL
+ );
+
+/**
+ Set the 8259 mode of operation. The base address for the 8259 is different for
+ legacy and protected mode. The legacy mode requires the master 8259 to have a
+ master base of 0x08 and the slave base of 0x70. The protected mode base locations
+ are not defined. Interrupts must be masked by the caller before this function
+ is called. The interrupt mask from the current mode is saved. The interrupt
+ mask for the new mode is Mask, or if Mask does not exist the previously saved
+ mask is used.
+
+ @param This The protocol instance pointer.
+ @param Mode The mode of operation. i.e. the real mode or protected mode.
+ @param Mask Optional interupt mask for the new mode.
+ @param EdgeLevel Optional trigger mask for the new mode.
+
+ @retval EFI_SUCCESS 8259 programmed.
+ @retval EFI_DEVICE_ERROR Error writing to 8259.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_LEGACY_8259_SET_MODE)(
+ IN EFI_LEGACY_8259_PROTOCOL *This,
+ IN EFI_8259_MODE Mode,
+ IN UINT16 *Mask, OPTIONAL
+ IN UINT16 *EdgeLevel OPTIONAL
+ );
+
+/**
+ Convert from IRQ to processor interrupt vector number.
+
+ @param This The protocol instance pointer.
+ @param Irq 8259 IRQ0 - IRQ15.
+ @param Vector The processor vector number that matches an Irq.
+
+ @retval EFI_SUCCESS The Vector matching Irq is returned.
+ @retval EFI_INVALID_PARAMETER The Irq not valid.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_LEGACY_8259_GET_VECTOR)(
+ IN EFI_LEGACY_8259_PROTOCOL *This,
+ IN EFI_8259_IRQ Irq,
+ OUT UINT8 *Vector
+ );
+
+/**
+ Enable Irq by unmasking interrupt in 8259
+
+ @param This The protocol instance pointer.
+ @param Irq 8259 IRQ0 - IRQ15.
+ @param LevelTriggered TRUE if level triggered. FALSE if edge triggered.
+
+ @retval EFI_SUCCESS The Irq was enabled on 8259.
+ @retval EFI_INVALID_PARAMETER The Irq is not valid.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_LEGACY_8259_ENABLE_IRQ)(
+ IN EFI_LEGACY_8259_PROTOCOL *This,
+ IN EFI_8259_IRQ Irq,
+ IN BOOLEAN LevelTriggered
+ );
+
+/**
+ Disable Irq by masking interrupt in 8259
+
+ @param This The protocol instance pointer.
+ @param Irq 8259 IRQ0 - IRQ15.
+
+ @retval EFI_SUCCESS The Irq was disabled on 8259.
+ @retval EFI_INVALID_PARAMETER The Irq is not valid.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_LEGACY_8259_DISABLE_IRQ)(
+ IN EFI_LEGACY_8259_PROTOCOL *This,
+ IN EFI_8259_IRQ Irq
+ );
+
+/**
+ PciHandle represents a PCI config space of a PCI function. Vector
+ represents Interrupt Pin (from PCI config space) and it is the data
+ that is programmed into the Interrupt Line (from the PCI config space)
+ register.
+
+ @param This The protocol instance pointer.
+ @param PciHandle The PCI function to return the vector for.
+ @param Vector The vector for the function it matches.
+
+ @retval EFI_SUCCESS A valid Vector was returned.
+ @retval EFI_INVALID_PARAMETER PciHandle not valid.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_LEGACY_8259_GET_INTERRUPT_LINE)(
+ IN EFI_LEGACY_8259_PROTOCOL *This,
+ IN EFI_HANDLE PciHandle,
+ OUT UINT8 *Vector
+ );
+
+/**
+ Send an EOI to 8259
+
+ @param This The protocol instance pointer.
+ @param Irq 8259 IRQ0 - IRQ15.
+
+ @retval EFI_SUCCESS EOI was successfully sent to 8259.
+ @retval EFI_INVALID_PARAMETER The Irq isnot valid.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_LEGACY_8259_END_OF_INTERRUPT)(
+ IN EFI_LEGACY_8259_PROTOCOL *This,
+ IN EFI_8259_IRQ Irq
+ );
+
+/**
+ @par Protocol Description:
+ Abstracts the 8259 and APIC hardware control between EFI usage and
+ Compatibility16 usage.
+
+ @param SetVectorBase
+ Sets the vector bases for master and slave PICs.
+
+ @param GetMask
+ Gets IRQ and edge/level masks for 16-bit real mode and 32-bit protected mode.
+
+ @param SetMask
+ Sets the IRQ and edge\level masks for 16-bit real mode and 32-bit protected mode.
+
+ @param SetMode
+ Sets PIC mode to 16-bit real mode or 32-bit protected mode.
+
+ @param GetVector
+ Gets the base vector assigned to an IRQ.
+
+ @param EnableIrq
+ Enables an IRQ.
+
+ @param DisableIrq
+ Disables an IRQ.
+
+ @param GetInterruptLine
+ Gets an IRQ that is assigned to a PCI device.
+
+ @param EndOfInterrupt
+ Issues the end of interrupt command.
+
+**/
+struct _EFI_LEGACY_8259_PROTOCOL {
+ EFI_LEGACY_8259_SET_VECTOR_BASE SetVectorBase;
+ EFI_LEGACY_8259_GET_MASK GetMask;
+ EFI_LEGACY_8259_SET_MASK SetMask;
+ EFI_LEGACY_8259_SET_MODE SetMode;
+ EFI_LEGACY_8259_GET_VECTOR GetVector;
+ EFI_LEGACY_8259_ENABLE_IRQ EnableIrq;
+ EFI_LEGACY_8259_DISABLE_IRQ DisableIrq;
+ EFI_LEGACY_8259_GET_INTERRUPT_LINE GetInterruptLine;
+ EFI_LEGACY_8259_END_OF_INTERRUPT EndOfInterrupt;
+};
+
+extern EFI_GUID gEfiLegacy8259ProtocolGuid;
+
+#endif
diff --git a/roms/edk2/OvmfPkg/Include/Protocol/OvmfLoadedX86LinuxKernel.h b/roms/edk2/OvmfPkg/Include/Protocol/OvmfLoadedX86LinuxKernel.h
new file mode 100644
index 000000000..01cfd9d18
--- /dev/null
+++ b/roms/edk2/OvmfPkg/Include/Protocol/OvmfLoadedX86LinuxKernel.h
@@ -0,0 +1,32 @@
+/** @file
+ Protocol/GUID definition to describe a x86 Linux kernel image loaded
+ into memory.
+
+ Note that this protocol is considered internal ABI, and may be change
+ structure at any time without regard for backward compatibility.
+
+ Copyright (c) 2020, Arm, Ltd. All rights reserved.<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef OVMF_LOADED_X86_LINUX_KERNEL_H__
+#define OVMF_LOADED_X86_LINUX_KERNEL_H__
+
+#define OVMF_LOADED_X86_LINUX_KERNEL_PROTOCOL_GUID \
+ {0xa3edc05d, 0xb618, 0x4ff6, {0x95, 0x52, 0x76, 0xd7, 0x88, 0x63, 0x43, 0xc8}}
+
+typedef struct {
+ VOID *SetupBuf;
+ VOID *KernelBuf;
+ CHAR8 *CommandLine;
+ VOID *InitrdData;
+ UINTN SetupSize;
+ UINTN KernelInitialSize;
+ UINTN InitrdSize;
+ UINTN CommandLineSize;
+} OVMF_LOADED_X86_LINUX_KERNEL;
+
+extern EFI_GUID gOvmfLoadedX86LinuxKernelProtocolGuid;
+
+#endif
diff --git a/roms/edk2/OvmfPkg/Include/Protocol/VirtioDevice.h b/roms/edk2/OvmfPkg/Include/Protocol/VirtioDevice.h
new file mode 100644
index 000000000..ea560719a
--- /dev/null
+++ b/roms/edk2/OvmfPkg/Include/Protocol/VirtioDevice.h
@@ -0,0 +1,520 @@
+/** @file
+ Virtio Device
+
+ DISCLAIMER: the VIRTIO_DEVICE_PROTOCOL introduced here is a work in progress,
+ and should not be used outside of the EDK II tree.
+
+ Copyright (c) 2013, ARM Ltd. All rights reserved.<BR>
+ Copyright (c) 2017, AMD Inc, All rights reserved.<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __VIRTIO_DEVICE_H__
+#define __VIRTIO_DEVICE_H__
+
+#include <IndustryStandard/Virtio.h>
+
+//
+// VirtIo Specification Revision: Major[31:24].Minor[23:16].Revision[15:0]
+//
+#define VIRTIO_SPEC_REVISION(major,minor,revision) \
+ ((((major) & 0xFF) << 24) | (((minor) & 0xFF) << 16) | ((revision) & 0xFFFF))
+
+#define VIRTIO_DEVICE_PROTOCOL_GUID { \
+ 0xfa920010, 0x6785, 0x4941, {0xb6, 0xec, 0x49, 0x8c, 0x57, 0x9f, 0x16, 0x0a }\
+ }
+
+typedef struct _VIRTIO_DEVICE_PROTOCOL VIRTIO_DEVICE_PROTOCOL;
+
+//
+// VIRTIO Operation for VIRTIO_MAP_SHARED
+//
+typedef enum {
+ //
+ // A read operation from system memory by a bus master
+ //
+ VirtioOperationBusMasterRead,
+ //
+ // A write operation to system memory by a bus master
+ //
+ VirtioOperationBusMasterWrite,
+ //
+ // Provides both read and write access to system memory by both the
+ // processor and a bus master
+ //
+ VirtioOperationBusMasterCommonBuffer,
+} VIRTIO_MAP_OPERATION;
+
+/**
+
+ Read a word from the device-specific I/O region of the Virtio Header.
+
+ @param[in] This This instance of VIRTIO_DEVICE_PROTOCOL
+
+ @param[in] FieldOffset Source offset.
+
+ @param[in] FieldSize Source field size in bytes, must be in {1, 2, 4, 8}.
+
+ @param[in] BufferSize Number of bytes available in the target buffer. Must
+ equal FieldSize.
+
+ @param[out] Buffer Target buffer.
+
+ @retval EFI_SUCCESS The data was read successfully.
+ @retval EFI_UNSUPPORTED The underlying IO device doesn't support the
+ provided address offset and read size.
+ @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
+ lack of resources.
+ @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *VIRTIO_DEVICE_READ) (
+ IN VIRTIO_DEVICE_PROTOCOL *This,
+ IN UINTN FieldOffset,
+ IN UINTN FieldSize,
+ IN UINTN BufferSize,
+ OUT VOID *Buffer
+ );
+
+/**
+
+ Write a word to the device-specific I/O region of the Virtio Header.
+
+ @param[in] This This instance of VIRTIO_DEVICE_PROTOCOL
+
+ @param[in] FieldOffset Destination offset.
+
+ @param[in] FieldSize Destination field size in bytes,
+ must be in {1, 2, 4, 8}.
+
+ @param[out] Value Value to write.
+
+ @retval EFI_SUCCESS The data was written successfully.
+ @retval EFI_UNSUPPORTED The underlying IO device doesn't support the
+ provided address offset and write size.
+ @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a
+ lack of resources.
+ @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *VIRTIO_DEVICE_WRITE) (
+ IN VIRTIO_DEVICE_PROTOCOL *This,
+ IN UINTN FieldOffset,
+ IN UINTN FieldSize,
+ IN UINT64 Value
+ );
+
+/**
+ Read the device features field from the Virtio Header.
+
+ @param[in] This This instance of VIRTIO_DEVICE_PROTOCOL
+
+ @param[out] DeviceFeatures The device features field.
+
+ @retval EFI_SUCCESS The data was read successfully.
+ @retval EFI_UNSUPPORTED The underlying IO device doesn't support the
+ provided address offset and read size.
+ @retval EFI_INVALID_PARAMETER DeviceFeatures is NULL
+**/
+typedef
+EFI_STATUS
+(EFIAPI *VIRTIO_GET_DEVICE_FEATURES) (
+ IN VIRTIO_DEVICE_PROTOCOL *This,
+ OUT UINT64 *DeviceFeatures
+ );
+
+/**
+ Write the guest features field in the Virtio Header.
+
+ @param[in] This This instance of VIRTIO_DEVICE_PROTOCOL
+
+ @param[in] Features The guest features field
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *VIRTIO_SET_GUEST_FEATURES) (
+ IN VIRTIO_DEVICE_PROTOCOL *This,
+ IN UINT64 Features
+ );
+
+/**
+ Write the queue address field(s) in the Virtio Header.
+
+ @param[in] This This instance of VIRTIO_DEVICE_PROTOCOL
+
+ @param[in] Ring The initialized VRING object to take the
+ addresses from. The caller is responsible for
+ ensuring that on input, all Ring->NumPages pages,
+ starting at Ring->Base, have been successfully
+ mapped with a single call to
+ This->MapSharedBuffer() for CommonBuffer bus
+ master operation.
+
+ @param[in] RingBaseShift Adding this value using UINT64 arithmetic to the
+ addresses found in Ring translates them from
+ system memory to bus addresses. The caller shall
+ calculate RingBaseShift as
+ (DeviceAddress - (UINT64)(UINTN)HostAddress),
+ where DeviceAddress and HostAddress (i.e.,
+ Ring->Base) were output and input parameters of
+ This->MapSharedBuffer(), respectively.
+
+ @retval EFI_SUCCESS The data was written successfully.
+ @retval EFI_UNSUPPORTED The underlying IO device doesn't support the
+ provided address offset and write size.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *VIRTIO_SET_QUEUE_ADDRESS) (
+ IN VIRTIO_DEVICE_PROTOCOL *This,
+ IN VRING *Ring,
+ IN UINT64 RingBaseShift
+ );
+
+/**
+
+ Write the queue select field in the Virtio Header.
+
+ Writing to the queue select field sets the index of the queue to which
+ operations such as SetQueueAlign and GetQueueNumMax apply.
+
+ @param[in] This This instance of VIRTIO_DEVICE_PROTOCOL
+
+ @param[in] Index The index of the queue to select
+
+ @retval EFI_SUCCESS The data was written successfully.
+ @retval EFI_UNSUPPORTED The underlying IO device doesn't support the
+ provided address offset and write size.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *VIRTIO_SET_QUEUE_SEL) (
+ IN VIRTIO_DEVICE_PROTOCOL *This,
+ IN UINT16 Index
+ );
+
+/**
+
+ Write the queue notify field in the Virtio Header.
+
+ @param[in] This This instance of VIRTIO_DEVICE_PROTOCOL
+
+ @param[in] Address The 32-bit Queue Notify field
+
+ @retval EFI_SUCCESS The data was written successfully.
+ @retval EFI_UNSUPPORTED The underlying IO device doesn't support the
+ provided address offset and write size.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *VIRTIO_SET_QUEUE_NOTIFY) (
+ IN VIRTIO_DEVICE_PROTOCOL *This,
+ IN UINT16 Index
+ );
+
+/**
+ Write the queue alignment field in the Virtio Header.
+
+ The queue to which the alignment applies is selected by the Queue Select
+ field.
+
+ Note: This operation is not implemented by the VirtIo over PCI. The PCI
+ implementation of this protocol returns EFI_SUCCESS.
+
+ @param[in] This This instance of VIRTIO_DEVICE_PROTOCOL
+
+ @param[in] Alignment The alignment boundary of the Used Ring in bytes.
+ Must be a power of 2.
+
+ @retval EFI_SUCCESS The data was written successfully.
+ @retval EFI_UNSUPPORTED The underlying IO device doesn't support the
+ provided address offset and write size.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *VIRTIO_SET_QUEUE_ALIGN) (
+ IN VIRTIO_DEVICE_PROTOCOL *This,
+ IN UINT32 Alignment
+ );
+
+/**
+ Write the guest page size.
+
+ Note: This operation is not implemented by the VirtIo over PCI. The PCI
+ implementation of this protocol returns EFI_SUCCESS.
+
+ @param[in] This This instance of VIRTIO_DEVICE_PROTOCOL
+
+ @param[in] PageSize Size of the Guest page in bytes.
+ Must be a power of 2.
+
+ @retval EFI_SUCCESS The data was written successfully.
+ @retval EFI_UNSUPPORTED The underlying IO device doesn't support the
+ provided address offset and write size.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *VIRTIO_SET_PAGE_SIZE) (
+ IN VIRTIO_DEVICE_PROTOCOL *This,
+ IN UINT32 PageSize
+ );
+
+/**
+
+ Get the size of the virtqueue selected by the queue select field.
+
+ See Virtio spec Section 2.3
+
+ @param[in] This This instance of VIRTIO_DEVICE_PROTOCOL
+
+ @param[out] QueueNumMax The size of the virtqueue in bytes.
+ Always a power of 2.
+
+ @retval EFI_SUCCESS The data was read successfully.
+ @retval EFI_UNSUPPORTED The underlying IO device doesn't support the
+ provided address offset and read size.
+ @retval EFI_INVALID_PARAMETER QueueNumMax is NULL
+**/
+typedef
+EFI_STATUS
+(EFIAPI *VIRTIO_GET_QUEUE_NUM_MAX) (
+ IN VIRTIO_DEVICE_PROTOCOL *This,
+ OUT UINT16 *QueueNumMax
+ );
+
+/**
+
+ Write to the QueueNum field in the Virtio Header.
+
+ This function only applies to Virtio-MMIO and may be a stub for other
+ implementations. See Virtio Spec appendix X.
+
+ @param[in] This This instance of VIRTIO_DEVICE_PROTOCOL
+
+ @param[in] QueueSize The number of elements in the queue.
+
+ @retval EFI_SUCCESS The data was written successfully.
+ @retval EFI_UNSUPPORTED The underlying IO device doesn't support the
+ provided address offset and write size.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *VIRTIO_SET_QUEUE_NUM) (
+ IN VIRTIO_DEVICE_PROTOCOL *This,
+ IN UINT16 QueueSize
+ );
+
+/**
+
+ Get the DeviceStatus field from the Virtio Header.
+
+ @param[in] This This instance of VIRTIO_DEVICE_PROTOCOL
+
+ @param[out] DeviceStatus The 8-bit value for the Device status field
+
+ @retval EFI_SUCCESS The data was read successfully.
+ @retval EFI_UNSUPPORTED The underlying IO device doesn't support the
+ provided address offset and read size.
+ @retval EFI_INVALID_PARAMETER DeviceStatus is NULL
+**/
+typedef
+EFI_STATUS
+(EFIAPI *VIRTIO_GET_DEVICE_STATUS) (
+ IN VIRTIO_DEVICE_PROTOCOL *This,
+ OUT UINT8 *DeviceStatus
+ );
+
+/**
+
+ Write the DeviceStatus field in the Virtio Header.
+
+ @param[in] This This instance of VIRTIO_DEVICE_PROTOCOL
+
+ @param[in] DeviceStatus The 8-bit value for the Device status field
+
+ @retval EFI_SUCCESS The data was written successfully.
+ @retval EFI_UNSUPPORTED The underlying IO device doesn't support the
+ provided address offset and write size.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *VIRTIO_SET_DEVICE_STATUS) (
+ IN VIRTIO_DEVICE_PROTOCOL *This,
+ IN UINT8 DeviceStatus
+ );
+
+/**
+
+ Allocates pages that are suitable for an VirtioOperationBusMasterCommonBuffer
+ mapping. This means that the buffer allocated by this function supports
+ simultaneous access by both the processor and the bus master. The device
+ address that the bus master uses to access the buffer must be retrieved with
+ a call to VIRTIO_MAP_SHARED.
+
+ @param[in] This The protocol instance pointer.
+
+ @param[in] Pages The number of pages to allocate.
+
+ @param[in,out] HostAddress A pointer to store the system memory base
+ address of the allocated range.
+
+ @retval EFI_SUCCESS The requested memory pages were allocated.
+ @retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *VIRTIO_ALLOCATE_SHARED)(
+ IN VIRTIO_DEVICE_PROTOCOL *This,
+ IN UINTN Pages,
+ IN OUT VOID **HostAddress
+ );
+
+/**
+ Frees memory that was allocated with VIRTIO_ALLOCATE_SHARED.
+
+ @param[in] This The protocol instance pointer.
+
+ @param[in] Pages The number of pages to free.
+
+ @param[in] HostAddress The system memory base address of the allocated
+ range.
+
+**/
+typedef
+VOID
+(EFIAPI *VIRTIO_FREE_SHARED)(
+ IN VIRTIO_DEVICE_PROTOCOL *This,
+ IN UINTN Pages,
+ IN VOID *HostAddress
+ );
+
+/**
+ Provides the virtio device address required to access system memory from a
+ DMA bus master.
+
+ The interface follows the same usage pattern as defined in UEFI spec 2.6
+ (Section 13.2 PCI Root Bridge I/O Protocol)
+
+ @param[in] This The protocol instance pointer.
+
+ @param[in] Operation Indicates if the bus master is going to
+ read or write to system memory.
+
+ @param[in] HostAddress The system memory address to map to shared
+ buffer address.
+
+ @param[in,out] NumberOfBytes On input the number of bytes to map.
+ On output the number of bytes that were
+ mapped.
+
+ @param[out] DeviceAddress The resulting shared map address for the
+ bus master to access the hosts HostAddress.
+
+ @param[out] Mapping A resulting token to pass to
+ VIRTIO_UNMAP_SHARED.
+
+ @retval EFI_SUCCESS The range was mapped for the returned
+ NumberOfBytes.
+ @retval EFI_UNSUPPORTED The HostAddress cannot be mapped as a
+ common buffer.
+ @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
+ @retval EFI_OUT_OF_RESOURCES The request could not be completed due to
+ a lack of resources.
+ @retval EFI_DEVICE_ERROR The system hardware could not map the
+ requested address.
+**/
+
+typedef
+EFI_STATUS
+(EFIAPI *VIRTIO_MAP_SHARED) (
+ IN VIRTIO_DEVICE_PROTOCOL *This,
+ IN VIRTIO_MAP_OPERATION Operation,
+ IN VOID *HostAddress,
+ IN OUT UINTN *NumberOfBytes,
+ OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
+ OUT VOID **Mapping
+ );
+
+/**
+ Completes the VIRTIO_MAP_SHARED operation and releases any corresponding
+ resources.
+
+ @param[in] This The protocol instance pointer.
+
+ @param[in] Mapping The mapping token returned from
+ VIRTIO_MAP_SHARED.
+
+ @retval EFI_SUCCESS The range was unmapped.
+ @retval EFI_INVALID_PARAMETER Mapping is not a value that was returned by
+ VIRTIO_MAP_SHARED. Passing an invalid Mapping
+ token can cause undefined behavior.
+ @retval EFI_DEVICE_ERROR The data was not committed to the target
+ system memory.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *VIRTIO_UNMAP_SHARED)(
+ IN VIRTIO_DEVICE_PROTOCOL *This,
+ IN VOID *Mapping
+ );
+
+///
+/// This protocol provides an abstraction over the VirtIo transport layer
+///
+/// DISCLAIMER: this protocol is a work in progress, and should not be used
+/// outside of the EDK II tree.
+///
+struct _VIRTIO_DEVICE_PROTOCOL {
+ //
+ // VirtIo Specification Revision encoded with VIRTIO_SPEC_REVISION()
+ //
+ UINT32 Revision;
+ //
+ // From the Virtio Spec
+ //
+ INT32 SubSystemDeviceId;
+
+ VIRTIO_GET_DEVICE_FEATURES GetDeviceFeatures;
+ VIRTIO_SET_GUEST_FEATURES SetGuestFeatures;
+
+ VIRTIO_SET_QUEUE_ADDRESS SetQueueAddress;
+
+ VIRTIO_SET_QUEUE_SEL SetQueueSel;
+
+ VIRTIO_SET_QUEUE_NOTIFY SetQueueNotify;
+
+ VIRTIO_SET_QUEUE_ALIGN SetQueueAlign;
+ VIRTIO_SET_PAGE_SIZE SetPageSize;
+
+ VIRTIO_GET_QUEUE_NUM_MAX GetQueueNumMax;
+ VIRTIO_SET_QUEUE_NUM SetQueueNum;
+
+ VIRTIO_GET_DEVICE_STATUS GetDeviceStatus;
+ VIRTIO_SET_DEVICE_STATUS SetDeviceStatus;
+
+ //
+ // Functions to read/write Device Specific headers
+ //
+ VIRTIO_DEVICE_WRITE WriteDevice;
+ VIRTIO_DEVICE_READ ReadDevice;
+
+ //
+ // Functions to allocate, free, map and unmap shared buffer
+ //
+ VIRTIO_ALLOCATE_SHARED AllocateSharedPages;
+ VIRTIO_FREE_SHARED FreeSharedPages;
+ VIRTIO_MAP_SHARED MapSharedBuffer;
+ VIRTIO_UNMAP_SHARED UnmapSharedBuffer;
+};
+
+extern EFI_GUID gVirtioDeviceProtocolGuid;
+
+#endif
diff --git a/roms/edk2/OvmfPkg/Include/Protocol/XenBus.h b/roms/edk2/OvmfPkg/Include/Protocol/XenBus.h
new file mode 100644
index 000000000..0dac92662
--- /dev/null
+++ b/roms/edk2/OvmfPkg/Include/Protocol/XenBus.h
@@ -0,0 +1,410 @@
+
+/** @file
+ XenBus protocol to be used between the XenBus bus driver and Xen PV devices.
+
+ DISCLAIMER: the XENBUS_PROTOCOL introduced here is a work in progress, and
+ should not be used outside of the EDK II tree.
+
+ This protocol provide the necessary for a Xen PV driver frontend to
+ communicate with the bus driver, and perform several task to
+ initialize/shutdown a PV device and perform IO with a PV backend.
+
+ Copyright (C) 2014, Citrix Ltd.
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __PROTOCOL_XENBUS_H__
+#define __PROTOCOL_XENBUS_H__
+
+#define XENBUS_PROTOCOL_GUID \
+ {0x3d3ca290, 0xb9a5, 0x11e3, {0xb7, 0x5d, 0xb8, 0xac, 0x6f, 0x7d, 0x65, 0xe6}}
+
+///
+/// Forward declaration
+///
+typedef struct _XENBUS_PROTOCOL XENBUS_PROTOCOL;
+
+typedef enum xenbus_state XenBusState;
+
+typedef struct
+{
+ UINT32 Id;
+} XENSTORE_TRANSACTION;
+
+#define XST_NIL ((XENSTORE_TRANSACTION *) NULL)
+
+typedef enum {
+ XENSTORE_STATUS_SUCCESS = 0,
+ XENSTORE_STATUS_FAIL,
+ XENSTORE_STATUS_EINVAL,
+ XENSTORE_STATUS_EACCES,
+ XENSTORE_STATUS_EEXIST,
+ XENSTORE_STATUS_EISDIR,
+ XENSTORE_STATUS_ENOENT,
+ XENSTORE_STATUS_ENOMEM,
+ XENSTORE_STATUS_ENOSPC,
+ XENSTORE_STATUS_EIO,
+ XENSTORE_STATUS_ENOTEMPTY,
+ XENSTORE_STATUS_ENOSYS,
+ XENSTORE_STATUS_EROFS,
+ XENSTORE_STATUS_EBUSY,
+ XENSTORE_STATUS_EAGAIN,
+ XENSTORE_STATUS_EISCONN,
+ XENSTORE_STATUS_E2BIG
+} XENSTORE_STATUS;
+
+
+#include <IndustryStandard/Xen/grant_table.h>
+#include <IndustryStandard/Xen/event_channel.h>
+
+///
+/// Function prototypes
+///
+
+/**
+ Get the contents of the node Node of the PV device. Returns the contents in
+ *Result which should be freed after use.
+
+ @param This A pointer to XENBUS_PROTOCOL instance.
+ @param Transaction The XenStore transaction covering this request.
+ @param Node The basename of the file to read.
+ @param Result The returned contents from this file.
+
+ @return On success, XENSTORE_STATUS_SUCCESS. Otherwise an errno value
+ indicating the type of failure.
+
+ @note The results buffer is malloced and should be free'd by the
+ caller.
+**/
+typedef
+XENSTORE_STATUS
+(EFIAPI *XENBUS_XS_READ)(
+ IN XENBUS_PROTOCOL *This,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
+ IN CONST CHAR8 *Node,
+ OUT VOID **Result
+ );
+
+/**
+ Get the contents of the node Node of the PV device's backend. Returns the
+ contents in *Result which should be freed after use.
+
+ @param This A pointer to XENBUS_PROTOCOL instance.
+ @param Transaction The XenStore transaction covering this request.
+ @param Node The basename of the file to read.
+ @param Result The returned contents from this file.
+
+ @return On success, XENSTORE_STATUS_SUCCESS. Otherwise an errno value
+ indicating the type of failure.
+
+ @note The results buffer is malloced and should be free'd by the
+ caller.
+**/
+typedef
+XENSTORE_STATUS
+(EFIAPI *XENBUS_XS_BACKEND_READ)(
+ IN XENBUS_PROTOCOL *This,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
+ IN CONST CHAR8 *Node,
+ OUT VOID **Result
+ );
+
+/**
+ Print formatted write to a XenStore node.
+
+ @param This A pointer to XENBUS_PROTOCOL instance.
+ @param Transaction The XenStore transaction covering this request.
+ @param Directory The dirname of the path to read.
+ @param Node The basename of the path to read.
+ @param Format AsciiSPrint format string followed by a variable number
+ of arguments.
+
+ @return On success, XENSTORE_STATUS_SUCCESS. Otherwise an errno value
+ indicating the type of write failure.
+**/
+typedef
+XENSTORE_STATUS
+(EFIAPI *XENBUS_XS_PRINTF) (
+ IN XENBUS_PROTOCOL *This,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
+ IN CONST CHAR8 *Directory,
+ IN CONST CHAR8 *Node,
+ IN CONST CHAR8 *Format,
+ ...
+ );
+
+/**
+ Remove a node or directory (directories must be empty) of the PV driver's
+ subdirectory.
+
+ @param This A pointer to XENBUS_PROTOCOL instance.
+ @param Transaction The XenStore transaction covering this request.
+ @param Node The basename of the node to remove.
+
+ @return On success, XENSTORE_STATUS_SUCCESS. Otherwise an errno value
+ indicating the type of failure.
+**/
+typedef
+XENSTORE_STATUS
+(EFIAPI *XENBUS_XS_REMOVE) (
+ IN XENBUS_PROTOCOL *This,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
+ IN CONST CHAR8 *Node
+ );
+
+/**
+ Start a transaction.
+
+ Changes by others will not be seen during the lifetime of this
+ transaction, and changes will not be visible to others until it
+ is committed (XsTransactionEnd).
+
+ @param This A pointer to XENBUS_PROTOCOL instance.
+ @param Transaction The returned transaction.
+
+ @return On success, XENSTORE_STATUS_SUCCESS. Otherwise an errno value
+ indicating the type of failure.
+**/
+typedef
+XENSTORE_STATUS
+(EFIAPI *XENBUS_XS_TRANSACTION_START)(
+ IN XENBUS_PROTOCOL *This,
+ OUT XENSTORE_TRANSACTION *Transaction
+ );
+
+/**
+ End a transaction.
+
+ @param This A pointer to XENBUS_PROTOCOL instance.
+ @param Transaction The transaction to end/commit.
+ @param Abort If TRUE, the transaction is discarded
+ instead of committed.
+
+ @return On success, XENSTORE_STATUS_SUCCESS. Otherwise an errno value
+ indicating the type of failure.
+**/
+typedef
+XENSTORE_STATUS
+(EFIAPI *XENBUS_XS_TRANSACTION_END) (
+ IN XENBUS_PROTOCOL *This,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
+ IN BOOLEAN Abort
+ );
+
+/**
+ Set a new state for the frontend of the PV driver.
+
+ @param This A pointer to XENBUS_PROTOCOL instance.
+ @param Transaction The transaction to end/commit.
+ @param State The new state to apply.
+
+ @return On success, XENSTORE_STATUS_SUCCESS. Otherwise an errno value
+ indicating the type of failure.
+**/
+typedef
+XENSTORE_STATUS
+(EFIAPI *XENBUS_SET_STATE)(
+ IN XENBUS_PROTOCOL *This,
+ IN CONST XENSTORE_TRANSACTION *Transaction,
+ IN XenBusState State
+ );
+
+/**
+ Grant access to the page Frame to the domain DomainId.
+
+ @param This A pointer to XENBUS_PROTOCOL instance.
+ @param DomainId ID of the domain to grant access to.
+ @param Frame Frame Number of the page to grant access to.
+ @param ReadOnly Provide read-only or read-write access.
+ @param RefPtr Reference number of the grant will be written to this pointer.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *XENBUS_GRANT_ACCESS)(
+ IN XENBUS_PROTOCOL *This,
+ IN domid_t DomainId,
+ IN UINTN Frame,
+ IN BOOLEAN ReadOnly,
+ OUT grant_ref_t *refp
+ );
+
+/**
+ End access to grant Ref, previously return by XenBusGrantAccess.
+
+ @param This A pointer to XENBUS_PROTOCOL instance.
+ @param Ref Reference numeber of a grant previously returned by
+ XenBusGrantAccess.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *XENBUS_GRANT_END_ACCESS)(
+ IN XENBUS_PROTOCOL *This,
+ IN grant_ref_t Ref
+ );
+
+/**
+ Allocate a port that can be bind from domain DomainId.
+
+ @param This A pointer to the XENBUS_PROTOCOL.
+ @param DomainId The domain ID that can bind the newly allocated port.
+ @param Port A pointer to a evtchn_port_t that will contain the newly
+ allocated port.
+
+ @retval UINT32 The return value from the hypercall, 0 if success.
+**/
+typedef
+UINT32
+(EFIAPI *XENBUS_EVENT_CHANNEL_ALLOCATE) (
+ IN XENBUS_PROTOCOL *This,
+ IN domid_t DomainId,
+ OUT evtchn_port_t *Port
+ );
+
+/**
+ Send an event to the remote end of the channel whose local endpoint is Port.
+
+ @param This A pointer to the XENBUS_PROTOCOL.
+ @param Port Local port to the event from.
+
+ @retval UINT32 The return value from the hypercall, 0 if success.
+**/
+typedef
+UINT32
+(EFIAPI *XENBUS_EVENT_CHANNEL_NOTIFY) (
+ IN XENBUS_PROTOCOL *This,
+ IN evtchn_port_t Port
+ );
+
+/**
+ Close a local event channel Port.
+
+ @param This A pointer to the XENBUS_PROTOCOL.
+ @param Port The event channel to close.
+
+ @retval UINT32 The return value from the hypercall, 0 if success.
+**/
+typedef
+UINT32
+(EFIAPI *XENBUS_EVENT_CHANNEL_CLOSE) (
+ IN XENBUS_PROTOCOL *This,
+ IN evtchn_port_t Port
+ );
+
+/**
+ Register a XenStore watch.
+
+ XenStore watches allow a client to wait for changes to an object in the
+ XenStore.
+
+ @param This A pointer to the XENBUS_PROTOCOL.
+ @param Node The basename of the path to watch.
+ @param Token A token.
+
+ @return On success, XENSTORE_STATUS_SUCCESS. Otherwise an errno value
+ indicating the type of write failure. EEXIST errors from the
+ XenStore are suppressed, allowing multiple, physically different,
+ xenbus_watch objects, to watch the same path in the XenStore.
+**/
+typedef
+XENSTORE_STATUS
+(EFIAPI *XENBUS_REGISTER_WATCH) (
+ IN XENBUS_PROTOCOL *This,
+ IN CONST CHAR8 *Node,
+ OUT VOID **Token
+ );
+
+/**
+ Register a XenStore watch on a backend's node.
+
+ XenStore watches allow a client to wait for changes to an object in the
+ XenStore.
+
+ @param This A pointer to the XENBUS_PROTOCOL.
+ @param Node The basename of the path to watch.
+ @param Token A token.
+
+ @return On success, XENSTORE_STATUS_SUCCESS. Otherwise an errno value
+ indicating the type of write failure. EEXIST errors from the
+ XenStore are suppressed, allowing multiple, physically different,
+ xenbus_watch objects, to watch the same path in the XenStore.
+**/
+typedef
+XENSTORE_STATUS
+(EFIAPI *XENBUS_REGISTER_WATCH_BACKEND) (
+ IN XENBUS_PROTOCOL *This,
+ IN CONST CHAR8 *Node,
+ OUT VOID **Token
+ );
+
+/**
+ Unregister a XenStore watch.
+
+ @param This A pointer to the XENBUS_PROTOCOL.
+ @param Token An token previously returned by a successful
+ call to RegisterWatch ().
+**/
+typedef
+VOID
+(EFIAPI *XENBUS_UNREGISTER_WATCH) (
+ IN XENBUS_PROTOCOL *This,
+ IN VOID *Token
+ );
+
+/**
+ Block until the node watch by Token change.
+
+ @param This A pointer to the XENBUS_PROTOCOL.
+ @param Token An token previously returned by a successful
+ call to RegisterWatch or RegisterWatchBackend.
+
+ @return On success, XENSTORE_STATUS_SUCCESS. Otherwise an errno value
+ indicating the type of failure.
+**/
+typedef
+XENSTORE_STATUS
+(EFIAPI *XENBUS_WAIT_FOR_WATCH) (
+ IN XENBUS_PROTOCOL *This,
+ IN VOID *Token
+ );
+
+
+///
+/// Protocol structure
+///
+/// DISCLAIMER: the XENBUS_PROTOCOL introduced here is a work in progress, and
+/// should not be used outside of the EDK II tree.
+///
+struct _XENBUS_PROTOCOL {
+ XENBUS_XS_READ XsRead;
+ XENBUS_XS_BACKEND_READ XsBackendRead;
+ XENBUS_XS_PRINTF XsPrintf;
+ XENBUS_XS_REMOVE XsRemove;
+ XENBUS_XS_TRANSACTION_START XsTransactionStart;
+ XENBUS_XS_TRANSACTION_END XsTransactionEnd;
+ XENBUS_SET_STATE SetState;
+
+ XENBUS_GRANT_ACCESS GrantAccess;
+ XENBUS_GRANT_END_ACCESS GrantEndAccess;
+
+ XENBUS_EVENT_CHANNEL_ALLOCATE EventChannelAllocate;
+ XENBUS_EVENT_CHANNEL_NOTIFY EventChannelNotify;
+ XENBUS_EVENT_CHANNEL_CLOSE EventChannelClose;
+
+ XENBUS_REGISTER_WATCH RegisterWatch;
+ XENBUS_REGISTER_WATCH_BACKEND RegisterWatchBackend;
+ XENBUS_UNREGISTER_WATCH UnregisterWatch;
+ XENBUS_WAIT_FOR_WATCH WaitForWatch;
+ //
+ // Protocol data fields
+ //
+ CONST CHAR8 *Type;
+ UINT16 DeviceId;
+ CONST CHAR8 *Node;
+ CONST CHAR8 *Backend;
+};
+
+extern EFI_GUID gXenBusProtocolGuid;
+
+#endif
diff --git a/roms/edk2/OvmfPkg/Include/Protocol/XenIo.h b/roms/edk2/OvmfPkg/Include/Protocol/XenIo.h
new file mode 100644
index 000000000..f4051ca50
--- /dev/null
+++ b/roms/edk2/OvmfPkg/Include/Protocol/XenIo.h
@@ -0,0 +1,42 @@
+/** @file
+ XenIo protocol to abstract arch specific details
+
+ The Xen implementations for the Intel and ARM architectures differ in the way
+ the base address of the grant table is communicated to the guest. The former
+ uses a virtual PCI device, while the latter uses a device tree node.
+ In order to allow the XenBusDxe UEFI driver to be reused for the non-PCI
+ Xen implementation, this abstract protocol can be installed on a handle
+ with the appropriate base address.
+
+ Copyright (C) 2014, Linaro Ltd.
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __PROTOCOL_XENIO_H__
+#define __PROTOCOL_XENIO_H__
+
+#include <IndustryStandard/Xen/xen.h>
+
+#define XENIO_PROTOCOL_GUID \
+ {0x6efac84f, 0x0ab0, 0x4747, {0x81, 0xbe, 0x85, 0x55, 0x62, 0x59, 0x04, 0x49}}
+
+///
+/// Forward declaration
+///
+typedef struct _XENIO_PROTOCOL XENIO_PROTOCOL;
+
+///
+/// Protocol structure
+///
+struct _XENIO_PROTOCOL {
+ //
+ // Protocol data fields
+ //
+ EFI_PHYSICAL_ADDRESS GrantTableAddress;
+};
+
+extern EFI_GUID gXenIoProtocolGuid;
+
+#endif