Hi Guys,
I have a couple of questions, first of all how do I go about calculating the total available RAM on a system? I have not enabled paging or anything so I need a fast way without using pages. Also, what would be the best way to create a PMode stack, should I have a descriptor in the GDT made just for it? Also, should it be expand up or down? I am using my data descriptor for the stack at the moment and it is expand up.
RAM and PMode Stack
-
Whatever5k
Re:RAM and PMode Stack
Look at this to determine your RAM-size: http://www.mega-tokyo.com/os/os-faq-mem ... ine_memory
- Pype.Clicker
- Member

- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:RAM and PMode Stack
you can keep your data descriptor as a stack segment. Having a separate stack segment can help avoiding stack overflows, but if you're programming in C, you'd better have stack & data aligned to the same base to avoid pointer conversions problems.
by the by, having a kernel stack that can generate stack fault exception also requires a task that will handle those exceptions (trying to handle them with an interrupt gate will result in triple fault, believe me
by the by, having a kernel stack that can generate stack fault exception also requires a task that will handle those exceptions (trying to handle them with an interrupt gate will result in triple fault, believe me
-
PlayOS
Re:RAM and PMode Stack
Does anyone know how to convert the code here for direct probing into NASM source?Whatever5k wrote: Look at this to determine your RAM-size: http://www.mega-tokyo.com/os/os-faq-mem ... ine_memory