[edk2-devel] [edk2-platforms][PATCH V2 08/14] ManageabilityPkg: Add MCTP manageability header file
Nickle Wang via groups.io
nicklew=nvidia.com at groups.io
Thu Apr 20 06:56:13 UTC 2023
Reviewed-by: Nickle Wang <nicklew at nvidia.com>
Regards,
Nickle
> -----Original Message-----
> From: abner.chang at amd.com <abner.chang at amd.com>
> Sent: Tuesday, April 18, 2023 3:16 PM
> To: devel at edk2.groups.io
> Cc: Isaac Oram <isaac.w.oram at intel.com>; Abdul Lateef Attar
> <abdattar at amd.com>; Nickle Wang <nicklew at nvidia.com>; Igor Kulchytskyy
> <igork at ami.com>
> Subject: [edk2-platforms][PATCH V2 08/14] ManageabilityPkg: Add MCTP
> manageability header file
>
> External email: Use caution opening links or attachments
>
>
> From: Abner Chang <abner.chang at amd.com>
>
> Add C header file of MCTP manageability transport interface library.
>
> Signed-off-by: Abner Chang <abner.chang at amd.com>
> Cc: Isaac Oram <isaac.w.oram at intel.com>
> Cc: Abdul Lateef Attar <abdattar at amd.com>
> Cc: Nickle Wang <nicklew at nvidia.com>
> Cc: Igor Kulchytskyy <igork at ami.com>
> ---
> .../Library/ManageabilityTransportMctpLib.h | 54 +++++++++++++++++++
> 1 file changed, 54 insertions(+)
> create mode 100644
> Features/ManageabilityPkg/Include/Library/ManageabilityTransportMctpLib.h
>
> diff --git
> a/Features/ManageabilityPkg/Include/Library/ManageabilityTransportMctpLib.h
> b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportMctpLib.h
> new file mode 100644
> index 0000000000..43bd142f4c
> --- /dev/null
> +++ b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportMc
> +++ tpLib.h
> @@ -0,0 +1,54 @@
> +/** @file
> +
> + This file defines the manageability MCTP protocol specific transport data.
> +
> + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights
> +reserved.<BR>
> + SPDX-License-Identifier: BSD-2-Clause-Patent **/
> +
> +#ifndef MANAGEABILITY_TRANSPORT_MCTP_LIB_H_
> +#define MANAGEABILITY_TRANSPORT_MCTP_LIB_H_
> +
> +#include <Library/ManageabilityTransportLib.h>
> +
> +#define MCTP_KCS_HEADER_VERSION 0x01
> +
> +// According to SMBUS spec, the polynomial is:
> +// C(x) = X^8 + X^2 + X^1 + 1, which is 0x107, // just ignore bit8 in
> +definition.
> +#define MCTP_KCS_PACKET_ERROR_CODE_POLY 0x07
> +
> +///
> +/// The MCTP Message header which is apart from /// the payload.
> +///
> +
> +typedef struct {
> + UINT8 IntegrityCheck : 1; ///< Message integrity check.
> + UINT8 MessageType : 7; ///< Message type.
> +} MANAGEABILITY_MCTP_MESSAGE_HEADER;
> +
> +typedef struct {
> + UINT8 SourceEndpointId;
> + UINT8 DestinationEndpointId;
> + MANAGEABILITY_MCTP_MESSAGE_HEADER MessageHeader;
> +} MANAGEABILITY_MCTP_TRANSPORT_HEADER;
> +
> +typedef struct {
> + UINT8 NetFunc; ///< Message integrity check.
> + UINT8 DefiningBody; ///< Message type.
> + UINT8 ByteCount; ///< Byte count of payload.
> +} MANAGEABILITY_MCTP_KCS_HEADER;
> +#define MCTP_KCS_NETFN_LUN 0xb0
> +#define DEFINING_BODY_DMTF_PRE_OS_WORKING_GROUP 0x01
> +
> +// This is used to track the response message. This value // is not
> +defined by the specification.
> +#define MCTP_MESSAGE_TAG 0x1
> +
> +#define MCTP_MESSAGE_TAG_OWNER_REQUEST 0x01
> +#define MCTP_MESSAGE_TAG_OWNER_RESPONSE 0x01
> +
> +#define MCTP_PACKET_SEQUENCE_MASK 0x3
> +
> +#endif // MANAGEABILITY_TRANSPORT_MCTP_LIB_H_
> --
> 2.37.1.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103284): https://edk2.groups.io/g/devel/message/103284
Mute This Topic: https://groups.io/mt/98339120/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list