public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Brijesh Singh <brijesh.singh@amd.com>
To: Laszlo Ersek <lersek@redhat.com>,
	edk2-devel-01 <edk2-devel@lists.01.org>
Cc: brijesh.singh@amd.com, Jordan Justen <jordan.l.justen@intel.com>,
	Liming Gao <liming.gao@intel.com>,
	Michael D Kinney <michael.d.kinney@intel.com>
Subject: Re: [PATCH 1/2] MdePkg/BaseIoLibIntrinsic: fix SEV (=unrolled) variants of IoWriteFifoXX()
Date: Tue, 5 Sep 2017 09:32:20 -0500	[thread overview]
Message-ID: <7d26a5ee-5ec7-a9fa-de65-60a47cc626d3@amd.com> (raw)
In-Reply-To: <20170904155717.31591-2-lersek@redhat.com>



On 09/04/2017 10:57 AM, Laszlo Ersek wrote:
> In commit b6d11d7c4678 ("MdePkg: BaseIoLibIntrinsic (IoLib class)
> library", 2017-04-12), the MOV instructions in the write loops were
> probably copied from the read loops. However, the operand order was not
> adjusted.
> 
> As a result, the IoWriteFifoXX() routines, when invoked in SEV guests, now
> overwrite the source buffer with value 0x01 / 0x0001 / 0x00000001 -- the
> SevNoRepIo() function returns value 1 in EAX, in SEV guests --, and write
> the same value to the target IO port.
> 
> Fix this by putting the target operand (AL / AX / EAX) first, and the
> source operand (BYTE / WORD / DWORD [ESI/RSI]) second.
> 
> Cc: Brijesh Singh <brijesh.singh@amd.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Fixes: b6d11d7c467810ea7f2e2eda46ef0bdc57bf1475
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>


Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>


  parent reply	other threads:[~2017-09-05 14:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-04 15:57 [PATCH 0/2] MdePkg, OvmfPkg: fix IoWriteFifo8(), and print debug messages with it Laszlo Ersek
2017-09-04 15:57 ` [PATCH 1/2] MdePkg/BaseIoLibIntrinsic: fix SEV (=unrolled) variants of IoWriteFifoXX() Laszlo Ersek
2017-09-05  1:40   ` Gao, Liming
2017-09-05 14:32   ` Brijesh Singh [this message]
2017-09-04 15:57 ` [PATCH 2/2] OvmfPkg/PlatformDebugLibIoPort: write messages with IoWriteFifo8() Laszlo Ersek
2017-09-05 14:33   ` Brijesh Singh
2017-09-11 20:30 ` [PATCH 0/2] MdePkg, OvmfPkg: fix IoWriteFifo8(), and print debug messages with it Laszlo Ersek

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=7d26a5ee-5ec7-a9fa-de65-60a47cc626d3@amd.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