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.


minor bug fixes, and copyright additions
[palacios.git] / palacios / src / devices / cdrom.c
index 61d7f52..a4f8dd5 100644 (file)
@@ -1,9 +1,6 @@
-/*
- * Zheng Cui
- * cuizheng@cs.unm.edu
- * July 2008
- */
-
+/* (c) 2008, Zheng Cui <cuizheng@cs.unm.edu> */
+/* (c) 2008, Jack Lange <jarusl@cs.northwestern.edu> */
+/* (c) 2008, The V3VEE Project <http://www.v3vee.org> */
 
 #include <devices/cdrom.h>
 #include <palacios/vmm.h>
@@ -25,6 +22,7 @@ void cdrom_init(struct cdrom_interface * cdrom)
   Ramdisk_Print_CD("[cdrom_init]\n");
   V3_ASSERT(g_ramdiskImage);
   cdrom->fd = g_ramdiskImage;
+  PrintDebug("CDIMAGE located at: %x\n", cdrom->fd);
   cdrom->capacity_B = s_ramdiskSize; 
   //FIXME:lba
   cdrom->lba = 1; 
@@ -91,9 +89,10 @@ void cdrom_read_block(struct cdrom_interface *cdrom, uint8_t* buf, int lba)// __
 {
 
   V3_ASSERT(lba != 0);
-    
-  Ramdisk_Print_CD("[cdrom_read_block] lba = %d\n", lba);
-  memcpy(buf, (uint8_t *)(cdrom->fd + lba*2048), 2048);
+  
+  Ramdisk_Print_CD("[cdrom_read_block] lba = %d (cdrom_image_start=%x)\n", lba, cdrom->fd);
+  memcpy(buf, (uint8_t *)(cdrom->fd + lba * 2048), 2048);
+  PrintDebug("Returning from read block\n");
     return;
 }