audk/MdePkg/Library/BaseIoLibIntrinsic
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
..
Ia32 MdePkg/BaseIoLibIntrinsic: fix SEV (=unrolled) variants of IoWriteFifoXX() 2017-09-11 22:28:05 +02:00
X64 MdePkg/BaseIoLibIntrinsic: fix SEV (=unrolled) variants of IoWriteFifoXX() 2017-09-11 22:28:05 +02:00
BaseIoLibIntrinsic.inf MdePkg: Expand BaseIoLibIntrinsic (IoLib class) library 2017-01-17 10:09:50 +08:00
BaseIoLibIntrinsic.uni MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BaseIoLibIntrinsicInternal.h Minor grammatical work--mostly adding periods. Items with ONLY period added did not have the heading date changed, but Items with content changes had heading copyright dates updated. Sending separately a list of files missing Doxygen @param and @return information. (PENDING) 2010-06-25 21:56:02 +00:00
BaseIoLibIntrinsicSev.inf MdePkg: BaseIoLibIntrinsic (IoLib class) library 2017-04-13 13:16:00 +08:00
IoHighLevel.c Add ASSERT() for BitField operations to make sure the input value is valid. 2012-12-25 02:25:50 +00:00
IoLib.c Minor grammatical work--mostly adding periods. Sending separately a list of files missing Doxygen @param and @return information. 2010-06-11 00:02:51 +00:00
IoLibArm.c MdePkg: Expand BaseIoLibIntrinsic (IoLib class) library 2017-01-17 10:09:50 +08:00
IoLibEbc.c MdePkg: Expand BaseIoLibIntrinsic (IoLib class) library 2017-01-17 10:09:50 +08:00
IoLibGcc.c Minor grammatical work--mostly adding periods. Sending separately a list of files missing Doxygen @param and @return information. 2010-06-11 00:02:51 +00:00
IoLibIcc.c Minor grammatical work--mostly adding periods. Sending separately a list of files missing Doxygen @param and @return information. 2010-06-11 00:02:51 +00:00
IoLibIpf.c MdePkg: Avoid Non-Boolean type used as Boolean 2017-01-20 15:40:59 +08:00
IoLibMmioBuffer.c Minor grammatical work--mostly adding periods. Items with ONLY period added did not have the heading date changed, but Items with content changes had heading copyright dates updated. Sending separately a list of files missing Doxygen @param and @return information. (PENDING) 2010-06-25 21:56:02 +00:00
IoLibMsc.c Minor grammatical work--mostly adding periods. Sending separately a list of files missing Doxygen @param and @return information. 2010-06-11 00:02:51 +00:00