From owner-freebsd-stable@FreeBSD.ORG Mon Oct 30 21:13:32 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 43A2E16A415; Mon, 30 Oct 2006 21:13:32 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9387A43D45; Mon, 30 Oct 2006 21:13:31 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id k9ULDEUa082234; Mon, 30 Oct 2006 16:13:25 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Ruslan Ermilov Date: Mon, 30 Oct 2006 15:18:19 -0500 User-Agent: KMail/1.9.1 References: <3A8131D4-881E-4873-A682-543A1A88C063@lassitu.de> <200610261542.35322.jhb@freebsd.org> <20061026195419.GA2972@rambler-co.ru> In-Reply-To: <20061026195419.GA2972@rambler-co.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610301518.20175.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 30 Oct 2006 16:13:29 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2132/Mon Oct 30 14:42:34 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: freebsd-stable@freebsd.org, Stefan Bethke , Bruce Evans , Bruce Evans Subject: Re: Still possible to directly boot without loader? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Oct 2006 21:13:32 -0000 On Thursday 26 October 2006 15:54, Ruslan Ermilov wrote: > On Thu, Oct 26, 2006 at 03:42:34PM -0400, John Baldwin wrote: > > On Thursday 26 October 2006 15:18, Ruslan Ermilov wrote: > > > On Thu, Oct 26, 2006 at 11:38:24AM -0400, John Baldwin wrote: > > > > On Thursday 26 October 2006 10:42, Ruslan Ermilov wrote: > > > > > On Thu, Oct 26, 2006 at 10:28:09AM -0400, John Baldwin wrote: > > > > > > boot2 should do whatever loader does. > > > > > > > > > > > But this would be a regression, since loader(8) does the following, > > > > > in the ELF32 case: > > > > > > > > > > : 0 edoofus:ttyp2:/sys/boot/i386/libi386 >grep -w entry elf32_freebsd.c > > > > > : vm_offset_t entry, bootinfop, modulep, kernend; > > > > > : entry = ehdr->e_entry & 0xffffff; > > > > > : printf("Start @ 0x%lx ...\n", entry); > > > > > : __exec((void *)entry, boothowto, bootdev, 0, 0, 0, bootinfop, modulep, kernend); > > > > > > > > Ah, ok. Make them both just mask the top 8 bits then. :) > > > > > > > OK, I backed out your change to boot2.c. > > > > Sorry, I meant that both boot2 and loader should follow your proposal of masking 28 bits. > > Just masking the top 4 bits is probably sufficient. > > > :-) > > OK, I'll craft a patch tomorrow. This will also require patching at least > sys/boot/common/load_elf.c:__elfN(loadimage), maybe something else. > I think we could actually mask 30 bits; that would allow to load 1G kernels, > provided that sufficient memory exists. Actually, please mask 4 bits. Not all kernels run at 0xc0000000. You can adjust that address via 'options KVA_PAGES'. I know of folks who run kernels at 0xa0000000 for example because they need more KVA. This is part of why I really don't like the masking part, though I'm not sure there's a way to figure out KERNBASE well enough to do the more correct 'pa = addr - KERNBASE' rather than 'pa = addr & 0x0fffffff'. -- John Baldwin