On 08/26/14 15:03, Ard Biesheuvel wrote:
> Allow the PCDs gArmTokenSpaceGuid.PcdGicDistributorBase and
> gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase to be redeclared
> as PcdsDynamic by the platform, so virtual machines can set these
> properties during boot. As the PcdGet32() calls now call into the
> PCD database, cache the values that are required during the handling
> of interrupts.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel <[email protected]>
> ---
>  ArmPkg/ArmPkg.dec                         | 15 +++++++------
>  ArmPkg/Drivers/ArmGic/ArmGicDxe.inf       |  4 +++-
>  ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c | 37 
> ++++++++++++++++++-------------
>  ArmPkg/Library/BdsLib/BdsLib.inf          |  2 +-
>  4 files changed, 33 insertions(+), 25 deletions(-)
> 
> diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec
> index 0392af52758f..e5ed445ca367 100644
> --- a/ArmPkg/ArmPkg.dec
> +++ b/ArmPkg/ArmPkg.dec
> @@ -72,6 +72,14 @@
>    # Whether to use the virtual rather than the physical architected timer
>    gArmTokenSpaceGuid.PcdArmArchTimerUseVirtual|FALSE|BOOLEAN|0x0000003F
>  
> +[PcdsFixedAtBuild.common,PcdsDynamic.common]
> +  #
> +  # ARM Generic Interrupt Controller
> +  #
> +  gArmTokenSpaceGuid.PcdGicDistributorBase|0|UINT32|0x0000000C
> +  gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0|UINT32|0x0000000D
> +  gArmTokenSpaceGuid.PcdGicSgiIntId|0|UINT32|0x00000025

[snip]

> +UINTN mGicInterruptInterfaceBase        = 0;
> +UINTN mGicDistributorBase               = 0;

These should be UINT32 too, as far as I can see. In addition, there's no
need for the =0 initializers, but they don't hurt either, obviously.

Other than that, this patch seems reasonable.

Thanks
Laszlo

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to