From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x231.google.com (mail-it0-x231.google.com [IPv6:2607:f8b0:4001:c0b::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8F5C11A1E56 for ; Thu, 1 Sep 2016 05:26:38 -0700 (PDT) Received: by mail-it0-x231.google.com with SMTP id e124so98987116ith.0 for ; Thu, 01 Sep 2016 05:26:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SCrn+zSTlvKAkEbaMoSRUTfWaFOKeckwX7tu7tx08nI=; b=WD/cBpLXFsiQNuEHqjrbKsrzsyMd6gR/Bo8DAlYn3MJYbXdb074SXFos372zBmNr+q fhgU7PBwI2Ss0sJ5SnNhXwbJkfdouHw8VMpIH/1HiTw289ANqSk4c5Xa6BdmMI6JhTUT 3JCsctJnECUVP13XqtY1JHfkFifuX5FX31LMk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SCrn+zSTlvKAkEbaMoSRUTfWaFOKeckwX7tu7tx08nI=; b=VtUMWpepGlr7y6S/Qs9sWEsGIeeAXYwZeMt/F7qOhq/MEnimFqVjGc8gZFdyPVs/de qK9sSjwHjN01gZ37lb4ianK5Te97jo5BrbzRNVYtDUrkn06isKJVTRSaXWvW6z5UC/II +7Z7pF4mvqjiDfI/6Qwni3KLO5nYhyTICWFqwEWLkK76bBiiRf9aTYGLPyiFJ1aA0EaC 0bqEo+UTbcvAqjzAlPTx0tkwTGV6OEEG0IgnFy6YMt2H4RaWGsxR+9FTsn70LJxSPlgX eHFAJJdJ6jQYXwmtX1K2xk94MEkrgW+INcVVbNdEtqupcOUYRjNxmd7Ga6YxEr+Ff5Qc 0TxQ== X-Gm-Message-State: AE9vXwMY2v1mtymceIsAH3ii61+fWo3+X77XkHz/PTYmHuO9CxO2qCCNCHstKWxyO9ZjmfybO+SKPfGwQsvCEJoy X-Received: by 10.36.137.193 with SMTP id s184mr36646271itd.51.1472732797921; Thu, 01 Sep 2016 05:26:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.204.195 with HTTP; Thu, 1 Sep 2016 05:26:37 -0700 (PDT) In-Reply-To: <1472731863-21633-1-git-send-email-vikas.cha.sajjan@hpe.com> References: <1472731863-21633-1-git-send-email-vikas.cha.sajjan@hpe.com> From: Ard Biesheuvel Date: Thu, 1 Sep 2016 13:26:37 +0100 Message-ID: To: Vikas C Sajjan Cc: edk2-devel-01 , Laszlo Ersek , Leif Lindholm Subject: Re: [PATCH] ArmPkg: Add IsZeroGuid() API support for ArmPkg X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2016 12:26:38 -0000 Content-Type: text/plain; charset=UTF-8 On 1 September 2016 at 13:11, Vikas C Sajjan wrote: > The commit "965268e SecurityPkg: Use IsZeroGuid API for zero GUID checking" > breaks the ArmPkg build as below. > > edk2/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c:184: undefined reference to `IsZeroGuid' > edk2/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c:5692: undefined reference to `IsZeroGuid' > edk2/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c:2832: undefined reference to `IsZeroGuid' > edk2/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c:361: undefined reference to `IsZeroGuid' > edk2/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c:376: undefined reference to `IsZeroGuid' > > Since it introduced the use of IsZeroGuid() instead > CompareGuid(). And the IsZeroGuid() support was missing in ArmPkg. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Reported-by: Mohan Parthasarathy > Signed-off-by: Vikas C Sajjan Thanks, but I already sent a patch for this. However, it appears that Leif prefers that the ARM version of BaseMemoryLib be moved into MdePkg instead. > --- > ArmPkg/Library/BaseMemoryLibStm/MemLibGuid.c | 29 ++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > > diff --git a/ArmPkg/Library/BaseMemoryLibStm/MemLibGuid.c b/ArmPkg/Library/BaseMemoryLibStm/MemLibGuid.c > index 2b4ed57..36d42d7 100644 > --- a/ArmPkg/Library/BaseMemoryLibStm/MemLibGuid.c > +++ b/ArmPkg/Library/BaseMemoryLibStm/MemLibGuid.c > @@ -130,3 +130,32 @@ ScanGuid ( > } > return NULL; > } > + > +/** > + Checks if the given GUID is a zero GUID. > + > + This function checks whether the given GUID is a zero GUID. If the GUID is > + identical to a zero GUID then TRUE is returned. Otherwise, FALSE is returned. > + > + If Guid is NULL, then ASSERT(). > + > + @param Guid The pointer to a 128 bit GUID. > + > + @retval TRUE Guid is a zero GUID. > + @retval FALSE Guid is not a zero GUID. > + > +**/ > +BOOLEAN > +EFIAPI > +IsZeroGuid ( > + IN CONST GUID *Guid > + ) > +{ > + UINT64 LowPartOfGuid; > + UINT64 HighPartOfGuid; > + > + LowPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid); > + HighPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid + 1); > + > + return (BOOLEAN) (LowPartOfGuid == 0 && HighPartOfGuid == 0); > +} > -- > 1.9.1 >