From owner-svn-src-head@freebsd.org Wed Mar 29 18:19:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6ACA2D245E2 for ; Wed, 29 Mar 2017 18:19:13 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x231.google.com (mail-it0-x231.google.com [IPv6:2607:f8b0:4001:c0b::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3766E2E8C for ; Wed, 29 Mar 2017 18:19:13 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x231.google.com with SMTP id y18so63394814itc.1 for ; Wed, 29 Mar 2017 11:19:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=T5gHE+91qv9j62SNsW0hwYg4VzwEc/gEJl51Wdu9Uxk=; b=RYyCorqKm61rWvgWny5j1M7NXzGCRvcLyIm2j69l/ls2ZmNbVnTfXau2AKSs7Tst81 +iPBJpZZLtftrjt8hdqPaUeaLGbXZ3FAj74qQc4xolNw6e2TVODiZ0bqVKod9DjQDN0T IcLfwXepT2869eDCIxxCRP0fSFsFogkHomZCg5uGIg7SqhMjShNLbQH7OugWn9y44v6o DW8Coc9QYyg4itX9W1aPMWBQHi6yXL36CbrBDXDihT1lH/RLQ1U7oZmyKdSliKwMW0Ym t8uOX9dzitbJYeeCbiyuKF/tH8BEseUMGeVju5JHsNfAPgwfx6kNRzfKEtKm0oazdF/4 OL+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=T5gHE+91qv9j62SNsW0hwYg4VzwEc/gEJl51Wdu9Uxk=; b=PMEtI8tDBvk7y6el/ZwSItgKsn2qz80J1muJLz1/emRnEIFiTYin+SZImoL3oXy6x5 1RcLwE6FlEYp0BV76yiiNZnVjIT14Q9SNcHeulstezXYABlN2jnw9QQ7EtqiH2QPCy6f /cm3aw7HWg9fLmvj6fVRam1RaAqyvp3m4qS0XgyswQ9NWwQdRDyuxEGzH8c0HakCnjq2 2YJUfkQydOcoooKoZW3PZN87vllAA6QzqrDNTRNvNqiT/sXDa9wQty2CGN437jAo4tdl t2EDjT1MI8YpMUit7noVA/sDJKYnfbSmLyvKC7LC7eyT2eYQaWmoUa/n327fgW9Hq+0X 7/bw== X-Gm-Message-State: AFeK/H3bT2UBU/OgtvdoWjACInR58KUW4LwXfMN7ePo0KUYY9ty+5RuuU2j8el92/l4Te2dlwG5S0X12odmTSA== X-Received: by 10.36.44.14 with SMTP id i14mr2527372iti.103.1490811552515; Wed, 29 Mar 2017 11:19:12 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.146.24 with HTTP; Wed, 29 Mar 2017 11:19:12 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:a045:c633:4156:d07c] In-Reply-To: <201703290930.v2T9U3x9087583@repo.freebsd.org> References: <201703290930.v2T9U3x9087583@repo.freebsd.org> From: Warner Losh Date: Wed, 29 Mar 2017 12:19:12 -0600 X-Google-Sender-Auth: GhZHb_Pxw3so4uBOGX3cw07oG58 Message-ID: Subject: Re: svn commit: r316132 - head/sys/boot/i386/boot2 To: Ngie Cooper Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 18:19:13 -0000 On Wed, Mar 29, 2017 at 3:30 AM, Ngie Cooper wrote: > Author: ngie > Date: Wed Mar 29 09:30:03 2017 > New Revision: 316132 > URL: https://svnweb.freebsd.org/changeset/base/316132 > > Log: > Parameterize out 7680 (15 * 512) as BOOT2SIZE, similar to sys/boot/i386/zfsboot/... > > This is being done to make it easier to change in the future--this action might be > needed sooner rather than later because of gcc 6.3.0 bailing, stating that there > is negative free space left (deficit) in the boot2 bootloader. This number is never, ever ever going to change. Don't even put that on the list of things that are possible to fix gcc 6.3 bloated code generation. You must fix the compiler, pass it the right options, or it will remain unsupported. There's a fixed slot it slides into. While it is in theory possible to increase it, it really isn't practical to increase it because so many things just know its size and offset. Warner > MFC after: 2 months > Sponsored by: Dell EMC Isilon > > Modified: > head/sys/boot/i386/boot2/Makefile > > Modified: head/sys/boot/i386/boot2/Makefile > ============================================================================== > --- head/sys/boot/i386/boot2/Makefile Wed Mar 29 08:38:31 2017 (r316131) > +++ head/sys/boot/i386/boot2/Makefile Wed Mar 29 09:30:03 2017 (r316132) > @@ -66,10 +66,12 @@ boot1.out: boot1.o > CLEANFILES+= boot2 boot2.ld boot2.ldr boot2.bin boot2.out boot2.o \ > boot2.h sio.o > > +BOOT2SIZE= 7680 > + > boot2: boot2.ld > - @set -- `ls -l ${.ALLSRC}`; x=$$((7680-$$5)); \ > + @set -- `ls -l ${.ALLSRC}`; x=$$((${BOOT2SIZE}-$$5)); \ > echo "$$x bytes available"; test $$x -ge 0 > - ${DD} if=${.ALLSRC} of=${.TARGET} obs=7680 conv=osync > + ${DD} if=${.ALLSRC} of=${.TARGET} obs=${BOOT2SIZE} conv=osync > > boot2.ld: boot2.ldr boot2.bin ${BTXKERN} > btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l boot2.ldr \ >