[RFC] BZ 2298 MdePkg/DevicePathLib merger or not


Ni, Ray
 

So, the impact is every platform DSC needs to be updated to reference the correct path of the UefiDevicePath lib after your merge.

Let's wait for at least 2 weeks for feedbacks.

Thanks,
Ray

From: Gao, Zhichao <zhichao.gao@...>
Sent: Friday, January 10, 2020 3:47 PM
To: Ni, Ray <ray.ni@...>; devel@edk2.groups.io; 'rfc@edk2.groups.io' <rfc@edk2.groups.io>
Cc: Gao, Liming <liming.gao@...>; Kinney, Michael D <michael.d.kinney@...>; vit9696@...
Subject: RE: [RFC] BZ 2298 MdePkg/DevicePathLib merger or not

Ray,
I prefer to merge these two lib instance into one folder and remove the duplicated code.
I can change all the required change in open source repo. But not sure how many close source platforms would be affected.
This action should make all the close platform owners aware of it and changing their platform code to consume the new lib instance.

#2: OK. That makes sense to consume the new device path node if appear.

Thanks,
Zhichao

From: Ni, Ray
Sent: Friday, January 10, 2020 3:36 PM
To: Gao, Zhichao <zhichao.gao@...<mailto:zhichao.gao@...>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 'rfc@edk2.groups.io' <rfc@edk2.groups.io<mailto:rfc@edk2.groups.io>>
Cc: Gao, Liming <liming.gao@...<mailto:liming.gao@...>>; Kinney, Michael D <michael.d.kinney@...<mailto:michael.d.kinney@...>>; vit9696@...<mailto:vit9696@...>
Subject: RE: [RFC] BZ 2298 MdePkg/DevicePathLib merger or not

Zhichao,
What's your recommendation regarding this?

Back to your 2nd question, drivers/applications consuming UefiDevicePathLibOptionalDevicePathProtocol
can firstly use the firmware built-in from-text and to-text conversion, then use its own conversion logic if
the firmware doesn't contain built-in from-text or to-text conversion.
Considering a case that an application is released in year 2015, it can recognize the new device path node
introduced after 2015 in a new system.

Thanks,
Ray

From: Gao, Zhichao <zhichao.gao@...<mailto:zhichao.gao@...>>
Sent: Friday, January 10, 2020 11:04 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 'rfc@edk2.groups.io' <rfc@edk2.groups.io<mailto:rfc@edk2.groups.io>>
Cc: Gao, Liming <liming.gao@...<mailto:liming.gao@...>>; Kinney, Michael D <michael.d.kinney@...<mailto:michael.d.kinney@...>>; vit9696@...<mailto:vit9696@...>; Ni, Ray <ray.ni@...<mailto:ray.ni@...>>
Subject: [RFC] BZ 2298 MdePkg/DevicePathLib merger or not

HI all,

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2298
In the MdePkg, there are two folder for the DevicePathLib:

1. MdePkg\Library\UefiDevicePathLib
2. MdePkg\Library\UefiDevicePathLibDevicePathProtocol

UefiDevicePathLibDevicePathProtocol is created to use the protocol to reduce the driver size which consume the DevicePathLib.
But it has duplicate code with #1. So I want to merge these two folder into one. But many platform implementations consume #2.
If we merge #2 into #1, there might be a lot of platform changes for both close source and open source.
Can anyone give me some suggestions about this? Do we have a progress to retire some implementation in the edk2 repor?

There is another question about MdePkg\Library\UefiDevicePathLib\UefiDevicePathLibOptionalDevicePathProtocol.inf.
This one implements the interface to choose the protocol first, then change to local implementation if no protocol is available.
It requires a fix and it is already sent to the community. But what's the purpose?
Local implementation, i.e. MdePkg\Library\UefiDevicePathLib\ UefiDevicePathLib.inf, can make sure its usable. And it can't reduce the driver size. If it is useless, can we directly remove it?

Thanks,
Zhichao


Gao, Zhichao
 

Ray,
I prefer to merge these two lib instance into one folder and remove the duplicated code.
I can change all the required change in open source repo. But not sure how many close source platforms would be affected.
This action should make all the close platform owners aware of it and changing their platform code to consume the new lib instance.

#2: OK. That makes sense to consume the new device path node if appear.

Thanks,
Zhichao

From: Ni, Ray
Sent: Friday, January 10, 2020 3:36 PM
To: Gao, Zhichao <zhichao.gao@...>; devel@edk2.groups.io; 'rfc@edk2.groups.io' <rfc@edk2.groups.io>
Cc: Gao, Liming <liming.gao@...>; Kinney, Michael D <michael.d.kinney@...>; vit9696@...
Subject: RE: [RFC] BZ 2298 MdePkg/DevicePathLib merger or not

Zhichao,
What's your recommendation regarding this?

Back to your 2nd question, drivers/applications consuming UefiDevicePathLibOptionalDevicePathProtocol
can firstly use the firmware built-in from-text and to-text conversion, then use its own conversion logic if
the firmware doesn't contain built-in from-text or to-text conversion.
Considering a case that an application is released in year 2015, it can recognize the new device path node
introduced after 2015 in a new system.

Thanks,
Ray

From: Gao, Zhichao <zhichao.gao@...<mailto:zhichao.gao@...>>
Sent: Friday, January 10, 2020 11:04 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 'rfc@edk2.groups.io' <rfc@edk2.groups.io<mailto:rfc@edk2.groups.io>>
Cc: Gao, Liming <liming.gao@...<mailto:liming.gao@...>>; Kinney, Michael D <michael.d.kinney@...<mailto:michael.d.kinney@...>>; vit9696@...<mailto:vit9696@...>; Ni, Ray <ray.ni@...<mailto:ray.ni@...>>
Subject: [RFC] BZ 2298 MdePkg/DevicePathLib merger or not

HI all,

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2298
In the MdePkg, there are two folder for the DevicePathLib:

1. MdePkg\Library\UefiDevicePathLib
2. MdePkg\Library\UefiDevicePathLibDevicePathProtocol

UefiDevicePathLibDevicePathProtocol is created to use the protocol to reduce the driver size which consume the DevicePathLib.
But it has duplicate code with #1. So I want to merge these two folder into one. But many platform implementations consume #2.
If we merge #2 into #1, there might be a lot of platform changes for both close source and open source.
Can anyone give me some suggestions about this? Do we have a progress to retire some implementation in the edk2 repor?

There is another question about MdePkg\Library\UefiDevicePathLib\UefiDevicePathLibOptionalDevicePathProtocol.inf.
This one implements the interface to choose the protocol first, then change to local implementation if no protocol is available.
It requires a fix and it is already sent to the community. But what's the purpose?
Local implementation, i.e. MdePkg\Library\UefiDevicePathLib\ UefiDevicePathLib.inf, can make sure its usable. And it can't reduce the driver size. If it is useless, can we directly remove it?

Thanks,
Zhichao


Ni, Ray
 

Zhichao,
What's your recommendation regarding this?

Back to your 2nd question, drivers/applications consuming UefiDevicePathLibOptionalDevicePathProtocol
can firstly use the firmware built-in from-text and to-text conversion, then use its own conversion logic if
the firmware doesn't contain built-in from-text or to-text conversion.
Considering a case that an application is released in year 2015, it can recognize the new device path node
introduced after 2015 in a new system.

Thanks,
Ray

From: Gao, Zhichao <zhichao.gao@...>
Sent: Friday, January 10, 2020 11:04 AM
To: devel@edk2.groups.io; 'rfc@edk2.groups.io' <rfc@edk2.groups.io>
Cc: Gao, Liming <liming.gao@...>; Kinney, Michael D <michael.d.kinney@...>; vit9696@...; Ni, Ray <ray.ni@...>
Subject: [RFC] BZ 2298 MdePkg/DevicePathLib merger or not

HI all,

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2298
In the MdePkg, there are two folder for the DevicePathLib:

1. MdePkg\Library\UefiDevicePathLib
2. MdePkg\Library\UefiDevicePathLibDevicePathProtocol

UefiDevicePathLibDevicePathProtocol is created to use the protocol to reduce the driver size which consume the DevicePathLib.
But it has duplicate code with #1. So I want to merge these two folder into one. But many platform implementations consume #2.
If we merge #2 into #1, there might be a lot of platform changes for both close source and open source.
Can anyone give me some suggestions about this? Do we have a progress to retire some implementation in the edk2 repor?

There is another question about MdePkg\Library\UefiDevicePathLib\UefiDevicePathLibOptionalDevicePathProtocol.inf.
This one implements the interface to choose the protocol first, then change to local implementation if no protocol is available.
It requires a fix and it is already sent to the community. But what's the purpose?
Local implementation, i.e. MdePkg\Library\UefiDevicePathLib\ UefiDevicePathLib.inf, can make sure its usable. And it can't reduce the driver size. If it is useless, can we directly remove it?

Thanks,
Zhichao


Gao, Zhichao
 

HI all,

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2298
In the MdePkg, there are two folder for the DevicePathLib:

1. MdePkg\Library\UefiDevicePathLib

2. MdePkg\Library\UefiDevicePathLibDevicePathProtocol

UefiDevicePathLibDevicePathProtocol is created to use the protocol to reduce the driver size which consume the DevicePathLib.
But it has duplicate code with #1. So I want to merge these two folder into one. But many platform implementations consume #2.
If we merge #2 into #1, there might be a lot of platform changes for both close source and open source.
Can anyone give me some suggestions about this? Do we have a progress to retire some implementation in the edk2 repor?

There is another question about MdePkg\Library\UefiDevicePathLib\UefiDevicePathLibOptionalDevicePathProtocol.inf.
This one implements the interface to choose the protocol first, then change to local implementation if no protocol is available.
It requires a fix and it is already sent to the community. But what's the purpose?
Local implementation, i.e. MdePkg\Library\UefiDevicePathLib\ UefiDevicePathLib.inf, can make sure its usable. And it can't reduce the driver size. If it is useless, can we directly remove it?

Thanks,
Zhichao