From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 1824D941804 for ; Wed, 18 Oct 2023 11:55:47 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=ZtZ9BeQzumNqduWCG3wC5bCSRjMpMIQ9wCARBknqJJ0=; c=relaxed/simple; d=groups.io; h=From:Date:Subject:MIME-Version:Message-Id:References:In-Reply-To:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20140610; t=1697630146; v=1; b=tRZlXHL3rgbQHsqeXjgtggUxC3FJ0PRLffcdc75SHl7d2mqOcRGp+x9K86EEPZI4uCuC50Cp MZ9d0At3Zn1So0VDTSU6nOSklVxHlpkTLwRjVs52MUnU9fS1YBccxJLeJwYdhxJrzqVJ1XuHgMc sUmcE6k4SAs/EdbSC8YjqJ2E= X-Received: by 127.0.0.2 with SMTP id oOpgYY7687511x60EG2Z7z4l; Wed, 18 Oct 2023 04:55:46 -0700 X-Received: from muminek.juszkiewicz.com.pl (muminek.juszkiewicz.com.pl [213.251.184.221]) by mx.groups.io with SMTP id smtpd.web11.279385.1697630145855639857 for ; Wed, 18 Oct 2023 04:55:46 -0700 X-Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id 0EE5126110A; Wed, 18 Oct 2023 13:55:42 +0200 (CEST) X-Virus-Scanned: Debian amavis at juszkiewicz.com.pl X-Received: from muminek.juszkiewicz.com.pl ([127.0.0.1]) by localhost (muminek.juszkiewicz.com.pl [127.0.0.1]) (amavis, port 10024) with ESMTP id Z43jUaYRyIZm; Wed, 18 Oct 2023 13:55:41 +0200 (CEST) X-Received: from [172.17.0.1] (83.11.27.172.ipv4.supernova.orange.pl [83.11.27.172]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id 65620260B8D; Wed, 18 Oct 2023 13:55:40 +0200 (CEST) From: "Marcin Juszkiewicz" Date: Wed, 18 Oct 2023 13:55:38 +0200 Subject: [edk2-devel] [PATCH edk2-platforms v5 1/4] SbsaQemu: introduce macro to compare platform version MIME-Version: 1.0 Message-Id: <20231018-ehci-xhci-fix-v5-1-f42995a3dfd9@linaro.org> References: <20231018-ehci-xhci-fix-v5-0-f42995a3dfd9@linaro.org> In-Reply-To: <20231018-ehci-xhci-fix-v5-0-f42995a3dfd9@linaro.org> To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Jeremy Linton , Nhi Pham , Chuong Tran , Rebecca Cran , Marcin Juszkiewicz Precedence: Bulk 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,marcin.juszkiewicz@linaro.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: XDwW1UZsKzMyjexn1nqUqKZMx7686176AA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=tRZlXHL3; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linaro.org (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io We want to check "if platver < 0.3" in an easy way. Signed-off-by: Marcin Juszkiewicz --- .../IndustryStandard/SbsaQemuPlatformVersion.h | 25 ++++++++++++++++= ++++ 1 file changed, 25 insertions(+) diff --git a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuPlatfor= mVersion.h b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuPlatfor= mVersion.h new file mode 100644 index 000000000000..dd2483787002 --- /dev/null +++ b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuPlatformVersio= n.h @@ -0,0 +1,25 @@ +/** @file +* +* Copyright (c) Linaro Limited. All rights reserved. +* +* SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef SBSAQEMUPLATFORM_VERSION_H +#define SBSAQEMUPLATFORM_VERSION_H + +/* + * Compare PlatformVersion + * + */ + +#define PLATFORM_VERSION_LESS_THAN(Major, Minor) ( \ + ( \ + ( PcdGet32 (PcdPlatformVersionMajor) < Major) || \ + ( \ + ( PcdGet32 (PcdPlatformVersionMajor) =3D=3D Major) && \ + ( PcdGet32 (PcdPlatformVersionMinor) < Minor) \ + ) \ + ) \ +) +#endif --=20 2.41.0 -=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 (#109735): https://edk2.groups.io/g/devel/message/109735 Mute This Topic: https://groups.io/mt/102037241/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-