From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) by mx.groups.io with SMTP id smtpd.web09.1271.1617156990305223847 for ; Tue, 30 Mar 2021 19:16:30 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=iC+he2i6; spf=pass (domain: nuviainc.com, ip: 209.85.167.176, mailfrom: rebecca@nuviainc.com) Received: by mail-oi1-f176.google.com with SMTP id n140so18547172oig.9 for ; Tue, 30 Mar 2021 19:16:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yRMZekYF/Mj40wuEJ32E6Oo6Pz1+yL3k+uKz9WHGHPI=; b=iC+he2i6EEvW70v1q4rEv3BWcGnMoCANV3I0tKc3EiE/0h5gCTVRVvkRzkUOAbD0Um 5/ULL2LMY3FWszu/JN+TiDnTkDOGsQAk4OLkiJt5WpFimsRaxPZ1ZKsx9M9HNxlyKpGJ Ts6WjHxeBHS+69idxJDkuZnbNpgLG9CjPxXiYxw0ty2drqYqkPaaihtvSUVvHUbu5+kz pQe0hR/tkNQVW3CrpeHKVklKCzQ4jFY+qiKaRASW91jffGjUHIe3AYfegCn+jve/Ld66 Ig7tU5O1GPW0YhuF1gEdxsYumL8snbQfGr+cbnKdN60wIWeeEsdEdSyHNv/33ECTquGJ +11Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yRMZekYF/Mj40wuEJ32E6Oo6Pz1+yL3k+uKz9WHGHPI=; b=Iaqu94+1iAfykyZr16EuLvloBIJ7JleN9eKI31DBALoX0j6eTh1M4NA4q7YKbUF03I MZDh6RgySNEqMbDw76jnS5u4/Ng+nyqD1K82ft5sSUKlz9CJOtsA5xVZZP2uas2IBtap zeeY8fU8Sdjb9rGOektfVWUpjni8aMnfdRsKhXSmB8YmIoYuxGcJrwVBdSNiLdzCHSJu 9cdD1SXauJRxstBKFPr04UaTfH8Qxt1uAUUJFTqij8ffSsTCm50nIDGdfg6iUh4IO1Nu 1TB5Wwh6jfy/BwEhPuF4Go5GwpglDxLW8r/n7X/ebdF9PXQIX2K+puFvUqB1jPqiymK5 5wHQ== X-Gm-Message-State: AOAM530w4yqRjq0NtrYubaeQawsfnGgAfh2lrQoY3X64I5UnjCKwWen3 yIU8nwR78I2gZT7C22EgO7j53iZ0X2qb314GREllVZFp0OGenYhZmWwIq+vnvBEr8UCgDQoU86q 92WPk9GmVyqnvf1G8qhyUmPPS/f5b2rW3jue+fBoR5yXiGXHRLwG0Pnd77HspQOlEAlKcaw== X-Google-Smtp-Source: ABdhPJyooYq8yQm05n5U1jV6alJl8BJmX1JjlgMFIRG783E9uGt6pMulXKs3RgJlmXl95ZzWNAdgIg== X-Received: by 2002:aca:c791:: with SMTP id x139mr626897oif.91.1617156989435; Tue, 30 Mar 2021 19:16:29 -0700 (PDT) Return-Path: 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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Mar 2021 19:16:29 -0700 (PDT) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , Leif Lindholm , Ard Biesheuvel Subject: [PATCH 3/5] ArmPkg: Allow platforms to report their boot status via OemMiscLib call Date: Tue, 30 Mar 2021 20:16:17 -0600 Message-Id: <20210331021619.19761-4-rebecca@nuviainc.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210331021619.19761-1-rebecca@nuviainc.com> References: <20210331021619.19761-1-rebecca@nuviainc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add a new function to OemMiscLib to allow platforms to report their boot status into the Type32 SMBIOS table. Signed-off-by: Rebecca Cran --- ArmPkg/Include/Library/OemMiscLib.h | 10 ++++++++++ ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c | 14 ++++++++++++++ ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunction.c | 3 +++ 3 files changed, 27 insertions(+) diff --git a/ArmPkg/Include/Library/OemMiscLib.h b/ArmPkg/Include/Library/OemMiscLib.h index 25ae508ddb03..0b03fe8d4de3 100644 --- a/ArmPkg/Include/Library/OemMiscLib.h +++ b/ArmPkg/Include/Library/OemMiscLib.h @@ -162,6 +162,16 @@ OemUpdateSmbiosInfo ( IN OEM_MISC_SMBIOS_HII_STRING_FIELD Field ); +/** Fetches the Type 32 boot information status. + + @return Boot status. +**/ +MISC_BOOT_INFORMATION_STATUS_DATA_TYPE +EFIAPI +OemGetBootStatus ( + VOID + ); + /** Fetches the chassis status when it was last booted. @return Chassis status. diff --git a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c index e6a4793fe1c2..74101beab1cb 100644 --- a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c +++ b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c @@ -140,6 +140,20 @@ OemUpdateSmbiosInfo ( ASSERT (FALSE); } +/** Fetches the Type 32 boot information status. + + @return Boot status. +**/ +MISC_BOOT_INFORMATION_STATUS_DATA_TYPE +EFIAPI +OemGetBootStatus ( + VOID + ) +{ + ASSERT (FALSE); + return BootInformationStatusNoError; +} + /** Fetches the chassis status when it was last booted. @return Chassis status. diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunction.c index 733615bbcf1a..4be1e1cd29a9 100644 --- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunction.c +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunction.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include "SmbiosMisc.h" @@ -59,6 +60,8 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscBootInformation) SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE32); + SmbiosRecord->BootStatus = OemGetBootStatus (); + // // Now we have got the full smbios record, call smbios protocol to add this record. // -- 2.26.2