From nobody Tue Feb 10 03:56:11 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+71819+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+71819+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1613716593; cv=none; d=zohomail.com; s=zohoarc; b=cKpCqpIncAz3fQ6l17X5BDeFFwNLgyTTY2xwWrDxY8343O9GrUa7ikcgNYS65gO2WTZxZMgSzT8/n2eaQ1haKqGdAjXktpuEZ6W+JnmHijfAmp28txVhE0OxI+gMz4u7F0IuC7cy4FO3XmOpYQURYQECjeQ89pKTnpxXyzkJBNw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613716593; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=PbpSSfsE8zB09XQV1a/zPu5DVIdko19MQP2X73y84x0=; b=azGe0t1x5WXC4OQEO2uTCcLP9nhob0yVZZLzz2Dh6kTp4iWKIRYwOMxnx/mOjRupGjbx9PIjS9MzSUV4urmnsmTB9IGI6UwhYUH+5l+2iJONKEtjwyX95kMf6MjnRkpp2uTCkQ26tJeKch1iSW19EyvOXgQPbW5JCFK877YzZkM= 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+71819+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1613716593327808.3307739799163; Thu, 18 Feb 2021 22:36:33 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id tcZnYY1788612xsM1ogcaMFB; Thu, 18 Feb 2021 22:36:32 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.5139.1613716592446692045 for ; Thu, 18 Feb 2021 22:36:32 -0800 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1F0781FB; Thu, 18 Feb 2021 22:36:32 -0800 (PST) X-Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.16.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6A1223F73B; Thu, 18 Feb 2021 22:36:30 -0800 (PST) From: "Sughosh Ganu" To: devel@edk2.groups.io Cc: Sami Mujawar , Ilias Apalodimas , Ard Biesheuvel , Sughosh Ganu Subject: [edk2-devel] [PATCH v5 06/14] StandaloneMmPkg: Use macros for SPM version check Date: Fri, 19 Feb 2021 12:05:59 +0530 Message-Id: <20210219063607.27920-7-sughosh.ganu@linaro.org> In-Reply-To: <20210219063607.27920-1-sughosh.ganu@linaro.org> References: <20210219063607.27920-1-sughosh.ganu@linaro.org> Precedence: Bulk List-Unsubscribe: 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,sughosh.ganu@linaro.org X-Gm-Message-State: ovjtNfT22PZXFk807yt7uLmkx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1613716592; bh=ZYE4rWjhUK1I4+o+rezZq2wr1VKhp+qTwai6VpE5Tfk=; h=Cc:Date:From:Reply-To:Subject:To; b=e5sO9krQQgXER1y0pBPq9xEq/VfDMb7QvYbhJT6qX4FPemPcBhmYSO8iJgfSL+RinT4 UtsnXSTu9DVRJC/sYiN4Joi8edA2/40XSDxYdrQK/pbwpsURTWQpBuBLFcBHmUhM1LjJD 2/UwV8DRyC/2M3OJXP/i36ddxUIYuto11+w= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Declare module wide variables for SPM major and minor versions to be used in checking the SPM version compatibility. Use the SPM major and minor version macros declared in the previous patch for the version check. Signed-off-by: Sughosh Ganu Reviewed-by: Sami Mujawar --- Changes since V4: None StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCor= eEntryPoint.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Sta= ndaloneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPo= int/AArch64/StandaloneMmCoreEntryPoint.c index 3d78e8e9ae..2643473e88 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Standalone= MmCoreEntryPoint.c +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Standalone= MmCoreEntryPoint.c @@ -32,8 +32,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define SPM_MINOR_VER_MASK 0x0000FFFF #define SPM_MAJOR_VER_SHIFT 16 =20 -#define SPM_MAJOR_VER 0 -#define SPM_MINOR_VER 1 +STATIC CONST UINT32 mSpmMajorVer =3D SPM_MAJOR_VERSION; +STATIC CONST UINT32 mSpmMinorVer =3D SPM_MINOR_VERSION; =20 #define BOOT_PAYLOAD_VERSION 1 =20 @@ -196,8 +196,8 @@ GetSpmVersion (VOID) // revision A must work in a compatible way with revision B. // However, it is possible for revision B to have a higher // function count than revision A. - if ((SpmMajorVersion =3D=3D SPM_MAJOR_VER) && - (SpmMinorVersion >=3D SPM_MINOR_VER)) + if ((SpmMajorVersion =3D=3D mSpmMajorVer) && + (SpmMinorVersion >=3D mSpmMinorVer)) { DEBUG ((DEBUG_INFO, "SPM Version: Major=3D0x%x, Minor=3D0x%x\n", SpmMajorVersion, SpmMinorVersion)); @@ -206,7 +206,7 @@ GetSpmVersion (VOID) else { DEBUG ((DEBUG_INFO, "Incompatible SPM Versions.\n Current Version: Maj= or=3D0x%x, Minor=3D0x%x.\n Expected: Major=3D0x%x, Minor>=3D0x%x.\n", - SpmMajorVersion, SpmMinorVersion, SPM_MAJOR_VER, SPM_MINOR_VER= )); + SpmMajorVersion, SpmMinorVersion, mSpmMajorVer, mSpmMinorVer)); Status =3D EFI_UNSUPPORTED; } =20 --=20 2.17.1 -=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 (#71819): https://edk2.groups.io/g/devel/message/71819 Mute This Topic: https://groups.io/mt/80750051/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-