Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756814AbYAVQZ2 (ORCPT ); Tue, 22 Jan 2008 11:25:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752195AbYAVQZU (ORCPT ); Tue, 22 Jan 2008 11:25:20 -0500 Received: from terminus.zytor.com ([198.137.202.10]:41540 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752184AbYAVQZT (ORCPT ); Tue, 22 Jan 2008 11:25:19 -0500 Message-ID: <4796189E.4010404@zytor.com> Date: Tue, 22 Jan 2008 08:23:58 -0800 From: "H. Peter Anvin" User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: Ingo Molnar CC: Andi Kleen , Ian Campbell , linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "Eric W. Biederman" Subject: Re: [PATCH] x86: Construct 32 bit boot time page tables in native format. References: <1200758937-22386-1-git-send-email-ijc@hellion.org.uk> <1200758937-22386-2-git-send-email-ijc@hellion.org.uk> <87prvxct42.fsf@basil.nowhere.org> <1200847490.26633.62.camel@cthulhu.hellion.org.uk> <20080120173938.GA27247@one.firstfloor.org> <47939787.3050707@zytor.com> <20080122100509.GC5722@elte.hu> In-Reply-To: <20080122100509.GC5722@elte.hu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1354 Lines: 32 Ingo Molnar wrote: > * H. Peter Anvin 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/