From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4F8EC224E691D for ; Thu, 1 Mar 2018 07:03:17 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Mar 2018 07:09:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,408,1515484800"; d="scan'208";a="22087305" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga006.jf.intel.com with ESMTP; 01 Mar 2018 07:09:25 -0800 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 1 Mar 2018 07:09:25 -0800 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.47]) by FMSMSX110.amr.corp.intel.com ([169.254.14.108]) with mapi id 14.03.0319.002; Thu, 1 Mar 2018 07:09:25 -0800 From: "Carsey, Jaben" To: Ard Biesheuvel , "edk2-devel@lists.01.org" CC: "Ni, Ruiyu" , "heyi.guo@linaro.org" Thread-Topic: [edk2] [PATCH] ShellPkg/UefiShellDebug1CommandsLib: remove I/O address limit from 'mm' Thread-Index: AQHTsUEnPHjcE/bzBUubPFmcLy81y6O7e/CQ Date: Thu, 1 Mar 2018 15:09:24 +0000 Message-ID: References: <20180301093847.19493-1-ard.biesheuvel@linaro.org> In-Reply-To: <20180301093847.19493-1-ard.biesheuvel@linaro.org> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWVkYTRmMjUtZDI1Mi00NTEzLWI4OTEtNGQyNmZiZGU5ZTM3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IjFkdm41WFBqTUdzVUcwUmFIbGx0Mk5FN3BjWTZreG82QkZkNHZxTkJwd1k9In0= x-ctpclassification: CTP_NT x-originating-ip: [10.1.200.107] MIME-Version: 1.0 Subject: Re: [PATCH] ShellPkg/UefiShellDebug1CommandsLib: remove I/O address limit from 'mm' X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Mar 2018 15:03:18 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Good catch. I wonder why that arbitrary restriction originated. Reviewed-by: Jaben Carsey > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Ard Biesheuvel > Sent: Thursday, March 01, 2018 1:39 AM > To: edk2-devel@lists.01.org > Cc: Ni, Ruiyu ; Carsey, Jaben > ; heyi.guo@linaro.org; Ard Biesheuvel > > Subject: [edk2] [PATCH] ShellPkg/UefiShellDebug1CommandsLib: remove > I/O address limit from 'mm' > Importance: High >=20 > Neither the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL nor the > EFI_CPU_IO2_PROTOCOL > impose any restrictions when it comes to the range of valid I/O > addresses. Even so, the 'mm' command in -IO mode refuses to perform > accesses to addresses >=3D 0xffff. >=20 > It is not up to 'mm' to impose this restriction, so remove it. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel > --- > ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c = | 11 ----- > ------ >=20 > ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Commands > Lib.uni | 2 -- > 2 files changed, 13 deletions(-) >=20 > diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c > b/ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c > index 9f97f1d345f7..d1fd42b1cd4d 100644 > --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c > +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c > @@ -525,12 +525,6 @@ ShellCommandRunMm ( > goto Done; > } >=20 > - if ((AccessType =3D=3D ShellMmIo) && (Address + Size > MAX_UINT16 + = 1)) { > - ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN > (STR_MM_IO_ADDRESS_RANGE), gShellDebug1HiiHandle, L"mm"); > - ShellStatus =3D SHELL_INVALID_PARAMETER; > - goto Done; > - } > - > // > // locate IO protocol interface > // > @@ -592,11 +586,6 @@ ShellCommandRunMm ( > // > Complete =3D FALSE; > do { > - if ((AccessType =3D=3D ShellMmIo) && (Address + Size > MAX_UINT16 = + 1)) { > - ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN > (STR_MM_ADDRESS_RANGE2), gShellDebug1HiiHandle, L"mm"); > - break; > - } > - > ShellMmAccess (AccessType, PciRootBridgeIo, CpuIo, TRUE, Address, > Size, &Buffer); > ShellPrintHiiEx (-1, -1, NULL, mShellMmAccessTypeStr[AccessType], > gShellDebug1HiiHandle); > ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_MM_ADDRESS), > gShellDebug1HiiHandle, Address); > diff --git > a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > dsLib.uni > b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > dsLib.uni > index b6a133a45444..011a7bfc2db6 100644 > --- > a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > dsLib.uni > +++ > b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman > dsLib.uni > @@ -128,7 +128,6 @@ >=20 > #string STR_MM_NOT_ALIGNED #language en-US "%H%s%N: Address > parameter %016LX is not aligned.\r\n" > #string STR_MM_PCIE_ADDRESS_RANGE #language en-US "%H%s%N: > Address parameter %016LX is not a valid PCI/PCIE address.\r\n" > -#string STR_MM_IO_ADDRESS_RANGE #language en-US "%H%s%N: IO > address out of range 0 - 0xFFFF\r\n" > #string STR_MM_MMIO #language en-US "%HMMIO%N" > #string STR_MM_IO #language en-US "%HIO%N" > #string STR_MM_PCI #language en-US "%HPCI%N" > @@ -136,7 +135,6 @@ > #string STR_MM_PCIE #language en-US "%HPCIE%N" > #string STR_MM_ADDRESS #language en-US " 0x%016lx : " > #string STR_MM_BUF #language en-US "0x%0*lx" > -#string STR_MM_ADDRESS_RANGE2 #language en-US "%H%s%N: IO > address out of range\r\n" > #string STR_MM_ERROR #language en-US "%H%s%N: Input had > incorrect format\r\n" >=20 > #string STR_SETVAR_PRINT #language en-US "%g - %s - %04x Bytes\= r\n" > -- > 2.11.0 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel