From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::232; helo=mail-io0-x232.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::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 9BAA8224E6931 for ; Thu, 1 Mar 2018 08:56:30 -0800 (PST) Received: by mail-io0-x232.google.com with SMTP id f1so7844383iob.0 for ; Thu, 01 Mar 2018 09:02:39 -0800 (PST) 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=PAIoo0zJPyeowph8Ysj1YEpFv0QvsyYsOI8d/fZN3r4=; b=IG9leiGKg0xMmXwg0AXM5/xeS4ANTKW8362r6liE/9h90ky533QGGr2P6tLuA3Pdm/ fkPGgka4CRMEEWJm3VTVQ6vMwftcTxvvF9yLutfF228h0B5GvjcIt8R7J8BP9wjmDk3a 4o7kM4vU0yAKSdwh+kVJYy2iBs5G+qtK5+jjM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=PAIoo0zJPyeowph8Ysj1YEpFv0QvsyYsOI8d/fZN3r4=; b=smDJa1BlJCycBbNsL45emcD3dHC6ZQAThN+nunT8ngOEH4tDZ+7po3szFKERgk2SDg XABDVmtIUcICNelSwnPGv1p49dGCERDGhEQTjEfA+gAVmPm/0mmBiWF/nagOqv/fUT9J jCUII4pcauLRg5MkpLNhnPS8GxtlvpEKWU3YJ9sayMWrIMHXV1+GHVt7UDyxra5yJc4s /j32kXNRljeVCWOPtyBldasdfTCcmofuYmyKofdbmPjeioxHBfRn8wiMuKVkhFH3ecng u3gO3b0DzcSV2zOo5fUt0Rnp3ezoQ9YBr5aikUbMLWrErN51IxdSsmNVC/RQRwP4rWTU e7BA== X-Gm-Message-State: AElRT7EAgPdEwBADQmK7Sbh6MdkFxVZ39IaUvbPux0rahP7JzGS2Koc7 +L3HhTAcIdvx7GN6RuN+g+2sw7Tqy84Zvu9nFq0CsBRlvC0= X-Google-Smtp-Source: AG47ELvPgkIWPHNBww7m+RKN/K1o1LmOzXEewkZ7J2AoyNdV8W+zElj0i59gllrKRCoiQ2kqa8bT8ufFb1f+xT6UDe0= X-Received: by 10.107.52.73 with SMTP id b70mr2888837ioa.60.1519923758134; Thu, 01 Mar 2018 09:02:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.138.209 with HTTP; Thu, 1 Mar 2018 09:02:37 -0800 (PST) In-Reply-To: References: <20180301093847.19493-1-ard.biesheuvel@linaro.org> From: Ard Biesheuvel Date: Thu, 1 Mar 2018 17:02:37 +0000 Message-ID: To: "Carsey, Jaben" Cc: "edk2-devel@lists.01.org" , "Ni, Ruiyu" , "heyi.guo@linaro.org" 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 16:56:31 -0000 Content-Type: text/plain; charset="UTF-8" On 1 March 2018 at 15:09, Carsey, Jaben wrote: > Good catch. I wonder why that arbitrary restriction originated. > > Reviewed-by: Jaben Carsey > Thanks Pushed as 23b53ede358d >> -----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 >> >> 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 >= 0xffff. >> >> It is not up to 'mm' to impose this restriction, so remove it. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ard Biesheuvel >> --- >> ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c | 11 ----- >> ------ >> >> ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Commands >> Lib.uni | 2 -- >> 2 files changed, 13 deletions(-) >> >> 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; >> } >> >> - if ((AccessType == ShellMmIo) && (Address + Size > MAX_UINT16 + 1)) { >> - ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN >> (STR_MM_IO_ADDRESS_RANGE), gShellDebug1HiiHandle, L"mm"); >> - ShellStatus = SHELL_INVALID_PARAMETER; >> - goto Done; >> - } >> - >> // >> // locate IO protocol interface >> // >> @@ -592,11 +586,6 @@ ShellCommandRunMm ( >> // >> Complete = FALSE; >> do { >> - if ((AccessType == 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 @@ >> >> #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" >> >> #string STR_SETVAR_PRINT #language en-US "%g - %s - %04x Bytes\r\n" >> -- >> 2.11.0 >> >> _______________________________________________ >> edk2-devel mailing list >> edk2-devel@lists.01.org >> https://lists.01.org/mailman/listinfo/edk2-devel