From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161095AbXEDRQK (ORCPT ); Fri, 4 May 2007 13:16:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1161224AbXEDRQJ (ORCPT ); Fri, 4 May 2007 13:16:09 -0400 Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:33406 "EHLO ebiederm.dsl.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161095AbXEDRQH (ORCPT ); Fri, 4 May 2007 13:16:07 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: "H. Peter Anvin" Cc: Jeremy Fitzhardinge , Rusty Russell , Andi Kleen , Linux Kernel Mailing List Subject: Re: [PATCH] i386: always clear bss References: <463AED07.1000505@goop.org> <463B49F0.401@goop.org> <463B5643.1040204@zytor.com> <463B6888.20001@zytor.com> Date: Fri, 04 May 2007 11:15:45 -0600 In-Reply-To: <463B6888.20001@zytor.com> (H. Peter Anvin's message of "Fri, 04 May 2007 10:08:24 -0700") Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org "H. Peter Anvin" writes: > Eric W. Biederman wrote: >>>> >>> I saw the 0x40(%esi) stack stuff, and I'm utterly puzzled by it. There >>> is no reason one can't set up %esp to point to a hunk in ordinary memory >>> and use it? >> >> That is what we are doing, remind me to make certain we have this >> field of the boot protocol documented as permanently reserved for >> this. >> >> This comes from the relocatable kernel patches where we run the >> kernel where the bootloader chooses to put it assuming we are >= 1M. >> >> The problem is that we don't have any IP relative data access >> instructions, we don't have a stack, and so the only valid address >> that we know is valid is %esi. Once we compute where we are running >> we can setup a base address register and a stack and everything is >> easy, but the bootstrap to figure out where we are is just a little >> tricky. > > Oh, right. And this runs with interrupts off, so you only need one > dword. That's fine, of course, although the location is a bit awkward. Yep. That is what I found when surveyed the available locations. Eric