From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mx.groups.io with SMTP id smtpd.web10.42091.1680218809086137158 for ; Thu, 30 Mar 2023 16:26:49 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DGBOqQ+J; spf=pass (domain: gmail.com, ip: 209.85.210.179, mailfrom: pedro.falcato@gmail.com) Received: by mail-pf1-f179.google.com with SMTP id l14so13664299pfc.11 for ; Thu, 30 Mar 2023 16:26:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680218808; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=MGlzRIoOm1lJbJtpXjqcOTwvQyWpW2ecPTcyH0dHcVo=; b=DGBOqQ+JVnBuG8+ZA0smm4PQVU6f7QJBKFjIFJJt5IS3SEFwPQOILLmo8mOncSh/9C yV92fyQiW2JzNf9xWqCOKjh6DHpFpj0cxyYuiBlxtVPGsCAnYmsBRHOhFiVhaDeo4C+1 rvTS0nu0miC+5/JDn1PTNUcKSzCvTA/ZzbPagpkCjB5lq7sC8o6VUyIEMz9WoyS4Yd2v glPJjtiKvDFi/hdgDM7q3Ru44IqcI65MSK3Um4ZPv6FXunqqWWFcqFGxlhvRMfM8apPg OwhbFtlQMq22rWtC7HxJDNWeRJKY81SP76NZZ6gCI//8KRrg2SxXHjGtLfoVt0s951Wi uFrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680218808; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MGlzRIoOm1lJbJtpXjqcOTwvQyWpW2ecPTcyH0dHcVo=; b=Fp01juViCs6U/LeDPgQQRTEfRB2UczdE0tVyHH7HfD0S+YD6G/twUXofOSXv2THtkd A4ZvdiZ9rZ6K5jlfas4VYscmhr7jgqaElFXCM/33qlQmLB8JzMQB0L8/PqgeHov0HdV4 4kvNr/ZIrsdvQDYvsYk3LwZybdKtEy0sabNXKEgK43k2eA65P/m75khZPUnx4z4l1vDB yxl1LEdWIXqjaJfwlq4sKcahC+Z6gCOsILiZHFPn/KV4Pam/Es2iHjwMCzjTFSj/7PsI FEummHUfIaoiS7VYlrl86hz8z1VFvl8uxp9M6DH5IPtXm193QWi4uWxet8bBsKgqd5wt Yt4A== X-Gm-Message-State: AAQBX9epGkABzcRyuUDt9jtvTlSViuAmBHeXVFHiOW3Zl2VC7Itl2KB9 L+w+A+HZYb+sPX+7gMkID6JGOc8UFO0dmLqK63yhy0sb X-Google-Smtp-Source: AKy350bi+qGnpuERZjcTQPLU4HDJzjqdkazQPiRP8AwMNW5kX6LIgJPTk2mJ7oIyNXcgMiHpP6jrevMRzGbS3ToLB8Q= X-Received: by 2002:a05:6a00:1905:b0:62d:934e:6ef8 with SMTP id y5-20020a056a00190500b0062d934e6ef8mr7638125pfi.5.1680218808518; Thu, 30 Mar 2023 16:26:48 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Pedro Falcato" Date: Fri, 31 Mar 2023 00:26:37 +0100 Message-ID: Subject: Re: [edk2-devel] [PATCH 0/2] Support FDT library. To: "Kinney, Michael D" Cc: "devel@edk2.groups.io" , "Lin, Benny" , "Gao, Liming" , "Liu, Zhiguang" , Sean Brogan , Michael Kubacki , Leif Lindholm Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Mar 30, 2023 at 11:59=E2=80=AFPM Kinney, Michael D wrote: > > > > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of Pedro Fa= lcato > > Sent: Thursday, March 30, 2023 2:50 PM > > To: devel@edk2.groups.io; Lin, Benny > > Cc: Kinney, Michael D ; Gao, Liming ; Liu, Zhiguang > > ; Sean Brogan ; Mich= ael Kubacki > > Subject: Re: [edk2-devel] [PATCH 0/2] Support FDT library. > > > > On Thu, Mar 30, 2023 at 6:13=E2=80=AFPM Benny Lin = wrote: > > > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4392 > > > Add FDT support in EDK2 by submodule 3rd party libfdt > > > (https://github.com/devicetree-org/pylibfdt/tree/main/libfdt) > > > > > > Cc: Michael D Kinney > > > Cc: Liming Gao > > > Cc: Zhiguang Liu > > > Cc: Sean Brogan > > > Cc: Michael Kubacki > > > Signed-off-by: Benny Lin > > > > > > Benny Lin (2): > > > MdePkg: Support FDT library. > > > .pytool: Support FDT library. > > > > > > .gitmodules | 3 + > > > .pytool/CISettings.py | 2 + > > > MdePkg/Include/Library/FdtLib.h | 300 ++++++++++++++++++++= ++ > > > MdePkg/Library/BaseFdtLib/BaseFdtLib.inf | 62 +++++ > > > MdePkg/Library/BaseFdtLib/BaseFdtLib.uni | 14 + > > > MdePkg/Library/BaseFdtLib/FdtLib.c | 284 ++++++++++++++++++++ > > > MdePkg/Library/BaseFdtLib/LibFdtSupport.h | 102 ++++++++ > > > MdePkg/Library/BaseFdtLib/LibFdtWrapper.c | 138 ++++++++++ > > > MdePkg/Library/BaseFdtLib/libfdt | 1 + > > > MdePkg/Library/BaseFdtLib/limits.h | 10 + > > > MdePkg/Library/BaseFdtLib/stdbool.h | 10 + > > > MdePkg/Library/BaseFdtLib/stddef.h | 10 + > > > MdePkg/Library/BaseFdtLib/stdint.h | 10 + > > > MdePkg/Library/BaseFdtLib/stdlib.h | 10 + > > > MdePkg/Library/BaseFdtLib/string.h | 10 + > > > MdePkg/MdePkg.ci.yaml | 17 +- > > > MdePkg/MdePkg.dec | 4 + > > > MdePkg/MdePkg.dsc | 2 + > > > ReadMe.rst | 1 + > > > 19 files changed, 988 insertions(+), 2 deletions(-) > > > create mode 100644 MdePkg/Include/Library/FdtLib.h > > > create mode 100644 MdePkg/Library/BaseFdtLib/BaseFdtLib.inf > > > create mode 100644 MdePkg/Library/BaseFdtLib/BaseFdtLib.uni > > > create mode 100644 MdePkg/Library/BaseFdtLib/FdtLib.c > > > create mode 100644 MdePkg/Library/BaseFdtLib/LibFdtSupport.h > > > create mode 100644 MdePkg/Library/BaseFdtLib/LibFdtWrapper.c > > > create mode 160000 MdePkg/Library/BaseFdtLib/libfdt > > > create mode 100644 MdePkg/Library/BaseFdtLib/limits.h > > > create mode 100644 MdePkg/Library/BaseFdtLib/stdbool.h > > > create mode 100644 MdePkg/Library/BaseFdtLib/stddef.h > > > create mode 100644 MdePkg/Library/BaseFdtLib/stdint.h > > > create mode 100644 MdePkg/Library/BaseFdtLib/stdlib.h > > > create mode 100644 MdePkg/Library/BaseFdtLib/string.h > > > > > > -- > > > 2.39.1.windows.1 > > > > There's already a copy of libfdt plus "FdtLib" at > > https://github.com/tianocore/edk2/tree/master/EmbeddedPkg/Library/FdtLi= b. > > Please figure out what to do with it. > > It's an old copy and has been accidentally uncrustify'd so it's > > probably a good idea to at least ditch that specific copy for a git > > submodule. > > I have discussed this overlap with Leif. After this patch series is > added, the EmbeddedPkg maintainers can convert that package to use > this lib and delete the duplicate sources. Ok, SGTM. > > > > > Also, NAK to Yet Another libc Implementation (and not a particularly > > good one at that). > > Please provide constructive feedback on what is not good about this speci= fic libc > Implementation so that appropriate code updates could be made for this pa= tch series. Done. > This is following the same pattern as other libs that are consuming a sub= module > that requires some amount of libc support. > > Getting down to one libc wrapper would be great. Do you want to provide = a proposed > implementation? That could be handled as a separate task. I would like it if we could stop contributing to that problem. We very much *know* there is a problem with both libc fragments and compiler intrinsic fragments all over edk2. A proper, correct C standard library is not trivial to implement (hence the multiple problems I did find from a quick read of the patch). We also have a whole libc implementation in edk2-libc that seems to be permanently gathering dust until Intel touches it for Python purposes from time to time. So between crypto, libfdt, etc, could we try to unify things here a bit? Thanks, Pedro