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:c06::241; helo=mail-io0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::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 E290421B00DC1 for ; Thu, 16 Nov 2017 06:11:52 -0800 (PST) Received: by mail-io0-x241.google.com with SMTP id 189so5346011iow.10 for ; Thu, 16 Nov 2017 06:16:02 -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=bo4XxHlFIr1ATZMaIJSlI9GECNMZBTdOOlwXgiSPoCw=; b=QpnZxzxcpqyFTjpZdJTR2JLPhM+Dg8lh9Ei33PlR8LoKH5zzWD7h7rNGp57GK09G14 8axkTzTZ6by32uPfIbH7bDfHLFfDu/tkafVj0Cu8UN81P8IxjqiRLu5D4rTVQ9eriFj1 akyW/Q1ECyEKruiAABmBv62ESiN3JAXLttxPY= 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=bo4XxHlFIr1ATZMaIJSlI9GECNMZBTdOOlwXgiSPoCw=; b=sqWU6tf1+QKaAQvvPLGTDzunA3QX95Uf5X4DqN50XCEKaqNtNaG0yyxZBGxRYWqfD7 /+yMTnNn/y7rIliNH1G6u8K/BdGz989AmoRxdG/ljecyHNgjoD8kwCH9Hq2WAlJrU92K VqhqVZwP7w98ugMWOIh+v+Jfgv0yLJ0RTyTaddNCuFkcLPUhpmrBA9hBJo513qSVMP9X UsPkqSyJNbCB1b/WZLRkOR8EzUtod2T86a77Obak8cg7ddPeDSJUqaeof/yV1RLtvFtP NeSVWL7AK9TQxe4VGMEOn1fH0wq+xw1IjX0IS33EkWMmQEYyGRodBrYwJreXN6l3Be6v lVnw== X-Gm-Message-State: AJaThX5VzJjBt5SPdINcsU6EwBlJSpkAQ10u+hXXnMs0Lx6KLF6vc8O9 b7jPlm0TfxFKMuIJhuajwdkkIf8Nh+38bZRZAyr3yw== X-Google-Smtp-Source: AGs4zMY2cgBrtUekGg3Nh5AYrbeodIMnKRiSoS4kOXXQjhsqka/Eo0EFMEckN3OULReQuW7QOuoUxPWehNYwZEz8+z8= X-Received: by 10.107.174.206 with SMTP id n75mr1713906ioo.43.1510841760108; Thu, 16 Nov 2017 06:16:00 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.104.3 with HTTP; Thu, 16 Nov 2017 06:15:59 -0800 (PST) In-Reply-To: <8702245A-4A13-4B96-9274-B22CC2B2F148@linaro.org> 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 14:15:59 +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 14:11:53 -0000 Content-Type: text/plain; charset="UTF-8" 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