1 | /** @file
|
---|
2 | *
|
---|
3 | * vboxadd -- VirtualBox Guest Additions for Linux
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006 InnoTek Systemberatung GmbH
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License as published by the Free Software Foundation,
|
---|
13 | * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
|
---|
14 | * distribution. VirtualBox OSE is distributed in the hope that it will
|
---|
15 | * be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | *
|
---|
17 | * If you received this file as part of a commercial VirtualBox
|
---|
18 | * distribution, then only the terms of your commercial VirtualBox
|
---|
19 | * license agreement apply instead of the previous paragraph.
|
---|
20 | */
|
---|
21 |
|
---|
22 | #ifndef VBOXMOD_H
|
---|
23 | #define VBOXMOD_H
|
---|
24 |
|
---|
25 | #include <VBox/VBoxGuest.h>
|
---|
26 | #include <VBox/VBoxGuestLib.h>
|
---|
27 | #include <iprt/asm.h>
|
---|
28 |
|
---|
29 | typedef struct VBoxDevice VBoxDevice;
|
---|
30 | struct VBoxDevice
|
---|
31 | {
|
---|
32 | /** the device name */
|
---|
33 | char name[128];
|
---|
34 | /** file node minor code */
|
---|
35 | unsigned minor;
|
---|
36 | /** IRQ number */
|
---|
37 | unsigned irq;
|
---|
38 | /** first IO port */
|
---|
39 | unsigned short io_port;
|
---|
40 | /** physical address of device memory */
|
---|
41 | uint32_t vmmdevmem;
|
---|
42 | /** size of adapter memory */
|
---|
43 | size_t vmmdevmem_size;
|
---|
44 |
|
---|
45 | /** kernel space mapping of the adapter memory */
|
---|
46 | VMMDevMemory *pVMMDevMemory;
|
---|
47 | /** current pending events mask */
|
---|
48 | uint32_t u32Events;
|
---|
49 | /** request structure to acknowledge events in ISR */
|
---|
50 | VMMDevEvents *irqAckRequest;
|
---|
51 | /** start of the hypervisor window */
|
---|
52 | void *hypervisorStart;
|
---|
53 | /** size of the hypervisor window in bytes */
|
---|
54 | uint32_t hypervisorSize;
|
---|
55 | /** event synchronization */
|
---|
56 | wait_queue_head_t eventq;
|
---|
57 | };
|
---|
58 |
|
---|
59 | extern int vboxadd_verbosity;
|
---|
60 |
|
---|
61 | #define wlog(...) printk (KERN_WARNING "vboxadd: " __VA_ARGS__)
|
---|
62 | #define ilog(...) printk (KERN_INFO "vboxadd: " __VA_ARGS__)
|
---|
63 | #define dlog(...) printk (KERN_DEBUG "vboxadd: " __VA_ARGS__)
|
---|
64 | #define elog(...) printk (KERN_ERR "vboxadd: " __VA_ARGS__)
|
---|
65 |
|
---|
66 | #define vlog(n, ...) \
|
---|
67 | if (n >= vboxadd_verbosity) printk (KERN_DEBUG "vboxadd: " __VA_ARGS__)
|
---|
68 |
|
---|
69 | extern int vboxadd_cmc_init (void);
|
---|
70 | extern void vboxadd_cmc_fini (void);
|
---|
71 |
|
---|
72 | #endif /* !VBOXMOD_H */
|
---|