aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/common-spar/include/channels/controlvmchannel.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/unisys/common-spar/include/channels/controlvmchannel.h')
-rw-r--r--drivers/staging/unisys/common-spar/include/channels/controlvmchannel.h623
1 files changed, 256 insertions, 367 deletions
diff --git a/drivers/staging/unisys/common-spar/include/channels/controlvmchannel.h b/drivers/staging/unisys/common-spar/include/channels/controlvmchannel.h
index d08c198e0de3..a66db7968d6c 100644
--- a/drivers/staging/unisys/common-spar/include/channels/controlvmchannel.h
+++ b/drivers/staging/unisys/common-spar/include/channels/controlvmchannel.h
@@ -27,12 +27,12 @@ enum { INVALID_GUEST_FIRMWARE, SAMPLE_GUEST_FIRMWARE,
};
/* {2B3C2D10-7EF5-4ad8-B966-3448B7386B3D} */
-#define ULTRA_CONTROLVM_CHANNEL_PROTOCOL_GUID \
+#define SPAR_CONTROLVM_CHANNEL_PROTOCOL_UUID \
UUID_LE(0x2b3c2d10, 0x7ef5, 0x4ad8, \
0xb9, 0x66, 0x34, 0x48, 0xb7, 0x38, 0x6b, 0x3d)
-static const uuid_le UltraControlvmChannelProtocolGuid =
- ULTRA_CONTROLVM_CHANNEL_PROTOCOL_GUID;
+static const uuid_le spar_controlvm_channel_protocol_uuid =
+ SPAR_CONTROLVM_CHANNEL_PROTOCOL_UUID;
#define ULTRA_CONTROLVM_CHANNEL_PROTOCOL_SIGNATURE \
ULTRA_CHANNEL_PROTOCOL_SIGNATURE
@@ -45,19 +45,13 @@ static const uuid_le UltraControlvmChannelProtocolGuid =
* channel struct withOUT needing to increment this. */
#define ULTRA_CONTROLVM_CHANNEL_PROTOCOL_VERSIONID 1
-#define ULTRA_CONTROLVM_CHANNEL_OK_CLIENT(pChannel, logCtx) \
- (ULTRA_check_channel_client(pChannel, \
- UltraControlvmChannelProtocolGuid, \
+#define SPAR_CONTROLVM_CHANNEL_OK_CLIENT(ch) \
+ spar_check_channel_client(ch, \
+ spar_controlvm_channel_protocol_uuid, \
"controlvm", \
- sizeof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL), \
+ sizeof(struct spar_controlvm_channel_protocol), \
ULTRA_CONTROLVM_CHANNEL_PROTOCOL_VERSIONID, \
- ULTRA_CONTROLVM_CHANNEL_PROTOCOL_SIGNATURE, \
- __FILE__, __LINE__, logCtx))
-#define ULTRA_CONTROLVM_CHANNEL_OK_SERVER(actualBytes, logCtx) \
- (ULTRA_check_channel_server(UltraControlvmChannelProtocolGuid, \
- "controlvm", \
- sizeof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL), \
- actualBytes, __FILE__, __LINE__, logCtx))
+ ULTRA_CONTROLVM_CHANNEL_PROTOCOL_SIGNATURE)
#define MY_DEVICE_INDEX 0
#define MAX_MACDATA_LEN 8 /* number of bytes for MAC address in config packet */
@@ -88,7 +82,7 @@ static const uuid_le UltraControlvmChannelProtocolGuid =
* - issued on the EventQueue queue (q #2) in the ControlVm channel
* - responded to on the EventAckQueue queue (q #3) in the ControlVm channel
*/
-typedef enum {
+enum controlvm_id {
CONTROLVM_INVALID = 0,
/* SWITCH commands required Parameter: SwitchNumber */
/* BUS commands required Parameter: BusNumber */
@@ -117,9 +111,9 @@ typedef enum {
CONTROLVM_CHIPSET_READY = 0x304, /* CP --> SP */
CONTROLVM_CHIPSET_SELFTEST = 0x305, /* CP --> SP */
-} CONTROLVM_ID;
+};
-struct InterruptInfo {
+struct irq_info {
/**< specifies interrupt info. It is used to send interrupts
* for this channel. The peer at the end of this channel
* who has registered an interrupt (using recv fields
@@ -128,495 +122,390 @@ struct InterruptInfo {
* interrupt. Currently this is used by IOPart-SP to wake
* up GP when Data Channel transitions from empty to
* non-empty.*/
- u64 sendInterruptHandle;
+ u64 send_irq_handle;
/**< specifies interrupt handle. It is used to retrieve the
* corresponding interrupt pin from Monitor; and the
* interrupt pin is used to connect to the corresponding
- * intrrupt. Used by IOPart-GP only. */
- u64 recvInterruptHandle;
+ * interrupt. Used by IOPart-GP only. */
+ u64 recv_irq_handle;
/**< specifies interrupt vector. It, interrupt pin, and shared are
* used to connect to the corresponding interrupt. Used by
* IOPart-GP only. */
- u32 recvInterruptVector;
+ u32 recv_irq_vector;
/**< specifies if the recvInterrupt is shared. It, interrupt pin
* and vector are used to connect to 0 = not shared; 1 = shared.
* the corresponding interrupt. Used by IOPart-GP only. */
- u8 recvInterruptShared;
+ u8 recv_irq_shared;
u8 reserved[3]; /* Natural alignment purposes */
};
-struct PciId {
- u16 Domain;
- u8 Bus;
- u8 Slot;
- u8 Func;
- u8 Reserved[3]; /* Natural alignment purposes */
-};
-
-struct PciConfigHdr {
- u16 VendorId;
- u16 SubSysVendor;
- u16 DeviceId;
- u16 SubSysDevice;
- u32 ClassCode;
- u32 Reserved; /* Natural alignment purposes */
-};
-
-struct ScsiId {
- u32 Bus;
- u32 Target;
- u32 Lun;
- u32 Host; /* Command should ignore this for *
- * DiskArrival/RemovalEvents */
-};
-
-struct WWID {
- u32 wwid1;
- u32 wwid2;
-};
-
-struct virtDiskInfo {
- u32 switchNo; /* defined by SWITCH_CREATE */
- u32 externalPortNo; /* 0 for SAS RAID provided (external)
- * virtual disks, 1 for virtual disk
- * images, 2 for gold disk images */
- u16 VirtualDiskIndex; /* Index of disk descriptor in the
- * VirtualDisk segment associated with
- * externalPortNo */
- u16 Reserved1;
- u32 Reserved2;
+struct pci_id {
+ u16 domain;
+ u8 bus;
+ u8 slot;
+ u8 func;
+ u8 reserved[3]; /* Natural alignment purposes */
};
-typedef enum {
- CONTROLVM_ACTION_NONE = 0,
- CONTROLVM_ACTION_SET_RESTORE = 0x05E7,
- CONTROLVM_ACTION_CLEAR_RESTORE = 0x0C18,
- CONTROLVM_ACTION_RESTORING = 0x08E5,
- CONTROLVM_ACTION_RESTORE_BUSY = 0x0999,
- CONTROLVM_ACTION_CLEAR_NVRAM = 0xB01
-} CONTROLVM_ACTION;
-
-typedef enum _ULTRA_TOOL_ACTIONS {
- /* enumeration that defines intended action */
- ULTRA_TOOL_ACTION_NONE = 0, /* normal boot of boot disk */
- ULTRA_TOOL_ACTION_INSTALL = 1, /* install source disk(s) to boot
- * disk */
- ULTRA_TOOL_ACTION_CAPTURE = 2, /* capture boot disk to target disk(s)
- * as 'gold image' */
- ULTRA_TOOL_ACTION_REPAIR = 3, /* use source disk(s) to repair
- * installation on boot disk */
- ULTRA_TOOL_ACTION_CLEAN = 4, /* 'scrub' virtual disk before
- * releasing back to storage pool */
- ULTRA_TOOL_ACTION_UPGRADE = 5, /* upgrade to use content of images
- * referenced from newer blueprint */
- ULTRA_TOOL_ACTION_DIAG = 6, /* use tool to invoke diagnostic script
- * provided by blueprint */
- ULTRA_TOOL_ACTION_FAILED = 7, /* used when tool fails installation
- and cannot continue */
- ULTRA_TOOL_ACTION_COUNT = 8
-} ULTRA_TOOL_ACTIONS;
-
-typedef struct _ULTRA_EFI_SPAR_INDICATION {
- u64 BootToFirmwareUI:1; /* Bit 0: Stop in uefi ui */
- u64 ClearNvram:1; /* Bit 1: Clear NVRAM */
- u64 ClearCmos:1; /* Bit 2: Clear CMOS */
- u64 BootToTool:1; /* Bit 3: Run install tool */
+struct efi_spar_indication {
+ u64 boot_to_fw_ui:1; /* Bit 0: Stop in uefi ui */
+ u64 clear_nvram:1; /* Bit 1: Clear NVRAM */
+ u64 clear_cmos:1; /* Bit 2: Clear CMOS */
+ u64 boot_to_tool:1; /* Bit 3: Run install tool */
/* remaining bits are available */
-} ULTRA_EFI_SPAR_INDICATION;
+};
-typedef enum {
+enum ultra_chipset_feature {
ULTRA_CHIPSET_FEATURE_REPLY = 0x00000001,
ULTRA_CHIPSET_FEATURE_PARA_HOTPLUG = 0x00000002,
ULTRA_CHIPSET_FEATURE_PCIVBUS = 0x00000004
-} ULTRA_CHIPSET_FEATURE;
+};
/** This is the common structure that is at the beginning of every
* ControlVm message (both commands and responses) in any ControlVm
* queue. Commands are easily distinguished from responses by
* looking at the flags.response field.
*/
-typedef struct _CONTROLVM_MESSAGE_HEADER {
- u32 Id; /* See CONTROLVM_ID. */
+struct controlvm_message_header {
+ u32 id; /* See CONTROLVM_ID. */
/* For requests, indicates the message type. */
/* For responses, indicates the type of message we are responding to. */
- u32 MessageSize; /* Includes size of this struct + size
+ u32 message_size; /* Includes size of this struct + size
* of message */
- u32 SegmentIndex; /* Index of segment containing Vm
+ u32 segment_index; /* Index of segment containing Vm
* message/information */
- u32 CompletionStatus; /* Error status code or result of
+ u32 completion_status; /* Error status code or result of
* message completion */
struct {
u32 failed:1; /**< =1 in a response to * signify
* failure */
- u32 responseExpected:1; /**< =1 in all messages that expect a
+ u32 response_expected:1; /**< =1 in all messages that expect a
* response (Control ignores this
* bit) */
u32 server:1; /**< =1 in all bus & device-related
* messages where the message
* receiver is to act as the bus or
* device server */
- u32 testMessage:1; /**< =1 for testing use only
+ u32 test_message:1; /**< =1 for testing use only
* (Control and Command ignore this
* bit) */
- u32 partialCompletion:1; /**< =1 if there are forthcoming
+ u32 partial_completion:1; /**< =1 if there are forthcoming
* responses/acks associated
* with this message */
u32 preserve:1; /**< =1 this is to let us know to
* preserve channel contents
* (for running guests)*/
- u32 writerInDiag:1; /**< =1 the DiagWriter is active in the
+ u32 writer_in_diag:1; /**< =1 the DiagWriter is active in the
* Diagnostic Partition*/
-
- /* remaining bits in this 32-bit word are available */
- } Flags;
- u32 Reserved; /* Natural alignment */
- u64 MessageHandle; /* Identifies the particular message instance,
+ } flags;
+ u32 reserved; /* Natural alignment */
+ u64 message_handle; /* Identifies the particular message instance,
* and is used to match particular */
/* request instances with the corresponding response instance. */
- u64 PayloadVmOffset; /* Offset of payload area from start of this
+ u64 payload_vm_offset; /* Offset of payload area from start of this
* instance of ControlVm segment */
- u32 PayloadMaxBytes; /* Maximum bytes allocated in payload
+ u32 payload_max_bytes; /* Maximum bytes allocated in payload
* area of ControlVm segment */
- u32 PayloadBytes; /* Actual number of bytes of payload
+ u32 payload_bytes; /* Actual number of bytes of payload
* area to copy between IO/Command; */
/* if non-zero, there is a payload to copy. */
-} CONTROLVM_MESSAGE_HEADER;
-
-typedef struct _CONTROLVM_PACKET_DEVICE_CREATE {
- u32 busNo; /**< bus # (0..n-1) from the msg receiver's
- * perspective */
+};
- /* Control uses header SegmentIndex field to access bus number... */
- u32 devNo; /**< bus-relative (0..n-1) device number */
- u64 channelAddr; /**< Guest physical address of the channel, which
- * can be dereferenced by the receiver
- * of this ControlVm command */
- u64 channelBytes; /**< specifies size of the channel in bytes */
- uuid_le dataTypeGuid;/**< specifies format of data in channel */
- uuid_le devInstGuid; /**< instance guid for the device */
- struct InterruptInfo intr; /**< specifies interrupt information */
-} CONTROLVM_PACKET_DEVICE_CREATE; /* for CONTROLVM_DEVICE_CREATE */
-
-typedef struct _CONTROLVM_PACKET_DEVICE_CONFIGURE {
- u32 busNo; /**< bus # (0..n-1) from the msg
+struct controlvm_packet_device_create {
+ u32 bus_no; /* bus # (0..n-1) from the msg receiver's end */
+ u32 dev_no; /* bus-relative (0..n-1) device number */
+ u64 channel_addr; /* Guest physical address of the channel, which
+ * can be dereferenced by the receiver of this
+ * ControlVm command */
+ u64 channel_bytes; /* specifies size of the channel in bytes */
+ uuid_le data_type_uuid; /* specifies format of data in channel */
+ uuid_le dev_inst_uuid; /* instance guid for the device */
+ struct irq_info intr; /* specifies interrupt information */
+}; /* for CONTROLVM_DEVICE_CREATE */
+
+struct controlvm_packet_device_configure {
+ u32 bus_no; /**< bus # (0..n-1) from the msg
* receiver's perspective */
/* Control uses header SegmentIndex field to access bus number... */
- u32 devNo; /**< bus-relative (0..n-1) device number */
-} CONTROLVM_PACKET_DEVICE_CONFIGURE; /* for CONTROLVM_DEVICE_CONFIGURE */
+ u32 dev_no; /**< bus-relative (0..n-1) device number */
+} ; /* for CONTROLVM_DEVICE_CONFIGURE */
-typedef struct _CONTROLVM_MESSAGE_DEVICE_CREATE {
- CONTROLVM_MESSAGE_HEADER Header;
- CONTROLVM_PACKET_DEVICE_CREATE Packet;
-} CONTROLVM_MESSAGE_DEVICE_CREATE; /* total 128 bytes */
+struct controlvm_message_device_create {
+ struct controlvm_message_header header;
+ struct controlvm_packet_device_create packet;
+}; /* total 128 bytes */
-typedef struct _CONTROLVM_MESSAGE_DEVICE_CONFIGURE {
- CONTROLVM_MESSAGE_HEADER Header;
- CONTROLVM_PACKET_DEVICE_CONFIGURE Packet;
-} CONTROLVM_MESSAGE_DEVICE_CONFIGURE; /* total 56 bytes */
+struct controlvm_message_device_configure {
+ struct controlvm_message_header header;
+ struct controlvm_packet_device_configure packet;
+}; /* total 56 bytes */
/* This is the format for a message in any ControlVm queue. */
-typedef struct _CONTROLVM_MESSAGE_PACKET {
+struct controlvm_message_packet {
union {
-
- /* BEGIN Request messages */
struct {
- u32 busNo; /*< bus # (0..n-1) from the msg
- * receiver's perspective */
-
- /* Control uses header SegmentIndex field to access bus number... */
- u32 deviceCount; /*< indicates the max number of
- * devices on this bus */
- u64 channelAddr; /*< Guest physical address of the
- * channel, which can be
- * dereferenced by the receiver
- * of this ControlVm command */
- u64 channelBytes; /*< size of the channel in bytes */
- uuid_le busDataTypeGuid;/*< indicates format of data in
- bus channel */
- uuid_le busInstGuid; /*< instance guid for the bus */
- } createBus; /* for CONTROLVM_BUS_CREATE */
+ u32 bus_no; /* bus # (0..n-1) from the msg
+ * receiver's perspective */
+ u32 dev_count; /* indicates the max number of
+ * devices on this bus */
+ u64 channel_addr; /* Guest physical address of
+ * the channel, which can be
+ * dereferenced by the receiver
+ * of this ControlVm command */
+ u64 channel_bytes; /* size of the channel */
+ uuid_le bus_data_type_uuid; /* indicates format of
+ * data in bus channel*/
+ uuid_le bus_inst_uuid; /* instance uuid for the bus */
+ } create_bus; /* for CONTROLVM_BUS_CREATE */
struct {
- u32 busNo; /*< bus # (0..n-1) from the msg
- * receiver's perspective */
-
- /* Control uses header SegmentIndex field to access bus number... */
+ u32 bus_no; /* bus # (0..n-1) from the msg
+ * receiver's perspective */
u32 reserved; /* Natural alignment purposes */
- } destroyBus; /* for CONTROLVM_BUS_DESTROY */
+ } destroy_bus; /* for CONTROLVM_BUS_DESTROY */
struct {
- u32 busNo; /*< bus # (0..n-1) from the
- * msg receiver's
- * perspective */
-
- /* Control uses header SegmentIndex field to access bus number... */
- u32 reserved1; /* for alignment purposes */
- u64 guestHandle; /* This is used to convert
- * guest physical address to real
- * physical address for DMA, for ex. */
- u64 recvBusInterruptHandle;/*< specifies interrupt
- * info. It is used by SP to register
- * to receive interrupts from the CP.
- * This interrupt is used for bus
- * level notifications. The
- * corresponding
- * sendBusInterruptHandle is kept in
- * CP. */
- } configureBus; /* for CONTROLVM_BUS_CONFIGURE */
-
+ u32 bus_no; /* bus # (0..n-1) from the receiver's
+ * perspective */
+ u32 reserved1; /* for alignment purposes */
+ u64 guest_handle; /* This is used to convert
+ * guest physical address to
+ * physical address */
+ u64 recv_bus_irq_handle;
+ /* specifies interrupt info. It is used by SP
+ * to register to receive interrupts from the
+ * CP. This interrupt is used for bus level
+ * notifications. The corresponding
+ * sendBusInterruptHandle is kept in CP. */
+ } configure_bus; /* for CONTROLVM_BUS_CONFIGURE */
/* for CONTROLVM_DEVICE_CREATE */
- CONTROLVM_PACKET_DEVICE_CREATE createDevice;
+ struct controlvm_packet_device_create create_device;
struct {
- u32 busNo; /*< bus # (0..n-1) from the msg
- * receiver's perspective */
-
- /* Control uses header SegmentIndex field to access bus number... */
- u32 devNo; /*< bus-relative (0..n-1) device
- * number */
- } destroyDevice; /* for CONTROLVM_DEVICE_DESTROY */
-
+ u32 bus_no; /* bus # (0..n-1) from the msg
+ * receiver's perspective */
+ u32 dev_no; /* bus-relative (0..n-1) device # */
+ } destroy_device; /* for CONTROLVM_DEVICE_DESTROY */
/* for CONTROLVM_DEVICE_CONFIGURE */
- CONTROLVM_PACKET_DEVICE_CONFIGURE configureDevice;
+ struct controlvm_packet_device_configure configure_device;
struct {
- u32 busNo; /*< bus # (0..n-1) from the msg
- * receiver's perspective */
-
- /* Control uses header SegmentIndex field to access bus number... */
- u32 devNo; /*< bus-relative (0..n-1) device
- * number */
- } reconfigureDevice; /* for CONTROLVM_DEVICE_RECONFIGURE */
+ u32 bus_no; /* bus # (0..n-1) from the msg
+ * receiver's perspective */
+ u32 dev_no; /* bus-relative (0..n-1) device # */
+ } reconfigure_device; /* for CONTROLVM_DEVICE_RECONFIGURE */
struct {
- u32 busNo;
- ULTRA_SEGMENT_STATE state;
+ u32 bus_no;
+ struct spar_segment_state state;
u8 reserved[2]; /* Natural alignment purposes */
- } busChangeState; /* for CONTROLVM_BUS_CHANGESTATE */
+ } bus_change_state; /* for CONTROLVM_BUS_CHANGESTATE */
struct {
- u32 busNo;
- u32 devNo;
- ULTRA_SEGMENT_STATE state;
+ u32 bus_no;
+ u32 dev_no;
+ struct spar_segment_state state;
struct {
- u32 physicalDevice:1; /* =1 if message is for
+ u32 phys_device:1; /* =1 if message is for
* a physical device */
- /* remaining bits in this 32-bit word are available */
} flags;
u8 reserved[2]; /* Natural alignment purposes */
- } deviceChangeState; /* for CONTROLVM_DEVICE_CHANGESTATE */
+ } device_change_state; /* for CONTROLVM_DEVICE_CHANGESTATE */
struct {
- u32 busNo;
- u32 devNo;
- ULTRA_SEGMENT_STATE state;
+ u32 bus_no;
+ u32 dev_no;
+ struct spar_segment_state state;
u8 reserved[6]; /* Natural alignment purposes */
- } deviceChangeStateEvent; /* for CONTROLVM_DEVICE_CHANGESTATE_EVENT */
+ } device_change_state_event;
+ /* for CONTROLVM_DEVICE_CHANGESTATE_EVENT */
struct {
- u32 busCount; /*< indicates the max number of busses */
- u32 switchCount; /*< indicates the max number of
- * switches (applicable for service
- * partition only) */
- ULTRA_CHIPSET_FEATURE features;
- u32 platformNumber; /* Platform Number */
- } initChipset; /* for CONTROLVM_CHIPSET_INIT */
+ u32 bus_count; /* indicates the max number of busses */
+ u32 switch_count; /* indicates the max number of
+ * switches if a service partition */
+ enum ultra_chipset_feature features;
+ u32 platform_number; /* Platform Number */
+ } init_chipset; /* for CONTROLVM_CHIPSET_INIT */
struct {
- u32 Options; /*< reserved */
- u32 Test; /*< bit 0 set to run embedded selftest */
- } chipsetSelftest; /* for CONTROLVM_CHIPSET_SELFTEST */
-
- /* END Request messages */
-
- /* BEGIN Response messages */
-
- /* END Response messages */
-
- /* BEGIN Event messages */
+ u32 options; /* reserved */
+ u32 test; /* bit 0 set to run embedded selftest */
+ } chipset_selftest; /* for CONTROLVM_CHIPSET_SELFTEST */
+ u64 addr; /* a physical address of something, that can be
+ * dereferenced by the receiver of this
+ * ControlVm command (depends on command id) */
+ u64 handle; /* a handle of something (depends on command
+ * id) */
+ };
+};
- /* END Event messages */
+/* All messages in any ControlVm queue have this layout. */
+struct controlvm_message {
+ struct controlvm_message_header hdr;
+ struct controlvm_message_packet cmd;
+};
- /* BEGIN Ack messages */
+struct device_map {
+ GUEST_PHYSICAL_ADDRESS device_channel_address;
+ u64 device_channel_size;
+ u32 ca_index;
+ u32 reserved; /* natural alignment */
+ u64 reserved2; /* Align structure on 32-byte boundary */
+};
- /* END Ack messages */
- u64 addr; /*< a physical address of something, that
- * can be dereferenced by the receiver of
- * this ControlVm command (depends on
- * command id) */
- u64 handle; /*< a handle of something (depends on
- * command id) */
- };
-} CONTROLVM_MESSAGE_PACKET;
+struct guest_devices {
+ struct device_map video_channel;
+ struct device_map keyboard_channel;
+ struct device_map network_channel;
+ struct device_map storage_channel;
+ struct device_map console_channel;
+ u32 partition_index;
+ u32 pad;
+};
-/* All messages in any ControlVm queue have this layout. */
-typedef struct _CONTROLVM_MESSAGE {
- CONTROLVM_MESSAGE_HEADER hdr;
- CONTROLVM_MESSAGE_PACKET cmd;
-} CONTROLVM_MESSAGE;
-
-typedef struct _DEVICE_MAP {
- GUEST_PHYSICAL_ADDRESS DeviceChannelAddress;
- u64 DeviceChannelSize;
- u32 CA_Index;
- u32 Reserved; /* natural alignment */
- u64 Reserved2; /* Align structure on 32-byte boundary */
-} DEVICE_MAP;
-
-typedef struct _GUEST_DEVICES {
- DEVICE_MAP VideoChannel;
- DEVICE_MAP KeyboardChannel;
- DEVICE_MAP NetworkChannel;
- DEVICE_MAP StorageChannel;
- DEVICE_MAP ConsoleChannel;
- u32 PartitionIndex;
- u32 Pad;
-} GUEST_DEVICES;
-
-typedef struct _ULTRA_CONTROLVM_CHANNEL_PROTOCOL {
- CHANNEL_HEADER Header;
- GUEST_PHYSICAL_ADDRESS gpControlVm; /* guest physical address of
+struct spar_controlvm_channel_protocol {
+ struct channel_header header;
+ GUEST_PHYSICAL_ADDRESS gp_controlvm; /* guest physical address of
* this channel */
- GUEST_PHYSICAL_ADDRESS gpPartitionTables; /* guest physical address of
- * partition tables */
- GUEST_PHYSICAL_ADDRESS gpDiagGuest; /* guest physical address of
+ GUEST_PHYSICAL_ADDRESS gp_partition_tables;/* guest physical address of
+ * partition tables */
+ GUEST_PHYSICAL_ADDRESS gp_diag_guest; /* guest physical address of
* diagnostic channel */
- GUEST_PHYSICAL_ADDRESS gpBootRomDisk; /* guest phys addr of (read
+ GUEST_PHYSICAL_ADDRESS gp_boot_romdisk;/* guest phys addr of (read
* only) Boot ROM disk */
- GUEST_PHYSICAL_ADDRESS gpBootRamDisk; /* guest phys addr of writable
+ GUEST_PHYSICAL_ADDRESS gp_boot_ramdisk;/* guest phys addr of writable
* Boot RAM disk */
- GUEST_PHYSICAL_ADDRESS gpAcpiTable; /* guest phys addr of acpi
+ GUEST_PHYSICAL_ADDRESS gp_acpi_table; /* guest phys addr of acpi
* table */
- GUEST_PHYSICAL_ADDRESS gpControlChannel; /* guest phys addr of control
- * channel */
- GUEST_PHYSICAL_ADDRESS gpDiagRomDisk; /* guest phys addr of diagnostic
+ GUEST_PHYSICAL_ADDRESS gp_control_channel;/* guest phys addr of control
+ * channel */
+ GUEST_PHYSICAL_ADDRESS gp_diag_romdisk;/* guest phys addr of diagnostic
* ROM disk */
- GUEST_PHYSICAL_ADDRESS gpNvram; /* guest phys addr of NVRAM
+ GUEST_PHYSICAL_ADDRESS gp_nvram; /* guest phys addr of NVRAM
* channel */
- u64 RequestPayloadOffset; /* Offset to request payload area */
- u64 EventPayloadOffset; /* Offset to event payload area */
- u32 RequestPayloadBytes; /* Bytes available in request payload
+ u64 request_payload_offset; /* Offset to request payload area */
+ u64 event_payload_offset; /* Offset to event payload area */
+ u32 request_payload_bytes; /* Bytes available in request payload
* area */
- u32 EventPayloadBytes; /* Bytes available in event payload area */
- u32 ControlChannelBytes;
- u32 NvramChannelBytes; /* Bytes in PartitionNvram segment */
- u32 MessageBytes; /* sizeof(CONTROLVM_MESSAGE) */
- u32 MessageCount; /* CONTROLVM_MESSAGE_MAX */
- GUEST_PHYSICAL_ADDRESS gpSmbiosTable; /* guest phys addr of SMBIOS
+ u32 event_payload_bytes;/* Bytes available in event payload area */
+ u32 control_channel_bytes;
+ u32 nvram_channel_bytes; /* Bytes in PartitionNvram segment */
+ u32 message_bytes; /* sizeof(CONTROLVM_MESSAGE) */
+ u32 message_count; /* CONTROLVM_MESSAGE_MAX */
+ GUEST_PHYSICAL_ADDRESS gp_smbios_table;/* guest phys addr of SMBIOS
* tables */
- GUEST_PHYSICAL_ADDRESS gpPhysicalSmbiosTable; /* guest phys addr of
- * SMBIOS table */
+ GUEST_PHYSICAL_ADDRESS gp_physical_smbios_table;/* guest phys addr of
+ * SMBIOS table */
/* ULTRA_MAX_GUESTS_PER_SERVICE */
- GUEST_DEVICES gpObsoleteGuestDevices[16];
+ struct guest_devices gp_obsolete_guest_devices[16];
/* guest physical address of EFI firmware image base */
- GUEST_PHYSICAL_ADDRESS VirtualGuestFirmwareImageBase;
+ GUEST_PHYSICAL_ADDRESS virtual_guest_firmware_image_base;
/* guest physical address of EFI firmware entry point */
- GUEST_PHYSICAL_ADDRESS VirtualGuestFirmwareEntryPoint;
+ GUEST_PHYSICAL_ADDRESS virtual_guest_firmware_entry_point;
/* guest EFI firmware image size */
- u64 VirtualGuestFirmwareImageSize;
+ u64 virtual_guest_firmware_image_size;
/* GPA = 1MB where EFI firmware image is copied to */
- GUEST_PHYSICAL_ADDRESS VirtualGuestFirmwareBootBase;
- GUEST_PHYSICAL_ADDRESS VirtualGuestImageBase;
- GUEST_PHYSICAL_ADDRESS VirtualGuestImageSize;
- u64 PrototypeControlChannelOffset;
- GUEST_PHYSICAL_ADDRESS VirtualGuestPartitionHandle;
+ GUEST_PHYSICAL_ADDRESS virtual_guest_firmware_boot_base;
+ GUEST_PHYSICAL_ADDRESS virtual_guest_image_base;
+ GUEST_PHYSICAL_ADDRESS virtual_guest_image_size;
+ u64 prototype_control_channel_offset;
+ GUEST_PHYSICAL_ADDRESS virtual_guest_partition_handle;
- u16 RestoreAction; /* Restore Action field to restore the guest
+ u16 restore_action; /* Restore Action field to restore the guest
* partition */
- u16 DumpAction; /* For Windows guests it shows if the visordisk
+ u16 dump_action; /* For Windows guests it shows if the visordisk
* is running in dump mode */
- u16 NvramFailCount;
- u16 SavedCrashMsgCount; /* = CONTROLVM_CRASHMSG_MAX */
- u32 SavedCrashMsgOffset; /* Offset to request payload area needed
+ u16 nvram_fail_count;
+ u16 saved_crash_message_count; /* = CONTROLVM_CRASHMSG_MAX */
+ u32 saved_crash_message_offset; /* Offset to request payload area needed
* for crash dump */
- u32 InstallationError; /* Type of error encountered during
+ u32 installation_error; /* Type of error encountered during
* installation */
- u32 InstallationTextId; /* Id of string to display */
- u16 InstallationRemainingSteps; /* Number of remaining installation
- * steps (for progress bars) */
- u8 ToolAction; /* ULTRA_TOOL_ACTIONS Installation Action
+ u32 installation_text_id; /* Id of string to display */
+ u16 installation_remaining_steps;/* Number of remaining installation
+ * steps (for progress bars) */
+ u8 tool_action; /* ULTRA_TOOL_ACTIONS Installation Action
* field */
- u8 Reserved; /* alignment */
- ULTRA_EFI_SPAR_INDICATION EfiSparIndication;
- ULTRA_EFI_SPAR_INDICATION EfiSparIndicationSupported;
- u32 SPReserved;
- u8 Reserved2[28]; /* Force signals to begin on 128-byte cache
+ u8 reserved; /* alignment */
+ struct efi_spar_indication efi_spar_ind;
+ struct efi_spar_indication efi_spar_ind_supported;
+ u32 sp_reserved;
+ u8 reserved2[28]; /* Force signals to begin on 128-byte cache
* line */
- SIGNAL_QUEUE_HEADER RequestQueue; /* Service or guest partition
- * uses this queue to send
- * requests to Control */
- SIGNAL_QUEUE_HEADER ResponseQueue; /* Control uses this queue to
- * respond to service or guest
- * partition requests */
- SIGNAL_QUEUE_HEADER EventQueue; /* Control uses this queue to
+ struct signal_queue_header request_queue;/* Service or guest partition
+ * uses this queue to send
+ * requests to Control */
+ struct signal_queue_header response_queue;/* Control uses this queue to
+ * respond to service or guest
+ * partition requests */
+ struct signal_queue_header event_queue; /* Control uses this queue to
* send events to service or
* guest partition */
- SIGNAL_QUEUE_HEADER EventAckQueue; /* Service or guest partition
- * uses this queue to ack
- * Control events */
+ struct signal_queue_header event_ack_queue;/* Service or guest partition
+ * uses this queue to ack
+ * Control events */
/* Request fixed-size message pool - does not include payload */
- CONTROLVM_MESSAGE RequestMsg[CONTROLVM_MESSAGE_MAX];
+ struct controlvm_message request_msg[CONTROLVM_MESSAGE_MAX];
/* Response fixed-size message pool - does not include payload */
- CONTROLVM_MESSAGE ResponseMsg[CONTROLVM_MESSAGE_MAX];
+ struct controlvm_message response_msg[CONTROLVM_MESSAGE_MAX];
/* Event fixed-size message pool - does not include payload */
- CONTROLVM_MESSAGE EventMsg[CONTROLVM_MESSAGE_MAX];
+ struct controlvm_message event_msg[CONTROLVM_MESSAGE_MAX];
/* Ack fixed-size message pool - does not include payload */
- CONTROLVM_MESSAGE EventAckMsg[CONTROLVM_MESSAGE_MAX];
+ struct controlvm_message event_ack_msg[CONTROLVM_MESSAGE_MAX];
/* Message stored during IOVM creation to be reused after crash */
- CONTROLVM_MESSAGE SavedCrashMsg[CONTROLVM_CRASHMSG_MAX];
-} ULTRA_CONTROLVM_CHANNEL_PROTOCOL;
+ struct controlvm_message saved_crash_msg[CONTROLVM_CRASHMSG_MAX];
+};
/* Offsets for VM channel attributes... */
#define VM_CH_REQ_QUEUE_OFFSET \
- offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, RequestQueue)
+ offsetof(struct spar_controlvm_channel_protocol, request_queue)
#define VM_CH_RESP_QUEUE_OFFSET \
- offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, ResponseQueue)
+ offsetof(struct spar_controlvm_channel_protocol, response_queue)
#define VM_CH_EVENT_QUEUE_OFFSET \
- offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, EventQueue)
+ offsetof(struct spar_controlvm_channel_protocol, event_queue)
#define VM_CH_ACK_QUEUE_OFFSET \
- offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, EventAckQueue)
+ offsetof(struct spar_controlvm_channel_protocol, event_ack_queue)
#define VM_CH_REQ_MSG_OFFSET \
- offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, RequestMsg)
+ offsetof(struct spar_controlvm_channel_protocol, request_msg)
#define VM_CH_RESP_MSG_OFFSET \
- offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, ResponseMsg)
+ offsetof(struct spar_controlvm_channel_protocol, response_msg)
#define VM_CH_EVENT_MSG_OFFSET \
- offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, EventMsg)
+ offsetof(struct spar_controlvm_channel_protocol, event_msg)
#define VM_CH_ACK_MSG_OFFSET \
- offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, EventAckMsg)
+ offsetof(struct spar_controlvm_channel_protocol, event_ack_msg)
#define VM_CH_CRASH_MSG_OFFSET \
- offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, SavedCrashMsg)
+ offsetof(struct spar_controlvm_channel_protocol, saved_crash_msg)
/* The following header will be located at the beginning of PayloadVmOffset for
- * various ControlVm commands. The receiver of a ControlVm command with a
- * PayloadVmOffset will dereference this address and then use ConnectionOffset,
- * InitiatorOffset, and TargetOffset to get the location of UTF-8 formatted
- * strings that can be parsed to obtain command-specific information. The value
- * of TotalLength should equal PayloadBytes. The format of the strings at
- * PayloadVmOffset will take different forms depending on the message. See the
- * following Wiki page for more information:
- * https://ustr-linux-1.na.uis.unisys.com/spar/index.php/ControlVm_Parameters_Area
+ * various ControlVm commands. The receiver of a ControlVm command with a
+ * PayloadVmOffset will dereference this address and then use connection_offset,
+ * initiator_offset, and target_offset to get the location of UTF-8 formatted
+ * strings that can be parsed to obtain command-specific information. The value
+ * of total_length should equal PayloadBytes. The format of the strings at
+ * PayloadVmOffset will take different forms depending on the message.
*/
-typedef struct _ULTRA_CONTROLVM_PARAMETERS_HEADER {
- u32 TotalLength;
- u32 HeaderLength;
- u32 ConnectionOffset;
- u32 ConnectionLength;
- u32 InitiatorOffset;
- u32 InitiatorLength;
- u32 TargetOffset;
- u32 TargetLength;
- u32 ClientOffset;
- u32 ClientLength;
- u32 NameOffset;
- u32 NameLength;
- uuid_le Id;
- u32 Revision;
- u32 Reserved; /* Natural alignment */
-} ULTRA_CONTROLVM_PARAMETERS_HEADER;
+struct spar_controlvm_parameters_header {
+ u32 total_length;
+ u32 header_length;
+ u32 connection_offset;
+ u32 connection_length;
+ u32 initiator_offset;
+ u32 initiator_length;
+ u32 target_offset;
+ u32 target_length;
+ u32 client_offset;
+ u32 client_length;
+ u32 name_offset;
+ u32 name_length;
+ uuid_le id;
+ u32 revision;
+ u32 reserved; /* Natural alignment */
+};
#endif /* __CONTROLVMCHANNEL_H__ */