From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mx.groups.io with SMTP id smtpd.web11.7942.1618834133579970216 for ; Mon, 19 Apr 2021 05:08:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=Nmf385Yn; spf=pass (domain: nuviainc.com, ip: 209.85.221.51, mailfrom: graeme@nuviainc.com) Received: by mail-wr1-f51.google.com with SMTP id h4so24724404wrt.12 for ; Mon, 19 Apr 2021 05:08:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=zzUG6/iCwAKd/SBiAVO1p/x4FOwh3UD/F/n31BRgmAs=; b=Nmf385YnydZvooGfOcVUclGWWVMQiVpmGoUCF5lcxpZJt5t7fL2f6zcxR1c/+y44dP gKHZBAg4a+3xn5fM4UqKmTPA0hlqIP7LBrKdQzQSB+xY8SiydT4oENFJVl/dlTYJ92iD rfL2asjM9G0cMpnC2BPA6dLX64gnvgbwQt6kOB9rjfIldIEkVbrbLQXC8MifmenA68Kr asy5FYmE+nurBOyDT18WgcptrCjB0juLxEOK/gHRY+LiEHLdb1nLczLdHnyqlx1rAQzk n5AHfcFdYE0cyYBys5nqCYkhvRyAooNOQ+bex49azAbrMyyRSPjsr0hYEyO9Bo6QgUwY X4nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=zzUG6/iCwAKd/SBiAVO1p/x4FOwh3UD/F/n31BRgmAs=; b=cnY5PF15HegwRX2PdwxAycdr7Gooq+hU8REv8P43CVCoW44zaqcCABJ/z932LkgeUJ fMeUsJ52QpYjnzmhCh/QnfN4pDFLMrDHWPq2kSQa5Q8gX8fki2apiw+hhIDy8/ARlYSq HKTQpRko/yMIzo9UZhvMph4I2uLrcmjSBS4tLNFRqaLLCHcSOip7/+XpJtVCMf7ln6Io twUOhp4hbSYc0sZEAEBmRlfEgqK00Epqs5g9FYCUWn1OoL2FxdTVYrdWuZK5VH/VMv0w Mg3SeUrBEfQjm5Cn+nVaWCmy1ADw4QdV/WaAHDubaCajz8wZV544ShkxZNwIccg+rH3u nvyw== X-Gm-Message-State: AOAM530PlICV245R/tGXNSq2H94lfEtNJ5U80pU1slfO949g3cB1GxYY XGJyhld9RSfSPeZOO4Ap1OyX1w== X-Google-Smtp-Source: ABdhPJzEBTVKdzqKiOg5DDwuC//Rz0d5jOul8fYR/oenkBoUT2YRclnSht7h/v+6bVhZxByZDDv5ZA== X-Received: by 2002:adf:f4c4:: with SMTP id h4mr14251165wrp.309.1618834132106; Mon, 19 Apr 2021 05:08:52 -0700 (PDT) Return-Path: Received: from ggregory-ubuntuvm ([62.3.69.143]) by smtp.gmail.com with ESMTPSA id s83sm19275459wms.16.2021.04.19.05.08.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 05:08:51 -0700 (PDT) Date: Mon, 19 Apr 2021 13:08:49 +0100 From: "Graeme Gregory" To: Rebecca Cran Cc: devel@edk2.groups.io, Leif Lindholm , Ard Biesheuvel , Radoslaw Biernacki Subject: Re: [edk2-platforms PATCH 1/1] SbsaQemu: Add OemMiscLib boot information and chassis status functions Message-ID: <20210419120849.GA13153@ggregory-ubuntuvm> References: <20210416222649.3697-1-rebecca@nuviainc.com> MIME-Version: 1.0 In-Reply-To: <20210416222649.3697-1-rebecca@nuviainc.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Apr 16, 2021 at 04:26:49PM -0600, Rebecca Cran wrote: > Add new SMBIOS Type 32 boot information and Type 3 chassis status > functions that have been added to OemMiscLib in ArmPkg. > > Since this is a virtual platform, return fixed values for the chassis > statuses. > Looks sensible and beleivable to me Reviewed-by: Graeme Gregory > Signed-off-by: Rebecca Cran > --- > Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c | 91 ++++++++++++++++++++ > Silicon/Qemu/SbsaQemu/SbsaQemu.dec | 2 +- > 2 files changed, 92 insertions(+), 1 deletion(-) > > diff --git a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c > index eb405b259848..b543045de3b7 100644 > --- a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c > +++ b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c > @@ -239,3 +239,94 @@ OemUpdateSmbiosInfo ( > HiiSetString (HiiHandle, TokenToUpdate, String, NULL); > } > } > + > +/** Fetches the Type 32 boot information status. > + > + @return Boot status. > +**/ > +MISC_BOOT_INFORMATION_STATUS_DATA_TYPE > +EFIAPI > +OemGetBootStatus ( > + VOID > + ) > +{ > + return BootInformationStatusNoError; > +} > + > +/** Fetches the chassis status when it was last booted. > + > + @return Chassis status. > +**/ > +MISC_CHASSIS_STATE > +EFIAPI > +OemGetChassisBootupState ( > + VOID > + ) > +{ > + return ChassisStateSafe; > +} > + > +/** Fetches the chassis power supply/supplies status when last booted. > + > + @return Chassis power supply/supplies status. > +**/ > +MISC_CHASSIS_STATE > +EFIAPI > +OemGetChassisPowerSupplyState ( > + VOID > + ) > +{ > + return ChassisStateSafe; > +} > + > +/** Fetches the chassis thermal status when last booted. > + > + @return Chassis thermal status. > +**/ > +MISC_CHASSIS_STATE > +EFIAPI > +OemGetChassisThermalState ( > + VOID > + ) > +{ > + return ChassisStateSafe; > +} > + > +/** Fetches the chassis security status when last booted. > + > + @return Chassis security status. > +**/ > +MISC_CHASSIS_SECURITY_STATE > +EFIAPI > +OemGetChassisSecurityStatus ( > + VOID > + ) > +{ > + return ChassisSecurityStatusNone; > +} > + > +/** Fetches the chassis height in RMUs (Rack Mount Units). > + > + @return The height of the chassis. > +**/ > +UINT8 > +EFIAPI > +OemGetChassisHeight ( > + VOID > + ) > +{ > + return 1U; > +} > + > +/** Fetches the number of power cords. > + > + @return The number of power cords. > +**/ > +UINT8 > +EFIAPI > +OemGetChassisNumPowerCords ( > + VOID > + ) > +{ > + return 1; > +} > \ No newline at end of file > diff --git a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec > index 9448852967b6..6051fabd683a 100644 > --- a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec > +++ b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec > @@ -66,4 +66,4 @@ > gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisVersion|L""|VOID*|0x0000011A > gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisManufacturer|L""|VOID*|0x0000011B > gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisAssetTag|L""|VOID*|0x0000011C > - gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisSKU|L""|VOID*|0x0000011D > + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisSKU|L""|VOID*|0x0000011D > \ No newline at end of file > -- > 2.26.2 >