public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: "Carsey, Jaben" <jaben.carsey@intel.com>
Cc: "Ni, Ruiyu" <ruiyu.ni@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH] ShellPkg/hexeditor: Use CpuIo for memory access
Date: Fri, 3 Nov 2017 09:54:53 +0000	[thread overview]
Message-ID: <CAKv+Gu8g=zMMzrrm3qpJFS9ydkrrzhC0Yq9_EqagFhvO+n_abg@mail.gmail.com> (raw)
In-Reply-To: <CB6E33457884FA40993F35157061515C7531C1CC@FMSMSX103.amr.corp.intel.com>

On 1 November 2017 at 18:15, Carsey, Jaben <jaben.carsey@intel.com> wrote:
> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
>
>> -----Original Message-----
>> From: Ni, Ruiyu
>> Sent: Wednesday, November 01, 2017 3:13 AM
>> To: edk2-devel@lists.01.org
>> Cc: Carsey, Jaben <jaben.carsey@intel.com>
>> Subject: [PATCH] ShellPkg/hexeditor: Use CpuIo for memory access
>> Importance: High
>>
>> The original code uses PciRootBridgeIo for memory access.
>> It worked before MdeModulePkg/PciHostBridgeDxe driver was checked in.
>> But MdeModulePkg/PciHostBridgeDxe adds checks to ensure the MMIO
>> access request is in the scope of the current RootBridgeIo instance.
>> It causes "hexeditor -m 0 2" reports error because memory address 0
>> surely is not in the scope of any RootBridgeIo instance.
>> In fact only accessing the MMIO space occupied by the RootBridgeIo
>> can work.
>>
>> The patch changes hexeditor to use CpuIo for memory access.
>>


This patch breaks the build on Clang.

ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MemImage.c>:142:35:
error: implicit conversion from enumeration type
'EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH' to different enumeration type
'EFI_CPU_IO_PROTOCOL_WIDTH' [-Werror,-Wenum-conversion]
                                  EfiPciWidthUint8,
                                  ^~~~~~~~~~~~~~~~
ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MemImage.c>:265:35:
error: implicit conversion from enumeration type
'EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH' to different enumeration type
'EFI_CPU_IO_PROTOCOL_WIDTH' [-Werror,-Wenum-conversion]
                                  EfiPciWidthUint8,
                                  ^~~~~~~~~~~~~~~~
2 errors generated.


      reply	other threads:[~2017-11-03  9:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-01 10:13 [PATCH] ShellPkg/hexeditor: Use CpuIo for memory access Ruiyu Ni
2017-11-01 18:15 ` Carsey, Jaben
2017-11-03  9:54   ` Ard Biesheuvel [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='CAKv+Gu8g=zMMzrrm3qpJFS9ydkrrzhC0Yq9_EqagFhvO+n_abg@mail.gmail.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