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 271E47803CD for ; Wed, 18 Oct 2023 08:46:27 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=pAk6ZvrbRBW1iKqxniHjuJ/dm55zuHOTiSvVwKK6j2c=; 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=1697618786; v=1; b=WcRgYybFXPHLNsaoEUgxJ9GD5B2vpi1VdPbfNwR6khw99BPW1jvYC43Ekm9/593eNiItrw96 S5IKlVWeEIKHucBjbln2hoUYsN1OgHKC1S32dzg+6vqL97wr9a1y2Vr8lf1e0fJ7Mo06fcJEJsq LpoUMQOlPne6kRi4mpXD37oQ= X-Received: by 127.0.0.2 with SMTP id oS9rYY7687511xCUYOZCenJb; Wed, 18 Oct 2023 01:46:26 -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.276866.1697618786216937137 for ; Wed, 18 Oct 2023 01:46:26 -0700 X-Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id B576B61735 for ; Wed, 18 Oct 2023 08:46:25 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 873BCC433CD for ; Wed, 18 Oct 2023 08:46:25 +0000 (UTC) X-Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2c503da4fd6so72074371fa.1 for ; Wed, 18 Oct 2023 01:46:25 -0700 (PDT) X-Gm-Message-State: jmPVMEl80QcihiCRur2GZ46Ux7686176AA= X-Google-Smtp-Source: AGHT+IFSPl8EiMDFisRSTpXoANAsXJS2VCORs3kH6FN6srdEcigaTBYgb4y6rsnWpImjKQOOKLJtsWid4pvj+4qRP10= X-Received: by 2002:a05:651c:b29:b0:2c5:4b1:32a0 with SMTP id b41-20020a05651c0b2900b002c504b132a0mr4624524ljr.31.1697618783734; Wed, 18 Oct 2023 01:46:23 -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: From: "Ard Biesheuvel" Date: Wed, 18 Oct 2023 10:46:12 +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=WcRgYybF; 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 Wed, 18 Oct 2023 at 10:45, Ard Biesheuvel wrote: > > 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. ... and it also lacks a s-o-b line -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109714): https://edk2.groups.io/g/devel/message/109714 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] -=-=-=-=-=-=-=-=-=-=-=-