Device driver FDC in virtual or protected mode

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Neo92
Member
Member
Posts: 28
Joined: Tue Jun 24, 2014 9:41 am

Device driver FDC in virtual or protected mode

Post by Neo92 »

Hi Guys, i'm create a device driver for FDC through ports with DMA, but i try to execute in virtual mode and don't work :(, only works in real mode. To a few words it is as if i execute the interrupt 0x13. alternatively, how can i fix it without drop back to realmode? Thanks. :)
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Device driver FDC in virtual or protected mode

Post by Combuster »

Virtual 8086 mode sends interrupts to your kernel, not the BIOS, for safety reasons. The int 0x13 call needs timekeeping and disk interrupts to perform it's task.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Neo92
Member
Member
Posts: 28
Joined: Tue Jun 24, 2014 9:41 am

Re: Device driver FDC in virtual or protected mode

Post by Neo92 »

Hi Combuster, you let me get, i must set a timer for disk access? I didn't understand... however 'int 13h' works on Bochs but doesn't read the next sector, show the log message 'partial read() on floppy image returns 510/512' seems that reads instead... help me :?:
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Device driver FDC in virtual or protected mode

Post by Combuster »

partial read() on floppy image
Shame on me for trying to help someone who doesn't even fix known issues. :evil:
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Neo92
Member
Member
Posts: 28
Joined: Tue Jun 24, 2014 9:41 am

Re: Device driver FDC in virtual or protected mode

Post by Neo92 »

Virtual 8086 mode sends interrupts to your kernel, not the BIOS, for safety reasons.
I already knew that.
The int 0x13 call needs timekeeping and disk interrupts to perform it's task.
What does that mean 'call needs timekeeping to perform it's task'? I set it MSR into floppy controller but nothing, maybe if you explain better i understand... :-| :-s
Post Reply