[edk2-devel] [edk2-staging/RISC-V-V2 PATCH v1 01/22]: RiscVPkg: RISC-V processor package.

Abner Chang posted 22 patches 6 years, 5 months ago
[edk2-devel] [edk2-staging/RISC-V-V2 PATCH v1 01/22]: RiscVPkg: RISC-V processor package.
Posted by Abner Chang 6 years, 5 months ago
- Add RiscVPkg package which provides RISC-V processor related drivers and libraries.
- Support RISC-V OpenSBI and RISC-V platforms

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Abner Chang <abner.chang@hpe.com>
---
 RiscVPkg/RiscVPkg.dec      |  57 +++++++++++++++++++++++++++++++++++++++++++++
 RiscVPkg/RiscVPkg.uni      | Bin 0 -> 1718 bytes
 RiscVPkg/RiscVPkgExtra.uni | Bin 0 -> 1374 bytes
 3 files changed, 57 insertions(+)
 create mode 100644 RiscVPkg/RiscVPkg.dec
 create mode 100644 RiscVPkg/RiscVPkg.uni
 create mode 100644 RiscVPkg/RiscVPkgExtra.uni

diff --git a/RiscVPkg/RiscVPkg.dec b/RiscVPkg/RiscVPkg.dec
new file mode 100644
index 0000000..acf71fe
--- /dev/null
+++ b/RiscVPkg/RiscVPkg.dec
@@ -0,0 +1,57 @@
+## @file  RiscVPkg.dec
+# This Package provides UEFI RISC-V modules and libraries.
+#
+# Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+#
+# This program and the accompanying materials are licensed and made available under
+# the terms and conditions of the BSD License which accompanies this distribution.
+# The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
+[Defines]
+  DEC_SPECIFICATION              = 0x00010005
+  PACKAGE_NAME                   = RiscVPkg
+  PACKAGE_UNI_FILE               = RiscVPkg.uni
+  PACKAGE_GUID                   = 993C7CAC-C87C-4F08-A2CF-AD3AABA859D1
+  PACKAGE_VERSION                = 0.1
+
+[Includes]
+  Include
+  opensbi/include
+  opensbi/lib/utils/libfdt
+
+[LibraryClasses]
+
+[LibraryClasses.RISCV32, LibraryClasses.RISCV64]
+
+[Guids]
+  gUefiRiscVPkgTokenSpaceGuid  = { 0x4261e9c8, 0x52c0, 0x4b34, { 0x85, 0x3d, 0x48, 0x46, 0xea, 0xd3, 0xb7, 0x2c}}
+  gUefiRiscVMachineContextGuid = { 0xdad19cd5, 0x9d1f, 0x4f38, { 0xbc, 0xba, 0x10, 0x81, 0xe4, 0xcd, 0xb7, 0x3f}}
+
+[PcdsFixedAtBuild]
+  # Processor Specific Data GUID HOB GUID
+  gUefiRiscVPkgTokenSpaceGuid.PcdProcessorSpecificDataGuidHobGuid|{0x20, 0x72, 0xD5, 0x2F, 0xCF, 0x3C, 0x4C, 0xBC, 0xB1, 0x65, 0x94, 0x90, 0xDC, 0xF2, 0xFA, 0x93}|VOID*|0x00001000
+  gUefiRiscVPkgTokenSpaceGuid.PcdProcessorSmbiosGuidHobGuid|{0x0F, 0x34, 0x00, 0x92, 0x04, 0x12, 0x45, 0x4A, 0x9C, 0x11, 0xB8, 0x8B, 0xDF, 0xC6, 0xFA, 0x6F}|VOID*|0x00001001
+  gUefiRiscVPkgTokenSpaceGuid.PcdProcessorSmbiosType4GuidHobGuid|{0x5B, 0x36, 0xEA, 0x23, 0x79, 0x6D, 0x4F, 0xCF, 0x9C, 0x22, 0x25, 0xC0, 0x89, 0x8C, 0x25, 0xB9}|VOID*|0x00001002
+  gUefiRiscVPkgTokenSpaceGuid.PcdProcessorSmbiosType7GuidHobGuid|{0xBF, 0xB4, 0x6D, 0x1B, 0x7E, 0x10, 0x47, 0x44, 0xB8, 0xBD, 0xFF, 0x1E, 0xDD, 0xDF, 0x71, 0x65}|VOID*|0x00001003
+
+
+  #
+  #                                                   1000000000
+  # PcdRiscVMachineTimerTickInNanoSecond = ---------------------------------------
+  #                                          PcdRiscVMachineTimerFrequencyInHerz
+  #
+  gUefiRiscVPkgTokenSpaceGuid.PcdRiscVMachineTimerTickInNanoSecond|100|UINT64|0x00001010
+  gUefiRiscVPkgTokenSpaceGuid.PcdRiscVMachineTimerFrequencyInHerz|10000000|UINT64|0x00001011
+
+[PcdsPatchableInModule]
+
+[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
+
+[UserExtensions.TianoCore."ExtraFiles"]
+  RiscVPkgExtra.uni
diff --git a/RiscVPkg/RiscVPkg.uni b/RiscVPkg/RiscVPkg.uni
new file mode 100644
index 0000000000000000000000000000000000000000..550e30d5c9e5db4091e4ba5090e38413a5c69393
GIT binary patch
literal 1718
zcmchXNpBND5QXcE#D8cx7eI*(95^6^h~r7H5@O2>fm1ZL6K8}SqqZ@a9}j%5dloy1
z1Sd3_UTb;vs;YngYFNV@|1&;k@9f$#o7t5;wnv=mu4irQ+mRjEM|NFHZERl{r${+F
zvjzJUoy>l6GU2RmEA#Acky)}&S?T-;*<0?e!dNeTRK6tf)iyzUYB$I_dxHI^%rEV^
zy|7od&-y(!z6YGEAXB08!Bdj^@mLd*Wx(2ET=UO@mpLn;Q4C$HGaqs@W0pqrF7zHb
z>HDBNLGq0?Vdd=u_y=H?Hy8Xau;Ph+&c5Jag@kw$i(_!ik<{HL=gV=D29AV6yha9v
z!m-QH5^f<9r-fZ<O>)a?*2-dPBSz_cLqoT|#O&}9ktiP?uiKdtGHGN;Wnrz`1=UgM
zHOX^}{n-vCM_$CinDKs;8NOsmz9Ucav1G4kN8l{{Rn_54tSX9Y?qi08`3JIhG41jb
zx!fQ%%JmmH6GFDy;zE_SA``De&8r3@$CCGf@jB6a^4YkPgC!>;BAC!0yWZ<qx#6#>
zyIKvX-~?P<>ZoHUjEDAty*kaos^&rHyrvCVC4uRooiit#i<4-f%0ip|N|5LW%N<s#
zXpJ>y*_G8Ab2IF<+uuTW!M&_@f=6c;Nc94;bI#jXm5omD-eV{1I+M=<vXYV4D0Pgi
zynkjs<wnTWxk>INMv>U3(oSW)4HsSNN<LfkTfti~yYN~y!nw}$@0C@gS4VG<_`Af;
zA-tS2o?z{gS&ZpU=K~}k{`SbGdTUAr6mOks;sADpw1#C*O{}R~b=H!zAs&uF?Y25w
z^;~q}?n^pHdlD)-Y8RcXDjH!s<&XVRD<l2aC{-nTv*oc{X6AmRe~(hV7dy3jW8=%O
Pm-YX|Ux)1?&zk=L?rRDP

literal 0
HcmV?d00001

diff --git a/RiscVPkg/RiscVPkgExtra.uni b/RiscVPkg/RiscVPkgExtra.uni
new file mode 100644
index 0000000000000000000000000000000000000000..64235949b742be811c22776aaa6b76741e8e68d6
GIT binary patch
literal 1374
zcmZvcNpBND5QXcE#D8d+3!uaX4jd3d*zu593Gv8wSWc0bEF<g~jVA%~<ALv0&k_e@
zxvQ(Xme;SU=g;qsbu93I&M(+|yR^)fc43e05mudzY+z$MuzmZ4mfF<j_Ko!luV5#(
zMxPRs*)J>$Y-1}dN58>mgFa;^`vJZ;oL%_Zu4^>4<ni6M9(`rk_y&7Q{%6Qn_QGD;
zYujUgM2;Vhvv8jVRqmCNvQADmA=x<AKI<L-rB_+86B^wiwKlTL$r7oESY7CI{1l&i
z>;liX)`OLI|G_^2v#JHJyCzG{?N{g(2L&GDO)SpAvBFbl+mf$<W$GLWg?Nn&3PnK6
zh!Sog5~o#OMJ>wAckI>0sm)jwcT0p$^BQxYMns~1<W#-iDIrrthF9i$ovxXVCay=H
z`{*Y-m;!wf2XoecZ<$d`nN&OSq#7G^-F61fs$Mf4!NjU=amjh?kTCzm_aUZTej=A!
zyk=$mx@1DgihEpW(h559#%EqL7&(@I?u@s&eNI0+4|=e{GUEmd-p6kBHd(IuSJPcd
z-RH;>P^C=K&<<I<_7Pq0EWoMc#NS=d&e$c+^O>C@6YNcfrUwIFSAxgbGY{Emp0&1+
z%B!p`WY2YJdo{LTpE(z<p;wgNrIL`HVjqxIIfh<+geL5=spbSP`KW62`hc$@zao!0
z5puoTq^uHek=U0yPm_HB7b#Pvntfhd#aktVf2%rfm+eVCKl<M2>m%;YOLkMTjOrW6
y+J&iO)<aItK_>3ijhIWXMtN?L@e8L(*oPG%luwI%n%TL35A}MR?_sM(CC|Utz|=+n

literal 0
HcmV?d00001

-- 
2.7.4


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46778): https://edk2.groups.io/g/devel/message/46778
Mute This Topic: https://groups.io/mt/33137119/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v1 01/22]: RiscVPkg: RISC-V processor package.
Posted by Leif Lindholm 6 years, 5 months ago
Hi Abner,

On Wed, Sep 04, 2019 at 06:42:56PM +0800, Abner Chang wrote:
> - Add RiscVPkg package which provides RISC-V processor related drivers and libraries.
> - Support RISC-V OpenSBI and RISC-V platforms
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Abner Chang <abner.chang@hpe.com>
> ---
>  RiscVPkg/RiscVPkg.dec      |  57 +++++++++++++++++++++++++++++++++++++++++++++
>  RiscVPkg/RiscVPkg.uni      | Bin 0 -> 1718 bytes
>  RiscVPkg/RiscVPkgExtra.uni | Bin 0 -> 1374 bytes
>  3 files changed, 57 insertions(+)
>  create mode 100644 RiscVPkg/RiscVPkg.dec
>  create mode 100644 RiscVPkg/RiscVPkg.uni
>  create mode 100644 RiscVPkg/RiscVPkgExtra.uni
> 
> diff --git a/RiscVPkg/RiscVPkg.dec b/RiscVPkg/RiscVPkg.dec
> new file mode 100644
> index 0000000..acf71fe
> --- /dev/null
> +++ b/RiscVPkg/RiscVPkg.dec
> @@ -0,0 +1,57 @@
> +## @file  RiscVPkg.dec
> +# This Package provides UEFI RISC-V modules and libraries.
> +#
> +# Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
> +#
> +# This program and the accompanying materials are licensed and made available under
> +# the terms and conditions of the BSD License which accompanies this distribution.
> +# The full text of the license may be found at
> +# http://opensource.org/licenses/bsd-license.php
> +#
> +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
> +#
> +##
> +
> +[Defines]
> +  DEC_SPECIFICATION              = 0x00010005
> +  PACKAGE_NAME                   = RiscVPkg
> +  PACKAGE_UNI_FILE               = RiscVPkg.uni
> +  PACKAGE_GUID                   = 993C7CAC-C87C-4F08-A2CF-AD3AABA859D1
> +  PACKAGE_VERSION                = 0.1
> +
> +[Includes]
> +  Include
> +  opensbi/include
> +  opensbi/lib/utils/libfdt

This one is something we need to sort out (together). Having multiple
copies of libfdt in the tree is not on.

I personally think we need a longer-term encapsulation of libfdt that
doesn't mess up the coding style. But until then, I would be much
happier if you used the half measure we have in EmbeddedPkg:
EmbeddedPkg/Library/FdtLib/ and EmbeddedPkg/Include/.

> +
> +[LibraryClasses]
> +
> +[LibraryClasses.RISCV32, LibraryClasses.RISCV64]
> +
> +[Guids]
> +  gUefiRiscVPkgTokenSpaceGuid  = { 0x4261e9c8, 0x52c0, 0x4b34, { 0x85, 0x3d, 0x48, 0x46, 0xea, 0xd3, 0xb7, 0x2c}}
> +  gUefiRiscVMachineContextGuid = { 0xdad19cd5, 0x9d1f, 0x4f38, { 0xbc, 0xba, 0x10, 0x81, 0xe4, 0xcd, 0xb7, 0x3f}}
> +
> +[PcdsFixedAtBuild]
> +  # Processor Specific Data GUID HOB GUID
> +  gUefiRiscVPkgTokenSpaceGuid.PcdProcessorSpecificDataGuidHobGuid|{0x20, 0x72, 0xD5, 0x2F, 0xCF, 0x3C, 0x4C, 0xBC, 0xB1, 0x65, 0x94, 0x90, 0xDC, 0xF2, 0xFA, 0x93}|VOID*|0x00001000
> +  gUefiRiscVPkgTokenSpaceGuid.PcdProcessorSmbiosGuidHobGuid|{0x0F, 0x34, 0x00, 0x92, 0x04, 0x12, 0x45, 0x4A, 0x9C, 0x11, 0xB8, 0x8B, 0xDF, 0xC6, 0xFA, 0x6F}|VOID*|0x00001001
> +  gUefiRiscVPkgTokenSpaceGuid.PcdProcessorSmbiosType4GuidHobGuid|{0x5B, 0x36, 0xEA, 0x23, 0x79, 0x6D, 0x4F, 0xCF, 0x9C, 0x22, 0x25, 0xC0, 0x89, 0x8C, 0x25, 0xB9}|VOID*|0x00001002
> +  gUefiRiscVPkgTokenSpaceGuid.PcdProcessorSmbiosType7GuidHobGuid|{0xBF, 0xB4, 0x6D, 0x1B, 0x7E, 0x10, 0x47, 0x44, 0xB8, 0xBD, 0xFF, 0x1E, 0xDD, 0xDF, 0x71, 0x65}|VOID*|0x00001003
> +
> +
> +  #
> +  #                                                   1000000000
> +  # PcdRiscVMachineTimerTickInNanoSecond = ---------------------------------------
> +  #                                          PcdRiscVMachineTimerFrequencyInHerz
> +  #
> +  gUefiRiscVPkgTokenSpaceGuid.PcdRiscVMachineTimerTickInNanoSecond|100|UINT64|0x00001010
> +  gUefiRiscVPkgTokenSpaceGuid.PcdRiscVMachineTimerFrequencyInHerz|10000000|UINT64|0x00001011

My personal preference would be for these Pcds to be included with the
specific commits that add use of them.

> +
> +[PcdsPatchableInModule]
> +
> +[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
> +
> +[UserExtensions.TianoCore."ExtraFiles"]
> +  RiscVPkgExtra.uni
> diff --git a/RiscVPkg/RiscVPkg.uni b/RiscVPkg/RiscVPkg.uni
> new file mode 100644
> index 0000000000000000000000000000000000000000..550e30d5c9e5db4091e4ba5090e38413a5c69393
> GIT binary patch

I think we're happy taking .uni files as UTF-8 these days - this
greatly simplifies documentation review.

Regards,

Leif

> literal 1718
> zcmchXNpBND5QXcE#D8cx7eI*(95^6^h~r7H5@O2>fm1ZL6K8}SqqZ@a9}j%5dloy1
> z1Sd3_UTb;vs;YngYFNV@|1&;k@9f$#o7t5;wnv=mu4irQ+mRjEM|NFHZERl{r${+F
> zvjzJUoy>l6GU2RmEA#Acky)}&S?T-;*<0?e!dNeTRK6tf)iyzUYB$I_dxHI^%rEV^
> zy|7od&-y(!z6YGEAXB08!Bdj^@mLd*Wx(2ET=UO@mpLn;Q4C$HGaqs@W0pqrF7zHb
> z>HDBNLGq0?Vdd=u_y=H?Hy8Xau;Ph+&c5Jag@kw$i(_!ik<{HL=gV=D29AV6yha9v
> z!m-QH5^f<9r-fZ<O>)a?*2-dPBSz_cLqoT|#O&}9ktiP?uiKdtGHGN;Wnrz`1=UgM
> zHOX^}{n-vCM_$CinDKs;8NOsmz9Ucav1G4kN8l{{Rn_54tSX9Y?qi08`3JIhG41jb
> zx!fQ%%JmmH6GFDy;zE_SA``De&8r3@$CCGf@jB6a^4YkPgC!>;BAC!0yWZ<qx#6#>
> zyIKvX-~?P<>ZoHUjEDAty*kaos^&rHyrvCVC4uRooiit#i<4-f%0ip|N|5LW%N<s#
> zXpJ>y*_G8Ab2IF<+uuTW!M&_@f=6c;Nc94;bI#jXm5omD-eV{1I+M=<vXYV4D0Pgi
> zynkjs<wnTWxk>INMv>U3(oSW)4HsSNN<LfkTfti~yYN~y!nw}$@0C@gS4VG<_`Af;
> zA-tS2o?z{gS&ZpU=K~}k{`SbGdTUAr6mOks;sADpw1#C*O{}R~b=H!zAs&uF?Y25w
> z^;~q}?n^pHdlD)-Y8RcXDjH!s<&XVRD<l2aC{-nTv*oc{X6AmRe~(hV7dy3jW8=%O
> Pm-YX|Ux)1?&zk=L?rRDP
> 
> literal 0
> HcmV?d00001
> 
> diff --git a/RiscVPkg/RiscVPkgExtra.uni b/RiscVPkg/RiscVPkgExtra.uni
> new file mode 100644
> index 0000000000000000000000000000000000000000..64235949b742be811c22776aaa6b76741e8e68d6
> GIT binary patch
> literal 1374
> zcmZvcNpBND5QXcE#D8d+3!uaX4jd3d*zu593Gv8wSWc0bEF<g~jVA%~<ALv0&k_e@
> zxvQ(Xme;SU=g;qsbu93I&M(+|yR^)fc43e05mudzY+z$MuzmZ4mfF<j_Ko!luV5#(
> zMxPRs*)J>$Y-1}dN58>mgFa;^`vJZ;oL%_Zu4^>4<ni6M9(`rk_y&7Q{%6Qn_QGD;
> zYujUgM2;Vhvv8jVRqmCNvQADmA=x<AKI<L-rB_+86B^wiwKlTL$r7oESY7CI{1l&i
> z>;liX)`OLI|G_^2v#JHJyCzG{?N{g(2L&GDO)SpAvBFbl+mf$<W$GLWg?Nn&3PnK6
> zh!Sog5~o#OMJ>wAckI>0sm)jwcT0p$^BQxYMns~1<W#-iDIrrthF9i$ovxXVCay=H
> z`{*Y-m;!wf2XoecZ<$d`nN&OSq#7G^-F61fs$Mf4!NjU=amjh?kTCzm_aUZTej=A!
> zyk=$mx@1DgihEpW(h559#%EqL7&(@I?u@s&eNI0+4|=e{GUEmd-p6kBHd(IuSJPcd
> z-RH;>P^C=K&<<I<_7Pq0EWoMc#NS=d&e$c+^O>C@6YNcfrUwIFSAxgbGY{Emp0&1+
> z%B!p`WY2YJdo{LTpE(z<p;wgNrIL`HVjqxIIfh<+geL5=spbSP`KW62`hc$@zao!0
> z5puoTq^uHek=U0yPm_HB7b#Pvntfhd#aktVf2%rfm+eVCKl<M2>m%;YOLkMTjOrW6
> y+J&iO)<aItK_>3ijhIWXMtN?L@e8L(*oPG%luwI%n%TL35A}MR?_sM(CC|Utz|=+n
> 
> literal 0
> HcmV?d00001
> 
> -- 
> 2.7.4
> 
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46823): https://edk2.groups.io/g/devel/message/46823
Mute This Topic: https://groups.io/mt/33137119/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v1 01/22]: RiscVPkg: RISC-V processor package.
Posted by Abner Chang 6 years, 4 months ago

> -----Original Message-----
> From: Leif Lindholm [mailto:leif.lindholm@linaro.org]
> Sent: Thursday, September 5, 2019 1:51 AM
> To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist)
> <abner.chang@hpe.com>
> Subject: Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v1 01/22]:
> RiscVPkg: RISC-V processor package.
> 
> Hi Abner,
> 
> On Wed, Sep 04, 2019 at 06:42:56PM +0800, Abner Chang wrote:
> > - Add RiscVPkg package which provides RISC-V processor related drivers
> and libraries.
> > - Support RISC-V OpenSBI and RISC-V platforms
> >
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Abner Chang <abner.chang@hpe.com>
> > ---
> >  RiscVPkg/RiscVPkg.dec      |  57
> +++++++++++++++++++++++++++++++++++++++++++++
> >  RiscVPkg/RiscVPkg.uni      | Bin 0 -> 1718 bytes
> >  RiscVPkg/RiscVPkgExtra.uni | Bin 0 -> 1374 bytes
> >  3 files changed, 57 insertions(+)
> >  create mode 100644 RiscVPkg/RiscVPkg.dec  create mode 100644
> > RiscVPkg/RiscVPkg.uni  create mode 100644 RiscVPkg/RiscVPkgExtra.uni
> >
> > diff --git a/RiscVPkg/RiscVPkg.dec b/RiscVPkg/RiscVPkg.dec new file
> > mode 100644 index 0000000..acf71fe
> > --- /dev/null
> > +++ b/RiscVPkg/RiscVPkg.dec
> > @@ -0,0 +1,57 @@
> > +## @file  RiscVPkg.dec
> > +# This Package provides UEFI RISC-V modules and libraries.
> > +#
> > +# Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development
> > +LP. All rights reserved.<BR> # # This program and the accompanying
> > +materials are licensed and made available under # the terms and
> > +conditions of the BSD License which accompanies this distribution.
> > +# The full text of the license may be found at #
> > +INVALID URI REMOVED
> 3A__opensource.org_li
> > +censes_bsd-
> 2Dlicense.php&d=DwIBAg&c=C5b8zRQO1miGmBeVZ2LFWg&r=_SN6FZBN
> >
> +4Vgi4Ulkskz6qU3NYRO03nHp9P7Z5q59A3E&m=1PSVwg69_Y8lpR9wdv1TN7
> kg2brsZYR
> > +sj5F_hpyPrv4&s=USJlvms7O9ZDAsM0U-
> FGng8i0uJkAMNbDEp1S_C4p0A&e=
> > +#
> > +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS"
> > +BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND,
> EITHER EXPRESS OR IMPLIED.
> > +#
> > +##
> > +
> > +[Defines]
> > +  DEC_SPECIFICATION              = 0x00010005
> > +  PACKAGE_NAME                   = RiscVPkg
> > +  PACKAGE_UNI_FILE               = RiscVPkg.uni
> > +  PACKAGE_GUID                   = 993C7CAC-C87C-4F08-A2CF-AD3AABA859D1
> > +  PACKAGE_VERSION                = 0.1
> > +
> > +[Includes]
> > +  Include
> > +  opensbi/include
> > +  opensbi/lib/utils/libfdt
> 
> This one is something we need to sort out (together). Having multiple copies
> of libfdt in the tree is not on.
> 
> I personally think we need a longer-term encapsulation of libfdt that doesn't
> mess up the coding style. But until then, I would be much happier if you used
> the half measure we have in EmbeddedPkg:
> EmbeddedPkg/Library/FdtLib/ and EmbeddedPkg/Include/.
We may not go this way due to everything is from OpenSBI and we don't want to maintain the difference to open source OpenSBI. Just take what OpenSBI provides.
> 
> > +
> > +[LibraryClasses]
> > +
> > +[LibraryClasses.RISCV32, LibraryClasses.RISCV64]
> > +
> > +[Guids]
> > +  gUefiRiscVPkgTokenSpaceGuid  = { 0x4261e9c8, 0x52c0, 0x4b34, {
> > +0x85, 0x3d, 0x48, 0x46, 0xea, 0xd3, 0xb7, 0x2c}}
> > +  gUefiRiscVMachineContextGuid = { 0xdad19cd5, 0x9d1f, 0x4f38, {
> > +0xbc, 0xba, 0x10, 0x81, 0xe4, 0xcd, 0xb7, 0x3f}}
> > +
> > +[PcdsFixedAtBuild]
> > +  # Processor Specific Data GUID HOB GUID
> > +
> >
> +gUefiRiscVPkgTokenSpaceGuid.PcdProcessorSpecificDataGuidHobGuid|{0x
> 20
> > +, 0x72, 0xD5, 0x2F, 0xCF, 0x3C, 0x4C, 0xBC, 0xB1, 0x65, 0x94, 0x90,
> > +0xDC, 0xF2, 0xFA, 0x93}|VOID*|0x00001000
> > +  gUefiRiscVPkgTokenSpaceGuid.PcdProcessorSmbiosGuidHobGuid|{0x0F,
> > +0x34, 0x00, 0x92, 0x04, 0x12, 0x45, 0x4A, 0x9C, 0x11, 0xB8, 0x8B,
> > +0xDF, 0xC6, 0xFA, 0x6F}|VOID*|0x00001001
> > +
> >
> +gUefiRiscVPkgTokenSpaceGuid.PcdProcessorSmbiosType4GuidHobGuid|{0
> x5B,
> > +0x36, 0xEA, 0x23, 0x79, 0x6D, 0x4F, 0xCF, 0x9C, 0x22, 0x25, 0xC0,
> > +0x89, 0x8C, 0x25, 0xB9}|VOID*|0x00001002
> > +
> >
> +gUefiRiscVPkgTokenSpaceGuid.PcdProcessorSmbiosType7GuidHobGuid|{0
> xBF,
> > +0xB4, 0x6D, 0x1B, 0x7E, 0x10, 0x47, 0x44, 0xB8, 0xBD, 0xFF, 0x1E,
> > +0xDD, 0xDF, 0x71, 0x65}|VOID*|0x00001003
> > +
> > +
> > +  #
> > +  #                                                   1000000000
> > +  # PcdRiscVMachineTimerTickInNanoSecond = ---------------------------------
> ------
> > +  #                                          PcdRiscVMachineTimerFrequencyInHerz
> > +  #
> > +
> > +
> gUefiRiscVPkgTokenSpaceGuid.PcdRiscVMachineTimerTickInNanoSecond|10
> 0
> > + |UINT64|0x00001010
> > +
> > +
> gUefiRiscVPkgTokenSpaceGuid.PcdRiscVMachineTimerFrequencyInHerz|100
> 0
> > + 0000|UINT64|0x00001011
> 
> My personal preference would be for these Pcds to be included with the
> specific commits that add use of them.
> 
> > +
> > +[PcdsPatchableInModule]
> > +
> > +[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic,
> PcdsDynamicEx]
> > +
> > +[UserExtensions.TianoCore."ExtraFiles"]
> > +  RiscVPkgExtra.uni
> > diff --git a/RiscVPkg/RiscVPkg.uni b/RiscVPkg/RiscVPkg.uni new file
> > mode 100644 index
> >
> 0000000000000000000000000000000000000000..550e30d5c9e5db4091e4ba509
> 0e3
> > 8413a5c69393
> > GIT binary patch
> 
> I think we're happy taking .uni files as UTF-8 these days - this greatly
> simplifies documentation review.
> 
> Regards,
> 
> Leif
> 
> > literal 1718
> >
> zcmchXNpBND5QXcE#D8cx7eI*(95^6^h~r7H5@O2>fm1ZL6K8}SqqZ@a9}j%5
> dloy1
> >
> z1Sd3_UTb;vs;YngYFNV@|1&;k@9f$#o7t5;wnv=mu4irQ+mRjEM|NFHZERl{r$
> {+F
> > zvjzJUoy>l6GU2RmEA#Acky)}&S?T-
> ;*<0?e!dNeTRK6tf)iyzUYB$I_dxHI^%rEV^
> > zy|7od&-
> y(!z6YGEAXB08!Bdj^@mLd*Wx(2ET=UO@mpLn;Q4C$HGaqs@W0pqrF7zHb
> >
> z>HDBNLGq0?Vdd=u_y=H?Hy8Xau;Ph+&c5Jag@kw$i(_!ik<{HL=gV=D29AV6y
> ha9v
> > z!m-QH5^f<9r-fZ<O>)a?*2-
> dPBSz_cLqoT|#O&}9ktiP?uiKdtGHGN;Wnrz`1=UgM
> > zHOX^}{n-
> vCM_$CinDKs;8NOsmz9Ucav1G4kN8l{{Rn_54tSX9Y?qi08`3JIhG41jb
> >
> zx!fQ%%JmmH6GFDy;zE_SA``De&8r3@$CCGf@jB6a^4YkPgC!>;BAC!0yWZ<q
> x#6#>
> > zyIKvX-~?P<>ZoHUjEDAty*kaos^&rHyrvCVC4uRooiit#i<4-
> f%0ip|N|5LW%N<s#
> > zXpJ>y*_G8Ab2IF<+uuTW!M&_@f=6c;Nc94;bI#jXm5omD-
> eV{1I+M=<vXYV4D0Pgi
> >
> zynkjs<wnTWxk>INMv>U3(oSW)4HsSNN<LfkTfti~yYN~y!nw}$@0C@gS4VG
> <_`Af;
> > zA-
> tS2o?z{gS&ZpU=K~}k{`SbGdTUAr6mOks;sADpw1#C*O{}R~b=H!zAs&uF?Y25
> w
> > z^;~q}?n^pHdlD)-Y8RcXDjH!s<&XVRD<l2aC{-
> nTv*oc{X6AmRe~(hV7dy3jW8=%O
> > Pm-YX|Ux)1?&zk=L?rRDP
> >
> > literal 0
> > HcmV?d00001
> >
> > diff --git a/RiscVPkg/RiscVPkgExtra.uni b/RiscVPkg/RiscVPkgExtra.uni
> > new file mode 100644 index
> >
> 0000000000000000000000000000000000000000..64235949b742be811c22776aa
> a6b
> > 76741e8e68d6
> > GIT binary patch
> > literal 1374
> >
> zcmZvcNpBND5QXcE#D8d+3!uaX4jd3d*zu593Gv8wSWc0bEF<g~jVA%~<ALv0
> &k_e@
> >
> zxvQ(Xme;SU=g;qsbu93I&M(+|yR^)fc43e05mudzY+z$MuzmZ4mfF<j_Ko!luV
> 5#(
> > zMxPRs*)J>$Y-
> 1}dN58>mgFa;^`vJZ;oL%_Zu4^>4<ni6M9(`rk_y&7Q{%6Qn_QGD;
> > zYujUgM2;Vhvv8jVRqmCNvQADmA=x<AKI<L-
> rB_+86B^wiwKlTL$r7oESY7CI{1l&i
> >
> z>;liX)`OLI|G_^2v#JHJyCzG{?N{g(2L&GDO)SpAvBFbl+mf$<W$GLWg?Nn&3P
> nK6
> > zh!Sog5~o#OMJ>wAckI>0sm)jwcT0p$^BQxYMns~1<W#-
> iDIrrthF9i$ovxXVCay=H
> > z`{*Y-m;!wf2XoecZ<$d`nN&OSq#7G^-
> F61fs$Mf4!NjU=amjh?kTCzm_aUZTej=A!
> > zyk=$mx@1DgihEpW(h559#%EqL7&(@I?u@s&eNI0+4|=e{GUEmd-
> p6kBHd(IuSJPcd
> > z-
> RH;>P^C=K&<<I<_7Pq0EWoMc#NS=d&e$c+^O>C@6YNcfrUwIFSAxgbGY{Em
> p0&1+
> >
> z%B!p`WY2YJdo{LTpE(z<p;wgNrIL`HVjqxIIfh<+geL5=spbSP`KW62`hc$@zao!0
> >
> z5puoTq^uHek=U0yPm_HB7b#Pvntfhd#aktVf2%rfm+eVCKl<M2>m%;YOLk
> MTjOrW6
> >
> y+J&iO)<aItK_>3ijhIWXMtN?L@e8L(*oPG%luwI%n%TL35A}MR?_sM(CC|Utz
> |=+n
> >
> > literal 0
> > HcmV?d00001
> >
> > --
> > 2.7.4
> >
> >
> > 
> >

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47257): https://edk2.groups.io/g/devel/message/47257
Mute This Topic: https://groups.io/mt/33137119/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v1 01/22]: RiscVPkg: RISC-V processor package.
Posted by Leif Lindholm 6 years, 4 months ago
On Mon, Sep 16, 2019 at 05:15:08AM +0000, Chang, Abner (HPS SW/FW Technologist) wrote:
> > -----Original Message-----
> > From: Leif Lindholm [mailto:leif.lindholm@linaro.org]
> > Sent: Thursday, September 5, 2019 1:51 AM
> > To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist)
> > <abner.chang@hpe.com>
> > Subject: Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v1 01/22]:
> > RiscVPkg: RISC-V processor package.
> > 
> > Hi Abner,
> > 
> > On Wed, Sep 04, 2019 at 06:42:56PM +0800, Abner Chang wrote:
> > > - Add RiscVPkg package which provides RISC-V processor related drivers
> > and libraries.
> > > - Support RISC-V OpenSBI and RISC-V platforms
> > >
> > > Contributed-under: TianoCore Contribution Agreement 1.0
> > > Signed-off-by: Abner Chang <abner.chang@hpe.com>
> > > ---
> > >  RiscVPkg/RiscVPkg.dec      |  57
> > +++++++++++++++++++++++++++++++++++++++++++++
> > >  RiscVPkg/RiscVPkg.uni      | Bin 0 -> 1718 bytes
> > >  RiscVPkg/RiscVPkgExtra.uni | Bin 0 -> 1374 bytes
> > >  3 files changed, 57 insertions(+)
> > >  create mode 100644 RiscVPkg/RiscVPkg.dec  create mode 100644
> > > RiscVPkg/RiscVPkg.uni  create mode 100644 RiscVPkg/RiscVPkgExtra.uni
> > >
> > > diff --git a/RiscVPkg/RiscVPkg.dec b/RiscVPkg/RiscVPkg.dec new file
> > > mode 100644 index 0000000..acf71fe
> > > --- /dev/null
> > > +++ b/RiscVPkg/RiscVPkg.dec
> > > @@ -0,0 +1,57 @@
> > > +## @file  RiscVPkg.dec
> > > +# This Package provides UEFI RISC-V modules and libraries.
> > > +#
> > > +# Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development
> > > +LP. All rights reserved.<BR> # # This program and the accompanying
> > > +materials are licensed and made available under # the terms and
> > > +conditions of the BSD License which accompanies this distribution.
> > > +# The full text of the license may be found at #
> > > +INVALID URI REMOVED
> > 3A__opensource.org_li
> > > +censes_bsd-
> > 2Dlicense.php&d=DwIBAg&c=C5b8zRQO1miGmBeVZ2LFWg&r=_SN6FZBN
> > >
> > +4Vgi4Ulkskz6qU3NYRO03nHp9P7Z5q59A3E&m=1PSVwg69_Y8lpR9wdv1TN7
> > kg2brsZYR
> > > +sj5F_hpyPrv4&s=USJlvms7O9ZDAsM0U-
> > FGng8i0uJkAMNbDEp1S_C4p0A&e=
> > > +#
> > > +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS"
> > > +BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND,
> > EITHER EXPRESS OR IMPLIED.
> > > +#
> > > +##
> > > +
> > > +[Defines]
> > > +  DEC_SPECIFICATION              = 0x00010005
> > > +  PACKAGE_NAME                   = RiscVPkg
> > > +  PACKAGE_UNI_FILE               = RiscVPkg.uni
> > > +  PACKAGE_GUID                   = 993C7CAC-C87C-4F08-A2CF-AD3AABA859D1
> > > +  PACKAGE_VERSION                = 0.1
> > > +
> > > +[Includes]
> > > +  Include
> > > +  opensbi/include
> > > +  opensbi/lib/utils/libfdt
> > 
> > This one is something we need to sort out (together). Having multiple copies
> > of libfdt in the tree is not on.
> > 
> > I personally think we need a longer-term encapsulation of libfdt that doesn't
> > mess up the coding style. But until then, I would be much happier if you used
> > the half measure we have in EmbeddedPkg:
> > EmbeddedPkg/Library/FdtLib/ and EmbeddedPkg/Include/.
>
> We may not go this way due to everything is from OpenSBI and we
> don't want to maintain the difference to open source OpenSBI. Just
> take what OpenSBI provides.

If libfdt was a very quickly changing project, I might agree with you.
But it is not. It is a very simple piece of code that performs a small
set of operations on a very well defined structured encapsulation
format.

So please use the one from EmbeddedPkg. On the very unlikely
occurrence that you require functionality not provided by the version
in there, we can update it.

/
    Leif

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47371): https://edk2.groups.io/g/devel/message/47371
Mute This Topic: https://groups.io/mt/33137119/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v1 01/22]: RiscVPkg: RISC-V processor package.
Posted by Abner Chang 6 years, 4 months ago

> -----Original Message-----
> From: Leif Lindholm [mailto:leif.lindholm@linaro.org]
> Sent: Tuesday, September 17, 2019 10:03 PM
> To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
> Cc: devel@edk2.groups.io
> Subject: Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v1 01/22]:
> RiscVPkg: RISC-V processor package.
> 
> On Mon, Sep 16, 2019 at 05:15:08AM +0000, Chang, Abner (HPS SW/FW
> Technologist) wrote:
> > > -----Original Message-----
> > > From: Leif Lindholm [mailto:leif.lindholm@linaro.org]
> > > Sent: Thursday, September 5, 2019 1:51 AM
> > > To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist)
> > > <abner.chang@hpe.com>
> > > Subject: Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v1 01/22]:
> > > RiscVPkg: RISC-V processor package.
> > >
> > > Hi Abner,
> > >
> > > On Wed, Sep 04, 2019 at 06:42:56PM +0800, Abner Chang wrote:
> > > > - Add RiscVPkg package which provides RISC-V processor related
> > > > drivers
> > > and libraries.
> > > > - Support RISC-V OpenSBI and RISC-V platforms
> > > >
> > > > Contributed-under: TianoCore Contribution Agreement 1.0
> > > > Signed-off-by: Abner Chang <abner.chang@hpe.com>
> > > > ---
> > > >  RiscVPkg/RiscVPkg.dec      |  57
> > > +++++++++++++++++++++++++++++++++++++++++++++
> > > >  RiscVPkg/RiscVPkg.uni      | Bin 0 -> 1718 bytes
> > > >  RiscVPkg/RiscVPkgExtra.uni | Bin 0 -> 1374 bytes
> > > >  3 files changed, 57 insertions(+)  create mode 100644
> > > > RiscVPkg/RiscVPkg.dec  create mode 100644 RiscVPkg/RiscVPkg.uni
> > > > create mode 100644 RiscVPkg/RiscVPkgExtra.uni
> > > >
> > > > diff --git a/RiscVPkg/RiscVPkg.dec b/RiscVPkg/RiscVPkg.dec new
> > > > file mode 100644 index 0000000..acf71fe
> > > > --- /dev/null
> > > > +++ b/RiscVPkg/RiscVPkg.dec
> > > > @@ -0,0 +1,57 @@
> > > > +## @file  RiscVPkg.dec
> > > > +# This Package provides UEFI RISC-V modules and libraries.
> > > > +#
> > > > +# Copyright (c) 2016 - 2019, Hewlett Packard Enterprise
> > > > +Development LP. All rights reserved.<BR> # # This program and the
> > > > +accompanying materials are licensed and made available under #
> > > > +the terms and conditions of the BSD License which accompanies this
> distribution.
> > > > +# The full text of the license may be found at # INVALID URI
> > > > +REMOVED
> > > 3A__opensource.org_li
> > > > +censes_bsd-
> > >
> 2Dlicense.php&d=DwIBAg&c=C5b8zRQO1miGmBeVZ2LFWg&r=_SN6FZBN
> > > >
> > >
> +4Vgi4Ulkskz6qU3NYRO03nHp9P7Z5q59A3E&m=1PSVwg69_Y8lpR9wdv1TN7
> > > kg2brsZYR
> > > > +sj5F_hpyPrv4&s=USJlvms7O9ZDAsM0U-
> > > FGng8i0uJkAMNbDEp1S_C4p0A&e=
> > > > +#
> > > > +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS
> IS"
> > > > +BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND,
> > > EITHER EXPRESS OR IMPLIED.
> > > > +#
> > > > +##
> > > > +
> > > > +[Defines]
> > > > +  DEC_SPECIFICATION              = 0x00010005
> > > > +  PACKAGE_NAME                   = RiscVPkg
> > > > +  PACKAGE_UNI_FILE               = RiscVPkg.uni
> > > > +  PACKAGE_GUID                   = 993C7CAC-C87C-4F08-A2CF-
> AD3AABA859D1
> > > > +  PACKAGE_VERSION                = 0.1
> > > > +
> > > > +[Includes]
> > > > +  Include
> > > > +  opensbi/include
> > > > +  opensbi/lib/utils/libfdt
> > >
> > > This one is something we need to sort out (together). Having
> > > multiple copies of libfdt in the tree is not on.
> > >
> > > I personally think we need a longer-term encapsulation of libfdt
> > > that doesn't mess up the coding style. But until then, I would be
> > > much happier if you used the half measure we have in EmbeddedPkg:
> > > EmbeddedPkg/Library/FdtLib/ and EmbeddedPkg/Include/.
> >
> > We may not go this way due to everything is from OpenSBI and we don't
> > want to maintain the difference to open source OpenSBI. Just take what
> > OpenSBI provides.
> 
> If libfdt was a very quickly changing project, I might agree with you.
> But it is not. It is a very simple piece of code that performs a small set of
> operations on a very well defined structured encapsulation format.
> 
> So please use the one from EmbeddedPkg. On the very unlikely occurrence
> that you require functionality not provided by the version in there, we can
> update it.

I am not sure how's compatibility between these two libraries. However I can't agree to use EmbbedPkg one now, maybe later once this port is got on edk2 repo. Currently we just simply create an INF file and in which  pull everything OpenSBI provides, that is easy for us to integrate OpenSbi. We don't want to increase complexities now. I am not saying to not adopting EmbbedPkg one, just not for now.

> 
> /
>     Leif

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47561): https://edk2.groups.io/g/devel/message/47561
Mute This Topic: https://groups.io/mt/33137119/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v1 01/22]: RiscVPkg: RISC-V processor package.
Posted by Leif Lindholm 6 years, 4 months ago
On Thu, Sep 19, 2019 at 07:10:16AM +0000, Chang, Abner (HPS SW/FW Technologist) wrote:
> > -----Original Message-----
> > > > I personally think we need a longer-term encapsulation of libfdt
> > > > that doesn't mess up the coding style. But until then, I would be
> > > > much happier if you used the half measure we have in EmbeddedPkg:
> > > > EmbeddedPkg/Library/FdtLib/ and EmbeddedPkg/Include/.
> > >
> > > We may not go this way due to everything is from OpenSBI and we don't
> > > want to maintain the difference to open source OpenSBI. Just take what
> > > OpenSBI provides.
> > 
> > If libfdt was a very quickly changing project, I might agree with you.
> > But it is not. It is a very simple piece of code that performs a small set of
> > operations on a very well defined structured encapsulation format.
> > 
> > So please use the one from EmbeddedPkg. On the very unlikely occurrence
> > that you require functionality not provided by the version in there, we can
> > update it.
> 
> I am not sure how's compatibility between these two
> libraries. However I can't agree to use EmbbedPkg one now, maybe
> later once this port is got on edk2 repo. Currently we just simply
> create an INF file and in which  pull everything OpenSBI provides,
> that is easy for us to integrate OpenSbi. We don't want to increase
> complexities now. I am not saying to not adopting EmbbedPkg one,
> just not for now.

If the libfdt is simply what comes along with opensbi, then I can live
with that for now, once opensbi becomes a submodule.

The conversion to use the current EmbeddedPkg FdtLib should however be
completely trivial. So I would still like to see the following
*attempted* before we start considering this being included in edk2
master:

- add FdtLib to RiscVOpensbiLib.inf [LibraryClasses]
- delete all of the libfdt/* files from RiscVOpensbiLib.inf [Sources]
- add EmbeddedPkg/EmbeddedPkg.dec to RiscVOpensbiLib.inf  [Packages]

/
    Leif

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47726): https://edk2.groups.io/g/devel/message/47726
Mute This Topic: https://groups.io/mt/33137119/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v1 01/22]: RiscVPkg: RISC-V processor package.
Posted by Abner Chang 6 years, 4 months ago

> -----Original Message-----
> From: Leif Lindholm [mailto:leif.lindholm@linaro.org]
> Sent: Saturday, September 21, 2019 1:05 AM
> To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
> Cc: devel@edk2.groups.io
> Subject: Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v1 01/22]:
> RiscVPkg: RISC-V processor package.
> 
> On Thu, Sep 19, 2019 at 07:10:16AM +0000, Chang, Abner (HPS SW/FW
> Technologist) wrote:
> > > -----Original Message-----
> > > > > I personally think we need a longer-term encapsulation of libfdt
> > > > > that doesn't mess up the coding style. But until then, I would
> > > > > be much happier if you used the half measure we have in
> EmbeddedPkg:
> > > > > EmbeddedPkg/Library/FdtLib/ and EmbeddedPkg/Include/.
> > > >
> > > > We may not go this way due to everything is from OpenSBI and we
> > > > don't want to maintain the difference to open source OpenSBI. Just
> > > > take what OpenSBI provides.
> > >
> > > If libfdt was a very quickly changing project, I might agree with you.
> > > But it is not. It is a very simple piece of code that performs a
> > > small set of operations on a very well defined structured encapsulation
> format.
> > >
> > > So please use the one from EmbeddedPkg. On the very unlikely
> > > occurrence that you require functionality not provided by the
> > > version in there, we can update it.
> >
> > I am not sure how's compatibility between these two libraries. However
> > I can't agree to use EmbbedPkg one now, maybe later once this port is
> > got on edk2 repo. Currently we just simply create an INF file and in
> > which  pull everything OpenSBI provides, that is easy for us to
> > integrate OpenSbi. We don't want to increase complexities now. I am
> > not saying to not adopting EmbbedPkg one, just not for now.
> 
> If the libfdt is simply what comes along with opensbi, then I can live with that
> for now, once opensbi becomes a submodule.
Yes. It comes with opensbi.

> 
> The conversion to use the current EmbeddedPkg FdtLib should however be
> completely trivial.
Yes. actually it is easy to convert it to use EmbeddedPkg. We just don't want to see edk2 opensbi port refers to the modules outside OpenSbi itself. 

>So I would still like to see the following
> *attempted* before we start considering this being included in edk2
> master:
I will say yes to any ideas which could make the better code structure, but just don't  make more efforts to maintainers while integrating OpenSbi to edk2 when the new version is released.
> 
> - add FdtLib to RiscVOpensbiLib.inf [LibraryClasses]
> - delete all of the libfdt/* files from RiscVOpensbiLib.inf [Sources]
> - add EmbeddedPkg/EmbeddedPkg.dec to RiscVOpensbiLib.inf  [Packages]

Anyway, that's no problem to remove OpenSbi fdtlib from edk2 opensbi build  as edk2 opensbi is just an wrapper.
But we don't refer EmbeddedPkg/EmbeddedPkg.dec in RiscVOpensbiLib.inf  because RiscVOpensbiLib is part of  RiscVPkg which is the processor architecture package. EmbeddedPkg version fdtlib is referred in RISC-V platform (edk2-platform) but not from RiscVPkg, same as to use EmbeddedPkg /RealTimeClockDxe for RISC-V embedded platforms.
RiscVOpensbiLib is now without fdtlib instance. However the code is still there because it is part of openSbi. Gilbert had sent out the PATCH v2 for RISC-V platform code. You will see platform PATHC v3 from me which involve above changes.

Thanks
Abner

> 
> /
>     Leif

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47747): https://edk2.groups.io/g/devel/message/47747
Mute This Topic: https://groups.io/mt/33137119/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-