From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=zKM12rXR; spf=pass (domain: arm.com, ip: 40.107.8.57, mailfrom: sami.mujawar@arm.com) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.57]) by groups.io with SMTP; Fri, 02 Aug 2019 10:30:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mdC7sWq64A6qbx4yZdYqH7VEjDwDaus1l2rROalVtj5/b0Ar76Qg7tNi5rrhyQkBvNAbw/a1l6omiUtk/I16O3rJpfsTVEaWaDjGh0PjLSqv6JLuIgLn0re09MqQ6NITjqI75vC0XoJohPtaytE3l9u1T0wQ6sMykQ7Hn8w2C0SM+GPq+sTPzJ3MrhYLoqn/69z8BZKljmhqE2BME/oAoZtP2OVphAM+BhyWcmmA94BjPHAcmFArVGWiteIvOP2dOikSrMLcnjJho3grs7kCM4jjdTh+ShJ4f/dmas29f8MBeNjmqeIU7nXPGQ45fbU7svz60mEu4n0EODLq0gsTSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q6gItFPHXeOWiSsL9kbKm/IGshNAZG1gikeTkx/jDaM=; b=GADgBfsW+Pij9/RAfON+Ijv/Q36P18Z6jFtZ0v9YPTaHI1v10dBQOTss7Y/iFkxjBVuXvbBHTmRKZnGcIbNofGfxj9s3uDlnX+qrheAwnKZzd95Jv0SXa1xG83UmNhHQuMjou3UDuguCtxDhKATEfOrb+QUltNrGSZyjOKwQ6fCekNu6/KACjdJTO2BeOa/+qFfGBfAGfqttec+T4cA7ctnm7eyrFablmpvpE7Tbe1AsO5yAuyHnqzjrgG5HxbGRkRHRnIwb5AbuCMsrnzNVSOseWCYBUoxwekK/VFOdkuC+cmbMKj0ch/UJXLBOg6lvzDq2QhZrS9KwLLtU5fnbgg== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=arm.com;dmarc=pass action=none header.from=arm.com;dkim=pass header.d=arm.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q6gItFPHXeOWiSsL9kbKm/IGshNAZG1gikeTkx/jDaM=; b=zKM12rXRt2xidFogtz4/vXSj2nqKIV0nkczTAz/bNS83f1zHntSrQ6LtxJxiCJXbTvapgKlyoj8Vb/FgBfn8yrjsx5aGEUCefl8OekSk6mfSqrXSj/6o+iOSzfP9KVrCucHj6CBHAY1SasB3ioiCKswZMY5q5EE1SvndkH001+I= Received: from DB6PR0802MB2375.eurprd08.prod.outlook.com (10.172.228.142) by DB6PR0802MB2375.eurprd08.prod.outlook.com (10.172.228.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2136.14; Fri, 2 Aug 2019 17:30:26 +0000 Received: from DB6PR0802MB2375.eurprd08.prod.outlook.com ([fe80::88a4:74c4:c4b7:aa1a]) by DB6PR0802MB2375.eurprd08.prod.outlook.com ([fe80::88a4:74c4:c4b7:aa1a%5]) with mapi id 15.20.2136.010; Fri, 2 Aug 2019 17:30:26 +0000 From: "Sami Mujawar" To: "Carsey, Jaben" , "Kinney, Michael D" , "devel@edk2.groups.io" CC: "Ni, Ray" , "Gao, Zhichao" Subject: Re: [edk2-devel] [Patch] ShellPkg/AcpiView: Fix IA32 link error Thread-Topic: [edk2-devel] [Patch] ShellPkg/AcpiView: Fix IA32 link error Thread-Index: AQHVN2/ArOxUEBCFWEmkHM2ufBJ6VqbFD4IQgCHReoCAAARsAIABBotw Date: Fri, 2 Aug 2019 17:30:26 +0000 Message-ID: References: <20190710223507.14396-1-michael.d.kinney@intel.com> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 43bccc98-206e-457a-8ef7-fdc32ab8569c.1 x-checkrecipientchecked: true authentication-results: spf=none (sender IP is ) smtp.mailfrom=Sami.Mujawar@arm.com; x-originating-ip: [217.140.106.52] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e34e38a3-a6b1-4035-6983-08d7176f1b53 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:DB6PR0802MB2375; x-ms-traffictypediagnostic: DB6PR0802MB2375: x-ms-exchange-purlcount: 4 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 011787B9DD x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(366004)(396003)(376002)(39860400002)(136003)(346002)(189003)(199004)(13464003)(40434004)(54906003)(186003)(486006)(66066001)(26005)(110136005)(316002)(478600001)(76176011)(53546011)(6506007)(6436002)(229853002)(66946007)(55016002)(305945005)(66476007)(6306002)(64756008)(66446008)(74316002)(256004)(19627235002)(66556008)(5024004)(86362001)(9686003)(76116006)(14444005)(7736002)(53936002)(2501003)(68736007)(6116002)(3846002)(99286004)(8676002)(52536014)(33656002)(8936002)(81156014)(2906002)(81166006)(5660300002)(476003)(446003)(11346002)(4326008)(102836004)(7696005)(25786009)(6246003)(14454004)(966005)(71190400001)(71200400001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0802MB2375;H:DB6PR0802MB2375.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: qiQDGkUcv+rMWk6PjwditUiaOdKUttaZYwC3NEvUYA96XosOVWvGE5ohvdJxnJcacoAS1tgJPOpuJY6qPU15U2b0oNx6O4f/Gh9inY1vPdDeVuR6h4rhZjN1B183r8sIRPhvcK/P1HIyYBtY+05zUBQ1uD0siRlP24vmHxq4eaUniU94SKO/LOUprHvtxvpN/0zlEn0sXRFDQ222D8AQ50RIcoNErsxxZ5K938LXx+XL6tkBYXP6VHkZ+fOlxm00mWQUbA/2kIh2Lwj5vVSeP4MwkQInzJSYqfyuspYsZ+hZcY7ZBRifhVov026BjrqdxwXUrBglvM6N/4Zvb2XxPcG62HD7vE3sEIu2J9hhU49IHfrD6qKR6JgQLS4IfM7mLKFhU5Du1KHv0g/59EP0ElWN8HzOMPLufP4zXyHyMsw= MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: e34e38a3-a6b1-4035-6983-08d7176f1b53 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Aug 2019 17:30:26.2325 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2375 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Mike, All, I agree it will be good to add acpiview to the standard ShellPkg build. Regards, Sami Mujawar -----Original Message----- From: Carsey, Jaben Sent: 01 August 2019 09:46 PM To: Kinney, Michael D ; Sami Mujawar ; devel@edk2.groups.io Cc: Ni, Ray ; Gao, Zhichao Subject: RE: [edk2-devel] [Patch] ShellPkg/AcpiView: Fix IA32 link error I think the shell DSC be updated to catch build errors in the NULL libs. I am good with Mike's proposed solution below, but not very concerned with= the method to catch the error. Thanks -Jaben > -----Original Message----- > From: Kinney, Michael D > Sent: Thursday, August 01, 2019 1:30 PM > To: Sami Mujawar ; devel@edk2.groups.io; Kinney, > Michael D > Cc: Carsey, Jaben ; Ni, Ray > ; Gao, Zhichao > Subject: RE: [edk2-devel] [Patch] ShellPkg/AcpiView: Fix IA32 link > error > > Hi Sami, > > I agree with your feedback. I saw that there was a larger patch set > for the ShellPkg, so I let that complete before returning to this > topic. > > The reason that I noticed this issue in the first place is when I > added the acpiview command to a platform and there was an IA32 build > failure. It would be better if the ShellPkg build caught this issue. > Adding the acpiview command to the standard shell build adds 50K to an > uncompressed DEBUG > IA32 build. > > 869,312 Shell_7C04A583-9E3E-4f1c-AD65-E05268D0B4D1.efi > 920,928 Shell_EA4BB293-2D7F-4456-A681-1F22F42CD0BC.efi > > Should acpiview be added to the standard ShellPkg build, or should I > add an extra build of the Shell to the ShellPkg DSC file with a > different GUID to make sure the shell builds when all NULL libs are > included without any !if statements. For example: > > ShellPkg/Application/Shell/Shell.inf { > > FILE_GUID =3D EA4BB293-2D7F-4456-A681-1F22F42CD0BC > > gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE > > > NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2Comma > ndsLib.inf > > NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1Comma > ndsLib.inf > > NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3Comma > ndsLib.inf > > NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1Com > mandsLib.inf > > NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1Co > NULL|m > mandsLib.inf > > NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Com > mandsLib.inf > > NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1 > CommandsLib.inf > > NULL|ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2 > CommandsLib.inf > > NULL|ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCo > mmandLib.inf > } > > Thanks, > > Mike > > > -----Original Message----- > > From: Sami Mujawar [mailto:Sami.Mujawar@arm.com] > > Sent: Thursday, July 11, 2019 1:24 AM > > To: devel@edk2.groups.io; Kinney, Michael D > > > > Cc: Carsey, Jaben ; Ni, Ray > > ; Gao, Zhichao > > Subject: RE: [edk2-devel] [Patch] ShellPkg/AcpiView: > > Fix IA32 link error > > > > Hi Mike, > > > > Since LocalityCount is 64-bit wide the SLIT validation code could > > possibly end up in an infinite loop. I am not aware of a platform > > that has a large enough LocalityCount to hit this condition. > > However, would it be good to have a check that limits the validation > > to MAX_UINT32? > > > > e.g. Something like > > if (LocalityCount < MAX_UINT32) { > > // Validate > > for (Count =3D 0; Count < LocalityCount; Count++) { > > for (Index =3D 0; Index < LocalityCount; Index++) { > > ... > > } else { > > Print (L"INFO: Skipping validation of System Localities as > > locality count is > MAX_UINT32\n"); } > > > > Regards, > > > > Sami Mujawar > > > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of > > Michael D Kinney via Groups.Io > > Sent: 10 July 2019 11:35 PM > > To: devel@edk2.groups.io > > Cc: Jaben Carsey ; Ray Ni > > ; Zhichao Gao > > Subject: [edk2-devel] [Patch] ShellPkg/AcpiView: Fix > > IA32 link error > > > > https://bugzilla.tianocore.org/show_bug.cgi?id=3D1970 > > > > Update local variable in ParseAcpiSlot() to be UINT32 instead of > > UINT64 to avoid 64-bit multiply operation in the SLIT_ELEMENT() > > macro. > > > > Cc: Jaben Carsey > > Cc: Ray Ni > > Cc: Zhichao Gao > > Signed-off-by: Michael D Kinney > > > > --- > > > > .../UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser > > .c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git > > a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/ > > Slit/SlitParser.c > > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/ > > Slit/SlitParser.c > > index 1f9dac66ee..af85c9aa1c 100644 > > --- > > a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/ > > Slit/SlitParser.c > > +++ > > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/ > > Slit/SlitPars > > +++ er.c > > @@ -57,8 +57,8 @@ ParseAcpiSlit ( > > ) > > { > > UINT32 Offset; > > - UINT64 Count; > > - UINT64 Index; > > + UINT32 Count; > > + UINT32 Index; > > UINT64 LocalityCount; > > UINT8* LocalityPtr; > > CHAR16 Buffer[80]; // Used for AsciiName param of ParseAcpi > > -- > > 2.21.0.windows.1 > > > > > >=20 > > > > IMPORTANT NOTICE: The contents of this email and any > > attachments are confidential and may also be > > privileged. If you are not the intended recipient, > > please notify the sender immediately and do not > > disclose the contents to any other person, use it for > > any purpose, or store or copy the information in any > > medium. Thank you. IMPORTANT NOTICE: The contents of this email and any attachments are confi= dential and may also be privileged. If you are not the intended recipient, = please notify the sender immediately and do not disclose the contents to an= y other person, use it for any purpose, or store or copy the information in= any medium. Thank you.