Re: physical memory manager
Posted: Mon Mar 17, 2014 3:53 pm
I wrote this a many years ago, but it might be a little help. I would highly advise you take Brendan's posts to heart, but this page might help give you a little insight into how to do things. I do not think I take into account reserving certain areas of memory for 16-bit things or legacy hardware, but IIRC I basically give each process it's own view of memory and share certain regions between kernel and user space.
Also one of the functions has a bug in it (I marked it on the page), but since it has been so long I am afraid to try to fix it and I need to setup a skeleton kernel on the X86 so I can test any fix I make on it.
http://wiki.osdev.org/User:Kmcguire/Qui ... ace_Scheme
But, it has a picture or two and some decent example code that might help you kinda see.
Then again it could confuse you more, LOL. But, if you read it with a grain of salt you should be fine.
<edit> I wish I had the time to go back and improve it. I think it just needs some work, and it basically paves the way for doing the simple things. But, like I said it does not address some advanced needs of a mature kernel. But, I mainly wrote it just to get somebody INTO it and then from there let them decide how they want to do it. </edit>
Also one of the functions has a bug in it (I marked it on the page), but since it has been so long I am afraid to try to fix it and I need to setup a skeleton kernel on the X86 so I can test any fix I make on it.
http://wiki.osdev.org/User:Kmcguire/Qui ... ace_Scheme
But, it has a picture or two and some decent example code that might help you kinda see.
Then again it could confuse you more, LOL. But, if you read it with a grain of salt you should be fine.
<edit> I wish I had the time to go back and improve it. I think it just needs some work, and it basically paves the way for doing the simple things. But, like I said it does not address some advanced needs of a mature kernel. But, I mainly wrote it just to get somebody INTO it and then from there let them decide how they want to do it. </edit>