Nishad Kamdar | af83114 | 2020-04-19 19:30:21 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Mark Foresta | eb30ed5 | 2017-08-22 13:26:56 -0400 | [diff] [blame] | 2 | /* |
Benjamin Romer | 6f14cc1 | 2015-07-16 12:40:48 -0400 | [diff] [blame] | 3 | * Copyright (C) 2010 - 2015 UNISYS CORPORATION |
Ken Cox | 12e364b | 2014-03-04 07:58:07 -0600 | [diff] [blame] | 4 | * All rights reserved. |
Ken Cox | 12e364b | 2014-03-04 07:58:07 -0600 | [diff] [blame] | 5 | */ |
| 6 | |
David Binder | 7339cb0 | 2016-09-02 16:41:32 -0400 | [diff] [blame] | 7 | #ifndef __VISORBUS_PRIVATE_H__ |
| 8 | #define __VISORBUS_PRIVATE_H__ |
Ken Cox | 12e364b | 2014-03-04 07:58:07 -0600 | [diff] [blame] | 9 | |
Benjamin Romer | 90addb0 | 2014-05-06 09:58:23 -0400 | [diff] [blame] | 10 | #include <linux/uuid.h> |
Jon Frisch | e82ed63 | 2016-09-26 11:03:41 -0400 | [diff] [blame] | 11 | #include <linux/utsname.h> |
David Kershner | 93d3ad9 | 2017-12-07 12:11:07 -0500 | [diff] [blame] | 12 | #include <linux/visorbus.h> |
Benjamin Romer | 90addb0 | 2014-05-06 09:58:23 -0400 | [diff] [blame] | 13 | |
Ken Cox | 12e364b | 2014-03-04 07:58:07 -0600 | [diff] [blame] | 14 | #include "controlvmchannel.h" |
David Kershner | b6d0fa1 | 2016-09-02 16:41:39 -0400 | [diff] [blame] | 15 | #include "vbuschannel.h" |
Bryan Thompson | 43c0ab0 | 2016-09-02 16:41:31 -0400 | [diff] [blame] | 16 | |
David Kershner | 69a4d1e7 | 2017-09-27 13:14:36 -0400 | [diff] [blame] | 17 | struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no, |
| 18 | struct visor_device *from); |
David Kershner | fdf5b9a | 2017-08-22 13:27:24 -0400 | [diff] [blame] | 19 | int visorbus_create_instance(struct visor_device *dev); |
Sameer Wadgaonkar | a7093ba | 2017-08-22 13:27:33 -0400 | [diff] [blame] | 20 | void visorbus_remove_instance(struct visor_device *bus_info); |
Sameer Wadgaonkar | 51c0f81 | 2017-08-22 13:27:34 -0400 | [diff] [blame] | 21 | int create_visor_device(struct visor_device *dev_info); |
Sameer Wadgaonkar | b74856b | 2017-08-22 13:27:35 -0400 | [diff] [blame] | 22 | void remove_visor_device(struct visor_device *dev_info); |
Sameer Wadgaonkar | c0b4413 | 2017-05-19 16:17:41 -0400 | [diff] [blame] | 23 | int visorchipset_device_pause(struct visor_device *dev_info); |
| 24 | int visorchipset_device_resume(struct visor_device *dev_info); |
Sameer Wadgaonkar | 76956aa | 2017-08-22 13:27:03 -0400 | [diff] [blame] | 25 | void visorbus_response(struct visor_device *p, int response, int controlvm_id); |
Sameer Wadgaonkar | 722e73d | 2017-08-22 13:27:04 -0400 | [diff] [blame] | 26 | void visorbus_device_changestate_response(struct visor_device *p, int response, |
| 27 | struct visor_segment_state state); |
Prarit Bhargava | 55c67dc | 2015-05-05 18:37:02 -0400 | [diff] [blame] | 28 | int visorbus_init(void); |
Prarit Bhargava | c79b28f | 2015-05-05 18:36:15 -0400 | [diff] [blame] | 29 | void visorbus_exit(void); |
David Binder | e9b18f3 | 2016-06-10 21:48:19 -0400 | [diff] [blame] | 30 | |
Tim Sell | 90bb5c1 | 2016-06-10 21:48:23 -0400 | [diff] [blame] | 31 | /* visorchannel access functions */ |
David Kershner | d7f1589 | 2017-08-30 13:36:31 -0400 | [diff] [blame] | 32 | struct visorchannel *visorchannel_create(u64 physaddr, gfp_t gfp, |
Sameer Wadgaonkar | 9047667 | 2017-09-27 13:14:44 -0400 | [diff] [blame] | 33 | const guid_t *guid, bool needs_lock); |
David Binder | e9b18f3 | 2016-06-10 21:48:19 -0400 | [diff] [blame] | 34 | void visorchannel_destroy(struct visorchannel *channel); |
| 35 | int visorchannel_read(struct visorchannel *channel, ulong offset, |
Erik Arfvidson | 9ed146c | 2016-11-21 12:15:43 -0500 | [diff] [blame] | 36 | void *dest, ulong nbytes); |
David Binder | e9b18f3 | 2016-06-10 21:48:19 -0400 | [diff] [blame] | 37 | int visorchannel_write(struct visorchannel *channel, ulong offset, |
Erik Arfvidson | 9ed146c | 2016-11-21 12:15:43 -0500 | [diff] [blame] | 38 | void *dest, ulong nbytes); |
David Binder | e9b18f3 | 2016-06-10 21:48:19 -0400 | [diff] [blame] | 39 | u64 visorchannel_get_physaddr(struct visorchannel *channel); |
| 40 | ulong visorchannel_get_nbytes(struct visorchannel *channel); |
| 41 | char *visorchannel_id(struct visorchannel *channel, char *s); |
| 42 | char *visorchannel_zoneid(struct visorchannel *channel, char *s); |
| 43 | u64 visorchannel_get_clientpartition(struct visorchannel *channel); |
| 44 | int visorchannel_set_clientpartition(struct visorchannel *channel, |
| 45 | u64 partition_handle); |
Andy Shevchenko | b32c5cb | 2017-08-22 13:26:54 -0400 | [diff] [blame] | 46 | char *visorchannel_guid_id(const guid_t *guid, char *s); |
David Binder | 5da77f3 | 2017-03-17 11:27:11 -0400 | [diff] [blame] | 47 | void *visorchannel_get_header(struct visorchannel *channel); |
Ken Cox | 12e364b | 2014-03-04 07:58:07 -0600 | [diff] [blame] | 48 | #endif |