2017-08-22 11:26:56 -06:00
|
|
|
/*
|
2015-07-16 10:40:48 -06:00
|
|
|
* Copyright (C) 2010 - 2015 UNISYS CORPORATION
|
2014-03-04 06:58:07 -07:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
2015-07-16 10:40:48 -06:00
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms and conditions of the GNU General Public License,
|
|
|
|
* version 2, as published by the Free Software Foundation.
|
2014-03-04 06:58:07 -07:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2016-09-02 14:41:32 -06:00
|
|
|
#ifndef __VISORBUS_PRIVATE_H__
|
|
|
|
#define __VISORBUS_PRIVATE_H__
|
2014-03-04 06:58:07 -07:00
|
|
|
|
2014-05-06 07:58:23 -06:00
|
|
|
#include <linux/uuid.h>
|
2016-09-26 09:03:41 -06:00
|
|
|
#include <linux/utsname.h>
|
2014-05-06 07:58:23 -06:00
|
|
|
|
2014-03-04 06:58:07 -07:00
|
|
|
#include "controlvmchannel.h"
|
2016-09-02 14:41:39 -06:00
|
|
|
#include "vbuschannel.h"
|
2017-08-22 11:27:14 -06:00
|
|
|
#include "visorbus.h"
|
2016-09-02 14:41:31 -06:00
|
|
|
|
2017-05-19 14:17:40 -06:00
|
|
|
int visorchipset_bus_create(struct visor_device *bus_info);
|
|
|
|
void visorchipset_bus_destroy(struct visor_device *bus_info);
|
2017-05-19 14:17:41 -06:00
|
|
|
int visorchipset_device_create(struct visor_device *dev_info);
|
|
|
|
void visorchipset_device_destroy(struct visor_device *dev_info);
|
|
|
|
int visorchipset_device_pause(struct visor_device *dev_info);
|
|
|
|
int visorchipset_device_resume(struct visor_device *dev_info);
|
2016-06-10 19:48:21 -06:00
|
|
|
|
2017-08-22 11:27:03 -06:00
|
|
|
void visorbus_response(struct visor_device *p, int response, int controlvm_id);
|
2017-08-22 11:27:04 -06:00
|
|
|
void visorbus_device_changestate_response(struct visor_device *p, int response,
|
|
|
|
struct visor_segment_state state);
|
2014-03-04 06:58:07 -07:00
|
|
|
|
2015-05-05 16:37:02 -06:00
|
|
|
int visorbus_init(void);
|
2015-05-05 16:36:15 -06:00
|
|
|
void visorbus_exit(void);
|
2016-06-10 19:48:19 -06:00
|
|
|
|
2016-06-10 19:48:23 -06:00
|
|
|
/* visorchannel access functions */
|
2016-06-10 19:48:19 -06:00
|
|
|
|
|
|
|
struct visorchannel *visorchannel_create(u64 physaddr,
|
|
|
|
unsigned long channel_bytes,
|
2017-08-22 11:26:54 -06:00
|
|
|
gfp_t gfp, const guid_t *guid);
|
2016-06-10 19:48:19 -06:00
|
|
|
struct visorchannel *visorchannel_create_with_lock(u64 physaddr,
|
|
|
|
unsigned long channel_bytes,
|
2017-08-22 11:26:54 -06:00
|
|
|
gfp_t gfp, const guid_t *guid);
|
2016-06-10 19:48:19 -06:00
|
|
|
void visorchannel_destroy(struct visorchannel *channel);
|
|
|
|
int visorchannel_read(struct visorchannel *channel, ulong offset,
|
2016-11-21 10:15:43 -07:00
|
|
|
void *dest, ulong nbytes);
|
2016-06-10 19:48:19 -06:00
|
|
|
int visorchannel_write(struct visorchannel *channel, ulong offset,
|
2016-11-21 10:15:43 -07:00
|
|
|
void *dest, ulong nbytes);
|
2016-06-10 19:48:19 -06:00
|
|
|
u64 visorchannel_get_physaddr(struct visorchannel *channel);
|
|
|
|
ulong visorchannel_get_nbytes(struct visorchannel *channel);
|
|
|
|
char *visorchannel_id(struct visorchannel *channel, char *s);
|
|
|
|
char *visorchannel_zoneid(struct visorchannel *channel, char *s);
|
|
|
|
u64 visorchannel_get_clientpartition(struct visorchannel *channel);
|
|
|
|
int visorchannel_set_clientpartition(struct visorchannel *channel,
|
|
|
|
u64 partition_handle);
|
2017-08-22 11:26:54 -06:00
|
|
|
char *visorchannel_guid_id(const guid_t *guid, char *s);
|
2017-03-17 09:27:11 -06:00
|
|
|
void *visorchannel_get_header(struct visorchannel *channel);
|
2014-03-04 06:58:07 -07:00
|
|
|
#endif
|