public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: devel@edk2.groups.io, marcin.juszkiewicz@linaro.org,
	 Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Jeremy Linton <jeremy.linton@arm.com>,
	Nhi Pham <nhi@os.amperecomputing.com>,
	 Chuong Tran <chuong@os.amperecomputing.com>,
	 Rebecca Cran <rebecca@os.amperecomputing.com>
Subject: Re: [edk2-devel] [PATCH edk2-platforms v3 1/4] SbsaQemu: introduce macro to compare platform version
Date: Wed, 18 Oct 2023 10:46:12 +0200	[thread overview]
Message-ID: <CAMj1kXH6F4fbq0iBnG_bdeN_p7Cj478zAxkRyNoiN_vSjHSWVg@mail.gmail.com> (raw)
In-Reply-To: <CAMj1kXHV=uhbsrKyZFo0eP3RwfmLMq-9cVht6FR9tKSKcpPQKQ@mail.gmail.com>

On Wed, 18 Oct 2023 at 10:45, Ard Biesheuvel <ardb@kernel.org> wrote:
>
> On Tue, 17 Oct 2023 at 15:23, Marcin Juszkiewicz
> <marcin.juszkiewicz@linaro.org> 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]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2023-10-18  8:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-17 13:23 [edk2-devel] [PATCH edk2-platforms v3 0/4] Provide XHCI USB controller only for newer hardware Marcin Juszkiewicz
2023-10-17 13:23 ` [edk2-devel] [PATCH edk2-platforms v3 1/4] SbsaQemu: introduce macro to compare platform version Marcin Juszkiewicz
2023-10-18  8:45   ` Ard Biesheuvel
2023-10-18  8:46     ` Ard Biesheuvel [this message]
2023-10-18 10:10       ` Marcin Juszkiewicz
2023-10-17 13:23 ` [edk2-devel] [PATCH edk2-platforms v3 2/4] SbsaQemu: add AcpiLib Marcin Juszkiewicz
2023-10-17 13:23 ` [edk2-devel] [PATCH edk2-platforms v3 3/4] SbsaQemu: initialize XHCI only if it exists Marcin Juszkiewicz
2023-10-17 13:23 ` [edk2-devel] [PATCH edk2-platforms v3 4/4] SbsaQemu: disable XHCI in DSDT if not present Marcin Juszkiewicz
2023-10-18  3:28   ` Nhi Pham via groups.io
2023-10-18  5:56     ` Marcin Juszkiewicz
2023-10-18  8:47       ` Ard Biesheuvel
2023-10-18 10:08         ` Marcin Juszkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMj1kXH6F4fbq0iBnG_bdeN_p7Cj478zAxkRyNoiN_vSjHSWVg@mail.gmail.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox