X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fcdrom.c;h=5c7f9c39f6b3b364c8a068b9cd0f72443e59fef8;hb=e70e95962c26832628d586e07f9cd1a2e1852d72;hp=61d7f52e793a7c96ea3647371a839d780b253b51;hpb=a1a2be8eb002e13b1eb6ccaca40e4396f8816402;p=palacios-OLD.git diff --git a/palacios/src/devices/cdrom.c b/palacios/src/devices/cdrom.c index 61d7f52..5c7f9c3 100644 --- a/palacios/src/devices/cdrom.c +++ b/palacios/src/devices/cdrom.c @@ -1,10 +1,23 @@ /* - * Zheng Cui - * cuizheng@cs.unm.edu - * July 2008 + * This file is part of the Palacios Virtual Machine Monitor developed + * by the V3VEE Project with funding from the United States National + * Science Foundation and the Department of Energy. + * + * The V3VEE Project is a joint project between Northwestern University + * and the University of New Mexico. You can find out more at + * http://www.v3vee.org + * + * Copyright (c) 2008, Zheng Cui + * Copyright (c) 2008, Jack Lange + * Copyright (c) 2008, The V3VEE Project + * All rights reserved. + * + * Author: Zheng Cui + * + * This is free software. You are permitted to use, + * redistribute, and modify it as specified in the file "V3VEE_LICENSE". */ - #include #include @@ -25,6 +38,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 +105,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; }