vmmgr initialization questions

If you are new to OS Development, plan on spending some time here first before going into the other forums.

Moderator:Moderators

Post Reply
pswin
Posts:15
Joined:Mon Jun 22, 2009 5:33 pm
vmmgr initialization questions

Post by pswin » Mon Feb 15, 2010 7:48 am

hi mike

why you initialize vmmngr before pmmngr? (in vmmngr initialize routine you use pmmngr alloc function)


-------
i use old kernel loader for loading kernel and initialize vmmngr after pmmngr then i doesn't have any problem with memory!!!

StephanvanSchaik
Posts:2
Joined:Mon Feb 22, 2010 7:40 pm

Re: vmmgr initialization questions

Post by StephanvanSchaik » Mon Feb 22, 2010 7:46 pm

pswin wrote:hi mike

why you initialize vmmngr before pmmngr? (in vmmngr initialize routine you use pmmngr alloc function)


-------
i use old kernel loader for loading kernel and initialize vmmngr after pmmngr then i doesn't have any problem with memory!!!
Hi,

You're correct, I wanted to report this bug as well.

The main routine in the kernel calls vmmngr_initialize, which will first call pmmngr_alloc_block which will return 0 as pmmngr_get_free_block_count returns 0. The virtual manager will never get initialised, however the whole thing still works simply because of the page directory set up at boot time. The page directory has the first megabyte identity mapped and the 3G-mark is mapped to the 1M-mark, therefore the code will still work fine and never run into a page fault as if the virtual memory manager was set up, while it never was.


Regards,
Stephan J.R. van Schaik.

User avatar
Mike
Site Admin
Posts:465
Joined:Sat Oct 20, 2007 7:58 pm
Contact:

Re: vmmgr initialization questions

Post by Mike » Mon Feb 22, 2010 9:14 pm

Hello,

This is a known bug and is the first of two bugs that went unnoticed. The chapter is planned for an update along with the bugs being fixed.
Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com

Post Reply