Problem with HardDisk Read
Posted: Wed Oct 11, 2006 4:56 am
I have a weird problem.... I'll try my level best to explain it clearly....
ATA Device (Hard Disk) is configured for DMA mode.
So While Settting up the PRD Table, I Need the Absolute Address of the Buffer where
DMA will write the data that is read from diskl....
Case 1 : - When i'm running in Kernel Mode (Page Table & Real Mem is one - to - one mapped)... there
is no problem as the virtual and real address are same.... (Or Virutal + Seg Base = Absoulte)
Work Fine ....
Case 2 : - When i'm in User Mode / User Process (Uses a different Page Table), to get the Absoute Address I enter into Kernel Mode and get the Absolute address of the Buffer by reverse engineering (back calculation) on the Page Table of the User Process.
I'm using qemu Emulator.
Case 1 works fine both on Real and Emu
But When it comes to Case 2:- It Works only on Emu
But on Real PC, The System neatly raises IRQ 14 (Hard Disk Primary IRQ) after DMA and finishes Reading but the data will not be available in the destination buffer.
Thanks for reading....
Also Thanks for solution / suggestion in advance
ATA Device (Hard Disk) is configured for DMA mode.
So While Settting up the PRD Table, I Need the Absolute Address of the Buffer where
DMA will write the data that is read from diskl....
Case 1 : - When i'm running in Kernel Mode (Page Table & Real Mem is one - to - one mapped)... there
is no problem as the virtual and real address are same.... (Or Virutal + Seg Base = Absoulte)
Work Fine ....
Case 2 : - When i'm in User Mode / User Process (Uses a different Page Table), to get the Absoute Address I enter into Kernel Mode and get the Absolute address of the Buffer by reverse engineering (back calculation) on the Page Table of the User Process.
I'm using qemu Emulator.
Case 1 works fine both on Real and Emu
But When it comes to Case 2:- It Works only on Emu
But on Real PC, The System neatly raises IRQ 14 (Hard Disk Primary IRQ) after DMA and finishes Reading but the data will not be available in the destination buffer.
Thanks for reading....
Also Thanks for solution / suggestion in advance