From 2ab130462062bfcd66d3047eaa6947a151296a21 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 12 May 2023 16:23:06 +0200 Subject: [PATCH 05/12] OvmfPkg/VirtioSerialDxe: use TPL_NOTIFY RH-Author: Gerd Hoffmann RH-MergeRequest: 39: ArmVirt: add VirtioSerialDxe to ArmVirtQemu builds RH-Jira: RHEL-643 RH-Acked-by: Laszlo Ersek RH-Commit: [5/6] 08998538804a8d62903e44e716bcafd9674d208f (kraxel/centos-edk2) Apparently TPL_CALLBACK is too low, code runs into an ASSERT complaining the new TPL is lower than the old TPL. Signed-off-by: Gerd Hoffmann (cherry picked from commit 4e5a804222415ec7b2bec90ea0300b8a9f60f131) --- OvmfPkg/VirtioSerialDxe/VirtioSerialPort.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/VirtioSerialDxe/VirtioSerialPort.c b/OvmfPkg/VirtioSerialDxe/VirtioSerialPort.c index 522b25e969..e4a58deff1 100644 --- a/OvmfPkg/VirtioSerialDxe/VirtioSerialPort.c +++ b/OvmfPkg/VirtioSerialDxe/VirtioSerialPort.c @@ -158,7 +158,7 @@ VirtioSerialIoWrite ( VirtioSerialRingClearTx (SerialIo->Dev, PortTx (SerialIo->PortId)); - OldTpl = gBS->RaiseTPL (TPL_CALLBACK); + OldTpl = gBS->RaiseTPL (TPL_NOTIFY); if (SerialIo->WriteOffset && (SerialIo->WriteOffset + *BufferSize > PORT_TX_BUFSIZE)) { @@ -201,7 +201,7 @@ VirtioSerialIoRead ( goto NoData; } - OldTpl = gBS->RaiseTPL (TPL_CALLBACK); + OldTpl = gBS->RaiseTPL (TPL_NOTIFY); if (SerialIo->WriteOffset) { DEBUG ((DEBUG_VERBOSE, "%a:%d: WriteFlush %d\n", __func__, __LINE__, SerialIo->WriteOffset)); VirtioSerialRingSendBuffer ( -- 2.39.3