Hi,
I have been working on support for AHCI controller for my ARMv8 platform.
For that I have integrated my PciEmulation code and SataControllerDxe driver code with MdeModulePkg/Bus/Ata.
But facing one issue, this is same issue reported by Jan Dabros(in To list) sometime back.
Setting PxCMD.FRE bit of command register doesn't cause PxCMD.FR to be set to '1' even after "500msec" timeout.
(As per AHCI spec 1.3 : When PxCMD.FRE is set, it causes PxCMD.FR to be set to '1' )
Is it correct to just comment out following code part from "MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c" file, "AhciModeInitialization" function:
As Initialization timeouts is occurring in below part of code:
//
// Enable FIS Receive DMA engine for the first D2H FIS.
//
Offset = EFI_AHCI_PORT_START + Port * EFI_AHCI_PORT_REG_WIDTH + EFI_AHCI_PORT_CMD;
AhciOrReg (PciIo, Offset, EFI_AHCI_PORT_CMD_FRE);
Status = AhciWaitMmioSet (
PciIo,
Offset,
EFI_AHCI_PORT_CMD_FR,
EFI_AHCI_PORT_CMD_FR,
EFI_AHCI_PORT_CMD_FR_CLEAR_TIMEOUT
);
if (EFI_ERROR (Status)) {
continue;
}
And if above code is commented out, then SATA stack works completely fine.
What can be the problem?
Thank you in advance for your time!
Best regards,
Shaveta
Hi, Shaveta
We have approved this fix. Do you miss it? http://article.gmane.org/gmane.comp.bios.edk2.devel/13541
Thanks Feng
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Thursday, July 14, 2016 2:04 PM To: edk2-devel@lists.01.org; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; Jan Dąbroś jsd@semihalf.com; Ard Biesheuvel ard.biesheuvel@linaro.org Cc: Ruchika Gupta ruchika.gupta@nxp.com Subject: [edk2] SATA AHCI issue
Hi,
I have been working on support for AHCI controller for my ARMv8 platform.
For that I have integrated my PciEmulation code and SataControllerDxe driver code with MdeModulePkg/Bus/Ata.
But facing one issue, this is same issue reported by Jan Dabros(in To list) sometime back.
Setting PxCMD.FRE bit of command register doesn't cause PxCMD.FR to be set to '1' even after "500msec" timeout.
(As per AHCI spec 1.3 : When PxCMD.FRE is set, it causes PxCMD.FR to be set to '1' )
Is it correct to just comment out following code part from "MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c" file, "AhciModeInitialization" function:
As Initialization timeouts is occurring in below part of code:
//
// Enable FIS Receive DMA engine for the first D2H FIS.
//
Offset = EFI_AHCI_PORT_START + Port * EFI_AHCI_PORT_REG_WIDTH + EFI_AHCI_PORT_CMD;
AhciOrReg (PciIo, Offset, EFI_AHCI_PORT_CMD_FRE);
Status = AhciWaitMmioSet (
PciIo,
Offset,
EFI_AHCI_PORT_CMD_FR,
EFI_AHCI_PORT_CMD_FR,
EFI_AHCI_PORT_CMD_FR_CLEAR_TIMEOUT
);
if (EFI_ERROR (Status)) {
continue;
}
And if above code is commented out, then SATA stack works completely fine.
What can be the problem?
Thank you in advance for your time!
Best regards,
Shaveta
_______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Thanks Feng!
I guess I missed it. SATA is working fine with this fix.
Thanks and Regards, Shaveta
-----Original Message----- From: Tian, Feng [mailto:feng.tian@intel.com] Sent: Thursday, July 14, 2016 11:56 AM To: Shaveta Leekha shaveta.leekha@nxp.com; edk2-devel@lists.01.org; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; Jan Dąbroś jsd@semihalf.com; Ard Biesheuvel ard.biesheuvel@linaro.org Cc: Ruchika Gupta ruchika.gupta@nxp.com; Tian, Feng feng.tian@intel.com Subject: RE: SATA AHCI issue
Hi, Shaveta
We have approved this fix. Do you miss it? http://article.gmane.org/gmane.comp.bios.edk2.devel/13541
Thanks Feng
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Thursday, July 14, 2016 2:04 PM To: edk2-devel@lists.01.org; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; Jan Dąbroś jsd@semihalf.com; Ard Biesheuvel ard.biesheuvel@linaro.org Cc: Ruchika Gupta ruchika.gupta@nxp.com Subject: [edk2] SATA AHCI issue
Hi,
I have been working on support for AHCI controller for my ARMv8 platform.
For that I have integrated my PciEmulation code and SataControllerDxe driver code with MdeModulePkg/Bus/Ata.
But facing one issue, this is same issue reported by Jan Dabros(in To list) sometime back.
Setting PxCMD.FRE bit of command register doesn't cause PxCMD.FR to be set to '1' even after "500msec" timeout.
(As per AHCI spec 1.3 : When PxCMD.FRE is set, it causes PxCMD.FR to be set to '1' )
Is it correct to just comment out following code part from "MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c" file, "AhciModeInitialization" function:
As Initialization timeouts is occurring in below part of code:
//
// Enable FIS Receive DMA engine for the first D2H FIS.
//
Offset = EFI_AHCI_PORT_START + Port * EFI_AHCI_PORT_REG_WIDTH + EFI_AHCI_PORT_CMD;
AhciOrReg (PciIo, Offset, EFI_AHCI_PORT_CMD_FRE);
Status = AhciWaitMmioSet (
PciIo,
Offset,
EFI_AHCI_PORT_CMD_FR,
EFI_AHCI_PORT_CMD_FR,
EFI_AHCI_PORT_CMD_FR_CLEAR_TIMEOUT
);
if (EFI_ERROR (Status)) {
continue;
}
And if above code is commented out, then SATA stack works completely fine.
What can be the problem?
Thank you in advance for your time!
Best regards,
Shaveta
_______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Hi,
I am facing one Timeout issue while writing big file over my SATA HDD. It in the code of "AhciDmaTransfer " from file AhciMode.c
// // Wait for command compelte // FisBaseAddr = (UINTN)AhciRegisters->AhciRFis + Port * sizeof (EFI_AHCI_RECEIVED_FIS); Offset = FisBaseAddr + EFI_AHCI_D2H_FIS_OFFSET; Status = AhciWaitMemSet ( Offset, EFI_AHCI_FIS_TYPE_MASK, EFI_AHCI_FIS_REGISTER_D2H, This MemSet check fails, what could be the issue? Timeout );
TimeOut occur while checking FIS_REGISTER_D2H. Any idea about this time out issue?
Can it be "Due to un-aligned PRD? Are there multiple PRDs created or single PRD?"
As I am able to write maximum 4MB file on SATA HDD, file above 4MB size failed by giving TIMEOUT_ERROR.
Thanks and Regards, Shaveta
Hi,
As per the spec and the code in "AhciMode.c"
// According to AHCI 1.3 spec, a PRDT entry can point to a maximum 4MB data block.
Does it mean, only one PRD entry is getting transferred successfully? But as the data I am writing onto SATA HDD is 30MB big, what about the rest of PRDs? What could be went here?
Thanks and Regards, Shaveta
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Monday, August 08, 2016 5:24 PM To: Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: [edk2] SATA AHCI issue
Hi,
I am facing one Timeout issue while writing big file over my SATA HDD. It in the code of "AhciDmaTransfer " from file AhciMode.c
// // Wait for command compelte // FisBaseAddr = (UINTN)AhciRegisters->AhciRFis + Port * sizeof (EFI_AHCI_RECEIVED_FIS); Offset = FisBaseAddr + EFI_AHCI_D2H_FIS_OFFSET; Status = AhciWaitMemSet ( Offset, EFI_AHCI_FIS_TYPE_MASK, EFI_AHCI_FIS_REGISTER_D2H, This MemSet check fails, what could be the issue? Timeout );
TimeOut occur while checking FIS_REGISTER_D2H. Any idea about this time out issue?
Can it be "Due to un-aligned PRD? Are there multiple PRDs created or single PRD?"
As I am able to write maximum 4MB file on SATA HDD, file above 4MB size failed by giving TIMEOUT_ERROR.
Thanks and Regards, Shaveta
_______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Hi, Shaveta
No, we will create multiple PRDs if the transfer length is larger than 4M. each PRD could represent a 4M transfer request and the maximum number of PRD for each command is 65535.
How do you access the HDD? At block level or file level? It happens at all HDDs or only one specific brand model?
Thanks Feng
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Monday, August 8, 2016 8:07 PM To: Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: Re: [edk2] SATA AHCI issue
Hi,
As per the spec and the code in "AhciMode.c"
// According to AHCI 1.3 spec, a PRDT entry can point to a maximum 4MB data block.
Does it mean, only one PRD entry is getting transferred successfully? But as the data I am writing onto SATA HDD is 30MB big, what about the rest of PRDs? What could be went here?
Thanks and Regards, Shaveta
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Monday, August 08, 2016 5:24 PM To: Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: [edk2] SATA AHCI issue
Hi,
I am facing one Timeout issue while writing big file over my SATA HDD. It in the code of "AhciDmaTransfer " from file AhciMode.c
// // Wait for command compelte // FisBaseAddr = (UINTN)AhciRegisters->AhciRFis + Port * sizeof (EFI_AHCI_RECEIVED_FIS); Offset = FisBaseAddr + EFI_AHCI_D2H_FIS_OFFSET; Status = AhciWaitMemSet ( Offset, EFI_AHCI_FIS_TYPE_MASK, EFI_AHCI_FIS_REGISTER_D2H, This MemSet check fails, what could be the issue? Timeout );
TimeOut occur while checking FIS_REGISTER_D2H. Any idea about this time out issue?
Can it be "Due to un-aligned PRD? Are there multiple PRDs created or single PRD?"
As I am able to write maximum 4MB file on SATA HDD, file above 4MB size failed by giving TIMEOUT_ERROR.
Thanks and Regards, Shaveta
_______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Hi Feng,
Yes for 30MB file, multiple PRD entries would have been created. But I able to write file only upto 4MB size.
The protocol stack I am using is:
Generic AtaBusDxe driver use EfiAtaPassThruProtocol Generic AtaAtapiPassThru driver consumes "EfiIdeControllerInitProtocol" and produces "EfiAtaPassThruProtocol" which is consumed by generic AtaBusDxe driver Platform-specific SATA driver that produces "EfiIdeControllerInitProtocol
I am writing SATA HDD at File level. HDD is formatted with FAT32 which is identified as FileSytem by FATPKG.
Snippet of writing onto SATA HDD Filesystem is pasted below.
Thanks and Regards, Shaveta
UEFI Interactive Shell v2.1 EDK II UEFI v2.50 (LS2080a RDB board EFI Jul 25 2016 00:00:33, 0x00000000) Mapping table FS0: Alias(s):F6a0a:;BLK0: PciRoot(0x0)/Pci(0x0,0x0)/Sata(0x0,0x0,0x0) Shell>FS0: FS0:> tftp 192.168.3.161 test2 test Downloading the file 'test2' [=======================================>] 0 Kb
-----Original Message----- From: Tian, Feng [mailto:feng.tian@intel.com] Sent: Tuesday, August 09, 2016 8:30 AM To: Shaveta Leekha shaveta.leekha@nxp.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Cc: Tian, Feng feng.tian@intel.com Subject: RE: SATA AHCI issue
Hi, Shaveta
No, we will create multiple PRDs if the transfer length is larger than 4M. each PRD could represent a 4M transfer request and the maximum number of PRD for each command is 65535.
How do you access the HDD? At block level or file level? It happens at all HDDs or only one specific brand model?
Thanks Feng
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Monday, August 8, 2016 8:07 PM To: Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: Re: [edk2] SATA AHCI issue
Hi,
As per the spec and the code in "AhciMode.c"
// According to AHCI 1.3 spec, a PRDT entry can point to a maximum 4MB data block.
Does it mean, only one PRD entry is getting transferred successfully? But as the data I am writing onto SATA HDD is 30MB big, what about the rest of PRDs? What could be went here?
Thanks and Regards, Shaveta
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Monday, August 08, 2016 5:24 PM To: Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: [edk2] SATA AHCI issue
Hi,
I am facing one Timeout issue while writing big file over my SATA HDD. It in the code of "AhciDmaTransfer " from file AhciMode.c
// // Wait for command compelte // FisBaseAddr = (UINTN)AhciRegisters->AhciRFis + Port * sizeof (EFI_AHCI_RECEIVED_FIS); Offset = FisBaseAddr + EFI_AHCI_D2H_FIS_OFFSET; Status = AhciWaitMemSet ( Offset, EFI_AHCI_FIS_TYPE_MASK, EFI_AHCI_FIS_REGISTER_D2H, This MemSet check fails, what could be the issue? Timeout );
TimeOut occur while checking FIS_REGISTER_D2H. Any idea about this time out issue?
Can it be "Due to un-aligned PRD? Are there multiple PRDs created or single PRD?"
As I am able to write maximum 4MB file on SATA HDD, file above 4MB size failed by giving TIMEOUT_ERROR.
Thanks and Regards, Shaveta
_______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Hi Feng,
Complete stack is:
MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf FatPkg/FatPei/FatPei.inf FatPkg/EnhancedFatDxe/Fat.inf
Best Regards, Shaveta
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Tuesday, August 09, 2016 1:07 PM To: Tian, Feng feng.tian@intel.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: Re: [edk2] SATA AHCI issue
Hi Feng,
Yes for 30MB file, multiple PRD entries would have been created. But I able to write file only upto 4MB size.
The protocol stack I am using is:
Generic AtaBusDxe driver use EfiAtaPassThruProtocol Generic AtaAtapiPassThru driver consumes "EfiIdeControllerInitProtocol" and produces "EfiAtaPassThruProtocol" which is consumed by generic AtaBusDxe driver Platform-specific SATA driver that produces "EfiIdeControllerInitProtocol
I am writing SATA HDD at File level. HDD is formatted with FAT32 which is identified as FileSytem by FATPKG.
Snippet of writing onto SATA HDD Filesystem is pasted below.
Thanks and Regards, Shaveta
UEFI Interactive Shell v2.1 EDK II UEFI v2.50 (LS2080a RDB board EFI Jul 25 2016 00:00:33, 0x00000000) Mapping table FS0: Alias(s):F6a0a:;BLK0: PciRoot(0x0)/Pci(0x0,0x0)/Sata(0x0,0x0,0x0) Shell>FS0: FS0:> tftp 192.168.3.161 test2 test Downloading the file 'test2' [=======================================>] 0 Kb
-----Original Message----- From: Tian, Feng [mailto:feng.tian@intel.com] Sent: Tuesday, August 09, 2016 8:30 AM To: Shaveta Leekha shaveta.leekha@nxp.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Cc: Tian, Feng feng.tian@intel.com Subject: RE: SATA AHCI issue
Hi, Shaveta
No, we will create multiple PRDs if the transfer length is larger than 4M. each PRD could represent a 4M transfer request and the maximum number of PRD for each command is 65535.
How do you access the HDD? At block level or file level? It happens at all HDDs or only one specific brand model?
Thanks Feng
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Monday, August 8, 2016 8:07 PM To: Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: Re: [edk2] SATA AHCI issue
Hi,
As per the spec and the code in "AhciMode.c"
// According to AHCI 1.3 spec, a PRDT entry can point to a maximum 4MB data block.
Does it mean, only one PRD entry is getting transferred successfully? But as the data I am writing onto SATA HDD is 30MB big, what about the rest of PRDs? What could be went here?
Thanks and Regards, Shaveta
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Monday, August 08, 2016 5:24 PM To: Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: [edk2] SATA AHCI issue
Hi,
I am facing one Timeout issue while writing big file over my SATA HDD. It in the code of "AhciDmaTransfer " from file AhciMode.c
// // Wait for command compelte // FisBaseAddr = (UINTN)AhciRegisters->AhciRFis + Port * sizeof (EFI_AHCI_RECEIVED_FIS); Offset = FisBaseAddr + EFI_AHCI_D2H_FIS_OFFSET; Status = AhciWaitMemSet ( Offset, EFI_AHCI_FIS_TYPE_MASK, EFI_AHCI_FIS_REGISTER_D2H, This MemSet check fails, what could be the issue? Timeout );
TimeOut occur while checking FIS_REGISTER_D2H. Any idea about this time out issue?
Can it be "Due to un-aligned PRD? Are there multiple PRDs created or single PRD?"
As I am able to write maximum 4MB file on SATA HDD, file above 4MB size failed by giving TIMEOUT_ERROR.
Thanks and Regards, Shaveta
_______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Hi, Shaveta
I saw you are using TFTP cmd to do the test? Did you ever test copying file from usb stick to the SATA HDD?
I just copied a 70M file from usb to SATA and from SATA to SATA. It works well.
Does this issue happen at all of your HDDs or only one specific brand model? Do you have other helpful info for us to narrow down?
Thanks Feng
-----Original Message----- From: Shaveta Leekha [mailto:shaveta.leekha@nxp.com] Sent: Tuesday, August 9, 2016 4:03 PM To: Tian, Feng feng.tian@intel.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: RE: SATA AHCI issue
Hi Feng,
Complete stack is:
MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf FatPkg/FatPei/FatPei.inf FatPkg/EnhancedFatDxe/Fat.inf
Best Regards, Shaveta
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Tuesday, August 09, 2016 1:07 PM To: Tian, Feng feng.tian@intel.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: Re: [edk2] SATA AHCI issue
Hi Feng,
Yes for 30MB file, multiple PRD entries would have been created. But I able to write file only upto 4MB size.
The protocol stack I am using is:
Generic AtaBusDxe driver use EfiAtaPassThruProtocol Generic AtaAtapiPassThru driver consumes "EfiIdeControllerInitProtocol" and produces "EfiAtaPassThruProtocol" which is consumed by generic AtaBusDxe driver Platform-specific SATA driver that produces "EfiIdeControllerInitProtocol
I am writing SATA HDD at File level. HDD is formatted with FAT32 which is identified as FileSytem by FATPKG.
Snippet of writing onto SATA HDD Filesystem is pasted below.
Thanks and Regards, Shaveta
UEFI Interactive Shell v2.1 EDK II UEFI v2.50 (LS2080a RDB board EFI Jul 25 2016 00:00:33, 0x00000000) Mapping table FS0: Alias(s):F6a0a:;BLK0: PciRoot(0x0)/Pci(0x0,0x0)/Sata(0x0,0x0,0x0) Shell>FS0: FS0:> tftp 192.168.3.161 test2 test Downloading the file 'test2' [=======================================>] 0 Kb
-----Original Message----- From: Tian, Feng [mailto:feng.tian@intel.com] Sent: Tuesday, August 09, 2016 8:30 AM To: Shaveta Leekha shaveta.leekha@nxp.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Cc: Tian, Feng feng.tian@intel.com Subject: RE: SATA AHCI issue
Hi, Shaveta
No, we will create multiple PRDs if the transfer length is larger than 4M. each PRD could represent a 4M transfer request and the maximum number of PRD for each command is 65535.
How do you access the HDD? At block level or file level? It happens at all HDDs or only one specific brand model?
Thanks Feng
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Monday, August 8, 2016 8:07 PM To: Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: Re: [edk2] SATA AHCI issue
Hi,
As per the spec and the code in "AhciMode.c"
// According to AHCI 1.3 spec, a PRDT entry can point to a maximum 4MB data block.
Does it mean, only one PRD entry is getting transferred successfully? But as the data I am writing onto SATA HDD is 30MB big, what about the rest of PRDs? What could be went here?
Thanks and Regards, Shaveta
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Monday, August 08, 2016 5:24 PM To: Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: [edk2] SATA AHCI issue
Hi,
I am facing one Timeout issue while writing big file over my SATA HDD. It in the code of "AhciDmaTransfer " from file AhciMode.c
// // Wait for command compelte // FisBaseAddr = (UINTN)AhciRegisters->AhciRFis + Port * sizeof (EFI_AHCI_RECEIVED_FIS); Offset = FisBaseAddr + EFI_AHCI_D2H_FIS_OFFSET; Status = AhciWaitMemSet ( Offset, EFI_AHCI_FIS_TYPE_MASK, EFI_AHCI_FIS_REGISTER_D2H, This MemSet check fails, what could be the issue? Timeout );
TimeOut occur while checking FIS_REGISTER_D2H. Any idea about this time out issue?
Can it be "Due to un-aligned PRD? Are there multiple PRDs created or single PRD?"
As I am able to write maximum 4MB file on SATA HDD, file above 4MB size failed by giving TIMEOUT_ERROR.
Thanks and Regards, Shaveta
_______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Hi Feng,
Yes, I am using Tftp to get the file on HDD.
Have tried only one HardDisk, will try SATA disk from other vendors also, to get to the root cause. Will also try copying data from SATA to SATA.
Are PRD entries aligned in EDK2 code base? (I mean they are aligned on which boundary? 16 Byte? 4KB?)
Best Regards, Shaveta
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Tian, Feng Sent: Tuesday, August 09, 2016 1:38 PM To: Shaveta Leekha shaveta.leekha@nxp.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Cc: Tian, Feng feng.tian@intel.com Subject: Re: [edk2] SATA AHCI issue
Hi, Shaveta
I saw you are using TFTP cmd to do the test? Did you ever test copying file from usb stick to the SATA HDD?
I just copied a 70M file from usb to SATA and from SATA to SATA. It works well.
Does this issue happen at all of your HDDs or only one specific brand model? Do you have other helpful info for us to narrow down?
Thanks Feng
-----Original Message----- From: Shaveta Leekha [mailto:shaveta.leekha@nxp.com] Sent: Tuesday, August 9, 2016 4:03 PM To: Tian, Feng feng.tian@intel.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: RE: SATA AHCI issue
Hi Feng,
Complete stack is:
MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf FatPkg/FatPei/FatPei.inf FatPkg/EnhancedFatDxe/Fat.inf
Best Regards, Shaveta
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Tuesday, August 09, 2016 1:07 PM To: Tian, Feng feng.tian@intel.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: Re: [edk2] SATA AHCI issue
Hi Feng,
Yes for 30MB file, multiple PRD entries would have been created. But I able to write file only upto 4MB size.
The protocol stack I am using is:
Generic AtaBusDxe driver use EfiAtaPassThruProtocol Generic AtaAtapiPassThru driver consumes "EfiIdeControllerInitProtocol" and produces "EfiAtaPassThruProtocol" which is consumed by generic AtaBusDxe driver Platform-specific SATA driver that produces "EfiIdeControllerInitProtocol
I am writing SATA HDD at File level. HDD is formatted with FAT32 which is identified as FileSytem by FATPKG.
Snippet of writing onto SATA HDD Filesystem is pasted below.
Thanks and Regards, Shaveta
UEFI Interactive Shell v2.1 EDK II UEFI v2.50 (LS2080a RDB board EFI Jul 25 2016 00:00:33, 0x00000000) Mapping table FS0: Alias(s):F6a0a:;BLK0: PciRoot(0x0)/Pci(0x0,0x0)/Sata(0x0,0x0,0x0) Shell>FS0: FS0:> tftp 192.168.3.161 test2 test Downloading the file 'test2' [=======================================>] 0 Kb
-----Original Message----- From: Tian, Feng [mailto:feng.tian@intel.com] Sent: Tuesday, August 09, 2016 8:30 AM To: Shaveta Leekha shaveta.leekha@nxp.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Cc: Tian, Feng feng.tian@intel.com Subject: RE: SATA AHCI issue
Hi, Shaveta
No, we will create multiple PRDs if the transfer length is larger than 4M. each PRD could represent a 4M transfer request and the maximum number of PRD for each command is 65535.
How do you access the HDD? At block level or file level? It happens at all HDDs or only one specific brand model?
Thanks Feng
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Monday, August 8, 2016 8:07 PM To: Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: Re: [edk2] SATA AHCI issue
Hi,
As per the spec and the code in "AhciMode.c"
// According to AHCI 1.3 spec, a PRDT entry can point to a maximum 4MB data block.
Does it mean, only one PRD entry is getting transferred successfully? But as the data I am writing onto SATA HDD is 30MB big, what about the rest of PRDs? What could be went here?
Thanks and Regards, Shaveta
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Monday, August 08, 2016 5:24 PM To: Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: [edk2] SATA AHCI issue
Hi,
I am facing one Timeout issue while writing big file over my SATA HDD. It in the code of "AhciDmaTransfer " from file AhciMode.c
// // Wait for command compelte // FisBaseAddr = (UINTN)AhciRegisters->AhciRFis + Port * sizeof (EFI_AHCI_RECEIVED_FIS); Offset = FisBaseAddr + EFI_AHCI_D2H_FIS_OFFSET; Status = AhciWaitMemSet ( Offset, EFI_AHCI_FIS_TYPE_MASK, EFI_AHCI_FIS_REGISTER_D2H, This MemSet check fails, what could be the issue? Timeout );
TimeOut occur while checking FIS_REGISTER_D2H. Any idea about this time out issue?
Can it be "Due to un-aligned PRD? Are there multiple PRDs created or single PRD?"
As I am able to write maximum 4MB file on SATA HDD, file above 4MB size failed by giving TIMEOUT_ERROR.
Thanks and Regards, Shaveta
_______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
PRD entries are organized like AHCI spec Figure 13 said.
Thanks Feng
-----Original Message----- From: Shaveta Leekha [mailto:shaveta.leekha@nxp.com] Sent: Tuesday, August 9, 2016 7:40 PM To: Tian, Feng feng.tian@intel.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: RE: SATA AHCI issue
Hi Feng,
Yes, I am using Tftp to get the file on HDD.
Have tried only one HardDisk, will try SATA disk from other vendors also, to get to the root cause. Will also try copying data from SATA to SATA.
Are PRD entries aligned in EDK2 code base? (I mean they are aligned on which boundary? 16 Byte? 4KB?)
Best Regards, Shaveta
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Tian, Feng Sent: Tuesday, August 09, 2016 1:38 PM To: Shaveta Leekha shaveta.leekha@nxp.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Cc: Tian, Feng feng.tian@intel.com Subject: Re: [edk2] SATA AHCI issue
Hi, Shaveta
I saw you are using TFTP cmd to do the test? Did you ever test copying file from usb stick to the SATA HDD?
I just copied a 70M file from usb to SATA and from SATA to SATA. It works well.
Does this issue happen at all of your HDDs or only one specific brand model? Do you have other helpful info for us to narrow down?
Thanks Feng
-----Original Message----- From: Shaveta Leekha [mailto:shaveta.leekha@nxp.com] Sent: Tuesday, August 9, 2016 4:03 PM To: Tian, Feng feng.tian@intel.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: RE: SATA AHCI issue
Hi Feng,
Complete stack is:
MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf FatPkg/FatPei/FatPei.inf FatPkg/EnhancedFatDxe/Fat.inf
Best Regards, Shaveta
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Tuesday, August 09, 2016 1:07 PM To: Tian, Feng feng.tian@intel.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: Re: [edk2] SATA AHCI issue
Hi Feng,
Yes for 30MB file, multiple PRD entries would have been created. But I able to write file only upto 4MB size.
The protocol stack I am using is:
Generic AtaBusDxe driver use EfiAtaPassThruProtocol Generic AtaAtapiPassThru driver consumes "EfiIdeControllerInitProtocol" and produces "EfiAtaPassThruProtocol" which is consumed by generic AtaBusDxe driver Platform-specific SATA driver that produces "EfiIdeControllerInitProtocol
I am writing SATA HDD at File level. HDD is formatted with FAT32 which is identified as FileSytem by FATPKG.
Snippet of writing onto SATA HDD Filesystem is pasted below.
Thanks and Regards, Shaveta
UEFI Interactive Shell v2.1 EDK II UEFI v2.50 (LS2080a RDB board EFI Jul 25 2016 00:00:33, 0x00000000) Mapping table FS0: Alias(s):F6a0a:;BLK0: PciRoot(0x0)/Pci(0x0,0x0)/Sata(0x0,0x0,0x0) Shell>FS0: FS0:> tftp 192.168.3.161 test2 test Downloading the file 'test2' [=======================================>] 0 Kb
-----Original Message----- From: Tian, Feng [mailto:feng.tian@intel.com] Sent: Tuesday, August 09, 2016 8:30 AM To: Shaveta Leekha shaveta.leekha@nxp.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Cc: Tian, Feng feng.tian@intel.com Subject: RE: SATA AHCI issue
Hi, Shaveta
No, we will create multiple PRDs if the transfer length is larger than 4M. each PRD could represent a 4M transfer request and the maximum number of PRD for each command is 65535.
How do you access the HDD? At block level or file level? It happens at all HDDs or only one specific brand model?
Thanks Feng
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Monday, August 8, 2016 8:07 PM To: Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: Re: [edk2] SATA AHCI issue
Hi,
As per the spec and the code in "AhciMode.c"
// According to AHCI 1.3 spec, a PRDT entry can point to a maximum 4MB data block.
Does it mean, only one PRD entry is getting transferred successfully? But as the data I am writing onto SATA HDD is 30MB big, what about the rest of PRDs? What could be went here?
Thanks and Regards, Shaveta
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Monday, August 08, 2016 5:24 PM To: Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: [edk2] SATA AHCI issue
Hi,
I am facing one Timeout issue while writing big file over my SATA HDD. It in the code of "AhciDmaTransfer " from file AhciMode.c
// // Wait for command compelte // FisBaseAddr = (UINTN)AhciRegisters->AhciRFis + Port * sizeof (EFI_AHCI_RECEIVED_FIS); Offset = FisBaseAddr + EFI_AHCI_D2H_FIS_OFFSET; Status = AhciWaitMemSet ( Offset, EFI_AHCI_FIS_TYPE_MASK, EFI_AHCI_FIS_REGISTER_D2H, This MemSet check fails, what could be the issue? Timeout );
TimeOut occur while checking FIS_REGISTER_D2H. Any idea about this time out issue?
Can it be "Due to un-aligned PRD? Are there multiple PRDs created or single PRD?"
As I am able to write maximum 4MB file on SATA HDD, file above 4MB size failed by giving TIMEOUT_ERROR.
Thanks and Regards, Shaveta
_______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Hi Feng,
PRD table entries are 16Byte aligned, as specified by AHCI spec also, it has 4 DWs.
I have tried two HDD, but issue is same, TIMEOUT issue. I have also tried copying one file on SATA HDD to another file on same SATA HDD(filesize > 4MB), No issue occur in this scenario.
USB support is not yet there on our platform, so couldn't try that scenario.
Still not sure, where could be the issue?
Thanks and Regards, Shaveta
-----Original Message----- From: Tian, Feng [mailto:feng.tian@intel.com] Sent: Wednesday, August 10, 2016 10:49 AM To: Shaveta Leekha shaveta.leekha@nxp.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Cc: Tian, Feng feng.tian@intel.com Subject: RE: SATA AHCI issue
PRD entries are organized like AHCI spec Figure 13 said.
Thanks Feng
-----Original Message----- From: Shaveta Leekha [mailto:shaveta.leekha@nxp.com] Sent: Tuesday, August 9, 2016 7:40 PM To: Tian, Feng feng.tian@intel.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: RE: SATA AHCI issue
Hi Feng,
Yes, I am using Tftp to get the file on HDD.
Have tried only one HardDisk, will try SATA disk from other vendors also, to get to the root cause. Will also try copying data from SATA to SATA.
Are PRD entries aligned in EDK2 code base? (I mean they are aligned on which boundary? 16 Byte? 4KB?)
Best Regards, Shaveta
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Tian, Feng Sent: Tuesday, August 09, 2016 1:38 PM To: Shaveta Leekha shaveta.leekha@nxp.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Cc: Tian, Feng feng.tian@intel.com Subject: Re: [edk2] SATA AHCI issue
Hi, Shaveta
I saw you are using TFTP cmd to do the test? Did you ever test copying file from usb stick to the SATA HDD?
I just copied a 70M file from usb to SATA and from SATA to SATA. It works well.
Does this issue happen at all of your HDDs or only one specific brand model? Do you have other helpful info for us to narrow down?
Thanks Feng
-----Original Message----- From: Shaveta Leekha [mailto:shaveta.leekha@nxp.com] Sent: Tuesday, August 9, 2016 4:03 PM To: Tian, Feng feng.tian@intel.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: RE: SATA AHCI issue
Hi Feng,
Complete stack is:
MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf FatPkg/FatPei/FatPei.inf FatPkg/EnhancedFatDxe/Fat.inf
Best Regards, Shaveta
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Tuesday, August 09, 2016 1:07 PM To: Tian, Feng feng.tian@intel.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: Re: [edk2] SATA AHCI issue
Hi Feng,
Yes for 30MB file, multiple PRD entries would have been created. But I able to write file only upto 4MB size.
The protocol stack I am using is:
Generic AtaBusDxe driver use EfiAtaPassThruProtocol Generic AtaAtapiPassThru driver consumes "EfiIdeControllerInitProtocol" and produces "EfiAtaPassThruProtocol" which is consumed by generic AtaBusDxe driver Platform-specific SATA driver that produces "EfiIdeControllerInitProtocol
I am writing SATA HDD at File level. HDD is formatted with FAT32 which is identified as FileSytem by FATPKG.
Snippet of writing onto SATA HDD Filesystem is pasted below.
Thanks and Regards, Shaveta
UEFI Interactive Shell v2.1 EDK II UEFI v2.50 (LS2080a RDB board EFI Jul 25 2016 00:00:33, 0x00000000) Mapping table FS0: Alias(s):F6a0a:;BLK0: PciRoot(0x0)/Pci(0x0,0x0)/Sata(0x0,0x0,0x0) Shell>FS0: FS0:> tftp 192.168.3.161 test2 test Downloading the file 'test2' [=======================================>] 0 Kb
-----Original Message----- From: Tian, Feng [mailto:feng.tian@intel.com] Sent: Tuesday, August 09, 2016 8:30 AM To: Shaveta Leekha shaveta.leekha@nxp.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Cc: Tian, Feng feng.tian@intel.com Subject: RE: SATA AHCI issue
Hi, Shaveta
No, we will create multiple PRDs if the transfer length is larger than 4M. each PRD could represent a 4M transfer request and the maximum number of PRD for each command is 65535.
How do you access the HDD? At block level or file level? It happens at all HDDs or only one specific brand model?
Thanks Feng
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Monday, August 8, 2016 8:07 PM To: Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: Re: [edk2] SATA AHCI issue
Hi,
As per the spec and the code in "AhciMode.c"
// According to AHCI 1.3 spec, a PRDT entry can point to a maximum 4MB data block.
Does it mean, only one PRD entry is getting transferred successfully? But as the data I am writing onto SATA HDD is 30MB big, what about the rest of PRDs? What could be went here?
Thanks and Regards, Shaveta
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Monday, August 08, 2016 5:24 PM To: Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: [edk2] SATA AHCI issue
Hi,
I am facing one Timeout issue while writing big file over my SATA HDD. It in the code of "AhciDmaTransfer " from file AhciMode.c
// // Wait for command compelte // FisBaseAddr = (UINTN)AhciRegisters->AhciRFis + Port * sizeof (EFI_AHCI_RECEIVED_FIS); Offset = FisBaseAddr + EFI_AHCI_D2H_FIS_OFFSET; Status = AhciWaitMemSet ( Offset, EFI_AHCI_FIS_TYPE_MASK, EFI_AHCI_FIS_REGISTER_D2H, This MemSet check fails, what could be the issue? Timeout );
TimeOut occur while checking FIS_REGISTER_D2H. Any idea about this time out issue?
Can it be "Due to un-aligned PRD? Are there multiple PRDs created or single PRD?"
As I am able to write maximum 4MB file on SATA HDD, file above 4MB size failed by giving TIMEOUT_ERROR.
Thanks and Regards, Shaveta
_______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Hi, Shaveta
I saw the Tftp implemention of UefiShell splits the whole procedure to two steps, read the file from tftp sever at first, then write the file to specified destination.
Do you know which step gets the timeout error?
The 1st step is total irrelevant with HDD access. And I didn't see any difference between the 2nd steps and other common write operations. So I am also curious on this. I would suggest you to add debug message to Tftp.c & AhciMode.c to see what happens.
Thanks Feng
-----Original Message----- From: Shaveta Leekha [mailto:shaveta.leekha@nxp.com] Sent: Wednesday, August 10, 2016 7:50 PM To: Tian, Feng feng.tian@intel.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: RE: SATA AHCI issue
Hi Feng,
PRD table entries are 16Byte aligned, as specified by AHCI spec also, it has 4 DWs.
I have tried two HDD, but issue is same, TIMEOUT issue. I have also tried copying one file on SATA HDD to another file on same SATA HDD(filesize > 4MB), No issue occur in this scenario.
USB support is not yet there on our platform, so couldn't try that scenario.
Still not sure, where could be the issue?
Thanks and Regards, Shaveta
-----Original Message----- From: Tian, Feng [mailto:feng.tian@intel.com] Sent: Wednesday, August 10, 2016 10:49 AM To: Shaveta Leekha shaveta.leekha@nxp.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Cc: Tian, Feng feng.tian@intel.com Subject: RE: SATA AHCI issue
PRD entries are organized like AHCI spec Figure 13 said.
Thanks Feng
-----Original Message----- From: Shaveta Leekha [mailto:shaveta.leekha@nxp.com] Sent: Tuesday, August 9, 2016 7:40 PM To: Tian, Feng feng.tian@intel.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: RE: SATA AHCI issue
Hi Feng,
Yes, I am using Tftp to get the file on HDD.
Have tried only one HardDisk, will try SATA disk from other vendors also, to get to the root cause. Will also try copying data from SATA to SATA.
Are PRD entries aligned in EDK2 code base? (I mean they are aligned on which boundary? 16 Byte? 4KB?)
Best Regards, Shaveta
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Tian, Feng Sent: Tuesday, August 09, 2016 1:38 PM To: Shaveta Leekha shaveta.leekha@nxp.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Cc: Tian, Feng feng.tian@intel.com Subject: Re: [edk2] SATA AHCI issue
Hi, Shaveta
I saw you are using TFTP cmd to do the test? Did you ever test copying file from usb stick to the SATA HDD?
I just copied a 70M file from usb to SATA and from SATA to SATA. It works well.
Does this issue happen at all of your HDDs or only one specific brand model? Do you have other helpful info for us to narrow down?
Thanks Feng
-----Original Message----- From: Shaveta Leekha [mailto:shaveta.leekha@nxp.com] Sent: Tuesday, August 9, 2016 4:03 PM To: Tian, Feng feng.tian@intel.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: RE: SATA AHCI issue
Hi Feng,
Complete stack is:
MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf FatPkg/FatPei/FatPei.inf FatPkg/EnhancedFatDxe/Fat.inf
Best Regards, Shaveta
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Tuesday, August 09, 2016 1:07 PM To: Tian, Feng feng.tian@intel.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: Re: [edk2] SATA AHCI issue
Hi Feng,
Yes for 30MB file, multiple PRD entries would have been created. But I able to write file only upto 4MB size.
The protocol stack I am using is:
Generic AtaBusDxe driver use EfiAtaPassThruProtocol Generic AtaAtapiPassThru driver consumes "EfiIdeControllerInitProtocol" and produces "EfiAtaPassThruProtocol" which is consumed by generic AtaBusDxe driver Platform-specific SATA driver that produces "EfiIdeControllerInitProtocol
I am writing SATA HDD at File level. HDD is formatted with FAT32 which is identified as FileSytem by FATPKG.
Snippet of writing onto SATA HDD Filesystem is pasted below.
Thanks and Regards, Shaveta
UEFI Interactive Shell v2.1 EDK II UEFI v2.50 (LS2080a RDB board EFI Jul 25 2016 00:00:33, 0x00000000) Mapping table FS0: Alias(s):F6a0a:;BLK0: PciRoot(0x0)/Pci(0x0,0x0)/Sata(0x0,0x0,0x0) Shell>FS0: FS0:> tftp 192.168.3.161 test2 test Downloading the file 'test2' [=======================================>] 0 Kb
-----Original Message----- From: Tian, Feng [mailto:feng.tian@intel.com] Sent: Tuesday, August 09, 2016 8:30 AM To: Shaveta Leekha shaveta.leekha@nxp.com; Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Cc: Tian, Feng feng.tian@intel.com Subject: RE: SATA AHCI issue
Hi, Shaveta
No, we will create multiple PRDs if the transfer length is larger than 4M. each PRD could represent a 4M transfer request and the maximum number of PRD for each command is 65535.
How do you access the HDD? At block level or file level? It happens at all HDDs or only one specific brand model?
Thanks Feng
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Monday, August 8, 2016 8:07 PM To: Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: Re: [edk2] SATA AHCI issue
Hi,
As per the spec and the code in "AhciMode.c"
// According to AHCI 1.3 spec, a PRDT entry can point to a maximum 4MB data block.
Does it mean, only one PRD entry is getting transferred successfully? But as the data I am writing onto SATA HDD is 30MB big, what about the rest of PRDs? What could be went here?
Thanks and Regards, Shaveta
-----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shaveta Leekha Sent: Monday, August 08, 2016 5:24 PM To: Linaro UEFI Mailman List linaro-uefi@lists.linaro.org; edk2-devel@lists.01.org Subject: [edk2] SATA AHCI issue
Hi,
I am facing one Timeout issue while writing big file over my SATA HDD. It in the code of "AhciDmaTransfer " from file AhciMode.c
// // Wait for command compelte // FisBaseAddr = (UINTN)AhciRegisters->AhciRFis + Port * sizeof (EFI_AHCI_RECEIVED_FIS); Offset = FisBaseAddr + EFI_AHCI_D2H_FIS_OFFSET; Status = AhciWaitMemSet ( Offset, EFI_AHCI_FIS_TYPE_MASK, EFI_AHCI_FIS_REGISTER_D2H, This MemSet check fails, what could be the issue? Timeout );
TimeOut occur while checking FIS_REGISTER_D2H. Any idea about this time out issue?
Can it be "Due to un-aligned PRD? Are there multiple PRDs created or single PRD?"
As I am able to write maximum 4MB file on SATA HDD, file above 4MB size failed by giving TIMEOUT_ERROR.
Thanks and Regards, Shaveta
_______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel