win-pvdrivers

view xenpci/xenpci.h @ 538:e75bb8d68370

Lots more changes...
author James Harper <james.harper@bendigoit.com.au>
date Tue Mar 03 09:51:24 2009 +1100 (2009-03-03)
parents 2a74ac2f43bb
children a88fe72e3597
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[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;
175 /* xenbus related */
176 XENBUS_WATCH_ENTRY XenBus_WatchEntries[MAX_WATCH_ENTRIES];
177 FAST_MUTEX xb_watch_mutex;
178 FAST_MUTEX xb_request_mutex;
179 KEVENT xb_request_complete_event;
180 struct xsd_sockmsg *xb_reply;
182 WDFCHILDLIST child_list;
184 int suspend_state;
186 UNICODE_STRING legacy_interface_name;
187 UNICODE_STRING interface_name;
188 BOOLEAN interface_open;
190 BOOLEAN removable;
192 BOOLEAN hibernated;
194 WDFQUEUE io_queue;
196 WDFCOLLECTION veto_devices;
197 #if 0
198 KSPIN_LOCK mmio_freelist_lock;
199 PPFN_NUMBER mmio_freelist_base;
200 ULONG mmio_freelist_free;
201 #endif
203 } XENPCI_DEVICE_DATA, *PXENPCI_DEVICE_DATA;
205 WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(XENPCI_DEVICE_DATA, GetXpdd)
207 typedef struct {
208 // XENPCI_COMMON common;
209 WDFDEVICE wdf_device;
210 WDFDEVICE wdf_device_bus_fdo;
211 //PDEVICE_OBJECT bus_pdo;
212 //PDEVICE_OBJECT bus_fdo;
213 BOOLEAN reported_missing;
214 char path[128];
215 char device[128];
216 ULONG index;
217 ULONG irq_number;
218 ULONG irq_vector;
219 KIRQL irq_level;
220 char backend_path[128];
221 //PVOID xenbus_request;
222 KEVENT backend_state_event;
223 ULONG backend_state;
224 ULONG frontend_state;
225 PHYSICAL_ADDRESS config_page_phys;
226 ULONG config_page_length;
227 PUCHAR requested_resources_start;
228 PUCHAR requested_resources_ptr;
229 PUCHAR assigned_resources_start;
230 PUCHAR assigned_resources_ptr;
231 XENPCI_DEVICE_STATE device_state;
232 BOOLEAN restart_on_resume;
234 BOOLEAN hiber_usage_kludge;
236 } XENPCI_PDO_DEVICE_DATA, *PXENPCI_PDO_DEVICE_DATA;
238 WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(XENPCI_PDO_DEVICE_DATA, GetXppdd)
240 typedef struct {
241 WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER header;
242 CHAR path[128];
243 CHAR device[128];
244 ULONG index;
245 } XENPCI_PDO_IDENTIFICATION_DESCRIPTION, *PXENPCI_PDO_IDENTIFICATION_DESCRIPTION;
247 #if 0
248 kd> dt _ADAPTER_OBJECT 81e96b08 -v
249 hal!_ADAPTER_OBJECT
250 struct _ADAPTER_OBJECT, 26 elements, 0x64 bytes
251 +0x000 DmaHeader : struct _DMA_ADAPTER, 3 elements, 0x8 bytes
252 +0x008 MasterAdapter : (null)
253 +0x00c MapRegistersPerChannel : 0x80001
254 +0x010 AdapterBaseVa : (null)
255 +0x014 MapRegisterBase : (null)
256 +0x018 NumberOfMapRegisters : 0
257 +0x01c CommittedMapRegisters : 0
258 +0x020 CurrentWcb : (null)
259 +0x024 ChannelWaitQueue : struct _KDEVICE_QUEUE, 5 elements, 0x14 bytes
260 +0x038 RegisterWaitQueue : (null)
261 +0x03c AdapterQueue : struct _LIST_ENTRY, 2 elements, 0x8 bytes
262 [ 0x0 - 0x0 ]
263 +0x044 SpinLock : 0
264 +0x048 MapRegisters : (null)
265 +0x04c PagePort : (null)
266 +0x050 ChannelNumber : 0xff ''
267 +0x051 AdapterNumber : 0 ''
268 +0x052 DmaPortAddress : 0
269 +0x054 AdapterMode : 0 ''
270 +0x055 NeedsMapRegisters : 0 ''
271 +0x056 MasterDevice : 0x1 ''
272 +0x057 Width16Bits : 0 ''
273 +0x058 ScatterGather : 0x1 ''
274 +0x059 IgnoreCount : 0 ''
275 +0x05a Dma32BitAddresses : 0x1 ''
276 +0x05b Dma64BitAddresses : 0 ''
277 +0x05c AdapterList : struct _LIST_ENTRY, 2 elements, 0x8 bytes
278 [ 0x806e1250 - 0x81f1b474 ]
279 #endif
281 /* need to confirm that this is the same for AMD64 too */
282 typedef struct {
283 DMA_ADAPTER DmaHeader;
284 PVOID MasterAdapter;
285 ULONG MapRegistersPerChannel;
286 PVOID AdapterBaseVa;
287 PVOID MapRegisterBase;
288 ULONG NumberOfMapRegisters;
289 ULONG CommittedMapRegisters;
290 PVOID CurrentWcb;
291 KDEVICE_QUEUE ChannelWaitQueue;
292 PKDEVICE_QUEUE RegisterWaitQueue;
293 LIST_ENTRY AdapterQueue;
294 KSPIN_LOCK SpinLock;
295 PVOID MapRegisters;
296 PVOID PagePort;
297 UCHAR ChannelNumber;
298 UCHAR AdapterNumber;
299 USHORT DmaPortAddress;
300 UCHAR AdapterMode;
301 BOOLEAN NeedsMapRegisters;
302 BOOLEAN MasterDevice;
303 UCHAR Width16Bits;
304 BOOLEAN ScatterGather;
305 BOOLEAN IgnoreCount;
306 BOOLEAN Dma32BitAddresses;
307 BOOLEAN Dma64BitAddresses;
308 #if (NTDDI_VERSION >= NTDDI_WS03)
309 BOOLEAN LegacyAdapter;
310 #endif
311 LIST_ENTRY AdapterList;
312 } X_ADAPTER_OBJECT;
314 typedef struct {
315 X_ADAPTER_OBJECT adapter_object;
316 PXENPCI_PDO_DEVICE_DATA xppdd;
317 dma_driver_extension_t *dma_extension;
318 PDRIVER_OBJECT dma_extension_driver; /* to deference it */
319 } xen_dma_adapter_t;
321 #define XEN_INTERFACE_VERSION 1
323 #define DEVICE_INTERFACE_TYPE_LEGACY 0
324 #define DEVICE_INTERFACE_TYPE_XENBUS 1
326 typedef struct {
327 ULONG type; /* must be the first member */
328 KSPIN_LOCK lock;
329 ULONG len;
330 union {
331 struct xsd_sockmsg msg;
332 UCHAR buffer[PAGE_SIZE];
333 } u;
334 LIST_ENTRY read_list_head;
335 LIST_ENTRY watch_list_head;
336 WDFQUEUE io_queue;
338 //PIRP pending_read_irp;
339 } XENPCI_DEVICE_INTERFACE_DATA, *PXENPCI_DEVICE_INTERFACE_DATA;
341 WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(XENPCI_DEVICE_INTERFACE_DATA, GetXpdid)
343 EVT_WDF_DEVICE_FILE_CREATE XenPci_EvtDeviceFileCreate;
344 EVT_WDF_FILE_CLOSE XenPci_EvtFileClose;
345 EVT_WDF_FILE_CLEANUP XenPci_EvtFileCleanup;
346 EVT_WDF_IO_QUEUE_IO_READ XenPci_EvtIoRead;
347 EVT_WDF_IO_QUEUE_IO_WRITE XenPci_EvtIoWrite;
349 #include "hypercall.h"
351 #define XBT_NIL ((xenbus_transaction_t)0)
353 NTSTATUS
354 hvm_get_stubs(PXENPCI_DEVICE_DATA xpdd);
355 NTSTATUS
356 hvm_free_stubs(PXENPCI_DEVICE_DATA xpdd);
358 EVT_WDF_DEVICE_PREPARE_HARDWARE XenPci_EvtDevicePrepareHardware;
359 EVT_WDF_DEVICE_RELEASE_HARDWARE XenPci_EvtDeviceReleaseHardware;
360 EVT_WDF_DEVICE_D0_ENTRY XenPci_EvtDeviceD0Entry;
361 EVT_WDF_DEVICE_D0_ENTRY_POST_INTERRUPTS_ENABLED XenPci_EvtDeviceD0EntryPostInterruptsEnabled;
362 EVT_WDF_DEVICE_D0_EXIT XenPci_EvtDeviceD0Exit;
363 EVT_WDF_DEVICE_D0_EXIT_PRE_INTERRUPTS_DISABLED XenPci_EvtDeviceD0ExitPreInterruptsDisabled;
364 EVT_WDF_DEVICE_QUERY_REMOVE XenPci_EvtDeviceQueryRemove;
366 NTSTATUS
367 XenPci_EvtChildListCreateDevice(WDFCHILDLIST child_list, PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER description_header, PWDFDEVICE_INIT child_init);
368 VOID
369 XenPci_EvtChildListScanForChildren(WDFCHILDLIST child_list);
371 VOID
372 XenPci_HideQemuDevices();
373 extern ULONG qemu_filtered_by_qemu;
375 #if 0
376 NTSTATUS
377 XenPci_Power_Fdo(PDEVICE_OBJECT device_object, PIRP irp);
378 NTSTATUS
379 XenPci_Dummy_Fdo(PDEVICE_OBJECT device_object, PIRP irp);
380 NTSTATUS
381 XenPci_Pnp_Fdo(PDEVICE_OBJECT device_object, PIRP irp);
382 NTSTATUS
383 XenPci_Irp_Create_Fdo(PDEVICE_OBJECT device_object, PIRP irp);
384 NTSTATUS
385 XenPci_Irp_Close_Fdo(PDEVICE_OBJECT device_object, PIRP irp);
386 NTSTATUS
387 XenPci_Irp_Read_Fdo(PDEVICE_OBJECT device_object, PIRP irp);
388 NTSTATUS
389 XenPci_Irp_Write_Fdo(PDEVICE_OBJECT device_object, PIRP irp);
390 NTSTATUS
391 XenPci_Irp_Cleanup_Fdo(PDEVICE_OBJECT device_object, PIRP irp);
392 NTSTATUS
393 XenPci_SystemControl_Fdo(PDEVICE_OBJECT device_object, PIRP irp);
395 NTSTATUS
396 XenPci_Irp_Create_XenBus(PDEVICE_OBJECT device_object, PIRP irp);
397 NTSTATUS
398 XenPci_Irp_Close_XenBus(PDEVICE_OBJECT device_object, PIRP irp);
399 NTSTATUS
400 XenPci_Irp_Read_XenBus(PDEVICE_OBJECT device_object, PIRP irp);
401 NTSTATUS
402 XenPci_Irp_Write_XenBus(PDEVICE_OBJECT device_object, PIRP irp);
403 NTSTATUS
404 XenPci_Irp_Cleanup_XenBus(PDEVICE_OBJECT device_object, PIRP irp);
406 NTSTATUS
407 XenPci_Power_Pdo(PDEVICE_OBJECT device_object, PIRP irp);
408 //NTSTATUS
409 //XenPci_Dummy_Pdo(PDEVICE_OBJECT device_object, PIRP irp);
410 NTSTATUS
411 XenPci_Pnp_Pdo(PDEVICE_OBJECT device_object, PIRP irp);
412 NTSTATUS
413 XenPci_Irp_Create_Pdo(PDEVICE_OBJECT device_object, PIRP irp);
414 NTSTATUS
415 XenPci_Irp_Close_Pdo(PDEVICE_OBJECT device_object, PIRP irp);
416 NTSTATUS
417 XenPci_Irp_Read_Pdo(PDEVICE_OBJECT device_object, PIRP irp);
418 NTSTATUS
419 XenPci_Irp_Write_Pdo(PDEVICE_OBJECT device_object, PIRP irp);
420 NTSTATUS
421 XenPci_Irp_Cleanup_Pdo(PDEVICE_OBJECT device_object, PIRP irp);
422 NTSTATUS
423 XenPci_SystemControl_Pdo(PDEVICE_OBJECT device_object, PIRP irp);
424 #endif
426 NTSTATUS
427 XenPci_Pdo_Suspend(WDFDEVICE device);
428 NTSTATUS
429 XenPci_Pdo_Resume(WDFDEVICE device);
431 VOID
432 XenPci_DumpPdoConfig(PDEVICE_OBJECT device_object);
434 typedef VOID
435 (*PXENPCI_HIGHSYNC_FUNCTION)(PVOID context);
437 VOID
438 XenPci_HighSync(PXENPCI_HIGHSYNC_FUNCTION function0, PXENPCI_HIGHSYNC_FUNCTION functionN, PVOID context);
440 VOID
441 XenPci_PatchKernel(PXENPCI_DEVICE_DATA xpdd, PVOID base, ULONG length);
443 struct xsd_sockmsg *
444 XenBus_Raw(PXENPCI_DEVICE_DATA xpdd, struct xsd_sockmsg *msg);
445 char *
446 XenBus_Read(PVOID Context, xenbus_transaction_t xbt, char *path, char **value);
447 char *
448 XenBus_Write(PVOID Context, xenbus_transaction_t xbt, char *path, char *value);
449 char *
450 XenBus_Printf(PVOID Context, xenbus_transaction_t xbt, char *path, char *fmt, ...);
451 char *
452 XenBus_StartTransaction(PVOID Context, xenbus_transaction_t *xbt);
453 char *
454 XenBus_EndTransaction(PVOID Context, xenbus_transaction_t t, int abort, int *retry);
455 char *
456 XenBus_List(PVOID Context, xenbus_transaction_t xbt, char *prefix, char ***contents);
457 char *
458 XenBus_AddWatch(PVOID Context, xenbus_transaction_t xbt, char *Path, PXENBUS_WATCH_CALLBACK ServiceRoutine, PVOID ServiceContext);
459 char *
460 XenBus_RemWatch(PVOID Context, xenbus_transaction_t xbt, char *Path, PXENBUS_WATCH_CALLBACK ServiceRoutine, PVOID ServiceContext);
461 //VOID
462 //XenBus_ThreadProc(PVOID StartContext);
463 NTSTATUS
464 XenBus_Init(PXENPCI_DEVICE_DATA xpdd);
465 NTSTATUS
466 XenBus_Close(PXENPCI_DEVICE_DATA xpdd);
467 NTSTATUS
468 XenBus_Start(PXENPCI_DEVICE_DATA xpdd);
469 NTSTATUS
470 XenBus_Stop(PXENPCI_DEVICE_DATA xpdd);
471 NTSTATUS
472 XenBus_Suspend(PXENPCI_DEVICE_DATA xpdd);
473 NTSTATUS
474 XenBus_Resume(PXENPCI_DEVICE_DATA xpdd);
475 NTSTATUS
476 XenBus_StopThreads(PXENPCI_DEVICE_DATA xpdd);
478 PHYSICAL_ADDRESS
479 XenPci_AllocMMIO(PXENPCI_DEVICE_DATA xpdd, ULONG len);
481 EVT_WDF_INTERRUPT_ISR EvtChn_EvtInterruptIsr;
482 EVT_WDF_INTERRUPT_ENABLE EvtChn_EvtInterruptEnable;
483 EVT_WDF_INTERRUPT_DISABLE EvtChn_EvtInterruptDisable;
485 NTSTATUS
486 EvtChn_Init(PXENPCI_DEVICE_DATA xpdd);
487 NTSTATUS
488 EvtChn_Suspend(PXENPCI_DEVICE_DATA xpdd);
489 NTSTATUS
490 EvtChn_Resume(PXENPCI_DEVICE_DATA xpdd);
492 NTSTATUS
493 EvtChn_Mask(PVOID Context, evtchn_port_t Port);
494 NTSTATUS
495 EvtChn_Unmask(PVOID Context, evtchn_port_t Port);
496 NTSTATUS
497 EvtChn_Bind(PVOID Context, evtchn_port_t Port, PXEN_EVTCHN_SERVICE_ROUTINE ServiceRoutine, PVOID ServiceContext);
498 NTSTATUS
499 EvtChn_BindDpc(PVOID Context, evtchn_port_t Port, PXEN_EVTCHN_SERVICE_ROUTINE ServiceRoutine, PVOID ServiceContext);
500 NTSTATUS
501 EvtChn_BindIrq(PVOID Context, evtchn_port_t Port, ULONG vector, PCHAR description);
502 evtchn_port_t
503 EvtChn_AllocIpi(PVOID context, ULONG vcpu);
504 NTSTATUS
505 EvtChn_Unbind(PVOID Context, evtchn_port_t Port);
506 NTSTATUS
507 EvtChn_Notify(PVOID Context, evtchn_port_t Port);
508 VOID
509 EvtChn_Close(PVOID Context, evtchn_port_t Port);
510 evtchn_port_t
511 EvtChn_AllocUnbound(PVOID Context, domid_t Domain);
512 BOOLEAN
513 EvtChn_AckEvent(PVOID context, evtchn_port_t port);
515 VOID
516 GntTbl_Init(PXENPCI_DEVICE_DATA xpdd);
517 VOID
518 GntTbl_Suspend(PXENPCI_DEVICE_DATA xpdd);
519 VOID
520 GntTbl_Resume(PXENPCI_DEVICE_DATA xpdd);
521 grant_ref_t
522 GntTbl_GrantAccess(PVOID Context, domid_t domid, uint32_t, int readonly, grant_ref_t ref);
523 BOOLEAN
524 GntTbl_EndAccess(PVOID Context, grant_ref_t ref, BOOLEAN keepref);
525 VOID
526 GntTbl_PutRef(PVOID Context, grant_ref_t ref);
527 grant_ref_t
528 GntTbl_GetRef(PVOID Context);
529 #if 0
530 int
531 GntTbl_Map(PVOID Context, unsigned int start_idx, unsigned int end_idx);
532 #endif
534 #endif