[edk2-devel] [PATCHv3 0/5] MdeModulePkg/SdMmcPciHcDxe: Refactor command processing

Albecki, Mateusz posted 5 patches 4 years, 1 month ago
Failed in applying to current master (apply log)
MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h |   4 +
MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c   | 609 ++++++++++++++++-----
2 files changed, 478 insertions(+), 135 deletions(-)
[edk2-devel] [PATCHv3 0/5] MdeModulePkg/SdMmcPciHcDxe: Refactor command processing
Posted by Albecki, Mateusz 4 years, 1 month ago
This patch series aims to refactor command processing to achieve following

- Trace the failing TRB packets to see what commands are failing and for what reasons
- Get the response data even if data transfer timed out to allow easier debugging
- Fix the PIO mode which is currently completely broken.

Changes in v2:
- Moved verbose packet prints after the command is finished to capture the successfull command response
- Fixed the debug prints
- PIO data will be moved with width matching the alignment of the block size. For majority of transfers that means UINT32 width.

Changes in v3
- Fixed the memory map in non DMA case(PATCHv3 4/5)

Tests performed:
- Each patch in the series has passed boot from eMMC with ADMAv3 data transfer mode
- SDMA based boot has been tested with the full patch series
- PIO based boot has been tested with the full patch series
- PIO based data transfer has been additionally tested by creating and modyfing a file in EFI shell
- Tested async PIO transfer - results below

Tests performed v3:
- Booted OS in ADMA mode(V3 64bit)
- Booted OS in PIO mode

Async test results:
After fixing memory map issue PIO works reliably in both async and sync cases on all paltforms.

All tests were performed with eMMC in HS400 @200MHz clock frequency.

For easier review & integration patch has been pushed here:
Whole series: https://github.com/malbecki/edk2/tree/emmc_transfer_refactor

Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Marcin Wojtas <mw@semihalf.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>


Mateusz Albecki (5):
  MdeModulePkg/SdMmcPciHcDxe: Enhance driver traces
  MdeModulePkg/SdMmcPciHcDxe: Read response on command completion
  MdeModulePkg/SdMmcPciHcDxe: Refactor data transfer completion
  MdeModulePkg/SdMmcPciHcDxe: Do not map memory for non DMA transfer
  MdeModulePkg/SdMmcPciHcDxe: Fix PIO transfer mode

 MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h |   4 +
 MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c   | 609 ++++++++++++++++-----
 2 files changed, 478 insertions(+), 135 deletions(-)

-- 
2.14.1.windows.1

--------------------------------------------------------------------

Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.

Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek
przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by
others is strictly prohibited.


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

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

Re: [edk2-devel] [PATCHv3 0/5] MdeModulePkg/SdMmcPciHcDxe: Refactor command processing
Posted by Wu, Hao A 4 years, 1 month ago
> -----Original Message-----
> From: Albecki, Mateusz
> Sent: Friday, February 28, 2020 1:25 AM
> To: devel@edk2.groups.io
> Cc: Albecki, Mateusz; Wu, Hao A; Marcin Wojtas; Gao, Zhichao; Gao, Liming
> Subject: [PATCHv3 0/5] MdeModulePkg/SdMmcPciHcDxe: Refactor
> command processing
> 
> This patch series aims to refactor command processing to achieve following
> 
> - Trace the failing TRB packets to see what commands are failing and for
> what reasons
> - Get the response data even if data transfer timed out to allow easier
> debugging
> - Fix the PIO mode which is currently completely broken.
> 
> Changes in v2:
> - Moved verbose packet prints after the command is finished to capture the
> successfull command response
> - Fixed the debug prints
> - PIO data will be moved with width matching the alignment of the block size.
> For majority of transfers that means UINT32 width.
> 
> Changes in v3
> - Fixed the memory map in non DMA case(PATCHv3 4/5)
> 
> Tests performed:
> - Each patch in the series has passed boot from eMMC with ADMAv3 data
> transfer mode
> - SDMA based boot has been tested with the full patch series
> - PIO based boot has been tested with the full patch series
> - PIO based data transfer has been additionally tested by creating and
> modyfing a file in EFI shell
> - Tested async PIO transfer - results below
> 
> Tests performed v3:
> - Booted OS in ADMA mode(V3 64bit)
> - Booted OS in PIO mode
> 
> Async test results:
> After fixing memory map issue PIO works reliably in both async and sync
> cases on all paltforms.
> 
> All tests were performed with eMMC in HS400 @200MHz clock frequency.


Tests done on my side:
A. Contents on SD card and eMMC device can be successfully accessed (Both ADMA
   and PIO mode).
B. Aync RW tests pass for SD card and eMMC device (Both ADMA and PIO mode).

So for the series,
Tested-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>

I will hold and push the series AFTER the upcoming stable tag.

Best Regards,
Hao Wu


> 
> For easier review & integration patch has been pushed here:
> Whole series:
> https://github.com/malbecki/edk2/tree/emmc_transfer_refactor
> 
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Marcin Wojtas <mw@semihalf.com>
> Cc: Zhichao Gao <zhichao.gao@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> 
> 
> Mateusz Albecki (5):
>   MdeModulePkg/SdMmcPciHcDxe: Enhance driver traces
>   MdeModulePkg/SdMmcPciHcDxe: Read response on command completion
>   MdeModulePkg/SdMmcPciHcDxe: Refactor data transfer completion
>   MdeModulePkg/SdMmcPciHcDxe: Do not map memory for non DMA
> transfer
>   MdeModulePkg/SdMmcPciHcDxe: Fix PIO transfer mode
> 
>  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h |   4 +
>  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c   | 609
> ++++++++++++++++-----
>  2 files changed, 478 insertions(+), 135 deletions(-)
> 
> --
> 2.14.1.windows.1


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

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

Re: [edk2-devel] [PATCHv3 0/5] MdeModulePkg/SdMmcPciHcDxe: Refactor command processing
Posted by Wu, Hao A 4 years, 1 month ago
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Wu, Hao A
> Sent: Monday, March 02, 2020 3:52 PM
> To: Albecki, Mateusz; devel@edk2.groups.io
> Cc: Marcin Wojtas; Gao, Zhichao; Gao, Liming
> Subject: Re: [edk2-devel] [PATCHv3 0/5] MdeModulePkg/SdMmcPciHcDxe:
> Refactor command processing
> 
> > -----Original Message-----
> > From: Albecki, Mateusz
> > Sent: Friday, February 28, 2020 1:25 AM
> > To: devel@edk2.groups.io
> > Cc: Albecki, Mateusz; Wu, Hao A; Marcin Wojtas; Gao, Zhichao; Gao,
> Liming
> > Subject: [PATCHv3 0/5] MdeModulePkg/SdMmcPciHcDxe: Refactor
> > command processing
> >
> > This patch series aims to refactor command processing to achieve
> following
> >
> > - Trace the failing TRB packets to see what commands are failing and for
> > what reasons
> > - Get the response data even if data transfer timed out to allow easier
> > debugging
> > - Fix the PIO mode which is currently completely broken.
> >
> > Changes in v2:
> > - Moved verbose packet prints after the command is finished to capture the
> > successfull command response
> > - Fixed the debug prints
> > - PIO data will be moved with width matching the alignment of the block
> size.
> > For majority of transfers that means UINT32 width.
> >
> > Changes in v3
> > - Fixed the memory map in non DMA case(PATCHv3 4/5)
> >
> > Tests performed:
> > - Each patch in the series has passed boot from eMMC with ADMAv3 data
> > transfer mode
> > - SDMA based boot has been tested with the full patch series
> > - PIO based boot has been tested with the full patch series
> > - PIO based data transfer has been additionally tested by creating and
> > modyfing a file in EFI shell
> > - Tested async PIO transfer - results below
> >
> > Tests performed v3:
> > - Booted OS in ADMA mode(V3 64bit)
> > - Booted OS in PIO mode
> >
> > Async test results:
> > After fixing memory map issue PIO works reliably in both async and sync
> > cases on all paltforms.
> >
> > All tests were performed with eMMC in HS400 @200MHz clock frequency.
> 
> 
> Tests done on my side:
> A. Contents on SD card and eMMC device can be successfully accessed (Both
> ADMA
>    and PIO mode).
> B. Aync RW tests pass for SD card and eMMC device (Both ADMA and PIO
> mode).
> 
> So for the series,
> Tested-by: Hao A Wu <hao.a.wu@intel.com>
> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
> 
> I will hold and push the series AFTER the upcoming stable tag.


Series has been pushed via commits 643623147a..9bfaa3da1e.

Best Regards,
Hao Wu


> 
> Best Regards,
> Hao Wu
> 
> 
> >
> > For easier review & integration patch has been pushed here:
> > Whole series:
> > https://github.com/malbecki/edk2/tree/emmc_transfer_refactor
> >
> > Cc: Hao A Wu <hao.a.wu@intel.com>
> > Cc: Marcin Wojtas <mw@semihalf.com>
> > Cc: Zhichao Gao <zhichao.gao@intel.com>
> > Cc: Liming Gao <liming.gao@intel.com>
> >
> >
> > Mateusz Albecki (5):
> >   MdeModulePkg/SdMmcPciHcDxe: Enhance driver traces
> >   MdeModulePkg/SdMmcPciHcDxe: Read response on command
> completion
> >   MdeModulePkg/SdMmcPciHcDxe: Refactor data transfer completion
> >   MdeModulePkg/SdMmcPciHcDxe: Do not map memory for non DMA
> > transfer
> >   MdeModulePkg/SdMmcPciHcDxe: Fix PIO transfer mode
> >
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h |   4 +
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c   | 609
> > ++++++++++++++++-----
> >  2 files changed, 478 insertions(+), 135 deletions(-)
> >
> > --
> > 2.14.1.windows.1
> 
> 
> 


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

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