From: "Chang, Abner" <abner.chang@amd.com>
To: <devel@edk2.groups.io>
Cc: Liming Gao <gaoliming@byosoft.com.cn>,
Isaac Oram <isaac.w.oram@intel.com>,
Nate DeSimone <nathaniel.l.desimone@intel.com>,
Nickle Wang <nicklew@nvidia.com>,
Igor Kulchytskyy <igork@ami.com>,
"Abdul Lateef Attar" <abdattar@amd.com>
Subject: [PATCH v4 4/9] ManageabilityPkg: Add NULL ManageabilityTransportLib
Date: Wed, 22 Mar 2023 10:48:35 +0800 [thread overview]
Message-ID: <20230322024840.1629-4-abner.chang@amd.com> (raw)
In-Reply-To: <20230322024840.1629-1-abner.chang@amd.com>
From: Abner Chang <abner.chang@amd.com>
The NULL instance of ManageabilityTransportLib
library.
Signed-off-by: Abner Chang <abner.chang@amd.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Cc: Abdul Lateef Attar <abdattar@amd.com>
---
.../ManageabilityPkg/ManageabilityPkg.dsc | 4 +-
.../BaseManageabilityTransportNull.inf | 28 ++++++++
.../BaseManageabilityTransportNull.c | 64 +++++++++++++++++++
.../BaseManageabilityTransportNull.uni | 13 ++++
4 files changed, 108 insertions(+), 1 deletion(-)
create mode 100644 Features/ManageabilityPkg/Library/BaseManageabilityTransportNullLib/BaseManageabilityTransportNull.inf
create mode 100644 Features/ManageabilityPkg/Library/BaseManageabilityTransportNullLib/BaseManageabilityTransportNull.c
create mode 100644 Features/ManageabilityPkg/Library/BaseManageabilityTransportNullLib/BaseManageabilityTransportNull.uni
diff --git a/Features/ManageabilityPkg/ManageabilityPkg.dsc b/Features/ManageabilityPkg/ManageabilityPkg.dsc
index b3586afa07..f5b8c550e8 100644
--- a/Features/ManageabilityPkg/ManageabilityPkg.dsc
+++ b/Features/ManageabilityPkg/ManageabilityPkg.dsc
@@ -35,5 +35,7 @@
!include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
!include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
-!include Include/Dsc/Manageability.dsc
+[LibraryClasses]
+ ManageabilityTransportLib|ManageabilityPkg/Library/BaseManageabilityTransportNullLib/BaseManageabilityTransportNull.inf
+!include Include/Dsc/Manageability.dsc
diff --git a/Features/ManageabilityPkg/Library/BaseManageabilityTransportNullLib/BaseManageabilityTransportNull.inf b/Features/ManageabilityPkg/Library/BaseManageabilityTransportNullLib/BaseManageabilityTransportNull.inf
new file mode 100644
index 0000000000..3cb97afb8b
--- /dev/null
+++ b/Features/ManageabilityPkg/Library/BaseManageabilityTransportNullLib/BaseManageabilityTransportNull.inf
@@ -0,0 +1,28 @@
+## @file
+# Null instance of Manageability Transport Library
+#
+# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+ INF_VERSION = 0x0001001B
+ BASE_NAME = BaseManageabilityTransportNull
+ MODULE_UNI_FILE = BaseManageabilityTransportNull.uni
+ FILE_GUID = B63DC070-FB44-44F3-8E9A-DA6CC712EF4F
+ MODULE_TYPE = BASE
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = ManageabilityTransportLib
+
+#
+# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64
+#
+
+[Sources]
+ BaseManageabilityTransportNull.c
+
+[Packages]
+ ManageabilityPkg/ManageabilityPkg.dec
+ MdePkg/MdePkg.dec
+
diff --git a/Features/ManageabilityPkg/Library/BaseManageabilityTransportNullLib/BaseManageabilityTransportNull.c b/Features/ManageabilityPkg/Library/BaseManageabilityTransportNullLib/BaseManageabilityTransportNull.c
new file mode 100644
index 0000000000..49fc8c0f71
--- /dev/null
+++ b/Features/ManageabilityPkg/Library/BaseManageabilityTransportNullLib/BaseManageabilityTransportNull.c
@@ -0,0 +1,64 @@
+/** @file
+ Null instance of Manageability Transport Library
+
+ Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#include <Uefi.h>
+#include <Library/ManageabilityTransportLib.h>
+
+/**
+ This function acquires to create a transport session to transmit manageability
+ packet. A transport token is returned to caller for the follow up operations.
+
+ @param [in] ManageabilityProtocolSpec The protocol spec the transport interface is acquired.
+ @param [out] TransportToken The pointer to receive the transport token created by
+ the target transport interface library.
+ @retval EFI_SUCCESS Token is created successfully.
+ @retval EFI_OUT_OF_RESOURCES Out of resource to create a new transport session.
+ @retval EFI_UNSUPPORTED Protocol is not supported on this transport interface.
+ @retval Otherwise Other errors.
+
+**/
+EFI_STATUS
+AcquireTransportSession (
+ IN EFI_GUID *ManageabilityProtocolSpec,
+ OUT MANAGEABILITY_TRANSPORT_TOKEN **TransportToken
+ )
+{
+ return EFI_UNSUPPORTED;
+}
+
+/**
+ This function returns the transport capabilities.
+
+ @param [out] TransportFeature Pointer to receive transport capabilities.
+ See the definitions of
+ MANAGEABILITY_TRANSPORT_CAPABILITY.
+
+**/
+VOID
+GetTransportCapability (
+ OUT MANAGEABILITY_TRANSPORT_CAPABILITY *TransportCapability
+ )
+{
+ *TransportCapability = 0;
+}
+
+/**
+ This function releases the manageability session.
+
+ @param [in] TransportToken The transport token acquired through
+ AcquireTransportSession.
+ @retval EFI_SUCCESS Token is released successfully.
+ Otherwise Other errors.
+
+**/
+EFI_STATUS
+ReleaseTransportSession (
+ IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken
+ )
+{
+ return EFI_SUCCESS;
+}
diff --git a/Features/ManageabilityPkg/Library/BaseManageabilityTransportNullLib/BaseManageabilityTransportNull.uni b/Features/ManageabilityPkg/Library/BaseManageabilityTransportNullLib/BaseManageabilityTransportNull.uni
new file mode 100644
index 0000000000..2211037072
--- /dev/null
+++ b/Features/ManageabilityPkg/Library/BaseManageabilityTransportNullLib/BaseManageabilityTransportNull.uni
@@ -0,0 +1,13 @@
+// /** @file
+// Null instance of Manageability Transport Library
+//
+// Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
+//
+// SPDX-License-Identifier: BSD-2-Clause-Patent
+//
+// **/
+
+#string STR_MODULE_ABSTRACT #language en-US "Null instance of Manageability Transport Library"
+
+#string STR_MODULE_DESCRIPTION #language en-US "Manageability Transport library implementation for build ManageabilityPkg only."
+
--
2.37.1.windows.1
next prev parent reply other threads:[~2023-03-22 2:49 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-22 2:48 [PATCH v4 1/9] ManageabilityPkg: Add Readme file Chang, Abner
2023-03-22 2:48 ` [PATCH v4 2/9] ManageabilityPkg: Initial package Chang, Abner
2023-03-23 18:02 ` [edk2-devel] " Isaac Oram
2023-03-28 12:37 ` Tinh Nguyen
2023-03-29 1:32 ` Chang, Abner
2023-03-30 8:52 ` Tinh Nguyen
2023-03-22 2:48 ` [PATCH v4 3/9] ManageabilityPkg: Add ManageabilityTransportLib header file Chang, Abner
2023-03-24 9:18 ` Nickle Wang
2023-03-24 11:18 ` Attar, AbdulLateef (Abdul Lateef)
2023-03-22 2:48 ` Chang, Abner [this message]
2023-03-24 9:19 ` [PATCH v4 4/9] ManageabilityPkg: Add NULL ManageabilityTransportLib Nickle Wang
2023-03-22 2:48 ` [PATCH v4 5/9] ManageabilityPkg: Add ManageabilityTransportHelperLib Chang, Abner
2023-03-23 18:30 ` [edk2-devel] " Tinh Nguyen
2023-04-15 6:12 ` Chang, Abner
2023-03-24 9:20 ` Nickle Wang
2023-03-22 2:48 ` [PATCH v4 6/9] ManageabilityPkg/ManageabilityTransportKcsLib Chang, Abner
2023-03-24 9:23 ` Nickle Wang
2023-03-22 2:48 ` [PATCH v4 7/9] ManageabilityPkg: Implement Ipmi Protocol/Ppi Chang, Abner
2023-03-23 19:40 ` [edk2-devel] " Tinh Nguyen
2023-04-15 8:38 ` Chang, Abner
2023-04-15 12:07 ` Chang, Abner
2023-03-24 9:25 ` Nickle Wang
2023-03-22 2:48 ` [PATCH v4 8/9] ManageabilityPkg: Add IpmiProtocol to Manageability Package Chang, Abner
2023-03-28 12:22 ` [edk2-devel] " Tinh Nguyen
2023-04-15 3:38 ` Chang, Abner
2023-03-22 2:48 ` [PATCH v4 9/9] edk2-platforms: Maintainers.txt Chang, Abner
2023-03-23 14:45 ` Leif Lindholm
2023-03-23 17:37 ` Isaac Oram
2023-03-24 3:06 ` Attar, AbdulLateef (Abdul Lateef)
2023-03-23 17:55 ` [edk2-devel] [PATCH v4 1/9] ManageabilityPkg: Add Readme file Isaac Oram
2023-03-24 9:17 ` Attar, AbdulLateef (Abdul Lateef)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230322024840.1629-4-abner.chang@amd.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox