win-pvdrivers

view xenpci/xenpci.h @ 607:c2aea3e060a7

Missed a line in cut&paste in previous checksum fix
author James Harper <james.harper@bendigoit.com.au>
date Sun Jul 05 21:06:26 2009 +1000 (2009-07-05)
parents cf954aa0a8b1
children f905eb3f0545
line source
1 /*
2 PV Drivers for Windows Xen HVM Domains
3 Copyright (C) 2007 James Harper
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
20 #if !defined(_XENPCI_H_)
21 #define _XENPCI_H_
23 #define __attribute__(arg) /* empty */
24 #define EISCONN 127
26 #include <ntifs.h>
27 #include <ntddk.h>
29 #define DDKAPI
30 //#include <wdm.h>
31 #include <wdf.h>
32 #include <initguid.h>
33 #include <wdmguid.h>
34 #include <errno.h>
35 #define NTSTRSAFE_LIB
36 #include <ntstrsafe.h>
38 #define __DRIVER_NAME "XenPCI"
40 #include <xen_windows.h>
41 #include <memory.h>
42 #include <grant_table.h>
43 #include <event_channel.h>
44 #include <hvm/params.h>
45 #include <hvm/hvm_op.h>
46 #include <sched.h>
47 #include <io/xenbus.h>
48 #include <io/xs_wire.h>
50 #include <xen_public.h>
52 //{C828ABE9-14CA-4445-BAA6-82C2376C6518}
53 DEFINE_GUID( GUID_XENPCI_DEVCLASS, 0xC828ABE9, 0x14CA, 0x4445, 0xBA, 0xA6, 0x82, 0xC2, 0x37, 0x6C, 0x65, 0x18);
55 #define XENPCI_POOL_TAG (ULONG) 'XenP'
57 #define NR_RESERVED_ENTRIES 8
58 #define NR_GRANT_FRAMES 32
59 #define NR_GRANT_ENTRIES (NR_GRANT_FRAMES * PAGE_SIZE / sizeof(grant_entry_t))
61 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
63 #define EVT_ACTION_TYPE_EMPTY 0
64 #define EVT_ACTION_TYPE_NORMAL 1
65 #define EVT_ACTION_TYPE_DPC 2
66 #define EVT_ACTION_TYPE_IRQ 3
67 #define EVT_ACTION_TYPE_SUSPEND 4
69 #define XEN_PV_PRODUCT_NUMBER 0x0002
70 #define XEN_PV_PRODUCT_BUILD 0x00000001
72 extern ULONG qemu_filtered;
73 extern ULONG qemu_protocol_version;
75 typedef struct _ev_action_t {
76 PXEN_EVTCHN_SERVICE_ROUTINE ServiceRoutine;
77 PVOID ServiceContext;
78 CHAR description[128];
79 ULONG type; /* EVT_ACTION_TYPE_* */
80 KDPC Dpc;
81 ULONG vector;
82 ULONG count;
83 PVOID xpdd;
84 } ev_action_t;
86 typedef struct _XENBUS_WATCH_RING
87 {
88 char Path[128];
89 char Token[10];
90 } XENBUS_WATCH_RING;
92 typedef struct _XENBUS_WATCH_ENTRY {
93 char Path[128];
94 PXENBUS_WATCH_CALLBACK ServiceRoutine;
95 PVOID ServiceContext;
96 int Count;
97 int Active;
98 //int RemovePending;
99 //int Running;
100 //KEVENT CompleteEvent;
101 } XENBUS_WATCH_ENTRY, *PXENBUS_WATCH_ENTRY;
103 #define NR_EVENTS 1024
104 #define WATCH_RING_SIZE 128
105 #define NR_XB_REQS 32
106 #define MAX_WATCH_ENTRIES 128
108 #define CHILD_STATE_EMPTY 0
109 #define CHILD_STATE_DELETED 1
110 #define CHILD_STATE_ADDED 2
112 #define SUSPEND_STATE_NONE 0 /* no suspend in progress */
113 #define SUSPEND_STATE_SCHEDULED 1 /* suspend scheduled */
114 #define SUSPEND_STATE_HIGH_IRQL 2 /* all processors are at high IRQL and spinning */
115 #define SUSPEND_STATE_RESUMING 3 /* we are the other side of the suspend and things are starting to get back to normal */
117 typedef struct {
118 //XENPCI_COMMON common;
120 BOOLEAN XenBus_ShuttingDown;
122 BOOLEAN tpr_patched;
124 WDFINTERRUPT interrupt;
125 ULONG irq_number;
126 ULONG irq_vector;
127 KIRQL irq_level;
128 KINTERRUPT_MODE irq_mode;
129 KAFFINITY irq_affinity;
131 PHYSICAL_ADDRESS shared_info_area_unmapped;
132 shared_info_t *shared_info_area;
133 xen_ulong_t evtchn_pending_pvt[MAX_VIRT_CPUS][sizeof(xen_ulong_t) * 8];
134 xen_ulong_t evtchn_pending_suspend[sizeof(xen_ulong_t) * 8];
135 evtchn_port_t pdo_event_channel;
136 KEVENT pdo_suspend_event;
137 BOOLEAN interrupts_masked;
139 PHYSICAL_ADDRESS platform_mmio_addr;
140 ULONG platform_mmio_orig_len;
141 ULONG platform_mmio_len;
142 ULONG platform_mmio_alloc;
143 USHORT platform_mmio_flags;
145 ULONG platform_ioport_addr;
146 ULONG platform_ioport_len;
148 char *hypercall_stubs;
150 evtchn_port_t xen_store_evtchn;
152 /* grant related */
153 grant_entry_t *gnttab_table;
154 grant_entry_t *gnttab_table_copy;
155 PHYSICAL_ADDRESS gnttab_table_physical;
156 grant_ref_t *gnttab_list;
157 int gnttab_list_free;
158 KSPIN_LOCK grant_lock;
159 ULONG grant_frames;
161 ev_action_t ev_actions[NR_EVENTS];
162 // unsigned long bound_ports[NR_EVENTS/(8*sizeof(unsigned long))];
164 PKTHREAD XenBus_ReadThread;
165 KEVENT XenBus_ReadThreadEvent;
166 PKTHREAD XenBus_WatchThread;
167 KEVENT XenBus_WatchThreadEvent;
169 XENBUS_WATCH_RING XenBus_WatchRing[WATCH_RING_SIZE];
170 int XenBus_WatchRingReadIndex;
171 int XenBus_WatchRingWriteIndex;
173 struct xenstore_domain_interface *xen_store_interface;
176 #define BALLOON_UNITS (1024 * 1024) /* 1MB */
177 PKTHREAD balloon_thread;
178 KEVENT balloon_event;
179 ULONG initial_memory;
180 ULONG current_memory;
181 ULONG target_memory;
183 /* xenbus related */
184 XENBUS_WATCH_ENTRY XenBus_WatchEntries[MAX_WATCH_ENTRIES];
185 FAST_MUTEX xb_watch_mutex;
186 FAST_MUTEX xb_request_mutex;
187 KEVENT xb_request_complete_event;
188 struct xsd_sockmsg *xb_reply;
190 WDFCHILDLIST child_list;
192 int suspend_state;
194 UNICODE_STRING legacy_interface_name;
195 UNICODE_STRING interface_name;
196 BOOLEAN interface_open;
198 BOOLEAN removable;
200 BOOLEAN hibernated;
202 WDFQUEUE io_queue;
204 WDFCOLLECTION veto_devices;
205 #if 0
206 KSPIN_LOCK mmio_freelist_lock;
207 PPFN_NUMBER mmio_freelist_base;
208 ULONG mmio_freelist_free;
209 #endif
211 } XENPCI_DEVICE_DATA, *PXENPCI_DEVICE_DATA;
213 WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(XENPCI_DEVICE_DATA, GetXpdd)
215 typedef struct {
216 WDFDEVICE wdf_device;
217 WDFDEVICE wdf_device_bus_fdo;
218 BOOLEAN reported_missing;
219 char path[128];
220 char device[128];
221 ULONG index;
222 ULONG irq_number;
223 ULONG irq_vector;
224 KIRQL irq_level;
225 char backend_path[128];
226 //PVOID xenbus_request;
227 KEVENT backend_state_event;
228 ULONG backend_state;
229 ULONG frontend_state;
230 PMDL config_page_mdl;
231 PHYSICAL_ADDRESS config_page_phys;
232 ULONG config_page_length;
233 PUCHAR requested_resources_start;
234 PUCHAR requested_resources_ptr;
235 PUCHAR assigned_resources_start;
236 PUCHAR assigned_resources_ptr;
237 XENPCI_DEVICE_STATE device_state;
238 BOOLEAN restart_on_resume;
240 BOOLEAN hiber_usage_kludge;
242 } XENPCI_PDO_DEVICE_DATA, *PXENPCI_PDO_DEVICE_DATA;
244 WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(XENPCI_PDO_DEVICE_DATA, GetXppdd)
246 typedef struct {
247 WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER header;
248 CHAR path[128];
249 CHAR device[128];
250 ULONG index;
251 } XENPCI_PDO_IDENTIFICATION_DESCRIPTION, *PXENPCI_PDO_IDENTIFICATION_DESCRIPTION;
253 #if 0
254 kd> dt _ADAPTER_OBJECT 81e96b08 -v
255 hal!_ADAPTER_OBJECT
256 struct _ADAPTER_OBJECT, 26 elements, 0x64 bytes
257 +0x000 DmaHeader : struct _DMA_ADAPTER, 3 elements, 0x8 bytes
258 +0x008 MasterAdapter : (null)
259 +0x00c MapRegistersPerChannel : 0x80001
260 +0x010 AdapterBaseVa : (null)
261 +0x014 MapRegisterBase : (null)
262 +0x018 NumberOfMapRegisters : 0
263 +0x01c CommittedMapRegisters : 0
264 +0x020 CurrentWcb : (null)
265 +0x024 ChannelWaitQueue : struct _KDEVICE_QUEUE, 5 elements, 0x14 bytes
266 +0x038 RegisterWaitQueue : (null)
267 +0x03c AdapterQueue : struct _LIST_ENTRY, 2 elements, 0x8 bytes
268 [ 0x0 - 0x0 ]
269 +0x044 SpinLock : 0
270 +0x048 MapRegisters : (null)
271 +0x04c PagePort : (null)
272 +0x050 ChannelNumber : 0xff ''
273 +0x051 AdapterNumber : 0 ''
274 +0x052 DmaPortAddress : 0
275 +0x054 AdapterMode : 0 ''
276 +0x055 NeedsMapRegisters : 0 ''
277 +0x056 MasterDevice : 0x1 ''
278 +0x057 Width16Bits : 0 ''
279 +0x058 ScatterGather : 0x1 ''
280 +0x059 IgnoreCount : 0 ''
281 +0x05a Dma32BitAddresses : 0x1 ''
282 +0x05b Dma64BitAddresses : 0 ''
283 +0x05c AdapterList : struct _LIST_ENTRY, 2 elements, 0x8 bytes
284 [ 0x806e1250 - 0x81f1b474 ]
285 #endif
287 /* need to confirm that this is the same for AMD64 too */
288 typedef struct {
289 DMA_ADAPTER DmaHeader;
290 PVOID MasterAdapter;
291 ULONG MapRegistersPerChannel;
292 PVOID AdapterBaseVa;
293 PVOID MapRegisterBase;
294 ULONG NumberOfMapRegisters;
295 ULONG CommittedMapRegisters;
296 PVOID CurrentWcb;
297 KDEVICE_QUEUE ChannelWaitQueue;
298 PKDEVICE_QUEUE RegisterWaitQueue;
299 LIST_ENTRY AdapterQueue;
300 KSPIN_LOCK SpinLock;
301 PVOID MapRegisters;
302 PVOID PagePort;
303 UCHAR ChannelNumber;
304 UCHAR AdapterNumber;
305 USHORT DmaPortAddress;
306 UCHAR AdapterMode;
307 BOOLEAN NeedsMapRegisters;
308 BOOLEAN MasterDevice;
309 UCHAR Width16Bits;
310 BOOLEAN ScatterGather;
311 BOOLEAN IgnoreCount;
312 BOOLEAN Dma32BitAddresses;
313 BOOLEAN Dma64BitAddresses;
314 #if (NTDDI_VERSION >= NTDDI_WS03)
315 BOOLEAN LegacyAdapter;
316 #endif
317 LIST_ENTRY AdapterList;
318 } X_ADAPTER_OBJECT;
320 typedef struct {
321 X_ADAPTER_OBJECT adapter_object;
322 PXENPCI_PDO_DEVICE_DATA xppdd;
323 dma_driver_extension_t *dma_extension;
324 PDRIVER_OBJECT dma_extension_driver; /* to deference it */
325 } xen_dma_adapter_t;
327 #define XEN_INTERFACE_VERSION 1
329 #define DEVICE_INTERFACE_TYPE_LEGACY 0
330 #define DEVICE_INTERFACE_TYPE_XENBUS 1
332 typedef struct {
333 ULONG type; /* must be the first member */
334 KSPIN_LOCK lock;
335 ULONG len;
336 union {
337 struct xsd_sockmsg msg;
338 UCHAR buffer[PAGE_SIZE];
339 } u;
340 LIST_ENTRY read_list_head;
341 LIST_ENTRY watch_list_head;
342 WDFQUEUE io_queue;
344 //PIRP pending_read_irp;
345 } XENPCI_DEVICE_INTERFACE_DATA, *PXENPCI_DEVICE_INTERFACE_DATA;
347 WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(XENPCI_DEVICE_INTERFACE_DATA, GetXpdid)
349 EVT_WDF_DEVICE_FILE_CREATE XenPci_EvtDeviceFileCreate;
350 EVT_WDF_FILE_CLOSE XenPci_EvtFileClose;
351 EVT_WDF_FILE_CLEANUP XenPci_EvtFileCleanup;
352 EVT_WDF_IO_QUEUE_IO_READ XenPci_EvtIoRead;
353 EVT_WDF_IO_QUEUE_IO_WRITE XenPci_EvtIoWrite;
355 #include "hypercall.h"
357 #define XBT_NIL ((xenbus_transaction_t)0)
359 NTSTATUS
360 hvm_get_stubs(PXENPCI_DEVICE_DATA xpdd);
361 NTSTATUS
362 hvm_free_stubs(PXENPCI_DEVICE_DATA xpdd);
364 EVT_WDF_DEVICE_PREPARE_HARDWARE XenPci_EvtDevicePrepareHardware;
365 EVT_WDF_DEVICE_RELEASE_HARDWARE XenPci_EvtDeviceReleaseHardware;
366 EVT_WDF_DEVICE_D0_ENTRY XenPci_EvtDeviceD0Entry;
367 EVT_WDF_DEVICE_D0_ENTRY_POST_INTERRUPTS_ENABLED XenPci_EvtDeviceD0EntryPostInterruptsEnabled;
368 EVT_WDF_DEVICE_D0_EXIT XenPci_EvtDeviceD0Exit;
369 EVT_WDF_DEVICE_D0_EXIT_PRE_INTERRUPTS_DISABLED XenPci_EvtDeviceD0ExitPreInterruptsDisabled;
370 EVT_WDF_DEVICE_QUERY_REMOVE XenPci_EvtDeviceQueryRemove;
372 NTSTATUS
373 XenPci_EvtChildListCreateDevice(WDFCHILDLIST child_list, PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER description_header, PWDFDEVICE_INIT child_init);
374 VOID
375 XenPci_EvtChildListScanForChildren(WDFCHILDLIST child_list);
377 VOID
378 XenPci_HideQemuDevices();
379 extern ULONG qemu_filtered_by_qemu;
381 #if 0
382 NTSTATUS
383 XenPci_Power_Fdo(PDEVICE_OBJECT device_object, PIRP irp);
384 NTSTATUS
385 XenPci_Dummy_Fdo(PDEVICE_OBJECT device_object, PIRP irp);
386 NTSTATUS
387 XenPci_Pnp_Fdo(PDEVICE_OBJECT device_object, PIRP irp);
388 NTSTATUS
389 XenPci_Irp_Create_Fdo(PDEVICE_OBJECT device_object, PIRP irp);
390 NTSTATUS
391 XenPci_Irp_Close_Fdo(PDEVICE_OBJECT device_object, PIRP irp);
392 NTSTATUS
393 XenPci_Irp_Read_Fdo(PDEVICE_OBJECT device_object, PIRP irp);
394 NTSTATUS
395 XenPci_Irp_Write_Fdo(PDEVICE_OBJECT device_object, PIRP irp);
396 NTSTATUS
397 XenPci_Irp_Cleanup_Fdo(PDEVICE_OBJECT device_object, PIRP irp);
398 NTSTATUS
399 XenPci_SystemControl_Fdo(PDEVICE_OBJECT device_object, PIRP irp);
401 NTSTATUS
402 XenPci_Irp_Create_XenBus(PDEVICE_OBJECT device_object, PIRP irp);
403 NTSTATUS
404 XenPci_Irp_Close_XenBus(PDEVICE_OBJECT device_object, PIRP irp);
405 NTSTATUS
406 XenPci_Irp_Read_XenBus(PDEVICE_OBJECT device_object, PIRP irp);
407 NTSTATUS
408 XenPci_Irp_Write_XenBus(PDEVICE_OBJECT device_object, PIRP irp);
409 NTSTATUS
410 XenPci_Irp_Cleanup_XenBus(PDEVICE_OBJECT device_object, PIRP irp);
412 NTSTATUS
413 XenPci_Power_Pdo(PDEVICE_OBJECT device_object, PIRP irp);
414 //NTSTATUS
415 //XenPci_Dummy_Pdo(PDEVICE_OBJECT device_object, PIRP irp);
416 NTSTATUS
417 XenPci_Pnp_Pdo(PDEVICE_OBJECT device_object, PIRP irp);
418 NTSTATUS
419 XenPci_Irp_Create_Pdo(PDEVICE_OBJECT device_object, PIRP irp);
420 NTSTATUS
421 XenPci_Irp_Close_Pdo(PDEVICE_OBJECT device_object, PIRP irp);
422 NTSTATUS
423 XenPci_Irp_Read_Pdo(PDEVICE_OBJECT device_object, PIRP irp);
424 NTSTATUS
425 XenPci_Irp_Write_Pdo(PDEVICE_OBJECT device_object, PIRP irp);
426 NTSTATUS
427 XenPci_Irp_Cleanup_Pdo(PDEVICE_OBJECT device_object, PIRP irp);
428 NTSTATUS
429 XenPci_SystemControl_Pdo(PDEVICE_OBJECT device_object, PIRP irp);
430 #endif
432 NTSTATUS
433 XenPci_Pdo_Suspend(WDFDEVICE device);
434 NTSTATUS
435 XenPci_Pdo_Resume(WDFDEVICE device);
437 VOID
438 XenPci_DumpPdoConfig(PDEVICE_OBJECT device_object);
440 typedef VOID
441 (*PXENPCI_HIGHSYNC_FUNCTION)(PVOID context);
443 VOID
444 XenPci_HighSync(PXENPCI_HIGHSYNC_FUNCTION function0, PXENPCI_HIGHSYNC_FUNCTION functionN, PVOID context);
446 VOID
447 XenPci_PatchKernel(PXENPCI_DEVICE_DATA xpdd, PVOID base, ULONG length);
449 struct xsd_sockmsg *
450 XenBus_Raw(PXENPCI_DEVICE_DATA xpdd, struct xsd_sockmsg *msg);
451 char *
452 XenBus_Read(PVOID Context, xenbus_transaction_t xbt, char *path, char **value);
453 char *
454 XenBus_Write(PVOID Context, xenbus_transaction_t xbt, char *path, char *value);
455 char *
456 XenBus_Printf(PVOID Context, xenbus_transaction_t xbt, char *path, char *fmt, ...);
457 char *
458 XenBus_StartTransaction(PVOID Context, xenbus_transaction_t *xbt);
459 char *
460 XenBus_EndTransaction(PVOID Context, xenbus_transaction_t t, int abort, int *retry);
461 char *
462 XenBus_List(PVOID Context, xenbus_transaction_t xbt, char *prefix, char ***contents);
463 char *
464 XenBus_AddWatch(PVOID Context, xenbus_transaction_t xbt, char *Path, PXENBUS_WATCH_CALLBACK ServiceRoutine, PVOID ServiceContext);
465 char *
466 XenBus_RemWatch(PVOID Context, xenbus_transaction_t xbt, char *Path, PXENBUS_WATCH_CALLBACK ServiceRoutine, PVOID ServiceContext);
467 //VOID
468 //XenBus_ThreadProc(PVOID StartContext);
469 NTSTATUS
470 XenBus_Init(PXENPCI_DEVICE_DATA xpdd);
471 NTSTATUS
472 XenBus_Close(PXENPCI_DEVICE_DATA xpdd);
473 NTSTATUS
474 XenBus_Start(PXENPCI_DEVICE_DATA xpdd);
475 NTSTATUS
476 XenBus_Stop(PXENPCI_DEVICE_DATA xpdd);
477 NTSTATUS
478 XenBus_Suspend(PXENPCI_DEVICE_DATA xpdd);
479 NTSTATUS
480 XenBus_Resume(PXENPCI_DEVICE_DATA xpdd);
481 NTSTATUS
482 XenBus_StopThreads(PXENPCI_DEVICE_DATA xpdd);
484 PHYSICAL_ADDRESS
485 XenPci_AllocMMIO(PXENPCI_DEVICE_DATA xpdd, ULONG len);
487 EVT_WDF_INTERRUPT_ISR EvtChn_EvtInterruptIsr;
488 EVT_WDF_INTERRUPT_ENABLE EvtChn_EvtInterruptEnable;
489 EVT_WDF_INTERRUPT_DISABLE EvtChn_EvtInterruptDisable;
491 NTSTATUS
492 EvtChn_Init(PXENPCI_DEVICE_DATA xpdd);
493 NTSTATUS
494 EvtChn_Suspend(PXENPCI_DEVICE_DATA xpdd);
495 NTSTATUS
496 EvtChn_Resume(PXENPCI_DEVICE_DATA xpdd);
498 NTSTATUS
499 EvtChn_Mask(PVOID Context, evtchn_port_t Port);
500 NTSTATUS
501 EvtChn_Unmask(PVOID Context, evtchn_port_t Port);
502 NTSTATUS
503 EvtChn_Bind(PVOID Context, evtchn_port_t Port, PXEN_EVTCHN_SERVICE_ROUTINE ServiceRoutine, PVOID ServiceContext);
504 NTSTATUS
505 EvtChn_BindDpc(PVOID Context, evtchn_port_t Port, PXEN_EVTCHN_SERVICE_ROUTINE ServiceRoutine, PVOID ServiceContext);
506 NTSTATUS
507 EvtChn_BindIrq(PVOID Context, evtchn_port_t Port, ULONG vector, PCHAR description);
508 evtchn_port_t
509 EvtChn_AllocIpi(PVOID context, ULONG vcpu);
510 NTSTATUS
511 EvtChn_Unbind(PVOID Context, evtchn_port_t Port);
512 NTSTATUS
513 EvtChn_Notify(PVOID Context, evtchn_port_t Port);
514 VOID
515 EvtChn_Close(PVOID Context, evtchn_port_t Port);
516 evtchn_port_t
517 EvtChn_AllocUnbound(PVOID Context, domid_t Domain);
518 BOOLEAN
519 EvtChn_AckEvent(PVOID context, evtchn_port_t port, BOOLEAN *last_interrupt);
521 VOID
522 GntTbl_Init(PXENPCI_DEVICE_DATA xpdd);
523 VOID
524 GntTbl_Suspend(PXENPCI_DEVICE_DATA xpdd);
525 VOID
526 GntTbl_Resume(PXENPCI_DEVICE_DATA xpdd);
527 grant_ref_t
528 GntTbl_GrantAccess(PVOID Context, domid_t domid, uint32_t, int readonly, grant_ref_t ref);
529 BOOLEAN
530 GntTbl_EndAccess(PVOID Context, grant_ref_t ref, BOOLEAN keepref);
531 VOID
532 GntTbl_PutRef(PVOID Context, grant_ref_t ref);
533 grant_ref_t
534 GntTbl_GetRef(PVOID Context);
535 #if 0
536 int
537 GntTbl_Map(PVOID Context, unsigned int start_idx, unsigned int end_idx);
538 #endif
540 #endif