Skip to content

NvmExpressMediaClear: Fix BufferSize value in writeblocks call.#12423

Open
spbrogan wants to merge 1 commit intotianocore:masterfrom
spbrogan:fix_tc_12397
Open

NvmExpressMediaClear: Fix BufferSize value in writeblocks call.#12423
spbrogan wants to merge 1 commit intotianocore:masterfrom
spbrogan:fix_tc_12397

Conversation

@spbrogan
Copy link
Copy Markdown
Member

@spbrogan spbrogan commented Apr 9, 2026

NvmExpressMediaClear requires that the overwrite buffer be the same size as the block size of the media but then WriteBlocks expects BufferSize in bytes. NvmExpressMediaClear was hardcoded to call using 1. This causes the WriteBlocks to fail.

  • Breaking change?
    • Breaking change - Does this PR cause a break in build or boot behavior?
    • Examples: Does it add a new library class or move a module to a different repo.
  • Impacts security?
    • Security - Does this PR have a direct security impact?
    • Examples: Crypto algorithm change or buffer overflow fix.
  • Includes tests?
    • Tests - Does this PR include any explicit test code?
    • Examples: Unit tests or integration tests.

How This Was Tested

Host based unit tests.

Integration Instructions

N/A

@spbrogan
Copy link
Copy Markdown
Member Author

spbrogan commented Apr 9, 2026

fixes #12397

NvmExpressMediaClear requires that the overwrite buffer be
the same size as the block size of the media but then
WriteBlocks expects BufferSize in bytes. NvmExpressMediaClear was
hardcoded to call using 1.  This causes the WriteBlocks to fail.

Signed-off-by: Sean Brogan <sebrogan@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: NvmeDxe:: NvmExpressMediaClear: Incorrect buffersize for write command

1 participant