From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eu-smtp-delivery-143.mimecast.com (eu-smtp-delivery-143.mimecast.com [207.82.80.143]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 419651A1E20 for ; Mon, 17 Oct 2016 00:45:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=AGNcjMTsxBw67OqGhWTAsrQ2sTtXHbtml/S9PdRlHWo=; b=QE062JsVCBehxMh5/yDEPjjfkB3f9/RhsJIlc9p/WUa0gWjYgB3VFTtLFufI4OmcbdrVKIg+hLgCO7XfBy3LZcOjGct1Diwu89ZICPa3JtbVD+iY7JYuA0oetZva+cXUQ4EuFes2sZn3UEwOWJv5Ff0di56FTNtAKOLDdnuJ8hY= Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp0210.outbound.protection.outlook.com [213.199.154.210]) (Using TLS) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-48-SvIFNXbXNAq41MOxRWTeCQ-1; Mon, 17 Oct 2016 08:45:08 +0100 Received: from VI1PR0801CA0003.eurprd08.prod.outlook.com (10.167.193.141) by DB5PR08MB0440.eurprd08.prod.outlook.com (10.161.245.143) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.659.11; Mon, 17 Oct 2016 07:45:06 +0000 Received: from DB3FFO11FD033.protection.gbl (2a01:111:f400:7e04::156) by VI1PR0801CA0003.outlook.office365.com (2603:10a6:800:32::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.619.10 via Frontend Transport; Mon, 17 Oct 2016 07:45:05 +0000 Received: from nebula.arm.com (217.140.96.140) by DB3FFO11FD033.mail.protection.outlook.com (10.47.217.64) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.669.7 via Frontend Transport; Mon, 17 Oct 2016 07:45:05 +0000 Received: from arm.com (10.1.2.79) by mail.arm.com (10.1.105.66) with Microsoft SMTP Server id 14.3.294.0; Mon, 17 Oct 2016 08:44:45 +0100 Date: Mon, 17 Oct 2016 15:44:43 +0800 From: Dennis Chen To: Ard Biesheuvel CC: edk2-devel-01 , , Leif Lindholm Message-ID: <20161017074441.GA5456@arm.com> References: <1476680593-4961-1-git-send-email-dennis.chen@arm.com> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:217.140.96.140; IPV:CAL; SCL:-1; CTRY:GB; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(199003)(189002)(51914003)(24454002)(23726003)(6916009)(2950100002)(106466001)(46406003)(83506001)(19580405001)(8936002)(19580395003)(8676002)(1076002)(104016004)(92566002)(86362001)(87936001)(246002)(356003)(50466002)(7696004)(626004)(7846002)(5660300001)(2906002)(4001350100001)(47776003)(77096005)(26826002)(33656002)(110136003)(97756001)(305945005)(36756003)(4326007)(586003)(54356999)(76176999)(50986999)(189998001)(11100500001)(18370500001)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR08MB0440; H:nebula.arm.com; FPR:; SPF:Pass; PTR:fw-tnat.cambridge.arm.com; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB3FFO11FD033; 1:kD4lZ7XQ4WLp7+zrvgcFE+u6GYqHdyfmWdmFNn4ymRtUTdAxS8I1zIIeNCTPBFrz1ugPsNY9H4bajKkgyo0m4VA01FNtfKWZCEoW6ETRIpfMj3y695yiwAOWR+IK0aII+AntI3ZbKfCxuNtT3g8YFlb4FmoA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DosRxsDaMUbgOa3ED/tL/+ZhRGZNoPXPxTWMCqLDFGRxW5XuS6073HvxmchzSFK3dZ+vkyh2xjRcX3StddXF+rqPRKav8qjJT5uiMlJPmzVAQkVKqzSPEB8yTD4hXbh/twiqC/w9b7OBsBiaij2XymqGDN2ojl6l1oMMTSCl+bOpGc9Ggf49nElhJCmmLCPwMjjqtItRI2SFE1DVh9AEfEvkG4mkfrjioz3//leUXR1aoevvGNliZFPNBdRoXA5bF6UcoE2hD9WVZILD5eIX3b3+Qpj+ZdAC+bXLBSRhjZ2lgUoLZPbAkrDj1WLWT6kPNMsh9T+rmKwvCKPOrE0HkcDelbt85KPvO71cij23M0JKSeW0cuAl95BJ892qVOw+TuabkbV9ZB4tF0WcrBb5zFAGIq0So//pR+QaWVmJpx+YkRdIJY X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:DB5PR08MB0440; X-LD-Processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; DB5PR08MB0440; 31:7yqxs0TC8gWYZUKmdZOton0LHH8kar4HgbR7Ygu9zXcJp3LmB4wA/uGS0nelLVeFbUYor4y48zLlWagzP8I6b3+hNp1QRN5QzMM2LbfOfChH2VbGuldP0/aO13cuFouvMQIDOzsyQ84+Z54F98pxLd5+FTvQGXSAhdYKOwO7OKrU875sZDv6rNCIhmCMDmuHWCb3q8K3dmSLa8uu6G3OsSe66Ytu5GRKGlmaOuuboAJ+dXm/HgIkgzgEqOfJ3Ovl; 20:xbcNNSMqokdsbouZNBV50t2WTICrzyY3nKoR3VcBhsOhVA8QYPhnBEfE5dWztLeCA6fo7SY7mYw3i3USzzh43JTtHnT8M53NXuamBHHsKUp2lr+P7XNhR0T9hKFt7L84jv20hR3bt2y3JoF2iZRzyKNrTtrJJncjzJuAonA5dO9KqP1GeWDLjGF9jcIwj9wlszSMavdSbx2e3+WGHllPvLAeDSjLKJ4TZvbd56mg/0HNP9EBR3dy1REANV4LazyB NoDisclaimer: True X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13013025)(13020025)(8121501046)(13024025)(13023025)(5005006)(3002001)(10201501046)(6055026); SRVR:DB5PR08MB0440; BCL:0; PCL:0; RULEID:; SRVR:DB5PR08MB0440; X-Microsoft-Exchange-Diagnostics: 1; DB5PR08MB0440; 4:oakuUO45UwhTX8tLwR3bGYaeKuKCP9KmXE2qOJjjXdjZUgTqHggIUjQe8pHK3iKmLgilhSzdzLz+hPtVbl0TX2dCvgc1tOn4SmwEXLi56OGL9wkP6rYrlCBdAZBIAWVUhaVUZS6Yv0MZ4b9cXnGiRjIZQcjBq3hg7EK27X6tDCH8bpzc9jecSWqk5HZDuionxOm5OxL2gzQweGju+EmJLdazEry21nJMLxAu0YJEQu8bJb6g0SmlohzAZL+k5buIuI4s7eahlEwH3gLudvYxPM8Nfoc1m+MAjXvhSCmo5ohz+f470w9rfIncVPnGHheugAIPiA+P02rHGaADW9jkCLVYBLslUydK0OXrAJ9J/SkavzG+nQjhSXQ9GeeQbs2ygOXiqh/hFIYCZdgfKbX+7K6vpHZdfHry4BIp49cDqcNx1gfcWkorvQBDPf6mh+17cHMGUBVHtXFt2iqioXHwooDu+pBuxRCoSlxq9cvHO733+9dirJPV0VDE9tvy9QHau/klcKLsU040gCeonZReXmD6QQYIrJozO2OttbHxR9s= X-Forefront-PRVS: 0098BA6C6C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB5PR08MB0440; 23:0ArxCNupKEFeEPxusZaB9FjaB07irQ7gB6N37nQnP?= =?us-ascii?Q?OgmzgC4sZbIVPJTGhdHHG6Sf4Lgl/Ws3kNSfJGe56Ej9Q/f3kNrHX0P3c/0z?= =?us-ascii?Q?rQ3S+FKb0Z/hxUqgjgD8CsNlyQhRRSTTdJhte8j2qQ7Dt4wYbBobWp0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cqMcl2A8FlawNnGLZFxbxeQANJirSFBUYTtS8IxHMV?= =?us-ascii?Q?qaEXBnlaKzOZKW4yVPT9GBHmXWruczBxZautMDn+TWXAaDPNwi+IHXNrbKMr?= =?us-ascii?Q?qfbGvoGFYbnpsLmIaja1JZCEnLOjsnBVE7RxPzqxk9/CfmDarlB2SDalK49x?= =?us-ascii?Q?UmHKbRpVmIM4DlpVRQxwd+5J84cAGLuB1gB?= X-Microsoft-Exchange-Diagnostics: 1; DB5PR08MB0440; 6:xFVax4QXwl6fpLpSnXjHNLu7tePnpLFUv2uNbcF8etGQTg4yQTMary1duuQW0pplUPF8XSpU1oD72Z6YQXOP/BUJKXD6iFlpVSwMHJqzf2tq1OtvdHBBOd/rgNDymaHfRNAXy67FD+YA5lPTBNike8uvaYIprt8Bbp0gPBlz3NucWWdXpRtDbUpTg4O7tFRFzSrdvEnTNsc7S3F6TUifLX0BLVkrIDNNPqhf8H7Xqn8BupUJiZYU8Nkw1oiA13yVBwvY7XZIT/Icb7WCo9e7n9En+TD1g9brpsVxzIzoNOWJvhnFsQKc2rjngMnjExjhnTqaFrM91C4THeRwi8XpsQ==; 5:clYeq83wjcwXuD9lklfq5NQCw2uQQl4hQ6l/O7nfmFe+6uQczgkUlVQedaMIdtlbyCfQBTKqEjMk1nMkOg9EkG2efjSI/MwNCEA8m8aRWILuUIUoZdlTzhFmTWyZXOGCCik4xZhXbUIiVU81RhxLsA==; 24:40HFUnmpev748wHqJcUNo3W10befSJ9XMJNdwiemr4+mCOqIG06rGkG/zQYtC0Sy44xGGnmKrZjhw3Q/sDJjBhhj39qdTBkctx1gCkapeGs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB5PR08MB0440; 7:niDy3stdi6IsbCI1zN+frM6a9lDYdzkgJcIThdj2y75xlnzaUukzpnDgR3sxkj7YjzngZQw83JY3bA5T6VPHrLW6+VNpe0+94qLGpSOfAJZLv/o0bqxaOw+VCErFLhvlMaqS4NCTitADEonCN8RqQZ8hgnSi5GWyZ02oyt/bK/KmKxiWcYomDr4DPJiR4wEvtikXl8cVh9XkYMUifp/6V94g3Mqk8DmbViMGdzV/gOqm5eSu3UG8KgcDkuYRrFb47WIVq+YklZ+HpJUp8fNrXb3dZtR30+Aj4U6nFaKKlv7+CqAjHy3esZhXJrDBMz+O4M0YHOWcnPo2+VHVtHRgv9OHjDVxnqBIga5OWYEe74k= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2016 07:45:05.2173 (UTC) X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[217.140.96.140]; Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR08MB0440 X-MC-Unique: SvIFNXbXNAq41MOxRWTeCQ-1 Subject: Re: [PATCH] ArmPkg ArmVirtPkg: 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: Mon, 17 Oct 2016 07:45:11 -0000 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello Ard, Thanks for the comments! I will split this patch into 2 and for ArmVirtPkg = patch, we just need to simply drop the original ASSERT() since it's nonsensical an= y more. Thanks, Dennis On Mon, Oct 17, 2016 at 08:28:50AM +0100, Ard Biesheuvel wrote: > Hi Dennis, >=20 > On 17 October 2016 at 06:03, 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 > > --- > > ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c | 4 ++-- > > ArmVirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.c | 8 ++++---- >=20 > Could you split this patch in 2 please, and put Laszlo Ersek on cc for > the ArmVirtPkg patch? >=20 >=20 > > 2 files changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c b/ArmPkg/Drivers= /ArmGic/GicV2/ArmGicV2Dxe.c > > index b9ecd55..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; > > >=20 > This should be UINT64 not UINTN >=20 > > /** > > Enable interrupt source Source. > > diff --git a/ArmVirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.c b= /ArmVirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.c > > index 64afc4d..16683ef 100644 > > --- a/ArmVirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.c > > +++ b/ArmVirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.c > > @@ -79,11 +79,11 @@ ArmVirtGicArchLibConstructor ( > > > > // RegProp[0..1] =3D=3D { GICD base, GICD size } > > DistBase =3D SwapBytes64 (Reg[0]); > > - ASSERT (DistBase < MAX_UINT32); > > + ASSERT (DistBase < MAX_UINT64); > > >=20 > This becomes equivalent to 'DistBase !=3D MAX_UINT64' given that a > UINT64 cannot exceed MAX_UINT64. That is a nonsensical thing to > assert, so it is better to simply drop it >=20 > > // RegProp[2..3] =3D=3D { GICR base, GICR size } > > RedistBase =3D SwapBytes64 (Reg[2]); > > - ASSERT (RedistBase < MAX_UINT32); > > + ASSERT (RedistBase < MAX_UINT64); > > >=20 > Likewise >=20 > > PcdSet64 (PcdGicDistributorBase, DistBase); > > PcdSet64 (PcdGicRedistributorsBase, RedistBase); > > @@ -117,8 +117,8 @@ ArmVirtGicArchLibConstructor ( > > > > DistBase =3D SwapBytes64 (Reg[0]); > > CpuBase =3D SwapBytes64 (Reg[2]); > > - ASSERT (DistBase < MAX_UINT32); > > - ASSERT (CpuBase < MAX_UINT32); > > + ASSERT (DistBase < MAX_UINT64); > > + ASSERT (CpuBase < MAX_UINT64); > > >=20 > Likewise >=20 > > PcdSet64 (PcdGicDistributorBase, DistBase); > > PcdSet64 (PcdGicInterruptInterfaceBase, CpuBase); > > -- > > 2.7.4 > > >=20