From nobody Tue Feb 10 16:18:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+103991+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+103991+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1683205928; cv=none; d=zohomail.com; s=zohoarc; b=D9nZ/sGrRTOMYCcYdfpX3Zm5rEHKyTsr0fTz/sq/9nlfOFe25fqF+AFc/7pOHDekilyh/1r9NxCcsHRCNyw9764EXjFCwWtOseOGJzSj0iqeywNGSh/i1LyOyDx3KQe8TrRWik3HnRCZpTU6EdBGWG0oHV/PxChvbEQd0ZfLAjY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683205928; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=FTZU1ESeyIrUvhf0kUa9PsLu5Eb9sCjvkm+PfNB8Io4=; b=PwyoGhNqf4nBJiMBqN7xPbhx/rQT6wRyV8cmSSBFt1eQKfC1NkDID/tjjyN/MNwY4LkkWG77UNfLoc1Fspm/DKn3ugkYE9Zf0vBaUYe9czMzB1cZWQUGvg5xpP98f6/s/JPdmF2lPKp8BUDMkaE4xALgerCZadoNglPMtrDMIbM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+103991+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1683205928964300.17046530023333; Thu, 4 May 2023 06:12:08 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id VMbCYY1788612x9NLIXM6XV8; Thu, 04 May 2023 06:12:08 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.49476.1683205927554591568 for ; Thu, 04 May 2023 06:12:07 -0700 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-241-2lBB16yLPHWppZOy-22ohQ-1; Thu, 04 May 2023 09:12:03 -0400 X-MC-Unique: 2lBB16yLPHWppZOy-22ohQ-1 X-Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 01BC285A588; Thu, 4 May 2023 13:12:03 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.48]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AF99F492C1B; Thu, 4 May 2023 13:12:02 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 25C1D180092D; Thu, 4 May 2023 15:12:01 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Oliver Steffen , Stefan Berger , Anthony Perard , Jiewen Yao , Julien Grall , Pawel Polawski , Jordan Justen , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann , Ard Biesheuvel Subject: [edk2-devel] [PATCH v2 1/4] OvmfPkg: add IndustryStandard/VirtioSerial.h Date: Thu, 4 May 2023 15:11:58 +0200 Message-Id: <20230504131201.1026585-2-kraxel@redhat.com> In-Reply-To: <20230504131201.1026585-1-kraxel@redhat.com> References: <20230504131201.1026585-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,kraxel@redhat.com X-Gm-Message-State: bMUTOgkopMhEpGJGvx7YgXoGx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1683205928; bh=fHcsu9IooSmoT2T0Mlwm3FKNoj3Gg5XjYJ1JLmmcMOg=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=sFROIFR1lGR/AiRCUZay4l/p/ZlKUE4B0QOIUbWdXf0hUJf0rYwSEw7jAOQy909qErj uP44Q3R6j9RP7sGoLTvZehc5JmCS/SFizPV/ViDDQGAo2X73tSy7feQjzahMnD42Ku1vh i4qk9hgzK3FBEv03fHQ3EGdPfc8jd+S5AR0= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1683205929247100002 Content-Type: text/plain; charset="utf-8"; x-default="true" Add header files with structs and defines for the virtio serial device. The virtio serial device also known as virtio console device because initially it had only support for a single tty, intended to be used as console. Support for multiple streams and named data ports has been added later on. https://docs.oasis-open.org/virtio/virtio/v1.2/cs01/virtio-v1.2-cs01.html#x= 1-2900003 Signed-off-by: Gerd Hoffmann --- .../Include/IndustryStandard/VirtioSerial.h | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 OvmfPkg/Include/IndustryStandard/VirtioSerial.h diff --git a/OvmfPkg/Include/IndustryStandard/VirtioSerial.h b/OvmfPkg/Incl= ude/IndustryStandard/VirtioSerial.h new file mode 100644 index 000000000000..ffc8f84d03cc --- /dev/null +++ b/OvmfPkg/Include/IndustryStandard/VirtioSerial.h @@ -0,0 +1,64 @@ +/** @file + Virtio Serial Device specific type and macro definitions. + + Copyright (C) 2013-2016, Red Hat, Inc. + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef _VIRTIO_SERIAL_H_ +#define _VIRTIO_SERIAL_H_ + +#include +#include + +// +// Device Configuration +// +typedef struct { + UINT16 Cols; + UINT16 Rows; + UINT32 MaxPorts; + UINT32 EmergWrite; +} VIRTIO_SERIAL_CONFIG; + +// +// Control Queue +// +typedef struct { + UINT32 Id; + UINT16 Event; + UINT16 Value; +} VIRTIO_SERIAL_CONTROL; + +// +// Queue Identifiers +// +#define VIRTIO_SERIAL_Q_RX_PORT0 0 +#define VIRTIO_SERIAL_Q_TX_PORT0 1 +#define VIRTIO_SERIAL_Q_RX_CTRL 2 +#define VIRTIO_SERIAL_Q_TX_CTRL 3 +#define VIRTIO_SERIAL_Q_RX_BASE 4 +#define VIRTIO_SERIAL_Q_TX_BASE 5 + +// +// Feature Bits +// +#define VIRTIO_SERIAL_F_SIZE BIT0 +#define VIRTIO_SERIAL_F_MULTIPORT BIT1 +#define VIRTIO_SERIAL_F_EMERG_WRITE BIT2 + +// +// Events +// +#define VIRTIO_SERIAL_DEVICE_READY 0 +#define VIRTIO_SERIAL_DEVICE_ADD 1 +#define VIRTIO_SERIAL_DEVICE_REMOVE 2 +#define VIRTIO_SERIAL_PORT_READY 3 +#define VIRTIO_SERIAL_CONSOLE_PORT 4 +#define VIRTIO_SERIAL_RESIZE 5 +#define VIRTIO_SERIAL_PORT_OPEN 6 +#define VIRTIO_SERIAL_PORT_NAME 7 + +#endif /* _VIRTIO_SERIAL_H_ */ --=20 2.40.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#103991): https://edk2.groups.io/g/devel/message/103991 Mute This Topic: https://groups.io/mt/98683331/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-