Page 1 of 1
vmmgr initialization questions
Posted: Mon Feb 15, 2010 7:48 am
by pswin
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!!!
Re: vmmgr initialization questions
Posted: Mon Feb 22, 2010 7:46 pm
by StephanvanSchaik
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.
Re: vmmgr initialization questions
Posted: Mon Feb 22, 2010 9:14 pm
by Mike
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.