On Tue, 17 Oct 2023 at 15:23, Marcin Juszkiewicz <marcin.juszkiew...@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. -=-=-=-=-=-=-=-=-=-=-=- 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/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-