From nobody Tue Feb 10 12:59:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+73565+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+73565+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1617156990; cv=none; d=zohomail.com; s=zohoarc; b=CYzCmdobKwmpBywIGKdSwVakVC/LChvc1a0nGP0wEmdlYsVIorBvConoYbWY5PKkmMepn8mIjR12scvYbyNRzVvYhqvj/iTmnJZxHfeWmSZDizFwba0qAB1K9/6JrGGuDAyvM1xrMhKMwoWch2wmdTZ2kixwRt3GjGmOgOwMdY4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1617156990; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=F8TrxY+voZfMjDo+Aj+WnTtD5F4GePVkqImwPWJXUNg=; b=Z+iVQMBtncB97HLe30O8CPmUrUbGQUkXRQlXz6IeKhj0oUtpNkjlhV50xme8/q5LTUcsADBDt1NuYYcGsJZgZNJoKBzXVi+BH9Rwo+vicmh67MI+XaIVOjpc4TyXhvY2RDiC8MPmxx5b3au7FQ72EPTK7EO0jrsT1Cn3rurl4Q8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+73565+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1617156990370620.726740456693; Tue, 30 Mar 2021 19:16:30 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id jqyfYY1788612xDBQxfbAEky; Tue, 30 Mar 2021 19:16:29 -0700 X-Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) by mx.groups.io with SMTP id smtpd.web09.1270.1617156989378957572 for ; Tue, 30 Mar 2021 19:16:29 -0700 X-Received: by mail-oi1-f171.google.com with SMTP id k25so18566656oic.4 for ; Tue, 30 Mar 2021 19:16:29 -0700 (PDT) X-Gm-Message-State: IpwG9qG0dsIwN1AryRSYPvo8x1787277AA= X-Google-Smtp-Source: ABdhPJxLTut11ak7cWRY6XEft6YJoFcKqUjf327pqgKoDfP0P5aIWgH0hyLsJJl19zye7Ovi4xYq3w== X-Received: by 2002:aca:d485:: with SMTP id l127mr658065oig.21.1617156988474; Tue, 30 Mar 2021 19:16:28 -0700 (PDT) X-Received: from cube.nuviainc.com (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id u11sm199996oif.10.2021.03.30.19.16.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Mar 2021 19:16:28 -0700 (PDT) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , Leif Lindholm , Ard Biesheuvel Subject: [edk2-devel] [PATCH 2/5] ArmPkg: Allow platforms to supply more data for SMBIOS Type3 record Date: Tue, 30 Mar 2021 20:16:16 -0600 Message-Id: <20210331021619.19761-3-rebecca@nuviainc.com> In-Reply-To: <20210331021619.19761-1-rebecca@nuviainc.com> References: <20210331021619.19761-1-rebecca@nuviainc.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,rebecca@nuviainc.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1617156989; bh=TjJftF2nU6tuneyOg/OYdnyg4ZcXr/TnusOojq8d8wU=; h=Cc:Date:From:Reply-To:Subject:To; b=DIH/ZB7AJfEVKS0HfEW+/Aua+OXAyrayeEGk0yeQcYG9G6IJHB9gbrgCXZBfFR4WQ0l HVVelYzXi3GbUJHlAaf/HlIlfrfRdcwm7V9wTSaU1itWercx6GP68ll6cs+LXFLd4kcFN xj+AvOSC7oc6Gpx5nm13qg1SYawrDU7nCM4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Add OemMiscLib calls to allow platforms to provide the following information about the chassis: o Bootup state o Power supply/supplies state o Thermal state o Security state o Chassis height (in RMU) o Number of power cords Signed-off-by: Rebecca Cran --- ArmPkg/Include/Library/OemMiscLib.h = | 60 ++++++++++++++ ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c = | 85 ++++++++++++++++++++ ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFuncti= on.c | 8 ++ 3 files changed, 153 insertions(+) diff --git a/ArmPkg/Include/Library/OemMiscLib.h b/ArmPkg/Include/Library/O= emMiscLib.h index 6dcc76a214df..25ae508ddb03 100644 --- a/ArmPkg/Include/Library/OemMiscLib.h +++ b/ArmPkg/Include/Library/OemMiscLib.h @@ -162,4 +162,64 @@ OemUpdateSmbiosInfo ( IN OEM_MISC_SMBIOS_HII_STRING_FIELD Field ); =20 +/** Fetches the chassis status when it was last booted. + + @return Chassis status. +**/ +MISC_CHASSIS_STATE +EFIAPI +OemGetChassisBootupState ( + VOID + ); + +/** Fetches the chassis power supply/supplies status when last booted. + + @return Chassis power supply/supplies status. +**/ +MISC_CHASSIS_STATE +EFIAPI +OemGetChassisPowerSupplyState ( + VOID + ); + +/** Fetches the chassis thermal status when last booted. + + @return Chassis thermal status. +**/ +MISC_CHASSIS_STATE +EFIAPI +OemGetChassisThermalState ( + VOID + ); + +/** Fetches the chassis security status when last booted. + + @return Chassis security status. +**/ +MISC_CHASSIS_SECURITY_STATE +EFIAPI +OemGetChassisSecurityStatus ( + VOID + ); + +/** Fetches the chassis height in RMUs (Rack Mount Units). + + @return The height of the chassis. +**/ +UINT8 +EFIAPI +OemGetChassisHeight ( + VOID + ); + +/** Fetches the number of power cords. + + @return The number of power cords. +**/ +UINT8 +EFIAPI +OemGetChassisNumPowerCords ( + VOID + ); + #endif // OEM_MISC_LIB_H_ diff --git a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c b/ArmPkg/U= niversal/Smbios/OemMiscLibNull/OemMiscLib.c index 21f106f1e060..e6a4793fe1c2 100644 --- a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c +++ b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c @@ -139,3 +139,88 @@ OemUpdateSmbiosInfo ( { ASSERT (FALSE); } + +/** Fetches the chassis status when it was last booted. + + @return Chassis status. +**/ +MISC_CHASSIS_STATE +EFIAPI +OemGetChassisBootupState ( + VOID + ) +{ + ASSERT (FALSE); + return ChassisStateSafe; +} + +/** Fetches the chassis power supply/supplies status when last booted. + + @return Chassis power supply/supplies status. +**/ +MISC_CHASSIS_STATE +EFIAPI +OemGetChassisPowerSupplyState ( + VOID + ) +{ + ASSERT (FALSE); + return ChassisStateSafe; +} + +/** Fetches the chassis thermal status when last booted. + + @return Chassis thermal status. +**/ +MISC_CHASSIS_STATE +EFIAPI +OemGetChassisThermalState ( + VOID + ) +{ + ASSERT (FALSE); + return ChassisStateSafe; +} + +/** Fetches the chassis security status when last booted. + + @return Chassis security status. +**/ +MISC_CHASSIS_SECURITY_STATE +EFIAPI +OemGetChassisSecurityStatus ( + VOID + ) +{ + ASSERT (FALSE); + return ChassisSecurityStatusNone; +} + +/** Fetches the chassis height in RMUs (Rack Mount Units). + + @return The height of the chassis. +**/ +UINT8 +EFIAPI +OemGetChassisHeight ( + VOID + ) +{ + ASSERT (FALSE); + return 1U; +} + +/** Fetches the number of power cords. + + @return The number of power cords. +**/ +UINT8 +EFIAPI +OemGetChassisNumPowerCords ( + VOID + ) +{ + ASSERT (FALSE); + return 1; +} + diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufa= cturerFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassis= ManufacturerFunction.c index fc4dba319aad..344343ed60a5 100644 --- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerF= unction.c +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerF= unction.c @@ -162,6 +162,14 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscChassisManufacturer) UnicodeStrToAsciiStrS (AssertTag, StrStart, AssertTagStrLen + 1); StrStart +=3D AssertTagStrLen + 1; UnicodeStrToAsciiStrS (ChassisSkuNumber, StrStart, ChaNumStrLen + 1); + + SmbiosRecord->BootupState =3D OemGetChassisBootupState (); + SmbiosRecord->PowerSupplyState =3D OemGetChassisPowerSupplyState (); + SmbiosRecord->ThermalState =3D OemGetChassisThermalState (); + SmbiosRecord->SecurityStatus =3D OemGetChassisSecurityStatus (); + SmbiosRecord->Height =3D OemGetChassisHeight (); + SmbiosRecord->NumberofPowerCords =3D OemGetChassisNumPowerCords (); + // // Now we have got the full smbios record, call smbios protocol to add t= his record. // --=20 2.26.2 -=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 (#73565): https://edk2.groups.io/g/devel/message/73565 Mute This Topic: https://groups.io/mt/81741554/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-