From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c0b::241; helo=mail-it0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it0-x241.google.com (mail-it0-x241.google.com [IPv6:2607:f8b0:4001:c0b::241]) (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 BCB6B2035A7A9 for ; Thu, 16 Nov 2017 08:24:03 -0800 (PST) Received: by mail-it0-x241.google.com with SMTP id l196so640977itl.4 for ; Thu, 16 Nov 2017 08:28:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=45ELsDrPMyYzpcpY6Wb+8yBOE5gALrTywviz3tb6qvg=; b=DWrSC3R0YUCCdtZG3O300btwiiz+x8DNu/iTZPPU7hA+FBetldEEuJI8TcbJEMvKSc mv196IfOU6V/JM4lMdPQWYCGUORncgpeseFWE67JwyDEZhKNcgBWDEA7+66hqE8W/OPh 7h15AzaziuEBwuCb9MYbEGhB6DYE8WPmdMFhE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=45ELsDrPMyYzpcpY6Wb+8yBOE5gALrTywviz3tb6qvg=; b=CKTUNSLFfcUV6g9u1dInoki3SS0u4khGYCTamtwp5X+E9heWrKkE+fpNmylTeYUKri yF25rVu+PfZZieKxWdbKcvYvRtdV7SYlANUMsv9mJI5bizCRaACfu33E9LaQ2M+UN+wZ IqwhGHrTiwMA1WHA9chxZshxo2X5mfBTPrTSHnwGxGej2sGx3DMoFafH6yhFwLR1mk4h tmVtQqnHb69Gq+ZuZ6Intj7KAvdGF8rzRCv8MP4qvhix+qRMneAGsFvC5RTyYrdX+9p3 KTaCWt/P3DvQHrqN4ExQVAPosX4VsI7iDbbe5CrwXPXOs8BYpeIZ5fgA9Z9zdlhO3Ze9 SBXQ== X-Gm-Message-State: AJaThX7VJ1b2hvNUD3r92CNmCw7OqXIU/yFys0enbtmsO2TXl8ME3QnB Stllh3S0/Q2ANI9z17PmyGxapz1we7/yqDGIbmXUig== X-Google-Smtp-Source: AGs4zMaaCulCaw89VhHD7MJ8OuM/Y2sCCQuPje/dxwZXynEvfCQgXTa4TkddAq2vjVhOCEXF2uxianfjvK23+tuEDTc= X-Received: by 10.36.48.4 with SMTP id q4mr2850201itq.34.1510849692785; Thu, 16 Nov 2017 08:28:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.104.3 with HTTP; Thu, 16 Nov 2017 08:28:12 -0800 (PST) In-Reply-To: References: <20171115140319.32570-1-ard.biesheuvel@linaro.org> <20171116115914.foym7hu3p676foer@bivouac.eciton.net> <8702245A-4A13-4B96-9274-B22CC2B2F148@linaro.org> From: Ard Biesheuvel Date: Thu, 16 Nov 2017 16:28:12 +0000 Message-ID: To: Leif Lindholm Cc: "edk2-devel@lists.01.org" , Laszlo Ersek Subject: Re: [PATCH] ArmVirtPkg: remove ArmPlatformSysConfigLib dependency 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 16:24:03 -0000 Content-Type: text/plain; charset="UTF-8" On 16 November 2017 at 14:15, Ard Biesheuvel wrote: > On 16 November 2017 at 12:34, Ard Biesheuvel wrote: >> >> >>> On 16 Nov 2017, at 11:59, Leif Lindholm wrote: >>> >>>> On Thu, Nov 16, 2017 at 09:40:58AM +0000, Ard Biesheuvel wrote: >>>>> On 15 November 2017 at 14:03, Ard Biesheuvel wrote: >>>>> Now that the PL031 RTC driver library no longer depends on the ARM >>>>> platform specific ArmPlatformSysConfigLib, we no longer need to >>>>> implement ArmPlatform.h or have a resolution for that library. >>>>> This allows us to get rid of a rather dodgy practice of including >>>>> platform headers using compiler flags, which is a bad idea at various >>>>> levels. >>>>> >>>>> Contributed-under: TianoCore Contribution Agreement 1.1 >>>>> Signed-off-by: Ard Biesheuvel >>>>> --- >>>>> PL031 patch is on-list and pending. >>>>> >>>>> ArmVirtPkg/ArmVirtQemu.dsc | 7 ----- >>>>> ArmVirtPkg/ArmVirtQemuKernel.dsc | 6 ---- >>>>> ArmVirtPkg/ArmVirtXen.dsc | 6 ---- >>>>> ArmVirtPkg/Include/ArmPlatform.h | 33 -------------------- >>>>> ArmVirtPkg/Library/ArmQemuRelocatablePlatformLib/QemuVirtMem.c | 1 - >>>>> ArmVirtPkg/Library/ArmQemuRelocatablePlatformLib/RelocatableVirt.c | 1 - >>>>> ArmVirtPkg/Library/ArmVirtPlatformLib/Virt.c | 1 - >>>>> ArmVirtPkg/Library/ArmVirtPlatformLib/VirtMem.c | 1 - >>>>> ArmVirtPkg/Library/ArmXenRelocatablePlatformLib/RelocatableVirt.c | 1 - >>>>> ArmVirtPkg/Library/ArmXenRelocatablePlatformLib/XenVirtMem.c | 1 - >>>>> ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.c | 7 ++++- >>>>> 11 files changed, 6 insertions(+), 59 deletions(-) >>>>> >>>>> diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc >>>>> index 8a60b61f2aa6..d1b3849d856a 100644 >>>>> --- a/ArmVirtPkg/ArmVirtQemu.dsc >>>>> +++ b/ArmVirtPkg/ArmVirtQemu.dsc >>>>> @@ -49,7 +49,6 @@ [LibraryClasses.common] >>>>> QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/BaseQemuFwCfgS3LibNull.inf >>>>> >>>>> ArmPlatformLib|ArmVirtPkg/Library/ArmVirtPlatformLib/ArmVirtPlatformLib.inf >>>>> - ArmPlatformSysConfigLib|ArmPlatformPkg/Library/ArmPlatformSysConfigLibNull/ArmPlatformSysConfigLibNull.inf >>>>> >>>>> TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf >>>>> NorFlashPlatformLib|ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf >>>>> @@ -71,12 +70,6 @@ [LibraryClasses.common] >>>>> [LibraryClasses.common.UEFI_DRIVER] >>>>> UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf >>>>> >>>>> -[BuildOptions] >>>>> - RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15 -I$(WORKSPACE)/ArmVirtPkg/Include >>>>> - GCC:*_*_ARM_PLATFORM_FLAGS == -mcpu=cortex-a15 -I$(WORKSPACE)/ArmVirtPkg/Include >>>> >>>> Oops. I will need to retain the -mcpu setting here, or the 'hvc' >>>> instruction will be rejected by the assembler. >>> >>> Don't we have source-level overrides for that? >>> At least ".arch_extension virt" for GNU. >>> >> >> Yeah, or at least move the cflags override to the .inf of the library that uses the hvc instruction > > As it turns out, ArmVirtQemu.dsc builds find without the -mcpu CFLAGS, > due to the fact that we already have .arch_extension virt' in > ArmPkg/Library/ArmHvcLib/Arm/ArmHvc.S, which is the only file that is > affected by this AFAICT. I will double check how RVCT deals with this, > but I will move the --cpu=Cortex-A15 flag into > ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf at the very least Pushed as f311e5d8b5e1928eec602334194187d7811d905a (with the --cpu issue fixed due to 302e8eda3b2f848e54bd21d0a8b2e5d8b891bffd 'ArmPkg: move RVCT PLATFORM_FLAGS override into ArmHvcLib/ArmSmcLib')