public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Carsey, Jaben" <jaben.carsey@intel.com>
To: "Ni, Ruiyu" <ruiyu.ni@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Carsey, Jaben" <jaben.carsey@intel.com>
Subject: Re: [PATCH] ShellPkg/mm: Support UINT16 segment number
Date: Thu, 23 Mar 2017 15:06:13 +0000	[thread overview]
Message-ID: <CB6E33457884FA40993F35157061515C54BC40EF@FMSMSX103.amr.corp.intel.com> (raw)
In-Reply-To: <20170323052922.59684-1-ruiyu.ni@intel.com>

Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

> -----Original Message-----
> From: Ni, Ruiyu
> Sent: Wednesday, March 22, 2017 10:29 PM
> To: edk2-devel@lists.01.org
> Cc: Carsey, Jaben <jaben.carsey@intel.com>
> Subject: [PATCH] ShellPkg/mm: Support UINT16 segment number
> Importance: High
> 
> It's to follow the Shell 2.2 spec.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Jaben Carsey <jaben.carsey@intel.com>
> ---
>  ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c   | 18 +++++++++-----
> ----
>  .../UefiShellDebug1CommandsLib.uni                 | 22 +++++++++++-----------
>  2 files changed, 20 insertions(+), 20 deletions(-)
> 
> diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c
> index 6caf448..9f97f1d 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.<BR>
> -  Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
>    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);
> diff --git
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman
> dsLib.uni
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman
> dsLib.uni
> index 2d5d16f..6c02abe 100644
> ---
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman
> dsLib.uni
> +++
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Comman
> dsLib.uni
> @@ -614,21 +614,21 @@
>  "MM Address [Value] [-w 1|2|4|8] [-MEM | -MMIO | -IO | -PCI | -PCIE] [-
> n]\r\n"
>  ".SH OPTIONS\r\n"
>  " \r\n"
> -"  Address - Specifies a starting address.\r\n"
> -"  Value   - Specifies the value to write.\r\n"
> +"  Address - Starting address in hexadecimal format.\r\n"
> +"  Value   - The value to write in hexadecimal format.\r\n"
>  "  -MEM    - Memory Address type\r\n"
>  "  -MMIO   - Memory Mapped IO Address type\r\n"
>  "  -IO     - IO Address type\r\n"
>  "  -PCI    - PCI Configuration Space Address type:\r\n"
> -"            Address format: 0x000000ssbbddffrr\r\n"
> -"              ss   - Segment\r\n"
> +"            Address format: ssssbbddffrr\r\n"
> +"              ssss - Segment\r\n"
>  "              bb   - Bus\r\n"
>  "              dd   - Device\r\n"
>  "              ff   - Function\r\n"
>  "              rr   - Register\r\n"
>  "  -PCIE   - PCIE Configuration Space Address type:\r\n"
> -"            Address format: 0x00000ssbbddffrrr\r\n"
> -"              ss   - Segment\r\n"
> +"            Address format: ssssbbddffrrr\r\n"
> +"              ssss - Segment\r\n"
>  "              bb   - Bus\r\n"
>  "              dd   - Device\r\n"
>  "              ff   - Function\r\n"
> @@ -653,7 +653,7 @@
>  "      follow the PCI Configuration Space Address format above. The 'PCI'\r\n"
>  "      command can be used to determine the address for a specified
> device.\r\n"
>  "      It is listed in the PCI configuration space dump information in the\r\n"
> -"      following format: "[EFI 0x000000ssbbddffxx]".\r\n"
> +"      following format: "[EFI ssbbddffxx]".\r\n"
>  "  5.  If the PCIE address type is specified, the 'Address' parameter must\r\n"
>  "      follow the PCIE Configuration Space Address format above.\r\n"
>  "  6.  In interactive mode, type a hex value to modify, 'q' or '.' to exit.\r\n"
> @@ -709,8 +709,8 @@
>  "    IO  0x0000000000000086 : 0xFF >\r\n"
>  "    IO  0x0000000000000087 : 0x00 > q\r\n"
>  " \r\n"
> -"  * To display PCI configuration space, ss=00, bb=00, dd=00, ff=00,
> rr=00:\r\n"
> -"    Shell> mm 0000000000 -PCI\r\n"
> +"  * To display PCI configuration space, ss=0000, bb=00, dd=00, ff=00,
> rr=00:\r\n"
> +"    Shell> mm 000000000000 -PCI\r\n"
>  "    PCI  0x0000000000000000 : 0x86 >\r\n"
>  "    PCI  0x0000000000000001 : 0x80 >\r\n"
>  "    PCI  0x0000000000000002 : 0x30 >\r\n"
> @@ -719,8 +719,8 @@
>  "    PCI  0x0000000000000005 : 0x00 > q\r\n"
>  "    These contents can also be displayed by 'PCI 00 00 00'.\r\n"
>  " \r\n"
> -"  * To display PCIE configuration space, ss=00, bb=06, dd=00, ff=00,
> rrr=000:\r\n"
> -"    Shell> mm 00060000000 -PCIE\r\n"
> +"  * To display PCIE configuration space, ss=0000, bb=06, dd=00, ff=00,
> rrr=000:\r\n"
> +"    Shell> mm 0000060000000 -PCIE\r\n"
>  "    PCIE  0x0000000060000000 : 0xAB >\r\n"
>  "    PCIE  0x0000000060000001 : 0x11 >\r\n"
>  "    PCIE  0x0000000060000002 : 0x61 >\r\n"
> --
> 2.9.0.windows.1



      reply	other threads:[~2017-03-23 15:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-23  5:29 [PATCH] ShellPkg/mm: Support UINT16 segment number Ruiyu Ni
2017-03-23 15:06 ` Carsey, Jaben [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CB6E33457884FA40993F35157061515C54BC40EF@FMSMSX103.amr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox