Paging (again)
Posted: Tue Oct 04, 2005 7:45 am
Hi again,
you haven't heard much of my nagging in the past few days because of the start of the new academic year, but here I am ... again.
Before I start writing the actual paging code - I think I understand it enough to start coding (to START ) However, I was wondering how people solved the DMA problem (needing continous memory <16MB) - What I was thinking was using a bitmap for the lower 16MB and a stack for the rest of the memory, allocating general memory above the 16MB mark first, for performance sake, and when none is left to use the remaining 16MB. So when I work on DMA I can request memory below the 16MB mark, which will be continuous (easier to find with a bitmap). Now maybe it's not the best way to do things, but this is just a learning experience for me anyway. Also, if I use this method, I would need 4 allocating functions:
2 for Allocating and delocating memory (anywhere, no requirements)
2 for allocating and delocating memory for DMA, continuous and below 16MB.
Right?
Are there any other things (PCI, AGP,...) that need memory to be allocated and fullfilling special conditions? Or are they memory mapped like basic VGA output, and need pages to be written write through and at the right virtual & physical addresses? Or am I just incredibly stupid?
you haven't heard much of my nagging in the past few days because of the start of the new academic year, but here I am ... again.
Before I start writing the actual paging code - I think I understand it enough to start coding (to START ) However, I was wondering how people solved the DMA problem (needing continous memory <16MB) - What I was thinking was using a bitmap for the lower 16MB and a stack for the rest of the memory, allocating general memory above the 16MB mark first, for performance sake, and when none is left to use the remaining 16MB. So when I work on DMA I can request memory below the 16MB mark, which will be continuous (easier to find with a bitmap). Now maybe it's not the best way to do things, but this is just a learning experience for me anyway. Also, if I use this method, I would need 4 allocating functions:
2 for Allocating and delocating memory (anywhere, no requirements)
2 for allocating and delocating memory for DMA, continuous and below 16MB.
Right?
Are there any other things (PCI, AGP,...) that need memory to be allocated and fullfilling special conditions? Or are they memory mapped like basic VGA output, and need pages to be written write through and at the right virtual & physical addresses? Or am I just incredibly stupid?