1 /* (c) 2008, Jack Lange <jarusl@cs.northwestern.edu> */
2 /* (c) 2008, The V3VEE Project <http://www.v3vee.org> */
4 #include <devices/timer.h>
5 #include <palacios/vmm.h>
16 int irq_handler(uint_t irq, struct vm_device * dev) {
17 PrintDebug("Timer interrupt\n");
22 int timer_init(struct vm_device * dev) {
23 //dev_hook_irq(dev, TIMER_IRQ, &irq_handler);
28 int timer_deinit(struct vm_device * dev) {
34 static struct vm_device_ops dev_ops = {
36 .deinit = timer_deinit,
44 struct vm_device * create_timer() {
45 struct timer_state * timer = NULL;
46 timer = (struct timer_state *)V3_Malloc( sizeof(struct timer_state));
47 V3_ASSERT(timer != NULL);
49 struct vm_device * dev = create_device("Timer", &dev_ops, timer);