From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::243; helo=mail-wm0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C4775220D4BE1 for ; Thu, 16 Nov 2017 06:31:44 -0800 (PST) Received: by mail-wm0-x243.google.com with SMTP id x63so511535wmf.2 for ; Thu, 16 Nov 2017 06:35:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=i90+5cmDPiTVllJAYn4Fe4hYqPkI8EGcUcOI0q/0hxY=; b=Go5t2zXCOpo/yIyuSOIlLgfTjPYvuvuYNT0iPoujR7gFbGKgdDUfYZ0/NJXZfyF21N 7df1XQV0EVsiLFhts6LI1ZnKrEL7HvmnLdAVFIkWtBUxAYtDye4cTaTRMjF/mXb2GfFI 3owvVlOmENiLo+xoxRFKxFC7v/HyWcurqR5aM= 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=i90+5cmDPiTVllJAYn4Fe4hYqPkI8EGcUcOI0q/0hxY=; b=byJPB/g87fyrX1etywg1v1EZIz8z762G+H3ZbMobpKCw/p5PHLdWCd6tunXZS30xvu hNFjryQmPX7XbhilNOx64N9aiOtwXdDzyPa14aFtvwVEfxFpsvfgjjEaN+3LqXb2QrHk XpzeZRYqKhRgtc1E8kowLifjYLtj91qu3dnXOZt1dEBQkIim38l9FZVOxDRoLPh1wnJ/ BczuspFJWnpIOEynyNwP0lvwbtoQkQbbh9R9K1VmfTNCygw5sYLqbiD9rzS41JGVQ8oS JpB02yS2Y+tIAZ/pauZsobFA98xxSbRo/2MD+lGjXI1Cqhk25nezibktNYMNadg2RuUl Yw1w== X-Gm-Message-State: AJaThX5e4bs1ac5bdbi8aLrhtstN2IaX6iXVTpuvir6O/4rzrM6bJ0ud kSFMWbeqhRd4m9hvGFv3Pk96cDSQw70= X-Google-Smtp-Source: AGs4zMajbxml27tHmtAy0/pXVh6JOhpbeUn9O2NO7ZzGnA0tD5iZQxGL4/4omTdB5Sz2D/3ieCCLaQ== X-Received: by 10.28.221.138 with SMTP id u132mr1571654wmg.113.1510842952674; Thu, 16 Nov 2017 06:35:52 -0800 (PST) Received: from localhost.localdomain ([160.167.170.128]) by smtp.gmail.com with ESMTPSA id c54sm2194709wra.84.2017.11.16.06.35.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Nov 2017 06:35:51 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Cc: lersek@redhat.com, Ard Biesheuvel Date: Thu, 16 Nov 2017 14:35:46 +0000 Message-Id: <20171116143546.2409-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [PATCH] ArmPkg: move RVCT PLATFORM_FLAGS override into ArmHvcLib/ArmSmcLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 14:31:45 -0000 Currently, each ARM platform built with RVCT that uses ArmHvcLib or ArmSmcLib needs to specify a CPU target that implements both the security and virtualization extensions, so that the assembler does not choke on the 'hvc' and 'smc' instructions in ArmHvcLib/ArmSvcLib. Let's move these overrides into the module .INFs so we can lift this requirement at the platform side. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmPkg/ArmPkg.dsc | 2 -- ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf | 3 +++ ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc index 382e99868453..622720ab2aef 100644 --- a/ArmPkg/ArmPkg.dsc +++ b/ArmPkg/ArmPkg.dsc @@ -33,8 +33,6 @@ [Defines] [BuildOptions] XCODE:*_*_ARM_PLATFORM_FLAGS == -arch armv7 GCC:*_*_ARM_PLATFORM_FLAGS == -march=armv7-a -mfpu=neon - # We use A15 to get the Secure and Virtualization extensions - RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15 RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG *_*_*_CC_FLAGS = -DDISABLE_NEW_DEPRECATED_INTERFACES diff --git a/ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf b/ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf index 92efac5741c8..d046ef3ba253 100644 --- a/ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf +++ b/ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf @@ -30,3 +30,6 @@ [Sources.AARCH64] [Packages] MdePkg/MdePkg.dec ArmPkg/ArmPkg.dec + +[BuildOptions] + RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15 diff --git a/ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf b/ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf index 9f9ba729967c..0aa64d467129 100644 --- a/ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf +++ b/ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf @@ -29,3 +29,6 @@ [Sources.AARCH64] [Packages] MdePkg/MdePkg.dec ArmPkg/ArmPkg.dec + +[BuildOptions] + RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15 -- 2.11.0