From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::232]) (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 3A77D1A1E2A for ; Mon, 5 Sep 2016 02:29:51 -0700 (PDT) Received: by mail-it0-x232.google.com with SMTP id e124so138266581ith.0 for ; Mon, 05 Sep 2016 02:29:51 -0700 (PDT) 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=dwHIFFxbtSMB6ULIv7fNR25uGCDaYFA7X/eKWZK7h/g=; b=Gzevwl5OLgaiv9IJEynTs4Bh0yKqqCefsNa8dU2oXGLuga+1hNeC2wwUzXhUjqBtEC uxQjPUUfO3PoaeKh1NDEMvdpBqPkar9AAL/HvDqfdBobgj8pk3ALw9B62GtQbK3cX8nj ZV6PvSK9voNprMgWrzUc8vYdWPGo+A9mf4sL4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dwHIFFxbtSMB6ULIv7fNR25uGCDaYFA7X/eKWZK7h/g=; b=b3s5gd2H17qiT1rK9L7Qm1Ft+Pxfc3141eHumNTUc0ZCei6nnxCXs4WeD4hTMZtlWI LKe+D5IIMcoj/lACJJhcHghnDLS5lZfQj/Zo3a0ImnxO5+UYgk+YwflCPXygL9fVgVYP yGbblQomxsrgOkR5HD8LO+8pjZv4/EHfkMwP8f6ZF8E6L7SbON6R0GyhYOPJwRYkoY9T 9EtOUNR+iLVS/sBFZ/50ZlX+9L5OUdHMzKMplR8On7/svHDXQ/J2i3sDBJ19KZXdbQgG CnjUfMtulHVVHEMlP3ZO5QigDZP8gNJHqk5CCwy5GlJ4pAvAmS1hBmejELio6+Z0G0Nx R2CQ== X-Gm-Message-State: AE9vXwOqZczy5eAYGDnJnph+SrYSBKoHqEci/sGuCpJUyyDg16qGktcDFg6R5W4yNxAWnGPr+QWjIVCj5YWTaO4h X-Received: by 10.36.65.2 with SMTP id x2mr21954851ita.78.1473067790468; Mon, 05 Sep 2016 02:29:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.204.195 with HTTP; Mon, 5 Sep 2016 02:29:49 -0700 (PDT) In-Reply-To: <1473064070-11762-1-git-send-email-dennis.chen@arm.com> References: <1473064070-11762-1-git-send-email-dennis.chen@arm.com> From: Ard Biesheuvel Date: Mon, 5 Sep 2016 10:29:49 +0100 Message-ID: To: Dennis Chen Cc: edk2-devel-01 , nd@arm.com, Leif Lindholm Subject: Re: [PATCH] ArmPkg: GICv2/v3 base address width fix-up X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2016 09:29:51 -0000 Content-Type: text/plain; charset=UTF-8 Hello Dennis, On 5 September 2016 at 09:27, Dennis Chen wrote: > According to the ACPI 6.0/6.1 spec, the physical base address of > GICC, GICD, GICR and GIC ITS is 64-bit. This patch is trying to > fix the original 32-bit width. > $ git grep PcdGic |grep -E Pcd.et32 gives me many instances in ArmPlatformPkg and ArmVirtPkg that refer to these PCDs as 32 bits wide. If you are going to make this change, please fix up all those occurrences as well, and please don't forget about OpenPlatformPkg. Thanks, Ard. > Contributed-under: TianoCore Contribution Agreement 1.0 > Cc: Ard Biesheuvel > Cc: Leif Lindholm > Signed-off-by: Dennis Chen > --- > ArmPkg/ArmPkg.dec | 7 ++++--- > ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c | 8 ++++---- > ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c | 4 ++-- > 3 files changed, 10 insertions(+), 9 deletions(-) > > diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec > index c189117..cc764d9 100644 > --- a/ArmPkg/ArmPkg.dec > +++ b/ArmPkg/ArmPkg.dec > @@ -251,10 +251,11 @@ > # > # ARM Generic Interrupt Controller > # > - gArmTokenSpaceGuid.PcdGicDistributorBase|0|UINT32|0x0000000C > + gArmTokenSpaceGuid.PcdGicDistributorBase|0|UINT64|0x0000000C > # Base address for the GIC Redistributor region that contains the boot CPU > - gArmTokenSpaceGuid.PcdGicRedistributorsBase|0|UINT32|0x0000000E > - gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0|UINT32|0x0000000D > + gArmTokenSpaceGuid.PcdGicRedistributorsBase|0|UINT64|0x0000000E > + gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0|UINT64|0x0000000D > + gArmTokenSpaceGuid.PcdGicItsBase|0|UINT64|0x0000000F > gArmTokenSpaceGuid.PcdGicSgiIntId|0|UINT32|0x00000025 > > # > diff --git a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c b/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c > index 34d4be3..a4ba5cf 100644 > --- a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c > +++ b/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c > @@ -30,8 +30,8 @@ Abstract: > > extern EFI_HARDWARE_INTERRUPT_PROTOCOL gHardwareInterruptV2Protocol; > > -STATIC UINT32 mGicInterruptInterfaceBase; > -STATIC UINT32 mGicDistributorBase; > +STATIC UINTN mGicInterruptInterfaceBase; > +STATIC UINTN mGicDistributorBase; > > /** > Enable interrupt source Source. > @@ -259,8 +259,8 @@ GicV2DxeInitialize ( > // Make sure the Interrupt Controller Protocol is not already installed in the system. > ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gHardwareInterruptProtocolGuid); > > - mGicInterruptInterfaceBase = PcdGet32 (PcdGicInterruptInterfaceBase); > - mGicDistributorBase = PcdGet32 (PcdGicDistributorBase); > + mGicInterruptInterfaceBase = PcdGet64 (PcdGicInterruptInterfaceBase); > + mGicDistributorBase = PcdGet64 (PcdGicDistributorBase); > mGicNumInterrupts = ArmGicGetMaxNumInterrupts (mGicDistributorBase); > > for (Index = 0; Index < mGicNumInterrupts; Index++) { > diff --git a/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c b/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c > index 983936f..8af97a9 100644 > --- a/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c > +++ b/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c > @@ -245,8 +245,8 @@ GicV3DxeInitialize ( > // Make sure the Interrupt Controller Protocol is not already installed in the system. > ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gHardwareInterruptProtocolGuid); > > - mGicDistributorBase = PcdGet32 (PcdGicDistributorBase); > - mGicRedistributorsBase = PcdGet32 (PcdGicRedistributorsBase); > + mGicDistributorBase = PcdGet64 (PcdGicDistributorBase); > + mGicRedistributorsBase = PcdGet64 (PcdGicRedistributorsBase); > mGicNumInterrupts = ArmGicGetMaxNumInterrupts (mGicDistributorBase); > > // > -- > 2.7.4 >