VirtualBox

source: vbox/trunk/src/VBox/Additions/linux/module/vboxmod.h@ 20038

Last change on this file since 20038 was 17857, checked in by vboxsync, 16 years ago

Additions/linux/vboxadd: added vboxuser device to kernel module for use by OpenGL guest additions

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1/** @file
2 *
3 * vboxadd -- VirtualBox Guest Additions for Linux
4 */
5
6/*
7 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
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 (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18 * Clara, CA 95054 USA or visit http://www.sun.com if you need
19 * additional information or have any questions.
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#define VBOXADD_NAME "vboxadd"
30#define VBOXUSER_NAME "vboxuser"
31
32typedef struct VBoxDevice VBoxDevice;
33struct VBoxDevice
34{
35 /** file node minor code */
36 unsigned minor;
37 /** IRQ number */
38 unsigned irq;
39 /** first IO port */
40 unsigned short io_port;
41 /** physical address of device memory */
42 uint32_t vmmdevmem;
43 /** size of adapter memory */
44 size_t vmmdevmem_size;
45
46 /** kernel space mapping of the adapter memory */
47 VMMDevMemory *pVMMDevMemory;
48 /** current pending events mask */
49 uint32_t u32Events;
50 /** request structure to acknowledge events in ISR */
51 VMMDevEvents *irqAckRequest;
52 /** start of the hypervisor window */
53 void *hypervisorStart;
54 /** size of the hypervisor window in bytes */
55 uint32_t hypervisorSize;
56 /** event synchronization */
57 wait_queue_head_t eventq;
58 /** number of times the guest has interrupted the event loop -
59 implemented as a counter to prevent one waiter swallowing the
60 event. */
61 uint32_t u32GuestInterruptions;
62 /** Queue structure */
63 struct fasync_struct *async_queue;
64};
65
66extern int vboxadd_verbosity;
67
68#define wlog(...) printk (KERN_WARNING "vboxadd: " __VA_ARGS__)
69#define ilog(...) printk (KERN_INFO "vboxadd: " __VA_ARGS__)
70#define dlog(...) printk (KERN_DEBUG "vboxadd: " __VA_ARGS__)
71#define elog(...) printk (KERN_ERR "vboxadd: " __VA_ARGS__)
72
73#define vlog(n, ...) \
74if (n >= vboxadd_verbosity) printk (KERN_DEBUG "vboxadd: " __VA_ARGS__)
75
76extern int vboxadd_cmc_init (void);
77extern void vboxadd_cmc_fini (void);
78DECLVBGL (int) vboxadd_cmc_call (void *opaque, uint32_t func, void *data);
79
80#endif /* !VBOXMOD_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette