libpayload/nvme: Test for NVMe-command-set bit individually

We only need to know if the NVMe command set is supported. Other
command-set bits can be set too, but we don't have to care.

Fixes init in QEMU which has more command-set bits set by now.

Change-Id: I29a693cf8cc13775e94dc671e8d0412ad86fef9c
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63934
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Nico Huber 2022-04-28 18:31:48 +02:00
parent 2b986700c9
commit 88b041897f
1 changed files with 1 additions and 1 deletions

View File

@ -321,7 +321,7 @@ static void nvme_init(pcidev_t dev)
void *pci_bar0 = phys_to_virt(pci_read_config32(dev, 0x10) & ~0x3ff);
if (!(((read64(pci_bar0) >> 37) & 0xff) == 0x01)) {
if (!(read64(pci_bar0) >> 37 & 0x01)) {
printf("NVMe ERROR: PCIe device does not support the NVMe command set\n");
return;
}