From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=UUNUwHwX; spf=pass (domain: linaro.org, ip: 209.85.210.170, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by groups.io with SMTP; Fri, 06 Sep 2019 15:20:14 -0700 Received: by mail-pf1-f170.google.com with SMTP id b13so5470476pfo.8 for ; Fri, 06 Sep 2019 15:20:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=41jUBN7o8TdY0lV3tl+dezmJmK0yWJYX3WGfBBXzGwM=; b=UUNUwHwXlHbLsLVIfNMXMcmij/sN6DGN+VyNWioFXBDcM09WvVJ36rhyBmen7fzXWO D/Iehlj+7XooqwDB10nILdJzT7sSC3nLFy7PSWopl9rSI4Y0/AvR4NUH02uyUKYd4zwX IQ/+B0LW798g3E08r8Y1lkfJc37HhZrcGNG32UmrNffErTQzH1KX2aXq6yTPC7R2dciO CfUKSLrIQkNJB9OslTCQjt/iDG32GKr1kRfNzgtFccuZaqeQz9TTXM2rwRQ81keq+6/C iWQnMEhIe//baHATI/Fsy2kt0uLveZ6GdW9gf5up4zwHx36sRX+ktAGsfBTG85TDcCUt UnuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=41jUBN7o8TdY0lV3tl+dezmJmK0yWJYX3WGfBBXzGwM=; b=pOK00TM11cHrEuEQFK2Jr7oreaut1iqkI9x5r8ATKXyTqE05c9uk0kWh0xypkvEpW0 OnEpBRXnU8N6I8LBgDyC4ZuuURk6X3aKpX7XAqfn8di2z3NY/6eHH7KRow0Rf4FprYDf q51Uh0MNVXgaDxN+3npmKAVzeBclOQ+sFYBmTgARYhcIoOiEeEAqd/g3rrUtFD+LTCMT ExpeyBD9O63lElYhNd55FYUW0Cm5c79sIE+WzMtavOPJCsI49xHzh6bS9o1k+sM1o2Jz Q+Bp0jlxLw5+n4zfig0OoCMp0JCCyfy1m2kqf2LTBVFDXO2Bg020nHeVlGMJNC+vvhxM D2+Q== X-Gm-Message-State: APjAAAVuunuzusQq/wbrdKARE1juyqoV9xEYt5AuQcoNZloVoMxf3Syn uGQSaRxNfTgFBTUkNS27urrSTCMAJ1khpFCL X-Google-Smtp-Source: APXvYqxn3XNm2dyOHSLIxQ66hQUepCAsoIIjM4VwyWdo5dUEwIqIcqGpdxuTErFR4rT4CnVhTbIJuw== X-Received: by 2002:a63:5402:: with SMTP id i2mr9937963pgb.414.1567808413525; Fri, 06 Sep 2019 15:20:13 -0700 (PDT) Return-Path: Received: from e111045-lin.nice.arm.com ([8.25.222.2]) by smtp.gmail.com with ESMTPSA id n19sm7428351pfa.67.2019.09.06.15.20.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2019 15:20:12 -0700 (PDT) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: leif.lindholm@linaro.org, lersek@redhat.com, Ard Biesheuvel Subject: [PATCH] ArmVirtPkg: increase FD/FV size for NOOPT builds Date: Fri, 6 Sep 2019 15:20:04 -0700 Message-Id: <20190906222004.30161-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 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. 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 = { !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 -- 2.17.1