audk/OvmfPkg/Library/XenConsoleSerialPortLib
Ard Biesheuvel c6d2972645 OvmfPkg: XenConsoleSerialPortLib: deal with output overflow
It is the responsibility of the SerialPortLib implementation
to deal with flow control if the underlying medium cannot keep
up with the inflow of data.

So in our SerialPortWrite () function, we should spin as long
as we need to in order to deliver all the data instead of giving
up and returning a smaller value than the number of bytes we were
given. Also, remove the 'if (Sent > 0)' condition on the signalling
of the event channel: if the buffer is full and we haven't been able
to add any more data, it makes perfect sense to signal the event
channel again, even if we have done so before when we did write
the data.

Also, this patch brings the implementation of XenSerialPortLib
in sync with the library class documentation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
[lersek@redhat.com: replace DebugLib dependency with open-coded ASSERT()]

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17079 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-27 21:25:16 +00:00
..
XenConsoleSerialPortLib.c OvmfPkg: XenConsoleSerialPortLib: deal with output overflow 2015-03-27 21:25:16 +00:00
XenConsoleSerialPortLib.inf Ovmf/Xen: add Xen PV console SerialPortLib driver 2015-02-28 20:33:45 +00:00