Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


huge update for merge
[palacios.git] / palacios / include / devices / cdrom.h
1
2 /*
3  * This file is part of the Palacios Virtual Machine Monitor developed
4  * by the V3VEE Project with funding from the United States National 
5  * Science Foundation and the Department of Energy.  
6  *
7  * The V3VEE Project is a joint project between Northwestern University
8  * and the University of New Mexico.  You can find out more at 
9  * http://www.v3vee.org
10  *
11  * Copyright (c) 2008, Zheng Cui<cuizheng@cs.unm.edu> 
12  * Copyright (c) 2008, The V3VEE Project <http://www.v3vee.org> 
13  * All rights reserved.
14  *
15  * Author: Zheng Cui<cuizheng@cs.unm.edu> 
16  *
17  * This is free software.  You are permitted to use,
18  * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
19  */
20
21 #ifndef __DEVICES_CDROM_H__
22 #define __DEVICES_CDROM_H__
23
24
25 #ifdef __V3VEE__
26
27 #include <devices/ramdisk.h>
28 #include <devices/ide.h>
29 #include <palacios/vmm_types.h>
30
31
32
33
34
35 struct cdrom_ops {
36     /* 
37      * Load CD-ROM. Returns false if CD is not ready. 
38      */
39     rd_bool (*insert_cdrom)(void * private_data);
40
41     /* 
42      * Logically eject the CD.
43      */
44     void (*eject_cdrom)(void * private_data);
45   
46     /* 
47      * Read CD TOC. Returns false if start track is out of bounds.
48      */
49     rd_bool (*read_toc)(void * private_data, uchar_t * buf, int * length, rd_bool msf, int start_track);
50   
51     /* 
52      * Return CD-ROM capacity (in 2048 byte frames)
53      */
54     uint32_t (*capacity)(void * private_data);
55   
56     /*
57      * Read a single block from the CD
58      */
59     void (*read_block)(void * private_data, uchar_t * buf, int lba);
60   
61     /*
62      * Start (spin up) the CD.
63      */
64     int (*start_cdrom)(void * private_data);
65
66     void (*set_LBA)(void * private_data, uchar_t lba);
67 };
68
69
70
71
72 struct vm_device * v3_create_cdrom(struct vm_device * ramdisk_dev, void * ramdisk, uint_t ramdisk_size);
73
74
75
76 #endif // !__V3VEE__
77
78 #endif