From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) by mx.groups.io with SMTP id smtpd.web11.5875.1614056042045899485 for ; Mon, 22 Feb 2021 20:54:02 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=hL7seC4+; spf=pass (domain: nuviainc.com, ip: 209.85.222.170, mailfrom: rebecca@nuviainc.com) Received: by mail-qk1-f170.google.com with SMTP id v206so15102312qkb.3 for ; Mon, 22 Feb 2021 20:54:01 -0800 (PST) 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=qjM0EWeRQH67pnCxJXlX+tqyx3VOgzIKRAWM8bvJE/U=; b=hL7seC4+QR1rTHQ/+/XjbfmpR1DP7x8Ai81tL53w3IUPNtVcAWxi2ErhYId6dNTk4u NJCFOpc82syKpZvW5ThTOz6Jge96quczTBohamyTtFQcciUoeP6+QdLGyXC9JG5DzxjM fIRdgOgHxCSp3US2JYp88PjABn5r+nk/854aWo5q8Aq/B3v2bXb/ly+cjgMYvywdOfa5 P69BN5VIiC5jNg4LnPzD/PBnVaBT6gP81fWjU0EC5hDYFo1fPyFOmzu3nmGx6KnJkC12 8iNvd2Z+SsLkcpvAlWTuXcE8ctp9hx8JyyyjJl82mCsqhzVVswMgPAdOegFWSJecVSZ4 mVmQ== 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=qjM0EWeRQH67pnCxJXlX+tqyx3VOgzIKRAWM8bvJE/U=; b=GlB6ATnfQDuOFMv7SftppATwH3j8a+hinvJgewL5ATPskdzlWf9+DZIv5uxht8sEMC vrz10kkca0orW5sOG0te0O/fwSxpefaB6A9pGKtH/XtdfJYSNL/Pi6pWV4GEH+CDK8Jg mKuWp5WArEltpf97hFDy0l2ZafK9nrotFdqKn5JkpJYdvQA9yXMsjXmOHNToFuZV8zXn jcGONeq+F0lLXOzXACHpMyBRlg4prccZmYR+2tcsCpA6Vm7Nky1/od+wY8mK9rAfwNd1 9uC4rWKICDKkd+JCGd+YXwnnTln2jNFvJiUq4aq4OkMOpzScMDHHTFKnwVNN3y8ynqwO W+NQ== X-Gm-Message-State: AOAM532Dkr3WMvlGPnCFUPou0yizUDsuWN+W/ZW8QJZ0KznewTJxmFnv mtmbN9ztKouNVOCHYCq+yhpTWZq2QElcWPe3ARklS2vj9PV11V/gHeBgjldWNm+Ub67/ZNF2Tea 8Y6lqCh7Hxs055rxCqFocWxbM15rxZEyz4je80IUHaBSGLxYxpbkmSluzlRJ5PhJ8hNhbeA== X-Google-Smtp-Source: ABdhPJwmnOYZ2OtLFGkV7ag0RfMaMEBRGoosBf8K77bvnzS4BGWM3qtY7KNdY8xzfKlZ3Q09ly4VWg== X-Received: by 2002:a37:a5d0:: with SMTP id o199mr24390656qke.388.1614056040967; Mon, 22 Feb 2021 20:54:00 -0800 (PST) Return-Path: Received: from cube.int.bluestop.org (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id x9sm12303258qtr.74.2021.02.22.20.53.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Feb 2021 20:54:00 -0800 (PST) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , Leif Lindholm , Ard Biesheuvel Subject: [PATCH v3 3/3] ArmPkg: Update OemGetChassisType function to return MISC_CHASSIS_TYPE Date: Mon, 22 Feb 2021 21:53:53 -0700 Message-Id: <20210223045353.31315-4-rebecca@nuviainc.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210223045353.31315-1-rebecca@nuviainc.com> References: <20210223045353.31315-1-rebecca@nuviainc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Update OemGetChassisType in OemMiscLib to return MISC_CHASSIS_TYPE instead of EFI_STATUS, which matches other OemMiscLib functions. Signed-off-by: Rebecca Cran --- ArmPkg/Include/Library/OemMiscLib.h | 8 +++--- ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c | 11 +++----- ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c | 28 +------------------- 3 files changed, 8 insertions(+), 39 deletions(-) diff --git a/ArmPkg/Include/Library/OemMiscLib.h b/ArmPkg/Include/Library/OemMiscLib.h index d1ac81f73d9f..6dcc76a214df 100644 --- a/ArmPkg/Include/Library/OemMiscLib.h +++ b/ArmPkg/Include/Library/OemMiscLib.h @@ -128,14 +128,12 @@ OemGetMaxProcessors ( /** Gets the type of chassis for the system. - @param ChassisType The type of the chassis. - - @retval EFI_SUCCESS The chassis type was fetched successfully. + @retval The type of the chassis. **/ -EFI_STATUS +MISC_CHASSIS_TYPE EFIAPI OemGetChassisType ( - OUT UINT8 *ChassisType + VOID ); /** Returns whether the specified processor is present or not. diff --git a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c index 5153c9d7809c..21f106f1e060 100644 --- a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c +++ b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c @@ -95,19 +95,16 @@ OemGetMaxProcessors ( /** Gets the type of chassis for the system. - @param ChassisType The type of the chassis. - - @retval EFI_SUCCESS The chassis type was fetched successfully. + @retval The type of the chassis. **/ -EFI_STATUS +MISC_CHASSIS_TYPE EFIAPI OemGetChassisType ( - UINT8 *ChassisType + VOID ) { ASSERT (FALSE); - *ChassisType = MiscChassisTypeUnknown; - return EFI_SUCCESS; + return MiscChassisTypeUnknown; } /** Returns whether the specified processor is present or not. diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c index e6adbceba2d5..fc4dba319aad 100644 --- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c @@ -23,27 +23,6 @@ #include "SmbiosMisc.h" -/** - * Returns the chassis type in SMBIOS format. - * - * @return Chassis type -**/ -UINT8 -GetChassisType ( - VOID - ) -{ - EFI_STATUS Status; - UINT8 ChassisType; - - Status = OemGetChassisType (&ChassisType); - if (EFI_ERROR (Status)) { - return 0; - } - - return ChassisType; -} - /** This function makes boot time changes to the contents of the MiscChassisManufacturer (Type 3) record. @@ -80,8 +59,6 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscChassisManufacturer) CONTAINED_ELEMENT ContainedElements; UINT8 ExtendLength; - UINT8 ChassisType; - ExtendLength = 0; // @@ -165,10 +142,7 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscChassisManufacturer) SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE3) + ExtendLength + 1; - ChassisType = GetChassisType (); - if (ChassisType != 0) { - SmbiosRecord->Type = ChassisType; - } + SmbiosRecord->Type = OemGetChassisType (); //ContainedElements ASSERT (ContainedElementCount < 2); -- 2.26.2