From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web10.4870.1603953079862849849 for ; Wed, 28 Oct 2020 23:31:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=c+PJUHvx; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=057147ffc3=nickle.wang@hpe.com) Received: from pps.filterd (m0134425.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09T6PiWO014606 for ; Thu, 29 Oct 2020 06:31:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pps0720; bh=OZtc5SGzoK73Fz0Y5My/wFI6kIbK6M/sDhxULU85mV8=; b=c+PJUHvxfrj/Q3nVWFo1cKmHhUn6eMfkRJAVUz4LvVYp2aD+0oO4qUM4qrjQjte1+5W/ UDkZj10/3qJ8q0Lj+5lwcoZXHiQNcrT4MoG/E2hJdA73fF6oRqwQgCi/TmslejRPf874 eqbWmvboEszVkiXwGXanm8CRsaxdlBGC7KvOEqeB9eutHD9VEe7azm8VsJVGFLNTSGbd YMjZnQrwcN9tiKUehn0x9OPDfXXBp5LbJMcIszh2KuBdl8Lm9dgvWKWiBwbVFZFBuch5 esQimH61wgABGMLpqF/qdEuBXksjs8VVr8rRbjQmzBBadc5PpF0pPdCKyfo9K38LflTA pg== Received: from g4t3425.houston.hpe.com (g4t3425.houston.hpe.com [15.241.140.78]) by mx0b-002e3701.pphosted.com with ESMTP id 34exehv678-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 29 Oct 2020 06:31:19 +0000 Received: from G1W8106.americas.hpqcorp.net (g1w8106.austin.hp.com [16.193.72.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g4t3425.houston.hpe.com (Postfix) with ESMTPS id 6E3D19D for ; Thu, 29 Oct 2020 06:31:18 +0000 (UTC) Received: from G4W9330.americas.hpqcorp.net (16.208.32.116) by G1W8106.americas.hpqcorp.net (16.193.72.61) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 29 Oct 2020 06:31:02 +0000 Received: from G9W9210.americas.hpqcorp.net (2002:10dc:429b::10dc:429b) by G4W9330.americas.hpqcorp.net (2002:10d0:2074::10d0:2074) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 29 Oct 2020 06:31:02 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (15.241.52.11) by G9W9210.americas.hpqcorp.net (16.220.66.155) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Thu, 29 Oct 2020 06:31:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eKcV9ObTmG57gPp8ekujndXoPE1XAMXsmohaZw3DM6JntqT7SVNFHjY5uYS40Vvo8fP5My8SiLC8EptrIWbi7QtDUxpxlep9TGDoxrYomEq+4HOjBnPY3+kXls6GvOsWL+5TrTdrcHsLguZlrgR/++hWYcFLIp8EqQCpDocSWxTL6pqJwuc454e2ct+BFpIGohkuxdnLf7545RSygA6W1zUWcnB/mMOS7q+WYtrHM3SWiIf/Pvb1bCLmR70sas7te2V58Itw9tT77/uWqCOkOnIzLjiOa3stNEtAg+D8xSaew52zntSQTCzVQyAR1PD8AASPUjS6bRBPq+1dSu/3cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OZtc5SGzoK73Fz0Y5My/wFI6kIbK6M/sDhxULU85mV8=; b=Cc9P17nuGh9w+Kn3bH2AIT3VIs93/1gDkl+qaBI39/dROewylxxuri1nsv8Q8JMRSPqPKlkgAIIkbr8eatG8z1pcewrJl+fLuZbUojWG+Tbo7hqYTYKJ4aXWL7oBMe7jEuuMIxs7z2FMBjQUiokLXTq/DnQXg7xwVHQs7TRrTJyIZkofNmuDf3jKOnk68sz+BhknIiJf/PGHCAMalrGtHna6StO/zFTcKxP4+eVWF5Vjv/z5PoCscWJ1ZbdBncnJhUP/5FD60QHKpN2GUq9hGC/Jotr9QqkGqOIjmrGTmEJEuSCA78M8AmdhJZiHPTqaAQmBgNs+A4ckKCPxcV3ksg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Received: from DF4PR8401MB0812.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760d::7) by DF4PR8401MB0571.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7608::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.27; Thu, 29 Oct 2020 06:31:00 +0000 Received: from DF4PR8401MB0812.NAMPRD84.PROD.OUTLOOK.COM ([fe80::c9cf:9c73:a8a5:331b]) by DF4PR8401MB0812.NAMPRD84.PROD.OUTLOOK.COM ([fe80::c9cf:9c73:a8a5:331b%12]) with mapi id 15.20.3499.018; Thu, 29 Oct 2020 06:31:00 +0000 From: "Nickle Wang" To: "Chang, Abner (HPS SW/FW Technologist)" , "devel@edk2.groups.io" CC: Jiaxin Wu , Siyuan Fu , Fan Wang , Jiewen Yao Subject: Re: [EFI Redfish Host Interface PATCH 4/5] RedfishPkg/RedfishHostInterfaceDxe: Create SMBIOS type 42 record Thread-Topic: [EFI Redfish Host Interface PATCH 4/5] RedfishPkg/RedfishHostInterfaceDxe: Create SMBIOS type 42 record Thread-Index: AQHWoRyzd38hRw1/c0u0nZnpeR5ytamuN8+A Date: Thu, 29 Oct 2020 06:30:59 +0000 Message-ID: References: <20201013040805.20523-1-abner.chang@hpe.com> <20201013040805.20523-5-abner.chang@hpe.com> In-Reply-To: <20201013040805.20523-5-abner.chang@hpe.com> Accept-Language: zh-TW, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: hpe.com; dkim=none (message not signed) header.d=none;hpe.com; dmarc=none action=none header.from=hpe.com; x-originating-ip: [36.224.251.48] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 5b5f8c97-33d9-45ec-bf91-08d87bd43390 x-ms-traffictypediagnostic: DF4PR8401MB0571: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:97; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: awkT7f7d9ZvoWAvxhqfJ+1oPJb/lKdYQSbhMvHQHaw0mtVkAP6mgiqWL59ohoH9fr9NGEJa2zUoqty99vEoPQquCGl8MwJ943tI5/JclQB3KPO9wN6IZXubnsfUIGYYGqQLXOlZN1ctiXlzITXh8yhehrytGQ6KStFQ7FhCCRomy1fq1dh8yAGFnuhfLxyAGod9nef8Mpvy8qonQ4HZRUbK8eEawg52zBVM+e2KoWLpgzd6ObbcWfcx8OTWKWCbTmY/tEVPtp5+Tf8jE1ijBOZwDGBNei8B1KSBIIDixA94BvZy/D8U3IimjWFV1zzAnP/vUTW7p6O2m3/UmCFnj40hedRVAcXUPTshv/AI4p6ZPG8jvaCu67/mPDAx42fX/ x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DF4PR8401MB0812.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(396003)(136003)(346002)(376002)(366004)(39860400002)(52536014)(55016002)(30864003)(66556008)(186003)(9686003)(86362001)(5660300002)(54906003)(110136005)(8936002)(316002)(83380400001)(66446008)(478600001)(64756008)(8676002)(76116006)(19627235002)(66946007)(66476007)(26005)(33656002)(71200400001)(7696005)(2906002)(4326008)(53546011)(6506007)(44824005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: GH4Y8zP6PvROiAfrfvQOACo4lMYt6wdTR43cEtkjsUm2Knjh/rkBcRSwuLKvjbSDT3oONvX0XZqH9ngdIBDte+PrFRBdnXXAgmhPTsxSO3fvniEM53HUnBTlMyEKbGNTmM64eClIaqnUMInQEiMbh6DKjSQPsO7FGdDXk+e9fcbsHDSaxQ6BLrGMmM9wdvngwNbrdnMmAwdSMyIPbYvl6lFs+SY5b1OmAZHLDTmW4SvP5QGI/OPrx+ZqYvohnUC35bXXSVnRZSWTHezBAa2JT3dA5rOsznlliAP2aWk9c4ToGt7s5o+ZHmZnv6asvBGgQCFwH1DVoIoC9EXXco0qS/N9Ero8RSxhoQlY3FjSgHpO5fpfQr1S8ZdLvWkZT2IGGHmB1jYAUKt0wR7SVrEpzJ+0EEaRi16DYW4ojs8Mps+EEC7n0vtR+u3quWox87jl+nRdqyb1eMmQRzYaPpYCmbLbvLrTieyo1DA1RSrQ2WrbF+U0/tYyhwVFh0akuAgmpNZNOgPdGBYu1D+OCDHQTi44Y8QKSGrTgpf7F0q5HfHpUSiJATbzEeUCZHDasqpsQsjrZ0nhUIZlMHf4v4xZT+odWGPIJvHVpR7wDrxIrhkZYUZFphfu3gEXa1nt0VNRO62Aa5gxeYxi8yg49ZecVA== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DF4PR8401MB0812.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 5b5f8c97-33d9-45ec-bf91-08d87bd43390 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Oct 2020 06:31:00.0113 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 9dXtdmIsD8gGsVjMT5Q7A6c8881tUb7zEAXz98jSHNE1kcOVB07+0hZ+fdU5IkPQ7+ov6stQlU1dostEm6ARxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR8401MB0571 X-OriginatorOrg: hpe.com X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-10-29_01:2020-10-29,2020-10-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 lowpriorityscore=0 mlxscore=0 phishscore=0 malwarescore=0 bulkscore=0 spamscore=0 suspectscore=0 mlxlogscore=999 impostorscore=0 clxscore=1015 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010290046 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Nickle Wang > -----Original Message----- > From: Chang, Abner (HPS SW/FW Technologist) > Sent: Tuesday, October 13, 2020 12:08 PM > To: devel@edk2.groups.io > Cc: Jiaxin Wu ; Siyuan Fu ; Fan > Wang ; Jiewen Yao ; Wang, > Nickle (HPS SW) > Subject: [EFI Redfish Host Interface PATCH 4/5] > RedfishPkg/RedfishHostInterfaceDxe: Create SMBIOS type 42 record >=20 > This is the abstract driver to consume the contents of SMBIOS type 42h > device descriptor and protocol type data which provided by > PlatformHostInterfaceLib, and create SMBIOS type 42 record through > EFI SMBIOS protocol. >=20 > Signed-off-by: Abner Chang >=20 > Cc: Jiaxin Wu > Cc: Siyuan Fu > Cc: Fan Wang > Cc: Jiewen Yao > Cc: Nickle Wang > --- > .../RedfishHostInterfaceDxe.c | 243 ++++++++++++++++++ > .../RedfishHostInterfaceDxe.inf | 50 ++++ > 2 files changed, 293 insertions(+) > create mode 100644 > RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c > create mode 100644 > RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf >=20 > diff --git a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c > b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c > new file mode 100644 > index 0000000000..ec7faefed7 > --- /dev/null > +++ b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c > @@ -0,0 +1,243 @@ > +/** @file > + RedfishHostInterfaceDxe builds up SMBIOS Type 42h host interface > + record for Redfish service host interface using EFI MBIOS Protocol. > + RedfishHostInterfacePlatformLib is the platform-level library which > + provides the content of Redfish host interface type 42h record. > + > + Copyright (c) 2019, Intel Corporation. All rights reserved.
> + (C) Copyright 2020 Hewlett Packard Enterprise Development LP
> + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +/** > + Create SMBIOS type 42 record for Redfish host interface. > + > + @retval EFI_SUCESS SMBIOS type 42 record is created. > + @retval Others Fail to create SMBIOS 42 record. > + > +**/ > +EFI_STATUS > +RedfishCreateSmbiosTable42 ( > + VOID > + ) > +{ > + REDFISH_INTERFACE_DATA *DeviceDescriptor; > + UINT8 DeviceDataLength; > + UINT8 DeviceType; > + EFI_STATUS Status; > + MC_HOST_INTERFACE_PROTOCOL_RECORD *ProtocolRecord; > + VOID *ProtocolRecords; > + VOID *NewProtocolRecords; > + UINT8 ProtocolCount; > + UINT8 CurrentProtocolsDataLength; > + UINT8 NewProtocolsDataLength; > + UINT8 ProtocolDataSize; > + SMBIOS_TABLE_TYPE42 *Type42Record; > + EFI_SMBIOS_PROTOCOL *Smbios; > + EFI_SMBIOS_HANDLE MemArrayMappedAddrSmbiosHandle; > + > + // > + // Get platform Redfish host interface device type descriptor data. > + // > + Status =3D RedfishPlatformHostInterfaceDeviceDescriptor (&DeviceType, > &DeviceDescriptor); > + if (EFI_ERROR (Status)) { > + if (Status =3D=3D EFI_NOT_FOUND) { > + DEBUG ((DEBUG_ERROR, "%a: No Redfish host interface descriptor is > provided on this platform.", __FUNCTION__)); > + return EFI_NOT_FOUND; > + } > + DEBUG((DEBUG_ERROR, "%a: Fail to get device descriptor, %r.", > __FUNCTION__, Status)); > + return Status; > + } > + if (DeviceType !=3D REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2 && > + DeviceType !=3D REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2 > + ) { > + DEBUG ((DEBUG_ERROR, "%a: Only support either protocol type 04h or > 05h as Redfish host interface.", __FUNCTION__)); > + return EFI_UNSUPPORTED; > + } > + if (DeviceType =3D=3D REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) > { > + DeviceDataLength =3D DeviceDescriptor- > >DeviceDescriptor.PciPcieDeviceV2.Length; > + } else { > + DeviceDataLength =3D DeviceDescriptor- > >DeviceDescriptor.UsbDeviceV2.Length; > + } > + // > + // Loop to get platform Redfish host interface protocol type data. > + // > + ProtocolRecord =3D NULL; > + ProtocolRecords =3D NULL; > + NewProtocolRecords =3D NULL; > + Type42Record =3D NULL; > + ProtocolCount =3D 0; > + CurrentProtocolsDataLength =3D 0; > + NewProtocolsDataLength =3D 0; > + while (TRUE) { > + Status =3D RedfishPlatformHostInterfaceProtocolData (&ProtocolRecord= , > ProtocolCount); > + if (Status =3D=3D EFI_NOT_FOUND) { > + break; > + } > + if (EFI_ERROR(Status)) { > + DEBUG ((DEBUG_ERROR, "%a: Fail to get Redfish host interafce proto= col > type data.", __FUNCTION__)); > + if (ProtocolRecords !=3D NULL) { > + FreePool (ProtocolRecords); > + } > + if (ProtocolRecord !=3D NULL) { > + FreePool (ProtocolRecord); > + } > + return Status; > + } > + ProtocolDataSize =3D sizeof (MC_HOST_INTERFACE_PROTOCOL_RECORD) - > sizeof(ProtocolRecord->ProtocolTypeData) + ProtocolRecord- > >ProtocolTypeDataLen; > + NewProtocolsDataLength +=3D ProtocolDataSize; > + if (ProtocolRecords =3D=3D NULL) { > + ProtocolRecords =3D AllocateZeroPool (NewProtocolsDataLength); > + if (ProtocolRecords =3D=3D NULL) { > + FreePool (ProtocolRecord); > + return EFI_OUT_OF_RESOURCES; > + } > + CopyMem ((VOID *)ProtocolRecords, (VOID *)ProtocolRecord, > ProtocolDataSize); > + NewProtocolRecords =3D ProtocolRecords; > + } else { > + NewProtocolRecords =3D ReallocatePool(CurrentProtocolsDataLength, > NewProtocolsDataLength, (VOID *)ProtocolRecords); > + if (NewProtocolRecords =3D=3D NULL) { > + DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for Redfish ho= st > interface protocol data.")); > + FreePool (ProtocolRecords); > + FreePool (ProtocolRecord); > + return EFI_OUT_OF_RESOURCES; > + } > + CopyMem ( > + (VOID *)((UINT8 *)NewProtocolRecords + > CurrentProtocolsDataLength), > + (VOID *)ProtocolRecord, > + ProtocolDataSize > + ); > + } > + FreePool (ProtocolRecord); > + CurrentProtocolsDataLength =3D NewProtocolsDataLength; > + ProtocolCount ++; > + }; > + if (ProtocolCount =3D=3D 0) { > + goto ON_EXIT; > + } > + // > + // Construct SMBIOS Type 42h for Redfish host inteface. > + // > + // SMBIOS type 42 Record for Redfish Interface > + // 00h Type BYTE 42 Management Controller Host Interface structure > indicator > + // 01h Length BYTE Varies Length of the structure, a minimum of 09h > + // 02h Handle WORD Varies > + // 04h Interface Type BYTE Varies Management Controller Interface Type= . > + // 05h Interface Specific Data Length (n) > + // 06h Interface Specific data > + // 06h+n number of protocols defined for the host interface (typically= 1) > + // 07h+n Include a Protocol Record for each protocol supported. > + // > + Type42Record =3D (SMBIOS_TABLE_TYPE42 *) AllocateZeroPool ( > + sizeof (SMBIOS_TABLE_TYPE42) = - 4 > + + DeviceDataLength > + + 1 /// For Protocol Record C= ount > + + CurrentProtocolsDataLength > + + 2 /// Double NULL terminato= r/ > + ); > + if (Type42Record =3D=3D NULL) { > + Status =3D EFI_OUT_OF_RESOURCES; > + goto ON_EXIT; > + } > + > + Type42Record->Hdr.Type =3D > EFI_SMBIOS_TYPE_MANAGEMENT_CONTROLLER_HOST_INTERFACE; > + Type42Record->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE42) - 4 > + + DeviceDataLength > + + 1 > + + CurrentProtocolsDataLength; > + Type42Record->Hdr.Handle =3D 0; > + Type42Record->InterfaceType =3D > MCHostInterfaceTypeNetworkHostInterface; // Network Host Interface > + > + // > + // Fill in InterfaceTypeSpecificDataLength field > + // > + Type42Record->InterfaceTypeSpecificDataLength =3D DeviceDataLength; > + > + // > + // Fill in InterfaceTypeSpecificData field > + // > + CopyMem (Type42Record->InterfaceTypeSpecificData, DeviceDescriptor, > DeviceDataLength); > + FreePool (DeviceDescriptor); > + DeviceDescriptor =3D NULL; > + > + // > + // Fill in InterfaceTypeSpecificData Protocol Count field > + // > + *(Type42Record->InterfaceTypeSpecificData + DeviceDataLength) =3D > ProtocolCount; > + > + // > + // Fill in Redfish Protocol Data > + // > + CopyMem ( > + Type42Record->InterfaceTypeSpecificData + DeviceDataLength + 1, > + NewProtocolRecords, > + CurrentProtocolsDataLength > + ); > + > + // > + // 5. Add Redfish interface data record to SMBIOS table 42 > + // > + Status =3D gBS->LocateProtocol (&gEfiSmbiosProtocolGuid, NULL, > (VOID**)&Smbios); > + if (EFI_ERROR (Status)) { > + goto ON_EXIT; > + } > + > + MemArrayMappedAddrSmbiosHandle =3D SMBIOS_HANDLE_PI_RESERVED; > + Status =3D Smbios->Add ( > + Smbios, > + NULL, > + &MemArrayMappedAddrSmbiosHandle, > + (EFI_SMBIOS_TABLE_HEADER*) Type42Record > + ); > + DEBUG ((DEBUG_INFO, "RedfishPlatformDxe: Smbios->Add() - %r\n", > Status)); > + if (EFI_ERROR (Status)) { > + goto ON_EXIT; > + } > + Status =3D EFI_SUCCESS; > + > +ON_EXIT: > + if (DeviceDescriptor !=3D NULL) { > + FreePool (DeviceDescriptor); > + } > + if (NewProtocolRecords !=3D NULL) { > + FreePool (NewProtocolRecords); > + } > + if (Type42Record !=3D NULL) { > + FreePool (Type42Record); > + } > + return Status; > +} > + > +/** > + Main entry for this driver. > + > + @param ImageHandle Image handle this driver. > + @param SystemTable Pointer to SystemTable. > + > + @retval EFI_SUCESS This function always complete successfully. > + > +**/ > +EFI_STATUS > +EFIAPI > +RedfishHostInterfaceDxeEntryPoint ( > + IN EFI_HANDLE ImageHandle, > + IN EFI_SYSTEM_TABLE *SystemTable > + ) > +{ > + // > + // Create SMBIOS type 42 record. > + // > + return RedfishCreateSmbiosTable42 (); > +} > diff --git > a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf > b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf > new file mode 100644 > index 0000000000..6c1f60bca5 > --- /dev/null > +++ b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf > @@ -0,0 +1,50 @@ > +## @file > +# RedfishHostInterfaceDxe builds up SMBIOS Type 42h host interface > +# record for Redfish service host interface using SMBIOS Protocol. > +# RedfishHostInterfacePlatformLib is the platform-level library which > +# provides the content of Redfish host interface type 42h record. > +# > +# Copyright (c) 2019, Intel Corporation. All rights reserved.
> +# (C) Copyright 2020 Hewlett Packard Enterprise Development LP
> + > +# SPDX-License-Identifier: BSD-2-Clause-Patent > +# > +## > + > +[Defines] > + INF_VERSION =3D 0x0001000b > + BASE_NAME =3D RedfishHostInterfaceDxe > + FILE_GUID =3D 592626DA-4A1E-8B39-28BA-FEAD92C4A0A= 4 > + MODULE_TYPE =3D DXE_DRIVER > + VERSION_STRING =3D 1.0 > + ENTRY_POINT =3D RedfishHostInterfaceDxeEntryPoint > + > +# > +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64 > +# > + > +[Sources] > + RedfishHostInterfaceDxe.c > + > +[Packages] > + MdePkg/MdePkg.dec > + MdeModulePkg/MdeModulePkg.dec > + RedfishPkg/RedfishPkg.dec > + > +[LibraryClasses] > + BaseLib > + BaseMemoryLib > + DebugLib > + MemoryAllocationLib > + PrintLib > + RedfishPlatformHostInterfaceLib > + UefiBootServicesTableLib > + UefiDriverEntryPoint > + UefiLib > + > +[Protocols] > + gEfiSmbiosProtocolGuid ## TO_START > + > +[Depex] > + gEfiSmbiosProtocolGuid > + > -- > 2.17.1