[coyotos-dev] SMP: Dropping the low map
Jeroen Visser
jeroen.c.visser at gmail.com
Mon Oct 22 21:56:45 EDT 2007
Shap,
I re-enabled dropping of the low map in boot.S exactly as you had it before.
In order to boot up an AP I now allocate two AP bootstrap pages in low memory.
The first page contains bootstrap code, bootstrap data area and
bootstrap stack as before.
In the second page we store a copy of the cpu0_KernPDPT (or PTE
equivalent). We then manually copy IA32_PAE[3] to IA32_PAE[0] (or PTE
equivalent) to create a workable bootstrap map with a low alias.
As soon as we can we switch from the bootstrap page PDPT to the
cpu0_KernPDPT (which doesn't have the low mapping).
I think this approach will work just fine for PTE mode too. (In fact,
PTE is the only reason I allocated the second page. A mere PDPT would
fit fine inside the first page data area.)
I think the cost of needing an extra page to boot an AP is marginal
and can be ignored. The bootstrap pages after all can be unloaded when
not in use.
-JCV
On 10/22/07, Jonathan S. Shapiro <shap at eros-os.com> wrote:
> Jeroen:
>
> If it is okay with you, I am going to hold off on applying this patch. I
> want to figure out the right place to release the low memory map first.
> I have code in an old revision to do that, and I will resurrect it. I
> will then apply a cleaned-up variant of your patch. Also, I want to
> figure out the IPI issues so that we can avoid sticking BSD code in the
> tree.
>
> Unfortunately, I need to leave at the moment, so this isn't going to
> happen until tonight/tomorrow.
> --
> Jonathan S. Shapiro, Ph.D.
> Managing Director
> The EROS Group, LLC
> www.coyotos.org, www.eros-os.org
>
> _______________________________________________
> coyotos-dev mailing list
> coyotos-dev at smtp.coyotos.org
> http://www.coyotos.org/mailman/listinfo/coyotos-dev
>
More information about the coyotos-dev
mailing list