From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 0E5D4D8024A for ; Sun, 26 Nov 2023 19:36:26 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=VYsKF9KwT7+eTANhzQsABryBoqy2AaR7SbxsQsFrWSE=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20140610; t=1701027385; v=1; b=STSLWmnBPPJakoH3hrc0RB4gnsMT8p5qa0gJqVo6jg39Ue1OaqTSmgVib2/lhAwCmXpBk9Il brtrsX1WQ0Iz3hO+YfIZXgLyP16iB1UNrlucXXkfhyx72P0FgZiHlotx8z4NWgzF4yNMC5BVuPT n/su5EZYhblRhKTN+KpMFDFk= X-Received: by 127.0.0.2 with SMTP id CSWKYY7687511xLvbiApj6Zj; Sun, 26 Nov 2023 11:36:25 -0800 X-Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com [209.85.219.172]) by mx.groups.io with SMTP id smtpd.web11.64322.1701027385037996098 for ; Sun, 26 Nov 2023 11:36:25 -0800 X-Received: by mail-yb1-f172.google.com with SMTP id 3f1490d57ef6-db498e1132bso888521276.2 for ; Sun, 26 Nov 2023 11:36:24 -0800 (PST) X-Gm-Message-State: qUgGu2lTzY2FySGPOSFdn2o8x7686176AA= X-Google-Smtp-Source: AGHT+IFcJZYiJm9LfcpRaqkj1ommjvOAR1VL/RFtpgceQoIKQuao+mOdGxDNAPQyMo6KdWUVijIe6ZF8WR1FjJm8D2Q= X-Received: by 2002:a25:25cd:0:b0:da3:b87b:5b75 with SMTP id l196-20020a2525cd000000b00da3b87b5b75mr9332505ybl.64.1701027384194; Sun, 26 Nov 2023 11:36:24 -0800 (PST) MIME-Version: 1.0 References: <20231123064719.1248-1-abner.chang@amd.com> <20231123064719.1248-3-abner.chang@amd.com> In-Reply-To: <20231123064719.1248-3-abner.chang@amd.com> From: "Mike Maslenkin" Date: Sun, 26 Nov 2023 22:35:48 +0300 Message-ID: Subject: Re: [edk2-devel] [PATCH V2 2/8] RedfishPkg/RedfishHostInterfaceDxe: Add Redfish HI readiness notification To: abner.chang@amd.com Cc: devel@edk2.groups.io, Nickle Wang , Igor Kulchytskyy Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=STSLWmnB; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) On Thu, Nov 23, 2023 at 9:48=E2=80=AFAM wrote: > > From: Abner Chang > > Introduce gEdkIIRedfishHostInterfaceReadyProtocolGuid > and produce it when Redfish Host Interface is installed > on system. > > Signed-off-by: Abner Chang > Cc: Nickle Wang > Cc: Igor Kulchytskyy > Cc: Mike Maslenkin > --- > RedfishPkg/RedfishPkg.dec | 3 +++ > .../RedfishHostInterfaceDxe.inf | 3 ++- > .../RedfishHostInterfaceDxe.c | 16 ++++++++++++++++ > 3 files changed, 21 insertions(+), 1 deletion(-) > > diff --git a/RedfishPkg/RedfishPkg.dec b/RedfishPkg/RedfishPkg.dec > index 0f18865cea0..e40538247c2 100644 > --- a/RedfishPkg/RedfishPkg.dec > +++ b/RedfishPkg/RedfishPkg.dec > @@ -90,6 +90,9 @@ > ## Include/Protocol/EdkIIRedfishPlatformConfig.h > gEdkIIRedfishPlatformConfigProtocolGuid =3D { 0X4D94A7C7, 0X4CE4, 0X4A= 84, { 0X88, 0XC1, 0X33, 0X0C, 0XD4, 0XA3, 0X47, 0X67 } } > > + # Redfish Host Interface ready notification protocol > + gEdkIIRedfishHostInterfaceReadyProtocolGuid =3D { 0xC3F6D062, 0x3D38, = 0x4EA4, { 0x92, 0xB1, 0xE8, 0xF8, 0x02, 0x27, 0x63, 0xDF } } > + > [Guids] > gEfiRedfishPkgTokenSpaceGuid =3D { 0x4fdbccb7, 0xe829, 0x4b4c, { = 0x88, 0x87, 0xb2, 0x3f, 0xd7, 0x25, 0x4b, 0x85 }} > > diff --git a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.i= nf b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf > index 1cdae149aad..f969e75463f 100644 > --- a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf > +++ b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf > @@ -43,7 +43,8 @@ > UefiLib > > [Protocols] > - gEfiSmbiosProtocolGuid ## TO_START > + gEfiSmbiosProtocolGuid ## TO_START > + gEdkIIRedfishHostInterfaceReadyProtocolGuid ## PRODUCED > > [Depex] > gEfiSmbiosProtocolGuid > diff --git a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c= b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c > index 55a66decfc8..94c0f9b6a92 100644 > --- a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c > +++ b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c > @@ -53,7 +53,9 @@ RedfishCreateSmbiosTable42 ( > SMBIOS_TABLE_TYPE42 *Type42Record; > EFI_SMBIOS_PROTOCOL *Smbios; > EFI_SMBIOS_HANDLE MemArrayMappedAddrSmbiosHandle; > + EFI_HANDLE Handle; > > + Handle =3D NULL; > // > // Get platform Redfish host interface device type descriptor data. > // > @@ -228,6 +230,20 @@ RedfishCreateSmbiosTable42 ( > > Status =3D EFI_SUCCESS; > > + // > + // Install Redfish Host Interface ready protocol. > + // > + Status =3D gBS->InstallProtocolInterface ( > + &Handle, > + &gEdkIIRedfishHostInterfaceReadyProtocolGuid, > + EFI_NATIVE_INTERFACE, > + (VOID *)NULL > + ); > + if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "Failed to install gEdkIIRedfishHostInterfaceRe= adyProtocolGuid.\n")); > + DEBUG ((DEBUG_ERROR, "PlatformConfigHandler driver may not be trigge= red to acquire Redfish service.\n")); > + } > + > ON_EXIT: > if (DeviceDescriptor !=3D NULL) { > FreePool (DeviceDescriptor); > -- > 2.37.1.windows.1 > You have clobbered explicit Status =3D EFI_SUCCESS; is it intended? Overall result of this function does not depend from this InstallProtocolInterface() call, SMBIOS table has been installed successfully. Looks like InstallProtocolInterface() should be added before Status return value set. -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111705): https://edk2.groups.io/g/devel/message/111705 Mute This Topic: https://groups.io/mt/102763119/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-