audk/MdePkg
Laszlo Ersek 98a4d04e8f MdePkg/BaseIoLibIntrinsic: fix SEV (=unrolled) variants of IoWriteFifoXX()
In commit b6d11d7c46 ("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: b6d11d7c46
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>
2017-09-11 22:28:05 +02:00
..
Include MdePkg: Add UDF volume structure definitions 2017-09-08 20:42:22 +02:00
Library MdePkg/BaseIoLibIntrinsic: fix SEV (=unrolled) variants of IoWriteFifoXX() 2017-09-11 22:28:05 +02:00
MdePkg.dec MdePkg: Add new definitions for Management Mode. 2017-08-29 09:37:36 +08:00
MdePkg.dsc MdePkg/S3PciSegmentLib: Add S3PciSegmentLib class and instance. 2017-08-28 16:47:05 +08:00
MdePkg.uni MdePkg/MdePkg.uni: Add description for PcdUartDefaultReceiveFifoDepth 2016-04-05 14:09:32 +08:00
MdePkgExtra.uni MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00