Skip to content

Commit

Permalink
Remove dead code in nvme driver which may cause system hang
Browse files Browse the repository at this point in the history
NvmeHcPciBase is the data used to select PCI BDF and register offset in
CF8 port in PCI scan. Use it to access MMIO region is a bug. In some
cases, the buggy address falls into iGPU stolen memory and such read
access will cause bus hang later.

Tracked-On: OAM-115757
Signed-off-by: Qiang Zhang <[email protected]>
  • Loading branch information
zhangqiang4 committed Feb 27, 2024
1 parent 708fcec commit f8fcca6
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/nvme/NvmExpress.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ NvmeInitialize (

Private->Buffer = (UINT8 *)aligned_buf;
Private->Signature = NVME_CONTROLLER_PRIVATE_DATA_SIGNATURE;
Private->NvmeHCBase = read32((void *)(NvmeHcPciBase + PCI_BASE_ADDRESSREG_OFFSET)) & 0xFFFFF000;
Private->Passthru.Mode = &Private->PassThruMode;
Private->Passthru.PassThru = (EFI_NVM_EXPRESS_PASS_THRU_PASSTHRU)NvmExpressPassThru;
Private->Passthru.GetNextNamespace = NvmExpressGetNextNamespace;
Expand Down

0 comments on commit f8fcca6

Please sign in to comment.