Skip to contentSkip to conversation

Question

Qemu-devel Mohammed Al-Saleh 1 participant 2 messages Jul 27, 2008 – Aug 4, 2008

lore
Share & tools
lore
#0 lore raw

Hi all;

I know that cd_read_sector function (which is called from ide_atapi_cmd_reply_end) in ide.c will copy data from the CD-ROM to an intermediate buffer, but I could not find out when this buffer is written to the RAM. All of what I can see is after reading data, ide_transfer_start and de_set_irq are called, but then what? how data will go to the RAM? if data will be copied to the RAM implicitly through the interrupt, then where can I find the ultimate function that copies the data to the RAM.
Can any body answer my question? it will be very appreciated.

Thanks,

...Mohammed

--

#1 lore raw

[Qemu-devel] CD-ROM Reading

Hi all;

Two methods to read from the CD-ROM depending on the following condition in the hw/ide.c file:

if (s->atapi_dma) {
        ide_atapi_cmd_read_dma(s, lba, nb_sectors, sector_size);
} else {
        ide_atapi_cmd_read_pio(s, lba, nb_sectors, sector_size);
}

in the first case (ide_atapi_cmd_read_dma), it is obvious how data will be read from the CD-ROM into an io_buffer and then to the RAM. But in the second case(ide_atapi_cmd_read_pio), it is obvious how that data will be read from the CD-ROM into an io_buffer, but it is not obvious how or when the data will written to the RAM. I know that cd_read_sector function (which is called from ide_atapi_cmd_reply_end) in ide.c will copy data from the CD- ROM to an intermediate buffer, but I could not find out when this buffer is written to the RAM. All of what I can see is after reading data, ide_transfer_start and ide_set_irq are called, but then what? how data will go to the RAM? if data will be copied to the RAM implicitly through the interrupt, then where can I find the ultimate function that copies the data to the RAM.

Can any body answer my question? it will be very appreciated.

Thanks,

...Mohammed

--
------- End of Forwarded Message -------

--