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 852BD941381 for ; Wed, 18 Oct 2023 08:45:56 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=WEgKl5kqNvb6iyDhX6EQyjtMI9TsKFlxjPuy0+2zmNA=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20140610; t=1697618755; v=1; b=is4epj4kYBWSsuOStl9LuPCo8dcaFpNcR9yHEr5NP/RHdRgpj+Ne5J2c8tv17U1yGlK9DJ/Q YAE9aF8d55isdsrEwrEg/eONRHknFi08AzImzJ91KEAqB3/NQQJ5bU78i3S/Lr0m4bC0cnalVtM W7fDDNJsksFUHdy+NkNPyjhk= X-Received: by 127.0.0.2 with SMTP id 6ZJXYY7687511xZHY9uomObW; Wed, 18 Oct 2023 01:45:55 -0700 X-Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web11.276859.1697618754411654138 for ; Wed, 18 Oct 2023 01:45:54 -0700 X-Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id BC6D161725 for ; Wed, 18 Oct 2023 08:45:53 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D2BBC43395 for ; Wed, 18 Oct 2023 08:45:53 +0000 (UTC) X-Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2bfed7c4e6dso85023671fa.1 for ; Wed, 18 Oct 2023 01:45:53 -0700 (PDT) X-Gm-Message-State: tTWItkOpso7lMlSMot05101Fx7686176AA= X-Google-Smtp-Source: AGHT+IGhQUx+eP0mSGuAkZxJAGqq28owiCGfr/sdM9RKISrNs6/kxvMkmUOvqJyj0L4PzI5gpnppZxf5bl8Tl2lEGYQ= X-Received: by 2002:a2e:8303:0:b0:2b6:df71:cff1 with SMTP id a3-20020a2e8303000000b002b6df71cff1mr3232339ljh.52.1697618751512; Wed, 18 Oct 2023 01:45:51 -0700 (PDT) MIME-Version: 1.0 References: <20231017-ehci-xhci-fix-v3-0-0b9ec9847947@linaro.org> <20231017-ehci-xhci-fix-v3-1-0b9ec9847947@linaro.org> In-Reply-To: <20231017-ehci-xhci-fix-v3-1-0b9ec9847947@linaro.org> From: "Ard Biesheuvel" Date: Wed, 18 Oct 2023 10:45:40 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH edk2-platforms v3 1/4] SbsaQemu: introduce macro to compare platform version To: devel@edk2.groups.io, marcin.juszkiewicz@linaro.org, Leif Lindholm Cc: Jeremy Linton , Nhi Pham , Chuong Tran , Rebecca Cran 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,ardb@kernel.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=is4epj4k; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.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 On Tue, 17 Oct 2023 at 15:23, Marcin Juszkiewicz wrote: > > We want to check "if platver < 0.3" in an easy way. > --- > .../IndustryStandard/SbsaQemuPlatformVersion.h | 25 ++++++++++++++++++++ > 1 file changed, 25 insertions(+) > > diff --git a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuPlatformVersion.h b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuPlatformVersion.h > new file mode 100644 > index 000000000000..dd2483787002 > --- /dev/null > +++ b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuPlatformVersion.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) == Major) && \ > + ( PcdGet32 (PcdPlatformVersionMinor) < Minor) \ > + ) \ > + ) \ > +) > +#endif > I don't mind adding this here but it is slightly unidiomatic so I'd like Leif's take on this too. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109713): https://edk2.groups.io/g/devel/message/109713 Mute This Topic: https://groups.io/mt/102017313/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-