]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg/UefiShellDebug1CommandsLib: remove I/O address limit from 'mm'
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 1 Mar 2018 09:27:31 +0000 (09:27 +0000)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 1 Mar 2018 17:01:30 +0000 (17:01 +0000)
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 <ard.biesheuvel@linaro.org>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c
ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni

index 9f97f1d345f7e6df2609e434599970c86e132115..d1fd42b1cd4d8f1b0664969b5c98770af139b846 100644 (file)
@@ -525,12 +525,6 @@ ShellCommandRunMm (
       goto Done;\r
     }\r
 \r
       goto Done;\r
     }\r
 \r
-    if ((AccessType == ShellMmIo) && (Address + Size > MAX_UINT16 + 1)) {\r
-      ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_MM_IO_ADDRESS_RANGE), gShellDebug1HiiHandle, L"mm");\r
-      ShellStatus = SHELL_INVALID_PARAMETER;\r
-      goto Done;\r
-    }\r
-\r
     //\r
     // locate IO protocol interface\r
     //\r
     //\r
     // locate IO protocol interface\r
     //\r
@@ -592,11 +586,6 @@ ShellCommandRunMm (
     //\r
     Complete = FALSE;\r
     do {\r
     //\r
     Complete = FALSE;\r
     do {\r
-      if ((AccessType == ShellMmIo) && (Address + Size > MAX_UINT16 + 1)) {\r
-        ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_MM_ADDRESS_RANGE2), gShellDebug1HiiHandle, L"mm");\r
-        break;\r
-      }\r
-\r
       ShellMmAccess (AccessType, PciRootBridgeIo, CpuIo, TRUE, Address, Size, &Buffer);\r
       ShellPrintHiiEx (-1, -1, NULL, mShellMmAccessTypeStr[AccessType], gShellDebug1HiiHandle);\r
       ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_MM_ADDRESS), gShellDebug1HiiHandle, Address);\r
       ShellMmAccess (AccessType, PciRootBridgeIo, CpuIo, TRUE, Address, Size, &Buffer);\r
       ShellPrintHiiEx (-1, -1, NULL, mShellMmAccessTypeStr[AccessType], gShellDebug1HiiHandle);\r
       ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_MM_ADDRESS), gShellDebug1HiiHandle, Address);\r
index b6a133a45444e1306ff81cae3100cebce65d728e..011a7bfc2db66f74c51142a2b249ca561716228c 100644 (file)
 \r
 #string STR_MM_NOT_ALIGNED        #language en-US "%H%s%N: Address parameter %016LX is not aligned.\r\n"\r
 #string STR_MM_PCIE_ADDRESS_RANGE #language en-US "%H%s%N: Address parameter %016LX is not a valid PCI/PCIE address.\r\n"\r
 \r
 #string STR_MM_NOT_ALIGNED        #language en-US "%H%s%N: Address parameter %016LX is not aligned.\r\n"\r
 #string STR_MM_PCIE_ADDRESS_RANGE #language en-US "%H%s%N: Address parameter %016LX is not a valid PCI/PCIE address.\r\n"\r
-#string STR_MM_IO_ADDRESS_RANGE   #language en-US "%H%s%N: IO address out of range 0 - 0xFFFF\r\n"\r
 #string STR_MM_MMIO               #language en-US "%HMMIO%N"\r
 #string STR_MM_IO                 #language en-US "%HIO%N"\r
 #string STR_MM_PCI                #language en-US "%HPCI%N"\r
 #string STR_MM_MMIO               #language en-US "%HMMIO%N"\r
 #string STR_MM_IO                 #language en-US "%HIO%N"\r
 #string STR_MM_PCI                #language en-US "%HPCI%N"\r
 #string STR_MM_PCIE               #language en-US "%HPCIE%N"\r
 #string STR_MM_ADDRESS            #language en-US "  0x%016lx : "\r
 #string STR_MM_BUF                #language en-US "0x%0*lx"\r
 #string STR_MM_PCIE               #language en-US "%HPCIE%N"\r
 #string STR_MM_ADDRESS            #language en-US "  0x%016lx : "\r
 #string STR_MM_BUF                #language en-US "0x%0*lx"\r
-#string STR_MM_ADDRESS_RANGE2     #language en-US "%H%s%N: IO address out of range\r\n"\r
 #string STR_MM_ERROR              #language en-US "%H%s%N: Input had incorrect format\r\n"\r
 \r
 #string STR_SETVAR_PRINT          #language en-US "%g - %s - %04x Bytes\r\n"\r
 #string STR_MM_ERROR              #language en-US "%H%s%N: Input had incorrect format\r\n"\r
 \r
 #string STR_SETVAR_PRINT          #language en-US "%g - %s - %04x Bytes\r\n"\r