From owner-svn-src-all@FreeBSD.ORG Thu Oct 28 18:57:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F97E106566C; Thu, 28 Oct 2010 18:57:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D25338FC21; Thu, 28 Oct 2010 18:57:43 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 3398946B09; Thu, 28 Oct 2010 14:57:43 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 441778A009; Thu, 28 Oct 2010 14:57:42 -0400 (EDT) From: John Baldwin To: Attilio Rao Date: Thu, 28 Oct 2010 14:57:19 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <201010281631.o9SGVdtZ014923@svn.freebsd.org> <201010281411.40423.jhb@freebsd.org> In-Reply-To: <201010281411.40423.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201010281457.19804.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Thu, 28 Oct 2010 14:57:42 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r214457 - in head/sys: amd64/amd64 conf i386/i386 x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2010 18:57:44 -0000 On Thursday, October 28, 2010 2:11:40 pm John Baldwin wrote: > On Thursday, October 28, 2010 1:21:34 pm Attilio Rao wrote: > > + vm_paddr_t *p; > > caddr_t kmdp; > > uint32_t smapsize; > > - int error, rid; > > + int error, i, rid; > > > > /* Retrieve the system memory map from the loader. */ > > kmdp = preload_search_by_type("elf kernel"); > > if (kmdp == NULL) > > - kmdp = preload_search_by_type("elf64 kernel"); > > + kmdp = preload_search_by_type(ELF_KERN_STR); > > smapbase = (struct bios_smap *)preload_search_info(kmdp, > > MODINFO_METADATA | MODINFOMD_SMAP); > > smapsize = *((u_int32_t *)smapbase - 1); > > It would be nice if ELF_KERN_STR could be autogenerated as something like: > > "elf ## __ELF_WORD_SIZE ## kernel" instead of needing an #ifdef. This works in my testing: #include #include int main(void) { printf("%s\n", "elf" __XSTRING(__ELF_WORD_SIZE) " kernel"); return (0); } -- John Baldwin