mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
MdeModulePkg:Last LBA missed on NvmExpressMediaClear
Off by one error in the code of NvmExpressMediaClear() causes the last LBA to be missed when clearing the media. This patch fixes the issue by adjusting the loop condition to ensure that all LBAs are cleared properly. Signed-off-by: Sean Brogan <sebrogan@microsoft.com>
This commit is contained in:
parent
ab3097d457
commit
86e285dd21
1 changed files with 1 additions and 1 deletions
|
|
@ -373,7 +373,7 @@ NvmExpressMediaClear (
|
|||
// Per NIST 800-88r1, one or more pass of writes may be alteratively used.
|
||||
//
|
||||
for (TotalPassCount = 0; TotalPassCount < PassCount; TotalPassCount++) {
|
||||
for (SectorOffset = 0; SectorOffset < Media->LastBlock; SectorOffset++ ) {
|
||||
for (SectorOffset = 0; SectorOffset <= Media->LastBlock; SectorOffset++ ) {
|
||||
Status = Device->BlockIo.WriteBlocks (
|
||||
&Device->BlockIo,
|
||||
MediaId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue