Re: [edk2] MdeModulePkg:Fix required in NvmExpressDxe driver

2015-04-24 Thread Tian, Feng
Thanks, Devkate. To follow EDKII open forum review process, I add the patch below to see if others have comments. Subject: [PATCH] MdeModulePkg/NvmExpressDxe: Correct Prp list creation algorithm. Fix the algo of Prp list creation to calculate the number of Prp lists and the number of entries i

Re: [edk2] MdeModulePkg:Fix required in NvmExpressDxe driver

2015-04-23 Thread Baban Devkate
Hi Feng, This modified code does calculate PrpListNo and Remainder correctly for both aligned and unaligned cases. Thanks & regards, Baban Devkate On Thu, Apr 23, 2015 at 1:05 PM, Tian, Feng wrote: > Hi, Devkate > > > > So the key point should be the *PrpListNo and Remainder doesn’t get > c

Re: [edk2] MdeModulePkg:Fix required in NvmExpressDxe driver

2015-04-14 Thread Tian, Feng
Hi, Devkate If the last entry in the first Prp list points to the last 4K data range rather than a next Prp list, how does h/w distinguish the last entry is a pointer to next Prp list or a valid entry to buffer? I am consulting NVMe org and if I have some feedbacks I will get back to you. Than

Re: [edk2] MdeModulePkg:Fix required in NvmExpressDxe driver

2015-04-13 Thread Baban Devkate
Feng, you were correct that we don't need the 2nd Prp list for such case( case 3) and the last entry in the first Prp list points to last 4K range rather than a pointer to next Prp List). Which is inline with NVMe spec. *Excerpt from NVM Express 1.1, section 4.3:* The first PRP entry contained wi

Re: [edk2] MdeModulePkg:Fix required in NvmExpressDxe driver

2015-04-09 Thread Baban Devkate
+ adding self On Thu, Apr 9, 2015 at 3:19 PM, Baban Devkate wrote: > Let's take one more sample.. > > 3) Offset = 0KB, Transfer Length = 4K * 513 blocks = 2MB + 4K > > Prp1 = 0K to 4KB > > Prp2 = pointer to a Prp List which is followed by another Prp List. > > The first Prp List contain

Re: [edk2] MdeModulePkg:Fix required in NvmExpressDxe driver

2015-04-09 Thread Baban Devkate
Let's take one more sample.. 3) Offset = 0KB, Transfer Length = 4K * 513 blocks = 2MB + 4K Prp1 = 0K to 4KB Prp2 = pointer to a Prp List which is followed by another Prp List. The first Prp List contains 511 entries to read data from offset 4KB to offset 2MB. the last one entry is a po

Re: [edk2] MdeModulePkg:Fix required in NvmExpressDxe driver

2015-04-09 Thread Tian, Feng
Hi, Devkate I agree the first one is a bug and need to be fixed like your proposal. For the second one, sorry I couldn’t catch your point. When the requested buffer size is larger than 2M, it means we need multiple PRP list pages. For example, when block size is 4K, memory page size is 4K 1)

Re: [edk2] MdeModulePkg:Fix required in NvmExpressDxe driver

2015-04-08 Thread Baban Devkate
PFA patch file. On Thu, Apr 9, 2015 at 7:06 AM, Baban Devkate wrote: > Hi, > > Commit Message > > > MdeModulePkg: Fixed Pointer truncation and incorrect bytes passed for PRP > list creation. > > There were two issues in NvmExpressPassthru.c( > MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmE

[edk2] MdeModulePkg:Fix required in NvmExpressDxe driver

2015-04-08 Thread Baban Devkate
Hi, Commit Message MdeModulePkg: Fixed Pointer truncation and incorrect bytes passed for PRP list creation. There were two issues in NvmExpressPassthru.c( MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c)- 1.PRP list entries were zeroed out as "PrpListBase" was getting trunca