Page 1 of 2
Should an IRQ be invoked after inserting Optical Disc?
Posted: Thu Oct 22, 2009 2:24 pm
by iocoder
I don't know why all my questions are about IRQs, but when i run Quafios (My Operating System) and insert compact disc to my DVD-RW, no IRQ happens, however, in Windows (The worst operating system) the auto-lay program starts when i insert the CD, sure this is according to an IRQ invoked. now i wanna know why this doesn't happen in Quafios (using my written IDE Driver)?
Re: Should an IRQ be invoked after inserting Optical Disc?
Posted: Thu Oct 22, 2009 3:16 pm
by iocoder
What happened, is the question is so difficult that no answer till now?
Re: Should an IRQ be invoked after inserting Optical Disc?
Posted: Thu Oct 22, 2009 4:36 pm
by pcmattman
What happened, is the question is so difficult that no answer till now?
What happened is that you only waited 30 minutes. If you want a quick answer, asking in an IRC channel (see the sticky in this subforum) is probably a better way of getting your answer.
now i wanna know why this doesn't happen in Quafios
Do you get
any IRQs from the drive, at all? If you read data from a disk that's already inserted, for example, do you receive IRQs at the right time?
Re: Should an IRQ be invoked after inserting Optical Disc?
Posted: Thu Oct 22, 2009 4:56 pm
by iocoder
thanks pcmattman very much for your hot reply, but i have waited about 2 hours, since 11:24pm hahahaha.
Do you get any IRQs from the drive, at all? If you read data from a disk that's already inserted, for example, do you receive IRQs at the right time?
Yes i get IRQs when i read from disc as well as when i write.
Re: Should an IRQ be invoked after inserting Optical Disc?
Posted: Thu Oct 22, 2009 5:10 pm
by Brynet-Inc
Nobody here is paid to help you, everyone is here for their own reasons.. holding your hand is not one of them.
Re: Should an IRQ be invoked after inserting Optical Disc?
Posted: Thu Oct 22, 2009 5:13 pm
by pcmattman
but i have waited about 2 hours, since 11:24pm
I was referring to the time between your first post and your bump, actually.
Perhaps the "Media Status Notification" feature set is what you're looking for? If you don't know what that is, you'll find it in the ATA/ATAPI specification, which I assume you already have.
Re: Should an IRQ be invoked after inserting Optical Disc?
Posted: Thu Oct 22, 2009 6:18 pm
by iocoder
First of all, Thanks very much for your reply.
Perhaps the "Media Status Notification" feature set is what you're looking for? If you don't know what that is, you'll find it in the ATA/ATAPI specification, which I assume you already have.
I hope "Media Status Notification" be what i'm looking for, i have searched for how to enable it, and i found that obseleted in ATA/ATAPI-8 Specification!
Then i searched online and finally, i use this commands to enable it:
Code: Select all
ide_write(i, ATA_REG_FEATURES, 0x95); // Enable Media Status Notification
ide_write(i, ATA_REG_COMMAND, 0xEF); // Set Feature Set.
But VMware invokes this message:
VMware Workstation unrecoverable error: (vcpu-0)
NOT_IMPLEMENTED /build/mts/release/bora-156735/bora/devices/vide/vide_user.c:2346
A log file is available in "/home/mostafa/Desktop/Quafios/vm/vmware.log". Please request support and include the contents of the log file.
To collect data to submit to VMware support, select Help > About and click "Collect Support Data". You can also run the "vm-support" script in the Workstation folder directly.
We will respond on the basis of your support entitlement.
And this is the last record of the log, which is never under-standed:
Oct 23 02:10:06.994: vcpu-0| VIDE: Curr CHS info cyls: 4161 heads: 16 sects: 63 lba_cap: 4194304
Oct 23 02:10:07.052: vcpu-0| BIOS-UUID is 56 4d e1 98 ef 7e 07 5d-7a 06 07 2d 67 d6 00 2c
Oct 23 02:10:07.586: mks| Ignoring update request in VGA_Expose (mode change pending).
Oct 23 02:10:08.639: vcpu-0| VIDE: Curr CHS info cyls: 4161 heads: 16 sects: 63 lba_cap: 4194304
Oct 23 02:10:10.461: vcpu-0| NOT_IMPLEMENTED /build/mts/release/bora-156735/bora/devices/vide/vide_user.c:2346
Oct 23 02:10:10.461: vcpu-0| Core dump limit is 0 KB.
Oct 23 02:10:10.463: vcpu-0| Child process 4537 failed to dump core (status 0x6).
Oct 23 02:10:10.463: vcpu-0| Backtrace:
Oct 23 02:10:10.463: vcpu-0| Backtrace[0] 0xb44cfdc8 eip 0x8054520
Oct 23 02:10:10.463: vcpu-0| Backtrace[1] 0xb44d01f8 eip 0x8124f06
Oct 23 02:10:10.463: vcpu-0| Backtrace[2] 0xb44d0218 eip 0x82cfbb8
Oct 23 02:10:10.463: vcpu-0| Backtrace[3] 0xb44d0258 eip 0x82d06ae
Oct 23 02:10:10.463: vcpu-0| Backtrace[4] 0xb44d0278 eip 0x84850fc
Oct 23 02:10:10.463: vcpu-0| Backtrace[5] 0xb44d0298 eip 0x8485455
Oct 23 02:10:10.463: vcpu-0| Backtrace[6] 0xb44d02c8 eip 0x8460411
Oct 23 02:10:10.463: vcpu-0| Backtrace[7] 0xb44d02d8 eip 0x84853f1
Oct 23 02:10:10.463: vcpu-0| Backtrace[8] 0xb44d03b8 eip 0x80c5f1d
Oct 23 02:10:10.463: vcpu-0| Backtrace[9] 0xb44d04b8 eip 0xc7251f
Oct 23 02:10:10.463: vcpu-0| Backtrace[10] 00000000 eip 0xba801e
Oct 23 02:10:10.463: vcpu-0| SymBacktrace[0] 0xb44cfdc8 eip 0x8054520 in function (null) in object /usr/lib/vmware/bin/vmware-vmx loaded at 0x8048000
Oct 23 02:10:10.463: vcpu-0| SymBacktrace[1] 0xb44d01f8 eip 0x8124f06 in function (null) in object /usr/lib/vmware/bin/vmware-vmx loaded at 0x8048000
Oct 23 02:10:10.463: vcpu-0| SymBacktrace[2] 0xb44d0218 eip 0x82cfbb8 in function (null) in object /usr/lib/vmware/bin/vmware-vmx loaded at 0x8048000
Oct 23 02:10:10.464: vcpu-0| SymBacktrace[3] 0xb44d0258 eip 0x82d06ae in function (null) in object /usr/lib/vmware/bin/vmware-vmx loaded at 0x8048000
Oct 23 02:10:10.464: vcpu-0| SymBacktrace[4] 0xb44d0278 eip 0x84850fc in function (null) in object /usr/lib/vmware/bin/vmware-vmx loaded at 0x8048000
Oct 23 02:10:10.464: vcpu-0| SymBacktrace[5] 0xb44d0298 eip 0x8485455 in function (null) in object /usr/lib/vmware/bin/vmware-vmx loaded at 0x8048000
Oct 23 02:10:10.464: vcpu-0| SymBacktrace[6] 0xb44d02c8 eip 0x8460411 in function (null) in object /usr/lib/vmware/bin/vmware-vmx loaded at 0x8048000
Oct 23 02:10:10.464: vcpu-0| SymBacktrace[7] 0xb44d02d8 eip 0x84853f1 in function (null) in object /usr/lib/vmware/bin/vmware-vmx loaded at 0x8048000
Oct 23 02:10:10.464: vcpu-0| SymBacktrace[8] 0xb44d03b8 eip 0x80c5f1d in function (null) in object /usr/lib/vmware/bin/vmware-vmx loaded at 0x8048000
Oct 23 02:10:10.464: vcpu-0| SymBacktrace[9] 0xb44d04b8 eip 0xc7251f in function (null) in object /lib/libpthread.so.0 loaded at 0xc6c000
Oct 23 02:10:10.464: vcpu-0| SymBacktrace[10] 00000000 eip 0xba801e in function clone in object /lib/libc.so.6 loaded at 0xac4000
Oct 23 02:10:10.464: vcpu-0| Msg_Post: Error
Oct 23 02:10:10.464: vcpu-0| [msg.log.error.unrecoverable] VMware Workstation unrecoverable error: (vcpu-0)
Oct 23 02:10:10.464: vcpu-0| NOT_IMPLEMENTED /build/mts/release/bora-156735/bora/devices/vide/vide_user.c:2346
Oct 23 02:10:10.464: vcpu-0| [msg.panic.haveLog] A log file is available in "/home/mostafa/Desktop/Quafios/vm/vmware.log". [msg.panic.requestSupport.withLog] Please request support and include the contents of the log file. [msg.panic.requestSupport.vmSupport.windowsOrLinux]
Oct 23 02:10:10.464: vcpu-0| To collect data to submit to VMware support, select Help > About and click "Collect Support Data". You can also run the "vm-support" script in the Workstation folder directly.
Oct 23 02:10:10.464: vcpu-0| [msg.panic.response] We will respond on the basis of your support entitlement.
Oct 23 02:10:10.464: vcpu-0| ----------------------------------------
Oct 23 02:16:01.572: vmx| VTHREAD watched thread 4 "vcpu-0" died
Oct 23 02:16:01.608: Worker#0| VTHREAD watched thread 0 "vmx" died
Oct 23 02:16:01.673: mks| VTHREAD watched thread 0 "vmx" died
When i test that on my computer, i find like i haven't done anything new to the driver.
Anyone has any idea about that????
Notice that i want to enable it in ATAPI Drive, not ATA.
Thanks all.
Re: Should an IRQ be invoked after inserting Optical Disc?
Posted: Thu Oct 22, 2009 6:34 pm
by bluechill
could be the way vmware is implementing it. do you have it automatically forward the cd to your os? you could also try qemu or bochs or some other emulator/virtual machine program.
Re: Should an IRQ be invoked after inserting Optical Disc?
Posted: Thu Oct 22, 2009 6:42 pm
by iocoder
could be the way vmware is implementing it.
do you have it automatically forward the cd to your os?
Yes i do.
you could also try qemu or bochs or some other emulator/virtual machine program.
The IDE Driver doesn't work correctly on qemu!
But i test the commands above on my real machine and it also don't work and no IRQ happens.
Re: Should an IRQ be invoked after inserting Optical Disc?
Posted: Thu Oct 22, 2009 7:01 pm
by pcmattman
mostafazizo wrote:The IDE Driver doesn't work correctly on qemu!
But i test the commands above on my real machine and it also don't work and no IRQ happens.
That sounds... problematic. You might want to fix that
before you continue with your driver code.
Re: Should an IRQ be invoked after inserting Optical Disc?
Posted: Fri Oct 23, 2009 4:48 am
by iocoder
Ok i have fixed the driver and it works well with qemu, but my problem is still not working.
Re: Should an IRQ be invoked after inserting Optical Disc?
Posted: Fri Oct 23, 2009 5:56 am
by iocoder
I have discovered something else, that the word number 127 in the identification space of the ATA/ATAPI Drive indicates wether drive supports media status notification or not, and when i read this word, it is always zero, means that it is not supported and it is really an obselete feature. so i have to search for another way for what i want. i may try to do something naughty:
- - On each IRQ0 invoking (each 10ms), i will send "GET MEDIA STATUS" command to 0x1F7.
- Then i read the outputs and status
- If the status of the drive has been changer so there is a new inserted medium or the medium is removed.
I think this is good and should work, Do you see that??????????????
I'm waiting for your replies..........
Re: Should an IRQ be invoked after inserting Optical Disc?
Posted: Fri Oct 23, 2009 6:21 am
by Combuster
Please, do not use colours.
Also, the time spent checking for media would become really excessive when done 100 times a second. Adding hardware delays, you may not be able to complete a sequence before the next IRQ...
Re: Should an IRQ be invoked after inserting Optical Disc?
Posted: Fri Oct 23, 2009 6:43 am
by pcmattman
- On each IRQ0 invoking (each 10ms), i will send "GET MEDIA STATUS" command to 0x1F7.
You can
easily get away with only checking every couple of seconds (perhaps once a second if you're pedantic). Keep in mind the command does not necessarily return instantly, as has already been mentioned by Combuster. Keep in mind also that a second is hardly any form of delay from the user's perspective. Whilst you may want to have "instant detection" you would be better off, in my opinion, having "pretty much instant detection". Users expect delays - use that to your advantage!
Re: Should an IRQ be invoked after inserting Optical Disc?
Posted: Fri Oct 23, 2009 6:45 am
by iocoder
Also, the time spent checking for media would become really excessive when done 100 times a second.
Ok i shall change it to be checked one time each 1000ms.
Adding hardware delays, you may not be able to complete a sequence before the next IRQ...
My System Timer Driver doesn't work in this stratigy, so delays will not delay IRQs.
Please, do not use colours.
Sorry, But can i know why? i'm new to the forums.