* [PATCH 1/3] BaseTools: add handling for 'S:' flag to GetMaintainer.py
2020-04-29 16:36 [PATCH 0/3] BaseTools,EmbeddedPkg,Maintainers.txt: Obsolete some drivers Leif Lindholm
@ 2020-04-29 16:36 ` Leif Lindholm
2020-04-30 7:00 ` Bob Feng
2020-04-29 16:36 ` [PATCH 2/3] Maintainers.txt: mark EmbeddedPkg MmcDxe as Obsolete Leif Lindholm
` (3 subsequent siblings)
4 siblings, 1 reply; 17+ messages in thread
From: Leif Lindholm @ 2020-04-29 16:36 UTC (permalink / raw)
To: devel; +Cc: Bob Feng, Liming Gao
GetMaintainer.py already extracts the value of any S: tags for sections,
but it doesn't do anything with that information.
Print a warning message, with the status, for each matching section with
a status explicitly set to anything other than 'Supported' or
'Maintained'.
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Leif Lindholm <leif@nuviainc.com>
---
BaseTools/Scripts/GetMaintainer.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/BaseTools/Scripts/GetMaintainer.py b/BaseTools/Scripts/GetMaintainer.py
index fbc63522db77..2ec550e86d36 100644
--- a/BaseTools/Scripts/GetMaintainer.py
+++ b/BaseTools/Scripts/GetMaintainer.py
@@ -77,8 +77,12 @@ def get_section_maintainers(path, section):
matching the provided path in the provided section."""
maintainers = []
lists = []
+ nowarn_status = ['Supported', 'Maintained']
if path_in_section(path, section):
+ for status in section['status']:
+ if status not in nowarn_status:
+ print('WARNING: Maintained status for "%s" is \'%s\'!' % (path, status))
for address in section['maintainer'], section['reviewer']:
# Convert to list if necessary
if isinstance(address, list):
--
2.20.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 1/3] BaseTools: add handling for 'S:' flag to GetMaintainer.py
2020-04-29 16:36 ` [PATCH 1/3] BaseTools: add handling for 'S:' flag to GetMaintainer.py Leif Lindholm
@ 2020-04-30 7:00 ` Bob Feng
0 siblings, 0 replies; 17+ messages in thread
From: Bob Feng @ 2020-04-30 7:00 UTC (permalink / raw)
To: Leif Lindholm, devel@edk2.groups.io; +Cc: Gao, Liming
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
-----Original Message-----
From: Leif Lindholm <leif@nuviainc.com>
Sent: Thursday, April 30, 2020 12:36 AM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: [PATCH 1/3] BaseTools: add handling for 'S:' flag to GetMaintainer.py
GetMaintainer.py already extracts the value of any S: tags for sections, but it doesn't do anything with that information.
Print a warning message, with the status, for each matching section with a status explicitly set to anything other than 'Supported' or 'Maintained'.
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Leif Lindholm <leif@nuviainc.com>
---
BaseTools/Scripts/GetMaintainer.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/BaseTools/Scripts/GetMaintainer.py b/BaseTools/Scripts/GetMaintainer.py
index fbc63522db77..2ec550e86d36 100644
--- a/BaseTools/Scripts/GetMaintainer.py
+++ b/BaseTools/Scripts/GetMaintainer.py
@@ -77,8 +77,12 @@ def get_section_maintainers(path, section):
matching the provided path in the provided section."""
maintainers = []
lists = []
+ nowarn_status = ['Supported', 'Maintained']
if path_in_section(path, section):
+ for status in section['status']:
+ if status not in nowarn_status:
+ print('WARNING: Maintained status for "%s" is \'%s\'!'
+ % (path, status))
for address in section['maintainer'], section['reviewer']:
# Convert to list if necessary
if isinstance(address, list):
--
2.20.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 2/3] Maintainers.txt: mark EmbeddedPkg MmcDxe as Obsolete
2020-04-29 16:36 [PATCH 0/3] BaseTools,EmbeddedPkg,Maintainers.txt: Obsolete some drivers Leif Lindholm
2020-04-29 16:36 ` [PATCH 1/3] BaseTools: add handling for 'S:' flag to GetMaintainer.py Leif Lindholm
@ 2020-04-29 16:36 ` Leif Lindholm
2020-04-29 20:12 ` [edk2-devel] " Laszlo Ersek
2020-04-29 16:36 ` [PATCH 3/3] Maintainers.txt: mark EmbeddedPkg hw drivers as bsolete Leif Lindholm
` (2 subsequent siblings)
4 siblings, 1 reply; 17+ messages in thread
From: Leif Lindholm @ 2020-04-29 16:36 UTC (permalink / raw)
To: devel; +Cc: Andrew Fish, Ard Biesheuvel, Laszlo Ersek, Michael D Kinney
The EmbeddedPkg MmcDxe duplicates definitions an functionality
also available in MdeModulePkg. New platforms should not be
making use of this, and old platforms should consider migrating -
indicate this properly by creating a separate section in
Maintainers.txt and marking it "Obsolete".
Cc: Andrew Fish <afish@apple.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Leif Lindholm <leif@nuviainc.com>
---
Maintainers.txt | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Maintainers.txt b/Maintainers.txt
index 1733225722b6..4d62e0b334f3 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -172,10 +172,17 @@ M: Alexei Fedorov <Alexei.Fedorov@arm.com>
EmbeddedPkg
F: EmbeddedPkg/
+X: EmbeddedPkg/Include/Protocol/MmcHost.h
+X: EmbeddedPkg/Universal/MmcDxe/
W: https://github.com/tianocore/tianocore.github.io/wiki/EmbeddedPkg
M: Leif Lindholm <leif@nuviainc.com>
M: Ard Biesheuvel <ard.biesheuvel@arm.com>
+EmbeddedPkg obsolete code
+F: EmbeddedPkg/Include/Protocol/MmcHost.h
+F: EmbeddedPkg/Universal/MmcDxe/
+S: Obsolete
+
EmulatorPkg
F: EmulatorPkg/
W: https://github.com/tianocore/tianocore.github.io/wiki/EmulatorPkg
--
2.20.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [edk2-devel] [PATCH 2/3] Maintainers.txt: mark EmbeddedPkg MmcDxe as Obsolete
2020-04-29 16:36 ` [PATCH 2/3] Maintainers.txt: mark EmbeddedPkg MmcDxe as Obsolete Leif Lindholm
@ 2020-04-29 20:12 ` Laszlo Ersek
0 siblings, 0 replies; 17+ messages in thread
From: Laszlo Ersek @ 2020-04-29 20:12 UTC (permalink / raw)
To: devel, leif; +Cc: Andrew Fish, Ard Biesheuvel, Michael D Kinney
On 04/29/20 18:36, Leif Lindholm wrote:
> The EmbeddedPkg MmcDxe duplicates definitions an functionality
s/ an / and /
> also available in MdeModulePkg. New platforms should not be
> making use of this, and old platforms should consider migrating -
> indicate this properly by creating a separate section in
> Maintainers.txt and marking it "Obsolete".
>
> Cc: Andrew Fish <afish@apple.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Signed-off-by: Leif Lindholm <leif@nuviainc.com>
> ---
> Maintainers.txt | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/Maintainers.txt b/Maintainers.txt
> index 1733225722b6..4d62e0b334f3 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -172,10 +172,17 @@ M: Alexei Fedorov <Alexei.Fedorov@arm.com>
>
> EmbeddedPkg
> F: EmbeddedPkg/
> +X: EmbeddedPkg/Include/Protocol/MmcHost.h
> +X: EmbeddedPkg/Universal/MmcDxe/
> W: https://github.com/tianocore/tianocore.github.io/wiki/EmbeddedPkg
> M: Leif Lindholm <leif@nuviainc.com>
> M: Ard Biesheuvel <ard.biesheuvel@arm.com>
>
> +EmbeddedPkg obsolete code
> +F: EmbeddedPkg/Include/Protocol/MmcHost.h
> +F: EmbeddedPkg/Universal/MmcDxe/
> +S: Obsolete
> +
> EmulatorPkg
> F: EmulatorPkg/
> W: https://github.com/tianocore/tianocore.github.io/wiki/EmulatorPkg
>
Can't comment on EmbeddedPkg MmcDxe, but formally, the patch is pleasing.
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 3/3] Maintainers.txt: mark EmbeddedPkg hw drivers as bsolete
2020-04-29 16:36 [PATCH 0/3] BaseTools,EmbeddedPkg,Maintainers.txt: Obsolete some drivers Leif Lindholm
2020-04-29 16:36 ` [PATCH 1/3] BaseTools: add handling for 'S:' flag to GetMaintainer.py Leif Lindholm
2020-04-29 16:36 ` [PATCH 2/3] Maintainers.txt: mark EmbeddedPkg MmcDxe as Obsolete Leif Lindholm
@ 2020-04-29 16:36 ` Leif Lindholm
2020-04-29 20:14 ` [edk2-devel] " Laszlo Ersek
2020-04-29 17:51 ` [PATCH 0/3] BaseTools,EmbeddedPkg,Maintainers.txt: Obsolete some drivers Ard Biesheuvel
2020-04-29 20:14 ` [edk2-devel] " Andrei Warkentin
4 siblings, 1 reply; 17+ messages in thread
From: Leif Lindholm @ 2020-04-29 16:36 UTC (permalink / raw)
To: devel; +Cc: Andrew Fish, Ard Biesheuvel, Laszlo Ersek, Michael D Kinney
A bunch of legacy drivers (most not compliant with UEFI driver model)
added for various ARM development platforms are still in EmbeddedPkg,
which was arguably the only possible location for them before
edk2-platforms was added.
DwEmmcDxe, Isp1761UsbDxe, Lan9118Dxe, and Lan91xDxe all use a
Pcd*BaseAddress mechanism making them *fundamentally* incompatible
with the UEFI driver model, and preventing use of more than one device
instance per system.
SataSiI3132Dxe *looks* like a proper UEFI driver, but would need
re-review with that in mind for moving to edk2-platforms.
Mark these as Status: Obsolete in Maintainers.txt to at the very least
indicate that they are not suitable references.
Cc: Andrew Fish <afish@apple.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Leif Lindholm <leif@nuviainc.com>
---
Maintainers.txt | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/Maintainers.txt b/Maintainers.txt
index 4d62e0b334f3..3415a0410b7b 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -172,6 +172,11 @@ M: Alexei Fedorov <Alexei.Fedorov@arm.com>
EmbeddedPkg
F: EmbeddedPkg/
+X: EmbeddedPkg/Drivers/DwEmmcDxe/
+X: EmbeddedPkg/Drivers/Isp1761UsbDxe/
+X: EmbeddedPkg/Drivers/Lan9118Dxe/
+X: EmbeddedPkg/Drivers/Lan91xDxe/
+X: EmbeddedPkg/Drivers/SataSiI3132Dxe/
X: EmbeddedPkg/Include/Protocol/MmcHost.h
X: EmbeddedPkg/Universal/MmcDxe/
W: https://github.com/tianocore/tianocore.github.io/wiki/EmbeddedPkg
@@ -179,6 +184,11 @@ M: Leif Lindholm <leif@nuviainc.com>
M: Ard Biesheuvel <ard.biesheuvel@arm.com>
EmbeddedPkg obsolete code
+F: EmbeddedPkg/Drivers/DwEmmcDxe/
+F: EmbeddedPkg/Drivers/Isp1761UsbDxe/
+F: EmbeddedPkg/Drivers/Lan9118Dxe/
+F: EmbeddedPkg/Drivers/Lan91xDxe/
+F: EmbeddedPkg/Drivers/SataSiI3132Dxe/
F: EmbeddedPkg/Include/Protocol/MmcHost.h
F: EmbeddedPkg/Universal/MmcDxe/
S: Obsolete
--
2.20.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [edk2-devel] [PATCH 3/3] Maintainers.txt: mark EmbeddedPkg hw drivers as bsolete
2020-04-29 16:36 ` [PATCH 3/3] Maintainers.txt: mark EmbeddedPkg hw drivers as bsolete Leif Lindholm
@ 2020-04-29 20:14 ` Laszlo Ersek
0 siblings, 0 replies; 17+ messages in thread
From: Laszlo Ersek @ 2020-04-29 20:14 UTC (permalink / raw)
To: devel, leif; +Cc: Andrew Fish, Ard Biesheuvel, Michael D Kinney
On 04/29/20 18:36, Leif Lindholm wrote:
> A bunch of legacy drivers (most not compliant with UEFI driver model)
> added for various ARM development platforms are still in EmbeddedPkg,
> which was arguably the only possible location for them before
> edk2-platforms was added.
>
> DwEmmcDxe, Isp1761UsbDxe, Lan9118Dxe, and Lan91xDxe all use a
> Pcd*BaseAddress mechanism making them *fundamentally* incompatible
> with the UEFI driver model, and preventing use of more than one device
> instance per system.
>
> SataSiI3132Dxe *looks* like a proper UEFI driver, but would need
> re-review with that in mind for moving to edk2-platforms.
>
> Mark these as Status: Obsolete in Maintainers.txt to at the very least
> indicate that they are not suitable references.
>
> Cc: Andrew Fish <afish@apple.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Signed-off-by: Leif Lindholm <leif@nuviainc.com>
> ---
> Maintainers.txt | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/Maintainers.txt b/Maintainers.txt
> index 4d62e0b334f3..3415a0410b7b 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -172,6 +172,11 @@ M: Alexei Fedorov <Alexei.Fedorov@arm.com>
>
> EmbeddedPkg
> F: EmbeddedPkg/
> +X: EmbeddedPkg/Drivers/DwEmmcDxe/
> +X: EmbeddedPkg/Drivers/Isp1761UsbDxe/
> +X: EmbeddedPkg/Drivers/Lan9118Dxe/
> +X: EmbeddedPkg/Drivers/Lan91xDxe/
> +X: EmbeddedPkg/Drivers/SataSiI3132Dxe/
> X: EmbeddedPkg/Include/Protocol/MmcHost.h
> X: EmbeddedPkg/Universal/MmcDxe/
> W: https://github.com/tianocore/tianocore.github.io/wiki/EmbeddedPkg
> @@ -179,6 +184,11 @@ M: Leif Lindholm <leif@nuviainc.com>
> M: Ard Biesheuvel <ard.biesheuvel@arm.com>
>
> EmbeddedPkg obsolete code
> +F: EmbeddedPkg/Drivers/DwEmmcDxe/
> +F: EmbeddedPkg/Drivers/Isp1761UsbDxe/
> +F: EmbeddedPkg/Drivers/Lan9118Dxe/
> +F: EmbeddedPkg/Drivers/Lan91xDxe/
> +F: EmbeddedPkg/Drivers/SataSiI3132Dxe/
> F: EmbeddedPkg/Include/Protocol/MmcHost.h
> F: EmbeddedPkg/Universal/MmcDxe/
> S: Obsolete
>
same generic observations as under patch#2
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/3] BaseTools,EmbeddedPkg,Maintainers.txt: Obsolete some drivers
2020-04-29 16:36 [PATCH 0/3] BaseTools,EmbeddedPkg,Maintainers.txt: Obsolete some drivers Leif Lindholm
` (2 preceding siblings ...)
2020-04-29 16:36 ` [PATCH 3/3] Maintainers.txt: mark EmbeddedPkg hw drivers as bsolete Leif Lindholm
@ 2020-04-29 17:51 ` Ard Biesheuvel
2020-04-29 19:53 ` Leif Lindholm
2020-04-29 20:14 ` [edk2-devel] " Andrei Warkentin
4 siblings, 1 reply; 17+ messages in thread
From: Ard Biesheuvel @ 2020-04-29 17:51 UTC (permalink / raw)
To: Leif Lindholm, devel
Cc: Andrew Fish, Bob Feng, Laszlo Ersek, Liming Gao, Michael D Kinney
On 4/29/20 6:36 PM, Leif Lindholm wrote:
> We keep seeing new users (and copies) of EmbeddedPkg:s MmcDxe, which
> while it predates the MdeModulePkg SD/(E)MMCsupport is in effect
> unmaintained and also duplicates core industry standard definitions.
>
> Since we now have GetMaintainers.py to parse Maintainers.txt for us,
> extend its functionality to warn about less supported code.
>
> Then as an indication of its unsuitability for reference (or use), set
> its Status flag in Maintainers.txt to Obsolete.
>
> Once this is done, follow up and do the same with the hardware drivers
> (not the software ones) still left in EmbeddedPkg/Drivers. They were
> added back when not using the UEFI driver model was still cool, or
> simply before edk2-platforms existed.
> They should move to edk2-platforms, but most of them require some
> level of rewriting before that.
>
> 1/3 adds a warning printout to GetMaintainer.py
>
> 2/3 obsoletes EmbeddedPkg/Universal/MmcDxe/
>
> 3/3 obsoletes remaining hw drivers in EmbeddedPkg/Drivers
> Cc: Andrew Fish <afish@apple.com>
>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
>
> Leif Lindholm (3):
> BaseTools: add handling for 'S:' flag to GetMaintainer.py
> Maintainers.txt: mark EmbeddedPkg MmcDxe as Obsolete
> Maintainers.txt: mark EmbeddedPkg hw drivers as bsolete
>
Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
I am mostly concerned about the use of MmcDxe in new platforms. The
other bits I'm not too worried about, and I think it would be fine to
move those into Platform/ARM/VExpressPkg in edk2-platforms, instead of
hoping that someone will turn up and turn them into driver model drivers.
One thing I'd like to do in the short term is renaming
gEfiMmcHostProtocolGuid, given that it violates the naming rules, and
move the PL180 driver to edk2-platforms. Any thoughts about DwEmmcDxe?
Only HiKey uses that at the moment, given that socfpga apparently
switched to the generic version.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/3] BaseTools,EmbeddedPkg,Maintainers.txt: Obsolete some drivers
2020-04-29 17:51 ` [PATCH 0/3] BaseTools,EmbeddedPkg,Maintainers.txt: Obsolete some drivers Ard Biesheuvel
@ 2020-04-29 19:53 ` Leif Lindholm
2020-04-29 20:04 ` Ard Biesheuvel
0 siblings, 1 reply; 17+ messages in thread
From: Leif Lindholm @ 2020-04-29 19:53 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: devel, Andrew Fish, Bob Feng, Laszlo Ersek, Liming Gao,
Michael D Kinney
On Wed, Apr 29, 2020 at 19:51:12 +0200, Ard Biesheuvel wrote:
> On 4/29/20 6:36 PM, Leif Lindholm wrote:
> > We keep seeing new users (and copies) of EmbeddedPkg:s MmcDxe, which
> > while it predates the MdeModulePkg SD/(E)MMCsupport is in effect
> > unmaintained and also duplicates core industry standard definitions.
> >
> > Since we now have GetMaintainers.py to parse Maintainers.txt for us,
> > extend its functionality to warn about less supported code.
> >
> > Then as an indication of its unsuitability for reference (or use), set
> > its Status flag in Maintainers.txt to Obsolete.
> >
> > Once this is done, follow up and do the same with the hardware drivers
> > (not the software ones) still left in EmbeddedPkg/Drivers. They were
> > added back when not using the UEFI driver model was still cool, or
> > simply before edk2-platforms existed.
> > They should move to edk2-platforms, but most of them require some
> > level of rewriting before that.
> >
> > 1/3 adds a warning printout to GetMaintainer.py
> >
> > 2/3 obsoletes EmbeddedPkg/Universal/MmcDxe/
> >
> > 3/3 obsoletes remaining hw drivers in EmbeddedPkg/Drivers
> > Cc: Andrew Fish <afish@apple.com>
> >
> > Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> > Cc: Bob Feng <bob.c.feng@intel.com>
> > Cc: Laszlo Ersek <lersek@redhat.com>
> > Cc: Liming Gao <liming.gao@intel.com>
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> >
> > Leif Lindholm (3):
> > BaseTools: add handling for 'S:' flag to GetMaintainer.py
> > Maintainers.txt: mark EmbeddedPkg MmcDxe as Obsolete
> > Maintainers.txt: mark EmbeddedPkg hw drivers as bsolete
> >
>
> Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
>
> I am mostly concerned about the use of MmcDxe in new platforms. The other
> bits I'm not too worried about, and I think it would be fine to move those
> into Platform/ARM/VExpressPkg in edk2-platforms, instead of hoping that
> someone will turn up and turn them into driver model drivers.
We could, although I would prefer not adding code to edk2-platforms
that would not be accepted was it submitted as a new contribution.
The SATA controller, I would ideally re-review and merge properly.
If we do include the other drivers in platform-specific directories, I
want them to come with ... strongly worded readmes.
> One thing I'd like to do in the short term is renaming
> gEfiMmcHostProtocolGuid, given that it violates the naming rules, and move
> the PL180 driver to edk2-platforms.
I did think about moving PL180 as well. I'm not opposed to moving
it. I don't think it's widely used.
> Any thoughts about DwEmmcDxe? Only HiKey uses that at the moment,
> given that socfpga apparently switched to the generic version.
Well, if nothing else it might be a useful scream test. Same comment
on strongly worded readme.
/
Leif
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/3] BaseTools,EmbeddedPkg,Maintainers.txt: Obsolete some drivers
2020-04-29 19:53 ` Leif Lindholm
@ 2020-04-29 20:04 ` Ard Biesheuvel
2020-04-29 21:45 ` Leif Lindholm
0 siblings, 1 reply; 17+ messages in thread
From: Ard Biesheuvel @ 2020-04-29 20:04 UTC (permalink / raw)
To: Leif Lindholm
Cc: devel, Andrew Fish, Bob Feng, Laszlo Ersek, Liming Gao,
Michael D Kinney
On 4/29/20 9:53 PM, Leif Lindholm wrote:
> On Wed, Apr 29, 2020 at 19:51:12 +0200, Ard Biesheuvel wrote:
>> On 4/29/20 6:36 PM, Leif Lindholm wrote:
>>> We keep seeing new users (and copies) of EmbeddedPkg:s MmcDxe, which
>>> while it predates the MdeModulePkg SD/(E)MMCsupport is in effect
>>> unmaintained and also duplicates core industry standard definitions.
>>>
>>> Since we now have GetMaintainers.py to parse Maintainers.txt for us,
>>> extend its functionality to warn about less supported code.
>>>
>>> Then as an indication of its unsuitability for reference (or use), set
>>> its Status flag in Maintainers.txt to Obsolete.
>>>
>>> Once this is done, follow up and do the same with the hardware drivers
>>> (not the software ones) still left in EmbeddedPkg/Drivers. They were
>>> added back when not using the UEFI driver model was still cool, or
>>> simply before edk2-platforms existed.
>>> They should move to edk2-platforms, but most of them require some
>>> level of rewriting before that.
>>>
>>> 1/3 adds a warning printout to GetMaintainer.py
>>>
>>> 2/3 obsoletes EmbeddedPkg/Universal/MmcDxe/
>>>
>>> 3/3 obsoletes remaining hw drivers in EmbeddedPkg/Drivers
>>> Cc: Andrew Fish <afish@apple.com>
>>>
>>> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
>>> Cc: Bob Feng <bob.c.feng@intel.com>
>>> Cc: Laszlo Ersek <lersek@redhat.com>
>>> Cc: Liming Gao <liming.gao@intel.com>
>>> Cc: Michael D Kinney <michael.d.kinney@intel.com>
>>>
>>> Leif Lindholm (3):
>>> BaseTools: add handling for 'S:' flag to GetMaintainer.py
>>> Maintainers.txt: mark EmbeddedPkg MmcDxe as Obsolete
>>> Maintainers.txt: mark EmbeddedPkg hw drivers as bsolete
>>>
>>
>> Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
>>
>> I am mostly concerned about the use of MmcDxe in new platforms. The other
>> bits I'm not too worried about, and I think it would be fine to move those
>> into Platform/ARM/VExpressPkg in edk2-platforms, instead of hoping that
>> someone will turn up and turn them into driver model drivers.
>
> We could, although I would prefer not adding code to edk2-platforms
> that would not be accepted was it submitted as a new contribution.
> The SATA controller, I would ideally re-review and merge properly.
>
> If we do include the other drivers in platform-specific directories, I
> want them to come with ... strongly worded readmes.
>
Right.
Should we have some format for that? A way to log shortcomings along
with the code?
>> One thing I'd like to do in the short term is renaming
>> gEfiMmcHostProtocolGuid, given that it violates the naming rules, and move
>> the PL180 driver to edk2-platforms.
>
> I did think about moving PL180 as well. I'm not opposed to moving
> it. I don't think it's widely used.
>
>> Any thoughts about DwEmmcDxe? Only HiKey uses that at the moment,
>> given that socfpga apparently switched to the generic version.
>
> Well, if nothing else it might be a useful scream test. Same comment
> on strongly worded readme.
>
OK
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/3] BaseTools,EmbeddedPkg,Maintainers.txt: Obsolete some drivers
2020-04-29 20:04 ` Ard Biesheuvel
@ 2020-04-29 21:45 ` Leif Lindholm
2020-04-29 21:47 ` Ard Biesheuvel
0 siblings, 1 reply; 17+ messages in thread
From: Leif Lindholm @ 2020-04-29 21:45 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: devel, Andrew Fish, Bob Feng, Laszlo Ersek, Liming Gao,
Michael D Kinney
On Wed, Apr 29, 2020 at 22:04:08 +0200, Ard Biesheuvel wrote:
> > > I am mostly concerned about the use of MmcDxe in new platforms. The other
> > > bits I'm not too worried about, and I think it would be fine to move those
> > > into Platform/ARM/VExpressPkg in edk2-platforms, instead of hoping that
> > > someone will turn up and turn them into driver model drivers.
> >
> > We could, although I would prefer not adding code to edk2-platforms
> > that would not be accepted was it submitted as a new contribution.
> > The SATA controller, I would ideally re-review and merge properly.
> >
> > If we do include the other drivers in platform-specific directories, I
> > want them to come with ... strongly worded readmes.
> >
>
> Right.
>
> Should we have some format for that? A way to log shortcomings along with
> the code?
Thinking a bit more on this, maybe what we should do is add a template
to each file's top comment block. Draft proposal:
*
* WARNING:
* This driver fails to follow the UEFI driver model without a good
* reason, and only remains in the tree because it is still used by
* a small number of platforms. It will removed when no longer used.
* New platforms should not use it, and no one should use this as
* reference code for developing new drivers.
*
/
Leif
> > > One thing I'd like to do in the short term is renaming
> > > gEfiMmcHostProtocolGuid, given that it violates the naming rules, and move
> > > the PL180 driver to edk2-platforms.
> >
> > I did think about moving PL180 as well. I'm not opposed to moving
> > it. I don't think it's widely used.
> >
> > > Any thoughts about DwEmmcDxe? Only HiKey uses that at the moment,
> > > given that socfpga apparently switched to the generic version.
> >
> > Well, if nothing else it might be a useful scream test. Same comment
> > on strongly worded readme.
> >
>
> OK
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/3] BaseTools,EmbeddedPkg,Maintainers.txt: Obsolete some drivers
2020-04-29 21:45 ` Leif Lindholm
@ 2020-04-29 21:47 ` Ard Biesheuvel
2020-04-30 11:17 ` Laszlo Ersek
0 siblings, 1 reply; 17+ messages in thread
From: Ard Biesheuvel @ 2020-04-29 21:47 UTC (permalink / raw)
To: Leif Lindholm
Cc: devel, Andrew Fish, Bob Feng, Laszlo Ersek, Liming Gao,
Michael D Kinney
On 4/29/20 11:45 PM, Leif Lindholm wrote:
> On Wed, Apr 29, 2020 at 22:04:08 +0200, Ard Biesheuvel wrote:
>>>> I am mostly concerned about the use of MmcDxe in new platforms. The other
>>>> bits I'm not too worried about, and I think it would be fine to move those
>>>> into Platform/ARM/VExpressPkg in edk2-platforms, instead of hoping that
>>>> someone will turn up and turn them into driver model drivers.
>>>
>>> We could, although I would prefer not adding code to edk2-platforms
>>> that would not be accepted was it submitted as a new contribution.
>>> The SATA controller, I would ideally re-review and merge properly.
>>>
>>> If we do include the other drivers in platform-specific directories, I
>>> want them to come with ... strongly worded readmes.
>>>
>>
>> Right.
>>
>> Should we have some format for that? A way to log shortcomings along with
>> the code?
>
> Thinking a bit more on this, maybe what we should do is add a template
> to each file's top comment block. Draft proposal:
>
> *
> * WARNING:
> * This driver fails to follow the UEFI driver model without a good
> * reason, and only remains in the tree because it is still used by
> * a small number of platforms. It will removed when no longer used.
> * New platforms should not use it, and no one should use this as
> * reference code for developing new drivers.
> *
>
Works for me
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/3] BaseTools,EmbeddedPkg,Maintainers.txt: Obsolete some drivers
2020-04-29 21:47 ` Ard Biesheuvel
@ 2020-04-30 11:17 ` Laszlo Ersek
2020-04-30 13:28 ` Leif Lindholm
0 siblings, 1 reply; 17+ messages in thread
From: Laszlo Ersek @ 2020-04-30 11:17 UTC (permalink / raw)
To: Ard Biesheuvel, Leif Lindholm
Cc: devel, Andrew Fish, Bob Feng, Liming Gao, Michael D Kinney
On 04/29/20 23:47, Ard Biesheuvel wrote:
> On 4/29/20 11:45 PM, Leif Lindholm wrote:
>> On Wed, Apr 29, 2020 at 22:04:08 +0200, Ard Biesheuvel wrote:
>>>>> I am mostly concerned about the use of MmcDxe in new platforms. The
>>>>> other
>>>>> bits I'm not too worried about, and I think it would be fine to
>>>>> move those
>>>>> into Platform/ARM/VExpressPkg in edk2-platforms, instead of hoping
>>>>> that
>>>>> someone will turn up and turn them into driver model drivers.
>>>>
>>>> We could, although I would prefer not adding code to edk2-platforms
>>>> that would not be accepted was it submitted as a new contribution.
>>>> The SATA controller, I would ideally re-review and merge properly.
>>>>
>>>> If we do include the other drivers in platform-specific directories, I
>>>> want them to come with ... strongly worded readmes.
>>>>
>>>
>>> Right.
>>>
>>> Should we have some format for that? A way to log shortcomings along
>>> with
>>> the code?
>>
>> Thinking a bit more on this, maybe what we should do is add a template
>> to each file's top comment block. Draft proposal:
>>
>> *
>> * WARNING:
>> * This driver fails to follow the UEFI driver model without a good
>> * reason, and only remains in the tree because it is still used by
>> * a small number of platforms. It will removed when no longer used.
>> * New platforms should not use it, and no one should use this as
>> * reference code for developing new drivers.
>> *
>>
>
> Works for me
>
You could also (or alternatively) add a separate file "DEPRECATED.txt"
to the directory -- sometimes people don't read file-top comments,
before duplicating or editing code. Something that's visible with a
simple "ls -l" might stand out more.
Just a thought, I'm neutral on this.
Thanks
Laszlo
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/3] BaseTools,EmbeddedPkg,Maintainers.txt: Obsolete some drivers
2020-04-30 11:17 ` Laszlo Ersek
@ 2020-04-30 13:28 ` Leif Lindholm
2020-04-30 13:43 ` Ard Biesheuvel
0 siblings, 1 reply; 17+ messages in thread
From: Leif Lindholm @ 2020-04-30 13:28 UTC (permalink / raw)
To: Laszlo Ersek
Cc: Ard Biesheuvel, devel, Andrew Fish, Bob Feng, Liming Gao,
Michael D Kinney
On Thu, Apr 30, 2020 at 13:17:26 +0200, Laszlo Ersek wrote:
> On 04/29/20 23:47, Ard Biesheuvel wrote:
> > On 4/29/20 11:45 PM, Leif Lindholm wrote:
> >> On Wed, Apr 29, 2020 at 22:04:08 +0200, Ard Biesheuvel wrote:
> >>>>> I am mostly concerned about the use of MmcDxe in new platforms. The
> >>>>> other
> >>>>> bits I'm not too worried about, and I think it would be fine to
> >>>>> move those
> >>>>> into Platform/ARM/VExpressPkg in edk2-platforms, instead of hoping
> >>>>> that
> >>>>> someone will turn up and turn them into driver model drivers.
> >>>>
> >>>> We could, although I would prefer not adding code to edk2-platforms
> >>>> that would not be accepted was it submitted as a new contribution.
> >>>> The SATA controller, I would ideally re-review and merge properly.
> >>>>
> >>>> If we do include the other drivers in platform-specific directories, I
> >>>> want them to come with ... strongly worded readmes.
> >>>>
> >>>
> >>> Right.
> >>>
> >>> Should we have some format for that? A way to log shortcomings along
> >>> with
> >>> the code?
> >>
> >> Thinking a bit more on this, maybe what we should do is add a template
> >> to each file's top comment block. Draft proposal:
> >>
> >> *
> >> * WARNING:
> >> * This driver fails to follow the UEFI driver model without a good
> >> * reason, and only remains in the tree because it is still used by
> >> * a small number of platforms. It will removed when no longer used.
> >> * New platforms should not use it, and no one should use this as
> >> * reference code for developing new drivers.
> >> *
> >>
> >
> > Works for me
> >
>
> You could also (or alternatively) add a separate file "DEPRECATED.txt"
> to the directory -- sometimes people don't read file-top comments,
> before duplicating or editing code. Something that's visible with a
> simple "ls -l" might stand out more.
I think what's more visible depends on the use-case.
A comment at the top of the file is at least very visible to the
reviewer if someone submits Yet Another Clone of an inadvisible
driver.
A DEPRECATED.txt might be a good ide for something like the
EmbeddedPkg MmcDxe which we wan't people to stop *using* as opposed to
copying.
Ard?
Thanks!
/
Leif
>
> Just a thought, I'm neutral on this.
>
> Thanks
> Laszlo
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/3] BaseTools,EmbeddedPkg,Maintainers.txt: Obsolete some drivers
2020-04-30 13:28 ` Leif Lindholm
@ 2020-04-30 13:43 ` Ard Biesheuvel
2020-04-30 14:59 ` Leif Lindholm
0 siblings, 1 reply; 17+ messages in thread
From: Ard Biesheuvel @ 2020-04-30 13:43 UTC (permalink / raw)
To: Leif Lindholm, Laszlo Ersek
Cc: devel, Andrew Fish, Bob Feng, Liming Gao, Michael D Kinney
On 4/30/20 3:28 PM, Leif Lindholm wrote:
> On Thu, Apr 30, 2020 at 13:17:26 +0200, Laszlo Ersek wrote:
>> On 04/29/20 23:47, Ard Biesheuvel wrote:
>>> On 4/29/20 11:45 PM, Leif Lindholm wrote:
>>>> On Wed, Apr 29, 2020 at 22:04:08 +0200, Ard Biesheuvel wrote:
>>>>>>> I am mostly concerned about the use of MmcDxe in new platforms. The
>>>>>>> other
>>>>>>> bits I'm not too worried about, and I think it would be fine to
>>>>>>> move those
>>>>>>> into Platform/ARM/VExpressPkg in edk2-platforms, instead of hoping
>>>>>>> that
>>>>>>> someone will turn up and turn them into driver model drivers.
>>>>>>
>>>>>> We could, although I would prefer not adding code to edk2-platforms
>>>>>> that would not be accepted was it submitted as a new contribution.
>>>>>> The SATA controller, I would ideally re-review and merge properly.
>>>>>>
>>>>>> If we do include the other drivers in platform-specific directories, I
>>>>>> want them to come with ... strongly worded readmes.
>>>>>>
>>>>>
>>>>> Right.
>>>>>
>>>>> Should we have some format for that? A way to log shortcomings along
>>>>> with
>>>>> the code?
>>>>
>>>> Thinking a bit more on this, maybe what we should do is add a template
>>>> to each file's top comment block. Draft proposal:
>>>>
>>>> *
>>>> * WARNING:
>>>> * This driver fails to follow the UEFI driver model without a good
>>>> * reason, and only remains in the tree because it is still used by
>>>> * a small number of platforms. It will removed when no longer used.
>>>> * New platforms should not use it, and no one should use this as
>>>> * reference code for developing new drivers.
>>>> *
>>>>
>>>
>>> Works for me
>>>
>>
>> You could also (or alternatively) add a separate file "DEPRECATED.txt"
>> to the directory -- sometimes people don't read file-top comments,
>> before duplicating or editing code. Something that's visible with a
>> simple "ls -l" might stand out more.
>
> I think what's more visible depends on the use-case.
> A comment at the top of the file is at least very visible to the
> reviewer if someone submits Yet Another Clone of an inadvisible
> driver.
>
> A DEPRECATED.txt might be a good ide for something like the
> EmbeddedPkg MmcDxe which we wan't people to stop *using* as opposed to
> copying.
>
> Ard?
>
Agreed. People tend to look at the file header when they add their
copyright, so putting it in each file seems like a sensible way to do this.
As for using the likes of MmcDxe: perhaps we should add a
i-am-deprecated PCD that defaults to a value that prevents it from working?
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/3] BaseTools,EmbeddedPkg,Maintainers.txt: Obsolete some drivers
2020-04-30 13:43 ` Ard Biesheuvel
@ 2020-04-30 14:59 ` Leif Lindholm
0 siblings, 0 replies; 17+ messages in thread
From: Leif Lindholm @ 2020-04-30 14:59 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: Laszlo Ersek, devel, Andrew Fish, Bob Feng, Liming Gao,
Michael D Kinney
On Thu, Apr 30, 2020 at 15:43:22 +0200, Ard Biesheuvel wrote:
> > > > > Thinking a bit more on this, maybe what we should do is add a template
> > > > > to each file's top comment block. Draft proposal:
> > > > >
> > > > > *
> > > > > * WARNING:
> > > > > * This driver fails to follow the UEFI driver model without a good
> > > > > * reason, and only remains in the tree because it is still used by
> > > > > * a small number of platforms. It will removed when no longer used.
> > > > > * New platforms should not use it, and no one should use this as
> > > > > * reference code for developing new drivers.
> > > > > *
> > > > >
> > > >
> > > > Works for me
> > > >
> > >
> > > You could also (or alternatively) add a separate file "DEPRECATED.txt"
> > > to the directory -- sometimes people don't read file-top comments,
> > > before duplicating or editing code. Something that's visible with a
> > > simple "ls -l" might stand out more.
> >
> > I think what's more visible depends on the use-case.
> > A comment at the top of the file is at least very visible to the
> > reviewer if someone submits Yet Another Clone of an inadvisible
> > driver.
> >
> > A DEPRECATED.txt might be a good ide for something like the
> > EmbeddedPkg MmcDxe which we wan't people to stop *using* as opposed to
> > copying.
> >
> > Ard?
> >
>
> Agreed. People tend to look at the file header when they add their
> copyright, so putting it in each file seems like a sensible way to do this.
>
> As for using the likes of MmcDxe: perhaps we should add a i-am-deprecated
> PCD that defaults to a value that prevents it from working?
Yes, that's even better!
/
Leif
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [edk2-devel] [PATCH 0/3] BaseTools,EmbeddedPkg,Maintainers.txt: Obsolete some drivers
2020-04-29 16:36 [PATCH 0/3] BaseTools,EmbeddedPkg,Maintainers.txt: Obsolete some drivers Leif Lindholm
` (3 preceding siblings ...)
2020-04-29 17:51 ` [PATCH 0/3] BaseTools,EmbeddedPkg,Maintainers.txt: Obsolete some drivers Ard Biesheuvel
@ 2020-04-29 20:14 ` Andrei Warkentin
4 siblings, 0 replies; 17+ messages in thread
From: Andrei Warkentin @ 2020-04-29 20:14 UTC (permalink / raw)
To: devel, leif
[-- Attachment #1: Type: text/plain, Size: 2448 bytes --]
Btw, the Raspberry Pi support has its own variant of MmcDxe and SD host
drivers... the history behind that is that's the way it was in the original
MSFT port circa 2016. When I had rebased that code to 2018 edk2 (still
before Pete's work to upstream it here), the edk2 variant had significantly
diverged from the MSFT changes, so the MSFT one was taken as is (and
further evolved to fix issues around high-speed support).
It's still a goal to move away from all of that towards something generic.
The Pi has two (sometimes 3) controllers - some are kinda-SDHCI (maybe
possible with the Mde stack, if quirked via _SD_MMC_OVERRIDE_PROTOCOL),
while the other is completely non-standard.
Mde doesn't have a non-SDHCI stack. That remains a gap...
A
On Wed, Apr 29, 2020 at 11:36 AM Leif Lindholm <leif@nuviainc.com> wrote:
> We keep seeing new users (and copies) of EmbeddedPkg:s MmcDxe, which
> while it predates the MdeModulePkg SD/(E)MMCsupport is in effect
> unmaintained and also duplicates core industry standard definitions.
>
> Since we now have GetMaintainers.py to parse Maintainers.txt for us,
> extend its functionality to warn about less supported code.
>
> Then as an indication of its unsuitability for reference (or use), set
> its Status flag in Maintainers.txt to Obsolete.
>
> Once this is done, follow up and do the same with the hardware drivers
> (not the software ones) still left in EmbeddedPkg/Drivers. They were
> added back when not using the UEFI driver model was still cool, or
> simply before edk2-platforms existed.
> They should move to edk2-platforms, but most of them require some
> level of rewriting before that.
>
> 1/3 adds a warning printout to GetMaintainer.py
>
> 2/3 obsoletes EmbeddedPkg/Universal/MmcDxe/
>
> 3/3 obsoletes remaining hw drivers in EmbeddedPkg/Drivers
> Cc: Andrew Fish <afish@apple.com>
>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
>
> Leif Lindholm (3):
> BaseTools: add handling for 'S:' flag to GetMaintainer.py
> Maintainers.txt: mark EmbeddedPkg MmcDxe as Obsolete
> Maintainers.txt: mark EmbeddedPkg hw drivers as bsolete
>
> BaseTools/Scripts/GetMaintainer.py | 4 ++++
> Maintainers.txt | 17 +++++++++++++++++
> 2 files changed, 21 insertions(+)
>
> --
> 2.20.1
>
>
>
>
>
--
A
[-- Attachment #2: Type: text/html, Size: 3448 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread