[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4796189E.4010404@zytor.com>
Date: Tue, 22 Jan 2008 08:23:58 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Ingo Molnar <mingo@...e.hu>
CC: Andi Kleen <andi@...stfloor.org>,
Ian Campbell <ijc@...lion.org.uk>,
linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>
Subject: Re: [PATCH] x86: Construct 32 bit boot time page tables in native
format.
Ingo Molnar wrote:
> * H. Peter Anvin <hpa@...or.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.
>
Yes, but that doesn't mean that this particular task is the right thing
for that job. In particular, the GOT adjustment wll be almost the same
size as the whole task.
On the other hand, there is a whole bunch of post-paging code in
head_32.S which doesn't need to be there.
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists