From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: philmd@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Mon, 09 Sep 2019 07:14:02 -0700 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 68D5F3DE04 for ; Mon, 9 Sep 2019 14:14:01 +0000 (UTC) Received: by mail-wr1-f70.google.com with SMTP id b9so7400222wrt.5 for ; Mon, 09 Sep 2019 07:14:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=SbFWp6MFHQh6A3/Xs5ROfyEeHf2ymW378KXk9YuNcbg=; b=erIXevrbFgGND+XvAhOo4BwRuly0vkYCh6eJ67y7cA3nX/mangwnEz8rhWF3bTgtF3 EWsqT9a/fdk7edTyqOKW+c2UR2YjsZolj2g7x8s8/qN1Eumn8MHK6PxlfEU0AWRI2goR NkDCG67ozNPCFjzS5u/5Rxa7byj+XYsGUngHe+fGNXVC1hnzm0o5uXHdaTtCclTruJi2 OS103xZ1LY3SmmnJkTLcn6+myLjXQdFX1648LcMcoOcqrE95k4Ji8zAVgbAQvpDiP5At bzImnEYoTxg5bBPAK2+KlVLNbjThG+s/edGjEqdlKzlpNC0wnwNG4R4Pf9onoPkr2bfj fKkg== X-Gm-Message-State: APjAAAXCrvL3eMh8CdxvzXfdvMJp8CKV9koPrHRjrRkQSZAG4xOQYMJm 1BWYOUcUTrgmOXMtgLXP4J1cpXXLQ8NUCHaxjKUuthTuDwRNsr5hedcbGZzxwEH0gboQC6Tpc+F e5+y9RPp0ztSgQA== X-Received: by 2002:a5d:66d2:: with SMTP id k18mr18977971wrw.7.1568038440146; Mon, 09 Sep 2019 07:14:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhWpyrPz4zVZNpeFTB8Gan0+iqw519WpNQlAqusJNixt47tl4z4riWqCO2qP1bLiHJMhOepQ== X-Received: by 2002:a5d:66d2:: with SMTP id k18mr18977948wrw.7.1568038439944; Mon, 09 Sep 2019 07:13:59 -0700 (PDT) Received: from [192.168.1.41] (251.red-88-10-102.dynamicip.rima-tde.net. [88.10.102.251]) by smtp.gmail.com with ESMTPSA id n8sm19374553wma.7.2019.09.09.07.13.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Sep 2019 07:13:59 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH] ArmVirtPkg: increase FD/FV size for NOOPT builds To: devel@edk2.groups.io, ard.biesheuvel@linaro.org Cc: leif.lindholm@linaro.org, lersek@redhat.com References: <20190906222004.30161-1-ard.biesheuvel@linaro.org> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: Date: Mon, 9 Sep 2019 16:13:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190906222004.30161-1-ard.biesheuvel@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Ard, On 9/7/19 12:20 AM, Ard Biesheuvel wrote: > After upgrading the CI system we use for building the ArmVirtPkg > targets, we started seeing failures due to the NOOPT build running > out of space when using the CLANG38 toolchain definition combined > with clang 7. > > We really don't want to increase the FD/FV sizes in general to > accommodate this, so parameterize the relevant quantities and > increase them by 50% for NOOPT builds. Why not by 100% directly? > Signed-off-by: Ard Biesheuvel > --- > ArmVirtPkg/ArmVirt.fdf.inc | 13 +++++++++++++ > ArmVirtPkg/ArmVirtQemu.fdf | 14 +++++++++++--- > ArmVirtPkg/ArmVirtQemuKernel.fdf | 14 +++++++++++--- > ArmVirtPkg/ArmVirtXen.fdf | 14 +++++++++++--- > 4 files changed, 46 insertions(+), 9 deletions(-) > > diff --git a/ArmVirtPkg/ArmVirt.fdf.inc b/ArmVirtPkg/ArmVirt.fdf.inc > new file mode 100644 > index 000000000000..5fdebcf5dc93 > --- /dev/null > +++ b/ArmVirtPkg/ArmVirt.fdf.inc > @@ -0,0 +1,13 @@ > +# > +# Copyright (c) 2019, Linaro Limited. All rights reserved. > +# > +# SPDX-License-Identifier: BSD-2-Clause-Patent > +# > + > +!if $(TARGET) != NOOPT > +DEFINE FD_SIZE = 0x200000 > +DEFINE FD_NUM_BLOCKS = 0x200 > +!else > +DEFINE FD_SIZE = 0x300000 > +DEFINE FD_NUM_BLOCKS = 0x300 > +!endif > diff --git a/ArmVirtPkg/ArmVirtQemu.fdf b/ArmVirtPkg/ArmVirtQemu.fdf > index c2169cb7964b..27dd5bf09a91 100644 > --- a/ArmVirtPkg/ArmVirtQemu.fdf > +++ b/ArmVirtPkg/ArmVirtQemu.fdf > @@ -20,14 +20,22 @@ > # > ################################################################################ > > +[Defines] > +!include ArmVirt.fdf.inc > +!if $(TARGET) != NOOPT > +DEFINE FVMAIN_COMPACT_SIZE = 0x1ff000 > +!else > +DEFINE FVMAIN_COMPACT_SIZE = 0x2ff000 > +!endif > + > [FD.QEMU_EFI] > BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress # QEMU assigns 0 - 0x8000000 for a BootROM > -Size = 0x00200000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device > +Size = $(FD_SIZE)|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device > ErasePolarity = 1 > > # This one is tricky, it must be: BlockSize * NumBlocks = Size > BlockSize = 0x00001000 > -NumBlocks = 0x200 > +NumBlocks = $(FD_NUM_BLOCKS) > > ################################################################################ > # > @@ -59,7 +67,7 @@ DATA = { > !endif > } > > -0x00001000|0x001ff000 > +0x00001000|$(FVMAIN_COMPACT_SIZE) > gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize > FV = FVMAIN_COMPACT > > diff --git a/ArmVirtPkg/ArmVirtQemuKernel.fdf b/ArmVirtPkg/ArmVirtQemuKernel.fdf > index f675b6d65ee1..1836697a0a90 100644 > --- a/ArmVirtPkg/ArmVirtQemuKernel.fdf > +++ b/ArmVirtPkg/ArmVirtQemuKernel.fdf > @@ -20,14 +20,22 @@ > # > ################################################################################ > > +[Defines] > +!include ArmVirt.fdf.inc > +!if $(TARGET) != NOOPT > +DEFINE FVMAIN_COMPACT_SIZE = 0x1f8000 > +!else > +DEFINE FVMAIN_COMPACT_SIZE = 0x2f8000 > +!endif > + > [FD.QEMU_EFI] > BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress # QEMU assigns 0 - 0x8000000 for a BootROM > -Size = 0x00200000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device > +Size = $(FD_SIZE)|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device > ErasePolarity = 1 > > # This one is tricky, it must be: BlockSize * NumBlocks = Size > BlockSize = 0x00001000 > -NumBlocks = 0x200 > +NumBlocks = $(FD_NUM_BLOCKS) > > ################################################################################ > # > @@ -81,7 +89,7 @@ DATA = { Don't you need to update the image_size in the kernel header layout? 0x00, 0x00, 0x20, 0x00 [,0x00, 0x00, 0x00, 0x00] ^^^^ > !endif > } > > -0x00008000|0x001f8000 > +0x00008000|$(FVMAIN_COMPACT_SIZE) > gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize > FV = FVMAIN_COMPACT > > diff --git a/ArmVirtPkg/ArmVirtXen.fdf b/ArmVirtPkg/ArmVirtXen.fdf > index 79f681cde028..4007f49a08fb 100644 > --- a/ArmVirtPkg/ArmVirtXen.fdf > +++ b/ArmVirtPkg/ArmVirtXen.fdf > @@ -20,14 +20,22 @@ > # > ################################################################################ > > +[Defines] > +!include ArmVirt.fdf.inc > +!if $(TARGET) != NOOPT > +DEFINE FVMAIN_COMPACT_SIZE = 0x1fe000 > +!else > +DEFINE FVMAIN_COMPACT_SIZE = 0x2fe000 > +!endif > + > [FD.XEN_EFI] > BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress > -Size = 0x00200000|gArmTokenSpaceGuid.PcdFdSize > +Size = $(FD_SIZE)|gArmTokenSpaceGuid.PcdFdSize > ErasePolarity = 1 > > # This one is tricky, it must be: BlockSize * NumBlocks = Size > BlockSize = 0x00001000 > -NumBlocks = 0x200 > +NumBlocks = $(FD_NUM_BLOCKS) > > ################################################################################ > # > @@ -81,7 +89,7 @@ DATA = { > !endif > } > > -0x00002000|0x001fe000 > +0x00002000|$(FVMAIN_COMPACT_SIZE) > gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize > FV = FVMAIN_COMPACT > >