public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>, edk2-devel@lists.01.org
Subject: Re: [PATCH 05/15] ArmVirtPkg/PrePi: remove dependency on ArmPlatformLib
Date: Tue, 21 Nov 2017 16:47:13 +0100	[thread overview]
Message-ID: <616bc12e-9447-dd5a-80b8-f165a68ef9e8@redhat.com> (raw)
In-Reply-To: <eecdd82b-855c-9252-42bf-20f999cde809@redhat.com>

On 11/21/17 16:46, Laszlo Ersek wrote:
> On 11/17/17 17:09, Ard Biesheuvel wrote:
>> Remove the pointless dependency on ArmPlatformLib: none of the code we
>> call from it actually does anything useful.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> ---
>>  ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf | 1 -
>>  ArmVirtPkg/PrePi/PrePi.c                            | 6 ++----
>>  ArmVirtPkg/PrePi/PrePi.h                            | 1 -
>>  3 files changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
>> index 5e706934f69f..1d79b1360c22 100755
>> --- a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
>> +++ b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
>> @@ -52,7 +52,6 @@ [LibraryClasses]
>>    LzmaDecompressLib
>>    PeCoffGetEntryPointLib
>>    PrePiLib
>> -  ArmPlatformLib
>>    ArmPlatformStackLib
>>    MemoryAllocationLib
>>    HobLib
>> diff --git a/ArmVirtPkg/PrePi/PrePi.c b/ArmVirtPkg/PrePi/PrePi.c
>> index c4fa979c43ef..fce4ab9428a5 100755
>> --- a/ArmVirtPkg/PrePi/PrePi.c
>> +++ b/ArmVirtPkg/PrePi/PrePi.c
>> @@ -13,6 +13,7 @@
>>  **/
>>  
>>  #include <PiPei.h>
>> +#include <Pi/PiBootMode.h>
>>  
>>  #include <Library/PrePiLib.h>
>>  #include <Library/PrintLib.h>
>> @@ -85,7 +86,7 @@ PrePiMain (
>>    BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize));
>>  
>>    // Set the Boot Mode
>> -  SetBootMode (ArmPlatformGetBootMode ());
>> +  SetBootMode (BOOT_WITH_FULL_CONFIGURATION);
>>  
>>    // Initialize Platform HOBs (CpuHob and FvHob)
>>    Status = PlatformPeim ();
>> @@ -123,9 +124,6 @@ CEntryPoint (
>>  {
>>    UINT64   StartTimeStamp;
>>  
>> -  // Initialize the platform specific controllers
>> -  ArmPlatformInitialize (MpId);
>> -
>>    if (PerformanceMeasurementEnabled ()) {
>>      // Initialize the Timer Library to setup the Timer HW controller
>>      TimerConstructor ();
>> diff --git a/ArmVirtPkg/PrePi/PrePi.h b/ArmVirtPkg/PrePi/PrePi.h
>> index d3189c0b8a6f..1ba88e0506cb 100644
>> --- a/ArmVirtPkg/PrePi/PrePi.h
>> +++ b/ArmVirtPkg/PrePi/PrePi.h
>> @@ -25,7 +25,6 @@
>>  #include <Library/MemoryAllocationLib.h>
>>  #include <Library/HobLib.h>
>>  #include <Library/SerialPortLib.h>
>> -#include <Library/ArmPlatformLib.h>
>>  
>>  #define SerialPrint(txt)  SerialPortWrite (txt, AsciiStrLen(txt)+1);
>>  
>>
> 
> ArmPlatformGetBootMode() and ArmPlatformInitialize() have identical
> implementations between the ArmQemuRelocatablePlatformLib and the
> ArmXenRelocatablePlatformLib instances, so I agree common handling is
> justified here.
> 
> The ArmPlatformInitialize() call is not replaced by the function's contents:
> 
>   ASSERT (!FeaturePcdGet (PcdSystemMemoryInitializeInSec));
> 
> but I guess this assertion is satisfied simply by the PrePi nature of
> the platform -- once we stop sharing the code like before, the assert
> becomes useless (there's no possible mis-build to catch). I think,
> 
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> 

heh, that was supposed to be: "I think.". Nothing else to add :)


  reply	other threads:[~2017-11-21 15:43 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-17 16:08 [PATCH 00/15] ArmVirtPkg: get rid of ArmPlatformLib Ard Biesheuvel
2017-11-17 16:08 ` [PATCH 01/15] ArmPlatformPkg/ArmPlatformLibNull: remove bogus PCD dependencies Ard Biesheuvel
2017-11-17 16:20   ` Leif Lindholm
2017-11-17 16:23     ` Ard Biesheuvel
2017-11-17 16:28       ` Leif Lindholm
2017-11-17 19:10         ` Ard Biesheuvel
2017-11-17 16:09 ` [PATCH 02/15] ArmVirtPkg/PrePi: run all library constructors by hand Ard Biesheuvel
2017-11-21 15:32   ` Laszlo Ersek
2017-11-17 16:09 ` [PATCH 03/15] ArmVirtPkg/PrePi: remove unused GetPlatformPpi() function Ard Biesheuvel
2017-11-21 15:36   ` Laszlo Ersek
2017-11-17 16:09 ` [PATCH 04/15] ArmVirtPkg/PrePi: remove bogus primary core check Ard Biesheuvel
2017-11-21 15:40   ` Laszlo Ersek
2017-11-17 16:09 ` [PATCH 05/15] ArmVirtPkg/PrePi: remove dependency on ArmPlatformLib Ard Biesheuvel
2017-11-21 15:46   ` Laszlo Ersek
2017-11-21 15:47     ` Laszlo Ersek [this message]
2017-11-17 16:09 ` [PATCH 06/15] ArmVirtPkg/PrePi: move DRAM discovery code into PrePi Ard Biesheuvel
2017-11-21 15:48   ` Laszlo Ersek
2017-11-17 16:09 ` [PATCH 07/15] ArmVirtPkg/PrePi: remove ArmPlatformStackLib dependency Ard Biesheuvel
2017-11-21 15:51   ` Laszlo Ersek
2017-11-17 16:09 ` [PATCH 08/15] ArmVirtPkg/PrePi: remove bogus IntelFrameworkModulePkg.dec dependency Ard Biesheuvel
2017-11-21 15:52   ` Laszlo Ersek
2017-11-17 16:09 ` [PATCH 09/15] ArmVirtPkg/ArmVirtPlatformLib: remove support for uncached mappings Ard Biesheuvel
2017-11-21 16:15   ` Laszlo Ersek
2017-11-17 16:09 ` [PATCH 10/15] ArmVirtPkg: introduce ArmVirtMemInfoLib library class Ard Biesheuvel
2017-11-21 16:23   ` Laszlo Ersek
2017-11-21 16:27     ` Laszlo Ersek
2017-11-21 16:32       ` Ard Biesheuvel
2017-11-17 16:09 ` [PATCH 11/15] ArmVirtPkg/ArmVirtXen: add ArmVirtMemInfoLib implementation Ard Biesheuvel
2017-11-21 16:30   ` Laszlo Ersek
2017-11-17 16:09 ` [PATCH 12/15] ArmVirtPkg/ArmVirtQemu: " Ard Biesheuvel
2017-11-21 16:47   ` Ard Biesheuvel
2017-11-21 16:56   ` Laszlo Ersek
2017-11-21 17:11     ` Ard Biesheuvel
2017-11-17 16:09 ` [PATCH 13/15] ArmVirtPkg: implement ArmVirtMemInfo PPI, PEIM and library Ard Biesheuvel
2017-11-21 17:49   ` Laszlo Ersek
2017-11-21 17:57     ` Ard Biesheuvel
2017-11-21 20:17       ` Laszlo Ersek
2017-11-21 20:32         ` Ard Biesheuvel
2017-11-22  8:45           ` Laszlo Ersek
2017-11-17 16:09 ` [PATCH 14/15] ArmVirtPkg/ArmVirtMemoryInitPeiLib: move to ArmVirtMemInfoLib Ard Biesheuvel
2017-11-21 17:51   ` Laszlo Ersek
2017-11-17 16:09 ` [PATCH 15/15] ArmVirtPkg: remove ArmPlatformLib implementations Ard Biesheuvel
2017-11-21 17:52   ` Laszlo Ersek

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=616bc12e-9447-dd5a-80b8-f165a68ef9e8@redhat.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