From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web11.24941.1678467917638255984 for ; Fri, 10 Mar 2023 09:05:17 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=V5mxZ/JN; spf=pass (domain: intel.com, ip: 192.55.52.88, 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=1678467917; x=1710003917; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=tcnWFu2fRDDKYJIbG1ocjc0WMVlbu8J0z5t0MBiiZhE=; b=V5mxZ/JN4qbkZSzW5/LBbzn8vFjDQkdzKSqXbpJOPWt57ExYasd+oR7x O7t1l0CyV+UuN05qsjv1q8oJeY++o2e9uiEwuyJnZq2wNh9yRE4gIYC3n 8wwh+OdgTFiZjeE3X3tVcNTz8vkvszhM01KJSByZ/dW9Xfrb6zUE8Mi3K FwG9T4YRzXUhI1YA9EJN0AhzeCDUSB2YtpFYvVEdf7C5SUWXv2PjRmJL3 C798D/PpKpG8kzyxSV0NVnTMMKPue9SdGV+qhBPaps4wGhJm7+iTsAVZU qUFKc9w/rfIK5kEahAoQmQdx+Onxn/VWwjFdbH82PZ5nYZelDdhozTRtJ g==; X-IronPort-AV: E=McAfee;i="6500,9779,10645"; a="364432090" X-IronPort-AV: E=Sophos;i="5.98,250,1673942400"; d="scan'208";a="364432090" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2023 09:05:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10645"; a="821132842" X-IronPort-AV: E=Sophos;i="5.98,250,1673942400"; d="scan'208";a="821132842" Received: from awarkent-mobl1.amr.corp.intel.com ([10.212.10.237]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2023 09:05:05 -0800 From: "Andrei Warkentin" To: devel@edk2.groups.io Cc: Andrei Warkentin Subject: [PATCH v5 0/3] RISC-V SBI-backed SerialLib Date: Fri, 10 Mar 2023 11:04:53 -0600 Message-Id: <20230310170456.5230-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 Compared to v4: (not sent out). CC MdePkg maintainers, fix copyright date in SecMain.c. Comapred 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/PrePiDxeRiscVSerialPortLibSbi/PrePiDxeRiscVSerialPortLibSbi.inf | 36 +++ MdePkg/Library/SecPeiRiscVSerialPortLibSbi/SecPeiRiscVSerialPortLibSbi.inf | 39 +++ 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/PrePiDxeRiscVSerialPortLibSbi/PrePiDxeRiscVSerialPortLibSbi.c | 288 ++++++++++++++++++++ MdePkg/Library/SecPeiRiscVSerialPortLibSbi/SecPeiRiscVSerialPortLibSbi.c | 233 ++++++++++++++++ OvmfPkg/RiscVVirt/Sec/SecMain.c | 4 +- MdePkg/Library/PrePiDxeRiscVSerialPortLibSbi/PrePiDxeRiscVSerialPortLibSbi.uni | 16 ++ MdePkg/Library/SecPeiRiscVSerialPortLibSbi/SecPeiRiscVSerialPortLibSbi.uni | 16 ++ 12 files changed, 673 insertions(+), 6 deletions(-) create mode 100644 MdePkg/Library/PrePiDxeRiscVSerialPortLibSbi/PrePiDxeRiscVSerialPortLibSbi.inf create mode 100644 MdePkg/Library/SecPeiRiscVSerialPortLibSbi/SecPeiRiscVSerialPortLibSbi.inf create mode 100644 MdePkg/Library/PrePiDxeRiscVSerialPortLibSbi/PrePiDxeRiscVSerialPortLibSbi.c create mode 100644 MdePkg/Library/SecPeiRiscVSerialPortLibSbi/SecPeiRiscVSerialPortLibSbi.c create mode 100644 MdePkg/Library/PrePiDxeRiscVSerialPortLibSbi/PrePiDxeRiscVSerialPortLibSbi.uni create mode 100644 MdePkg/Library/SecPeiRiscVSerialPortLibSbi/SecPeiRiscVSerialPortLibSbi.uni -- 2.25.1