Commit | Line | Data |
---|---|---|
12e364b9 KC |
1 | /* visorchipset.h |
2 | * | |
6f14cc18 | 3 | * Copyright (C) 2010 - 2015 UNISYS CORPORATION |
12e364b9 KC |
4 | * All rights reserved. |
5 | * | |
6f14cc18 BR |
6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | |
8 | * version 2, as published by the Free Software Foundation. | |
12e364b9 KC |
9 | * |
10 | * This program is distributed in the hope that it will be useful, but | |
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | |
13 | * NON INFRINGEMENT. See the GNU General Public License for more | |
14 | * details. | |
15 | */ | |
16 | ||
17 | #ifndef __VISORCHIPSET_H__ | |
18 | #define __VISORCHIPSET_H__ | |
19 | ||
90addb02 BR |
20 | #include <linux/uuid.h> |
21 | ||
12e364b9 | 22 | #include "controlvmchannel.h" |
12e364b9 KC |
23 | #include "vbusdeviceinfo.h" |
24 | #include "vbushelper.h" | |
25 | ||
87241ab8 DB |
26 | void chipset_bus_create(struct visor_device *bus_info); |
27 | void chipset_bus_destroy(struct visor_device *bus_info); | |
28 | void chipset_device_create(struct visor_device *dev_info); | |
29 | void chipset_device_destroy(struct visor_device *dev_info); | |
30 | void chipset_device_pause(struct visor_device *dev_info); | |
31 | void chipset_device_resume(struct visor_device *dev_info); | |
32 | ||
33 | void bus_create_response(struct visor_device *p, int response); | |
34 | void bus_destroy_response(struct visor_device *p, int response); | |
35 | void device_create_response(struct visor_device *p, int response); | |
36 | void device_destroy_response(struct visor_device *p, int response); | |
37 | void device_resume_response(struct visor_device *p, int response); | |
ea3a5aaf | 38 | void device_pause_response(struct visor_device *p, int response); |
12e364b9 | 39 | |
c79b28f7 | 40 | /* visorbus init and exit functions */ |
55c67dca | 41 | int visorbus_init(void); |
c79b28f7 | 42 | void visorbus_exit(void); |
e9b18f3b DB |
43 | |
44 | /* Visorchannel access functions */ | |
45 | ||
46 | /* Note that for visorchannel_create() | |
47 | * <channel_bytes> and <guid> arguments may be 0 if we are a channel CLIENT. | |
48 | * In this case, the values can simply be read from the channel header. | |
49 | */ | |
50 | struct visorchannel *visorchannel_create(u64 physaddr, | |
51 | unsigned long channel_bytes, | |
52 | gfp_t gfp, uuid_le guid); | |
53 | struct visorchannel *visorchannel_create_with_lock(u64 physaddr, | |
54 | unsigned long channel_bytes, | |
55 | gfp_t gfp, uuid_le guid); | |
56 | void visorchannel_destroy(struct visorchannel *channel); | |
57 | int visorchannel_read(struct visorchannel *channel, ulong offset, | |
58 | void *local, ulong nbytes); | |
59 | int visorchannel_write(struct visorchannel *channel, ulong offset, | |
60 | void *local, ulong nbytes); | |
61 | u64 visorchannel_get_physaddr(struct visorchannel *channel); | |
62 | ulong visorchannel_get_nbytes(struct visorchannel *channel); | |
63 | char *visorchannel_id(struct visorchannel *channel, char *s); | |
64 | char *visorchannel_zoneid(struct visorchannel *channel, char *s); | |
65 | u64 visorchannel_get_clientpartition(struct visorchannel *channel); | |
66 | int visorchannel_set_clientpartition(struct visorchannel *channel, | |
67 | u64 partition_handle); | |
68 | char *visorchannel_uuid_id(uuid_le *guid, char *s); | |
69 | void __iomem *visorchannel_get_header(struct visorchannel *channel); | |
12e364b9 | 70 | #endif |