From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-x234.google.com (mail-io0-x234.google.com [IPv6:2607:f8b0:4001:c06::234]) (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 090341A1E3C for ; Tue, 18 Oct 2016 01:40:44 -0700 (PDT) Received: by mail-io0-x234.google.com with SMTP id f5so31697068ioj.2 for ; Tue, 18 Oct 2016 01:40:43 -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=3h3SBFiNJmKlAEQ37YNjscsle0ao4WVMDki8BxAQh2M=; b=LT9KYBUEs3oM+l6hj3lECSjximvWghb73p3ISWdC/0owrMluODyYc2+y1C0CadeK9J J5XkhN/v0gxlhndUdamW6ZALal4APxSnz6rZY0wBVnG4+phb727O8WkikgIwa7hId23z 9A4M3hHVn0uT6gtE2Z9HLLkJOTC3CKEoSGF54= 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=3h3SBFiNJmKlAEQ37YNjscsle0ao4WVMDki8BxAQh2M=; b=j45AEZQUjTUNZFjiaZISN8vVRXUj3h36AWi28+L2KWUJIUL2srMR9b1URjYEnnhjEK QeI62NMTS6bZfpGIbA/IaUfiz1nI631w3nmaRzFr24qgSxcR0koQAy4e5j5A1Qz/hybd iS6cGGuAL4gGPK2tnsfAH9NFp7UDUBB+YwttF89xcNOfE4E4zN9CR9c+9E8xBSbDvRqb iW+Up5NTEerRCTa7QOnEj84XhOVnF/eagB1T1xFuG4ZbflOnIOBrR1bshOJmitO2cEG/ ZMNJIEFAzQlMUuQqs0t95KxRaFhJvUkxUnBb9irEY1hC50Yva2QndhdlyJFc1AHTG3Mx EbTw== X-Gm-Message-State: AA6/9RlxJuuqLPMgd8J+v2fc5IjwscmzhkrPwOE7JfkpqB1KXOuU9cRfv2GMFwPtVymtXodLDJu43yUJe39bNcMa X-Received: by 10.107.156.137 with SMTP id f131mr25141273ioe.83.1476780043224; Tue, 18 Oct 2016 01:40:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.5.139 with HTTP; Tue, 18 Oct 2016 01:40:42 -0700 (PDT) In-Reply-To: <20161018025013.GA19504@arm.com> References: <1476694460-29877-1-git-send-email-dennis.chen@arm.com> <20161018025013.GA19504@arm.com> From: Ard Biesheuvel Date: Tue, 18 Oct 2016 09:40:42 +0100 Message-ID: To: Dennis Chen Cc: edk2-devel-01 , nd@arm.com, Leif Lindholm Subject: Re: [PATCH] ArmPkg: Fix the GIC base address variables as 64-bit 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: Tue, 18 Oct 2016 08:40:44 -0000 Content-Type: text/plain; charset=UTF-8 On 18 October 2016 at 03:50, Dennis Chen wrote: > Hello Ard, > > On Mon, Oct 17, 2016 at 06:09:00PM +0100, Ard Biesheuvel wrote: >> On 17 October 2016 at 09:54, Dennis Chen wrote: >> > Since ACPI spec defines the GIC base addresses (CPU interface, >> > Distributor and Redistributor*GICv3 only*) as 64-bit, so we should >> > define these corresponding base address variables as 64-bit instead of >> > 32-bit. This patch redefines them according to the ACPI spec. >> > >> > Contributed-under: TianoCore Contribution Agreement 1.0 >> > Cc: Ard Biesheuvel >> > Cc: Leif Lindholm >> > Signed-off-by: Dennis Chen >> >> After a closer look, I noticed the following: >> >> ArmPkg/Include/Library/ArmGicLib.h: IN INTN GicInterruptInterfaceBase >> ArmPkg/Include/Library/ArmGicLib.h: IN INTN GicDistributorBase, >> ArmPkg/Include/Library/ArmGicLib.h: IN INTN GicInterruptInterfaceBase >> ArmPkg/Include/Library/ArmGicLib.h: IN UINTN GicDistributorBase, >> ArmPkg/Include/Library/ArmGicLib.h: IN INTN GicInterruptInterfaceBase >> ArmPkg/Include/Library/ArmGicLib.h: IN INTN GicInterruptInterfaceBase >> ArmPkg/Include/Library/ArmGicLib.h: IN INTN GicDistributorBase >> ArmPkg/Include/Library/ArmGicLib.h: IN INTN GicDistributorBase >> ArmPkg/Include/Library/ArmGicLib.h: IN INTN GicDistributorBase >> ArmPkg/Include/Library/ArmGicLib.h: IN INTN GicDistributorBase, >> ArmPkg/Include/Library/ArmGicLib.h: IN UINTN >> GicInterruptInterfaceBase, >> ArmPkg/Include/Library/ArmGicLib.h: IN UINTN >> GicInterruptInterfaceBase, >> ArmPkg/Include/Library/ArmGicLib.h: IN INTN >> GicInterruptInterfaceBase, >> ArmPkg/Include/Library/ArmGicLib.h: IN UINTN >> GicDistributorBase, >> ArmPkg/Include/Library/ArmGicLib.h: IN UINTN >> GicRedistributorBase, >> ArmPkg/Include/Library/ArmGicLib.h: IN UINTN >> GicDistributorBase, >> ArmPkg/Include/Library/ArmGicLib.h: IN UINTN >> GicRedistributorBase, >> ArmPkg/Include/Library/ArmGicLib.h: IN UINTN >> GicDistributorBase, >> ArmPkg/Include/Library/ArmGicLib.h: IN UINTN >> GicRedistributorBase, >> ArmPkg/Include/Library/ArmGicLib.h: IN INTN GicDistributorBase, >> ArmPkg/Include/Library/ArmGicLib.h: IN INTN GicInterruptInterfaceBase >> ArmPkg/Include/Library/ArmGicLib.h: IN INTN GicInterruptInterfaceBase >> ArmPkg/Include/Library/ArmGicLib.h: IN INTN GicInterruptInterfaceBase >> ArmPkg/Include/Library/ArmGicLib.h: IN UINTN >> GicInterruptInterfaceBase >> ArmPkg/Include/Library/ArmGicLib.h: IN UINTN >> GicInterruptInterfaceBase, >> >> so I think we need to clean up the use of these values more widely >> than we have done up till now >> > I am not very sure if we still need to support UEFI on 32-bit ARM platform, as Leif mentioned > if we use INTN or UINTN that will be more generic to embrace both 32 &64-bit platform, at least > in form of. Currently we are only focused on 64-bit platform, let's wait for Leif's comment then > I can re-work my patch to adapt it after we have reached a wider agreement. > Hi Dennis, My primary concern is the sloppiness regarding INTN/UINTN, so it seem a major cleanup is due. I'd prefer using UINT64 everywhere: we can still assert that an UINT64 *value* does not exceed MAX_UINTN if we want to -- Ard.