Re: [PATCH] x86: Construct 32 bit boot time page tables in native format.

Ingo Molnar
2008-01-22T10:05:39Z

* H. Peter Anvin <hpa@zytor.com> wrote:

> I was thinking about this yesterday, and it seems to me that there are
> two cleaner options here...
>
> - either we should put in the full machinery to be able to run C code
> compiled with -fPIC/-fPIE before paging is enabled. Unfortunately gcc
> generates R_386_GOT32 relocations for external references even with
> -fPIE, so we'll have to put in some code to adjust the GOT (easy
> enough to do.)

i'd _love_ to have this approach instead of the assembly routines. While
'constructing pagetables' might not look like a big deal in isolation -
C is still 10 times more programmable than assembly. Pushing more of the
early boot code into a sane, non-assembly environment will have positive
long-term effects all across.

Ingo