Hello everyone,
OSDev Series Chapter 21 has been released.
It covers the Direct Memory Access Controller (DMAC), Direct Memory Access (DMA) theory and concepts used in PCI and ISA, DMAC hardware, ports, registers, commands, history, and more. It builds off of the last chapter to create a DMAC minidriver in the HAL and updates our floppy driver to use it. Includes a full working demo that reads from any sector off disk.
OSDev Series Base Site.
Please feel free to post comments, questions, or suggestions and I thank everyone for your great support
(*Also, sorry for the delay between this and the last chapter. Work and other things kept me busy.)
~Mike ();
OSDev Series Chapter 21
OSDev Series Chapter 21
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Re: OSDev Series Chapter 21
Hi,
Some typos.
"The basic idea is that we can *schedual* the DMA ..." - schedule
"The CPU will *being* the HACK line to low when it needs ..." - bring?
"Will, sort of." - Well
"connected in a *simular* way that ..." - similar (multiple instances of this typo)
"For *completness*, these are included in ..." - completeness
Other than this, great work.
Some typos.
"The basic idea is that we can *schedual* the DMA ..." - schedule
"The CPU will *being* the HACK line to low when it needs ..." - bring?
"Will, sort of." - Well
"connected in a *simular* way that ..." - similar (multiple instances of this typo)
"For *completness*, these are included in ..." - completeness
Other than this, great work.
Re: OSDev Series Chapter 21
Hello,
Thank you for looking it over - those errors have been corrected
Thank you for looking it over - those errors have been corrected
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Re: OSDev Series Chapter 21
I think you should be more clear that by "modern" you mean anything younger dan 30 years :). Seriously though, although it's great covering DMA, in a modern OS it is hardly needed except for supporting a floppy drive or ancient sound card. We're talking ISA here, which has been surpassed by PCI for fifteen years now.Direct Memory Access (DMA) is a feature in all modern computers
Some more typos/errors:
"In the ATX motherboard designs" -> "In the original PC and XT motherboard designs"
"Do to the limitations" -> "Due to ..."
"slaved together" - I don't think this a common expression, perhaps rewrite it ("operating in a master-slave configuration" or the like)
"Both controllers always run at 4MHz." - isn't this 4.77MHz? Even the OSdev wiki seems to think so
"newer devices tend to us PIO or UDMA instead" - PIO is not using DMA, so not really relevant and also only IDE, UDMA is also IDE, and I don't think disk drives every used DMA on the AT and higher? "newer" devices (read: all PCI(-E) devices, see also remark above about "modern") use PCI DMA.
"Channel 3: Hard Disk Controller (PIO or UDMA recommended instead)" -> XT HDDs do not have PIO or UDMA, and AT HDDs cannot use DMA. So the remark between parentheses can be removed. I'd advise to have instead of "XT" a label "XT/AT", and have "(XT only, available on AT)" as remark.
"where the transfer is to be completed" -> "... performed", or perhaps better, "where the transferred data is to read or written" or something
"Afterwords" -> "Afterwards" (multiple times)
"it sets to either read or write from that block of memory and then sets the controller on its way to complete the transfer" - this is completely agrammatical. Rephrase it.
"This is important!" - what is? The stuff about the IRQ?
"These are the steps" - what steps? Unclear what you mean here, and it reads as if the steps are to follow.
"a request to read or write to or from" - "a request to read from or write to", or alternatively "a request to transfer to or from"
I didn't read the technical stuff, no time and no knowledge. But the "dmac-x86" JPG picture is of very bad quality, don't you have a PNG or GIF?
"If the system software has enabled paging, it must map the location that the channel will use into the same virtual address by idenitity mapping the region of memory that will be used." - Not necessarily of course, as long the system software knows the physical address of the page it has reserved. But I agree identity mapping is easiest.
Conclusion:
"wasnt" -> "wasn't"
"ealier" -> "earlier"
"From here we cannot get much further without the capability of loading files from disk." -> "capability" is not the right word here. I'd rewrite it a bit, although I'm not entirely sure what you mean. Something like "... without being able to load files from disk" or something?
"2 times" -> "two times"
"executing a demo program come next chapter" - ungrammatical, do you mean "in the next chapter"?
Ok, some advise: after writing a tutorial, reread it. Thrice. That should catch most obvious errors. Also, copy/paste it into your favourite word processor and run a spell check. Yes, all computer terms will be flagged, but all the other typos too! You get half an electronical JAL the copy editor for free! Wait, I'm free too. Never mind.
JAL
Re: OSDev Series Chapter 21
I just looked at the FDC tutorial, where it says "This is the physical layout of a generic 3-1/2" floppy disk." I'm pretty sure though, that a floppy disk does not have three platters, nor has the FDC five heads :).
JAL
JAL
Re: OSDev Series Chapter 21
Hello,
Thank you for looking it over
That was taken from a previous chapter - still needs to be updated with a more proper image I am also in the process of fixing the typos in all chaptersjal wrote:I just looked at the FDC tutorial, where it says "This is the physical layout of a generic 3-1/2" floppy disk." I'm pretty sure though, that a floppy disk does not have three platters, nor has the FDC five heads .
Technically "yes" but that quoted statement was referring to DMA, not the DMACs. DMA is used in both ISA and PCI.I think you should be more clear that by "modern" you mean anything younger dan 30 years .
Thank you for looking it over
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Re: OSDev Series Chapter 21
That makes it even less "modern" :). There are very little computers without some sort of DMA. You'd have to look at the 80s home computers for that (C64, ZX spectrum etc.).neon wrote:Technically "yes" but that quoted statement was referring to DMA, not the DMACs. DMA is used in both ISA and PCI.
JAL
Re: OSDev Series Chapter 21
Hm, good point. It seems like I worded it quite wrong - I'll fix that The emphasis was that all computers these days generally support some form of DMA.jal wrote:That makes it even less "modern" . There are very little computers without some sort of DMA. You'd have to look at the 80s home computers for that (C64, ZX spectrum etc.).
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Re: OSDev Series Chapter 21
Indeed. Perhaps not in embedded systems, but all the rest have it.neon wrote:The emphasis was that all computers these days generally support some form of DMA.
JAL