public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	Laszlo Ersek <lersek@redhat.com>
Subject: Re: [PATCH] ArmVirtPkg: remove ArmPlatformSysConfigLib dependency
Date: Thu, 16 Nov 2017 16:28:12 +0000	[thread overview]
Message-ID: <CAKv+Gu_qoG39vvbQAwijzROg_Fq1XfvqUEABF5aK5E4_CzMMJg@mail.gmail.com> (raw)
In-Reply-To: <CAKv+Gu9Mz1edEd4e1U58atvcmVLxE-f73DcOA6KBFLLktG3L2A@mail.gmail.com>

On 16 November 2017 at 14:15, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> On 16 November 2017 at 12:34, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>>
>>
>>> On 16 Nov 2017, at 11:59, Leif Lindholm <leif.lindholm@linaro.org> wrote:
>>>
>>>> On Thu, Nov 16, 2017 at 09:40:58AM +0000, Ard Biesheuvel wrote:
>>>>> On 15 November 2017 at 14:03, Ard Biesheuvel <ard.biesheuvel@linaro.org> 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 <ard.biesheuvel@linaro.org>
>>>>> ---
>>>>> 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')


      reply	other threads:[~2017-11-16 16:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15 14:03 [PATCH] ArmVirtPkg: remove ArmPlatformSysConfigLib dependency Ard Biesheuvel
2017-11-15 23:03 ` Laszlo Ersek
2017-11-16  9:40 ` Ard Biesheuvel
2017-11-16 11:59   ` Leif Lindholm
2017-11-16 12:34     ` Ard Biesheuvel
2017-11-16 14:15       ` Ard Biesheuvel
2017-11-16 16:28         ` Ard Biesheuvel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKv+Gu_qoG39vvbQAwijzROg_Fq1XfvqUEABF5aK5E4_CzMMJg@mail.gmail.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox