X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ShellPkg%2FLibrary%2FUefiShellDebug1CommandsLib%2FMm.c;fp=ShellPkg%2FLibrary%2FUefiShellDebug1CommandsLib%2FMm.c;h=9f97f1d345f7e6df2609e434599970c86e132115;hb=0027921b1be4b41a766c982615b4ed5a4868d318;hp=6caf4481d60ef2b4b0c4417f4682caba6a78272b;hpb=d590cce5cd9b9d31848eda4fcb62d1ab3fd05dfd;p=mirror_edk2.git diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c index 6caf4481d6..9f97f1d345 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c @@ -2,7 +2,7 @@ Main file for Mm shell Debug1 function. (C) Copyright 2015 Hewlett-Packard Development Company, L.P.
- Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -58,10 +58,10 @@ CONST EFI_CPU_IO_PROTOCOL_WIDTH mShellMmCpuIoWidth[] = { /** Extract the PCI segment, bus, device, function, register from - from a SHELL_MM_PCI or SHELL_MM_PCIE format of address.. + from a PCI or PCIE format of address.. @param[in] PciFormat Whether the address is of PCI format of PCIE format. - @param[in] Address SHELL_MM_PCI or SHELL_MM_PCIE address. + @param[in] Address PCI or PCIE address. @param[out] Segment PCI segment number. @param[out] Bus PCI bus number. @param[out] Device PCI device number. @@ -81,10 +81,10 @@ ShellMmDecodePciAddress ( { if (PciFormat) { // - // PCI Configuration Space.The address will have the format 0x000000ssbbddffrr, - // where ss = Segment, bb = Bus, dd = Device, ff = Function and rr = Register. + // PCI Configuration Space.The address will have the format ssssbbddffrr, + // where ssss = Segment, bb = Bus, dd = Device, ff = Function and rr = Register. // - *Segment = (UINT32) (RShiftU64 (Address, 32) & 0xFF); + *Segment = (UINT32) (RShiftU64 (Address, 32) & 0xFFFF); *Bus = (UINT8) (((UINT32) Address) >> 24); if (Device != NULL) { @@ -98,10 +98,10 @@ ShellMmDecodePciAddress ( } } else { // - // PCI Express Configuration Space.The address will have the format 0x0000000ssbbddffrrr, - // where ss = Segment, bb = Bus, dd = Device, ff = Function and rrr = Register. + // PCI Express Configuration Space.The address will have the format ssssssbbddffrrr, + // where ssss = Segment, bb = Bus, dd = Device, ff = Function and rrr = Register. // - *Segment = (UINT32) (RShiftU64 (Address, 36) & 0xFF); + *Segment = (UINT32) (RShiftU64 (Address, 36) & 0xFFFF); *Bus = (UINT8) RShiftU64 (Address, 28); if (Device != NULL) { *Device = (UINT8) (((UINT32) Address) >> 20);