Commit 12e364b9 authored by Ken Cox's avatar Ken Cox Committed by Greg Kroah-Hartman
Browse files

staging: visorchipset driver to provide registration and other services



The visorchipset module receives device creation and destruction
events from the Command service partition of s-Par, as well as
controlling registration of shared device drivers with the s-Par
driver core. The events received are used to populate other s-Par
modules with their assigned shared devices. Visorchipset is required
for shared device drivers to function properly. Visorchipset also
stores information for handling dump disk device creation during
kdump.

In operation, the visorchipset module processes device creation and
destruction messages sent by s-Par's Command service partition through
a channel. These messages result in creation (or destruction) of each
virtual bus and virtual device. Each bus and device is also associated
with a communication channel, which is used to communicate with one or
more IO service partitions to perform device IO on behalf of the
guest.

Signed-off-by: default avatarKen Cox <jkc@redhat.com>
Cc: Ben Romer <sparmaintainer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e423812a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -11,5 +11,6 @@ if UNISYSSPAR

source "drivers/staging/unisys/visorutil/Kconfig"
source "drivers/staging/unisys/visorchannel/Kconfig"
source "drivers/staging/unisys/visorchipset/Kconfig"

endif # UNISYSSPAR
+1 −0
Original line number Diff line number Diff line
@@ -3,4 +3,5 @@
#
obj-$(CONFIG_UNISYS_VISORUTIL)		+= visorutil/
obj-$(CONFIG_UNISYS_VISORCHANNEL)	+= visorchannel/
obj-$(CONFIG_UNISYS_VISORCHIPSET)	+= visorchipset/
+64 −0
Original line number Diff line number Diff line
/* Copyright  2010 - 2013 UNISYS CORPORATION
 * All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
 * NON INFRINGEMENT.  See the GNU General Public License for more
 * details.
 */

/*
 * CHANNEL Guids
 */

/* Used in IOChannel
 * {414815ed-c58c-11da-95a9-00e08161165f}
 */
#define ULTRA_VHBA_CHANNEL_PROTOCOL_GUID \
	{ 0x414815ed, 0xc58c, 0x11da, \
		{ 0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f } }
static const GUID UltraVhbaChannelProtocolGuid =
	ULTRA_VHBA_CHANNEL_PROTOCOL_GUID;

/* Used in IOChannel
 * {8cd5994d-c58e-11da-95a9-00e08161165f}
 */
#define ULTRA_VNIC_CHANNEL_PROTOCOL_GUID \
	{ 0x8cd5994d, 0xc58e, 0x11da, \
		{ 0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f } }
static const GUID UltraVnicChannelProtocolGuid =
	ULTRA_VNIC_CHANNEL_PROTOCOL_GUID;

/* Used in IOChannel
 * {72120008-4AAB-11DC-8530-444553544200}
 */
#define ULTRA_SIOVM_GUID \
	{ 0x72120008, 0x4AAB, 0x11DC,					\
		{ 0x85, 0x30, 0x44, 0x45, 0x53, 0x54, 0x42, 0x00 } }
static const GUID UltraSIOVMGuid = ULTRA_SIOVM_GUID;


/* Used in visornoop/visornoop_main.c
 * {5b52c5ac-e5f5-4d42-8dff-429eaecd221f}
 */
#define ULTRA_CONTROLDIRECTOR_CHANNEL_PROTOCOL_GUID  \
	{ 0x5b52c5ac, 0xe5f5, 0x4d42, \
		{ 0x8d, 0xff, 0x42, 0x9e, 0xae, 0xcd, 0x22, 0x1f } }

static const GUID UltraControlDirectorChannelProtocolGuid =
	ULTRA_CONTROLDIRECTOR_CHANNEL_PROTOCOL_GUID;

/* Used in visorchipset/visorchipset_main.c
 * {B4E79625-AEDE-4EAA-9E11-D3EDDCD4504C}
 */
#define ULTRA_DIAG_POOL_CHANNEL_PROTOCOL_GUID				\
	{0xb4e79625, 0xaede, 0x4eaa,					\
		{ 0x9e, 0x11, 0xd3, 0xed, 0xdc, 0xd4, 0x50, 0x4c } }

+77 −0
Original line number Diff line number Diff line
/* Copyright © 2010 - 2013 UNISYS CORPORATION
 * All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
 * NON INFRINGEMENT.  See the GNU General Public License for more
 * details.
 */

/*
 * Module Name:
 *  controlframework.h
 *
 * Abstract: This file defines common structures in the unmanaged
 *	     Ultravisor (mostly EFI) space.
 *
 */

#ifndef _CONTROL_FRAMEWORK_H_
#define _CONTROL_FRAMEWORK_H_

#include "commontypes.h"
#include "channel.h"

#define ULTRA_MEMORY_COUNT_Ki 1024

/* Scale order 0 is one 32-bit (4-byte) word (in 64 or 128-bit
 * architecture potentially 64 or 128-bit word) */
#define ULTRA_MEMORY_PAGE_WORD 4

/* Define Ki scale page to be traditional 4KB page */
#define ULTRA_MEMORY_PAGE_Ki (ULTRA_MEMORY_PAGE_WORD * ULTRA_MEMORY_COUNT_Ki)
typedef struct _ULTRA_SEGMENT_STATE  {
	U16 Enabled:1;		/* Bit 0: May enter other states */
	U16 Active:1;		/* Bit 1: Assigned to active partition */
	U16 Alive:1;		/* Bit 2: Configure message sent to
				 * service/server */
	U16 Revoked:1;		/* Bit 3: similar to partition state
				 * ShuttingDown */
	U16 Allocated:1;	/* Bit 4: memory (device/port number)
				 * has been selected by Command */
	U16 Known:1;		/* Bit 5: has been introduced to the
				 * service/guest partition */
	U16 Ready:1;		/* Bit 6: service/Guest partition has
				 * responded to introduction */
	U16 Operating:1;	/* Bit 7: resource is configured and
				 * operating */
	/* Note: don't use high bit unless we need to switch to ushort
	 * which is non-compliant */
} ULTRA_SEGMENT_STATE;
static const ULTRA_SEGMENT_STATE SegmentStateRunning = {
	1, 1, 1, 0, 1, 1, 1, 1
};
static const ULTRA_SEGMENT_STATE SegmentStatePaused = {
	1, 1, 1, 0, 1, 1, 1, 0
};
static const ULTRA_SEGMENT_STATE SegmentStateStandby = {
	1, 1, 0, 0, 1, 1, 1, 0
};
typedef union {
	U64 Full;
	struct {
		U8 Major;	/* will be 1 for the first release and
				 * increment thereafter  */
		U8 Minor;
		U16 Maintenance;
		U32 Revision;	/* Subversion revision */
	} Part;
} ULTRA_COMPONENT_VERSION;

#endif				/* _CONTROL_FRAMEWORK_H_ not defined */
+619 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading