diff mbox

[edk2,v3,2/5] ArmVirtualizationPkg: move Qemu target to ArmVirtualizationMemoryInitPeiLib

Message ID 1428477061-1768-3-git-send-email-ard.biesheuvel@linaro.org
State New
Headers show

Commit Message

Ard Biesheuvel April 8, 2015, 7:10 a.m. UTC
This updates ArmVirtualizationQemu.dsc to use the MemoryInitPeilLib
implementation for virt targets. The only difference between that one
and the original one is that the original one removes memory from the
available list if it overlaps the FD region (which may be the case when
shadowing NOR flash with system RAM). Since this is never the case for
the Qemu target, this change should have no effect. In a followup patch,
we will implement more virt specific behavior in this library instance.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc | 2 ++
 1 file changed, 2 insertions(+)

Comments

Ard Biesheuvel April 8, 2015, 11:14 a.m. UTC | #1
On 8 April 2015 at 13:09, Laszlo Ersek <lersek@redhat.com> wrote:
> On 04/08/15 09:10, Ard Biesheuvel wrote:
>> This updates ArmVirtualizationQemu.dsc to use the MemoryInitPeilLib
>> implementation for virt targets. The only difference between that one
>> and the original one is that the original one removes memory from the
>> available list if it overlaps the FD region (which may be the case when
>> shadowing NOR flash with system RAM). Since this is never the case for
>> the Qemu target, this change should have no effect. In a followup patch,
>> we will implement more virt specific behavior in this library instance.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.0
>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> ---
>>  ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc
>> index 07ae63ada7c0..cad7353442f7 100644
>> --- a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc
>> +++ b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc
>> @@ -39,6 +39,8 @@
>>    ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexA15Lib/ArmCortexA15Lib.inf
>>
>>  [LibraryClasses.common]
>> +  MemoryInitPeiLib|ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationMemoryInitPeiLib/ArmVirtualizationMemoryInitPeiLib.inf
>> +
>>    # Virtio Support
>>    VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
>>    VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf
>>
>
> Instead of this patch, how about moving the similar (preexistent)
> resolution from "ArmVirtualizationXen.dsc" to "ArmVirtualization.dsc.inc"?
>
> In practice that would mean:
> - delete the resolution in "ArmVirtualizationXen.dsc",
> - update (redirect) the resolution in "ArmVirtualization.dsc.inc" that
>   was added in patch #1.
>
> Otherwise, we'll end up with a resolution in the dsc include file that
> none of the actual platforms use, and the actual platforms will both use
> the same non-default resolution.
>
> What do you think?
>

Yes, that would be cleaner. Since the Qemu target does not actually
care about the MemoryInitPeiLib declaration until patch #1 is applied,
I can add a separate patch that does this, and move it to the
beginning of the series.
diff mbox

Patch

diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc
index 07ae63ada7c0..cad7353442f7 100644
--- a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc
+++ b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemu.dsc
@@ -39,6 +39,8 @@ 
   ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexA15Lib/ArmCortexA15Lib.inf
 
 [LibraryClasses.common]
+  MemoryInitPeiLib|ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationMemoryInitPeiLib/ArmVirtualizationMemoryInitPeiLib.inf
+
   # Virtio Support
   VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
   VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf