From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web10.107004.1680626644810205254 for ; Tue, 04 Apr 2023 09:44:05 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=mzAtIWxp; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: andrei.warkentin@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680626644; x=1712162644; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=wuEefqkU5ScZifrAErufDcnqW36kVntl0YshmiiwVXM=; b=mzAtIWxpH6f9UR7F06EdjiEHKkObybgWZIwE/L7G569y7ufVCReyz7QV IOPKEqJPsBQZnc6qdouUic5iGVpPjqojaOfpfFX6nd37VPRNLirnx3R2P w00zzt22jempjnqXAJI2eft3pbsbXmgenhYi/yt35foeQ2QiB3Risbxdd EjciPH1i+6my9y9ESOPbYpzYuy/znzSVyapCqgWZ4q2UKXEAYUbXfANN0 wORAyYiw9cMSzVg5KTJwWq9/2adxzjCcbz5ZSiHMNPMokh8OXacc69/X1 rdyT0aYUuijTVwUuMJszIgNbi8znjf06UuuBlnAcBGTgfVOxw7/2I7lg4 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10670"; a="428527749" X-IronPort-AV: E=Sophos;i="5.98,318,1673942400"; d="scan'208";a="428527749" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Apr 2023 09:44:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10670"; a="750987334" X-IronPort-AV: E=Sophos;i="5.98,318,1673942400"; d="scan'208";a="750987334" Received: from awarkent-mobl1.amr.corp.intel.com ([10.212.50.115]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Apr 2023 09:44:04 -0700 From: "Andrei Warkentin" To: devel@edk2.groups.io Cc: Andrei Warkentin Subject: [PATCH v6 0/3] RISC-V SBI-backed SerialLib Date: Tue, 4 Apr 2023 11:43:56 -0500 Message-Id: <20230404164359.25852-1-andrei.warkentin@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hello, Here are three patches that provide a SerialLib backed by SBI console. Both legacy and DBCN mechanisms are supported in various execution environments and have been tested with UART and HTIF consoles. MdePkg reviewers: please review MdePkg.dsc changes. This is also available at https://github.com/andreiw/edk2-rv-wip/tree/patchset-2 A CI run is at https://github.com/tianocore/edk2/pull/4225 Compared to v5: Rename components as per Michael Kinney's suggestions. Compared to v4: (not sent out). CC MdePkg maintainers, fix copyright date in SecMain.c. Compared to v3 EccCheck fixes. Add MdePkg infs to DSC. Compared to v2: - Probes legacy extension as well. - Encode supported module types in the INF file. This is done using LIBRARY_CLASS, as MODULE_TYPE cannot encode multiple types, so MODULE_TYPE is retained as BASE. - Update INF version and generate brand new GUIDs instead of editing them. - Checked that all patches retain ^M endings. Andrei Warkentin (3): MdePkg: BaseRiscVSbiLib: make more useful to consumers MdePkg: add SBI-based SerialPortLib for RISC-V OvmfPkg: RiscVVirt: Add missing SerialPortInitialize to Sec MdePkg/MdePkg.dsc | 2 + MdePkg/Library/BaseSerialPortLibRiscVSbiLib/BaseSerialPortLibRiscVSbiLib.inf | 39 +++ MdePkg/Library/BaseSerialPortLibRiscVSbiLibRam/BaseSerialPortLibRiscVSbiLibRam.inf | 36 +++ OvmfPkg/RiscVVirt/Sec/SecMain.inf | 1 + MdePkg/Include/Library/BaseRiscVSbiLib.h | 40 ++- OvmfPkg/RiscVVirt/Sec/SecMain.h | 1 + MdePkg/Library/BaseRiscVSbiLib/BaseRiscVSbiLib.c | 3 +- MdePkg/Library/BaseSerialPortLibRiscVSbiLib/BaseSerialPortLibRiscVSbiLib.c | 233 ++++++++++++++++ MdePkg/Library/BaseSerialPortLibRiscVSbiLibRam/BaseSerialPortLibRiscVSbiLibRam.c | 288 ++++++++++++++++++++ OvmfPkg/RiscVVirt/Sec/SecMain.c | 4 +- MdePkg/Library/BaseSerialPortLibRiscVSbiLib/BaseSerialPortLibRiscVSbiLib.uni | 16 ++ MdePkg/Library/BaseSerialPortLibRiscVSbiLibRam/BaseSerialPortLibRiscVSbiLibRam.uni | 16 ++ 12 files changed, 673 insertions(+), 6 deletions(-) create mode 100644 MdePkg/Library/BaseSerialPortLibRiscVSbiLib/BaseSerialPortLibRiscVSbiLib.inf create mode 100644 MdePkg/Library/BaseSerialPortLibRiscVSbiLibRam/BaseSerialPortLibRiscVSbiLibRam.inf create mode 100644 MdePkg/Library/BaseSerialPortLibRiscVSbiLib/BaseSerialPortLibRiscVSbiLib.c create mode 100644 MdePkg/Library/BaseSerialPortLibRiscVSbiLibRam/BaseSerialPortLibRiscVSbiLibRam.c create mode 100644 MdePkg/Library/BaseSerialPortLibRiscVSbiLib/BaseSerialPortLibRiscVSbiLib.uni create mode 100644 MdePkg/Library/BaseSerialPortLibRiscVSbiLibRam/BaseSerialPortLibRiscVSbiLibRam.uni -- 2.25.1