summaryrefslogtreecommitdiffstats
path: root/payloads/libpayload/include
diff options
context:
space:
mode:
authorThomas Heijligen <thomas.heijligen@secunet.com>2019-07-10 16:05:36 +0200
committerNico Huber <nico.h@gmx.de>2021-04-07 10:58:04 +0000
commitfffc21d3dce565525d5adec3b0755a1b1cdbf76c (patch)
tree2e87a8045d86a6b8d949afd145558bc7ef72e03a /payloads/libpayload/include
parent989323d29ec6e2cc748f0edb976d11e3bc3c178f (diff)
downloadcoreboot-fffc21d3dce565525d5adec3b0755a1b1cdbf76c.tar.gz
coreboot-fffc21d3dce565525d5adec3b0755a1b1cdbf76c.tar.bz2
coreboot-fffc21d3dce565525d5adec3b0755a1b1cdbf76c.zip
libpayload/storage: Add NVMe driver
Tested with qemu virtual NVMe and Intel hardware. Works with FILO. Change-Id: Ie75b1dc743dac3426c230c57ee23b771ba3a6e0c Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33582 Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'payloads/libpayload/include')
-rw-r--r--payloads/libpayload/include/pci/pci.h1
-rw-r--r--payloads/libpayload/include/storage/nvme.h14
-rw-r--r--payloads/libpayload/include/storage/storage.h1
3 files changed, 16 insertions, 0 deletions
diff --git a/payloads/libpayload/include/pci/pci.h b/payloads/libpayload/include/pci/pci.h
index 5e2106013096..d9ce75576147 100644
--- a/payloads/libpayload/include/pci/pci.h
+++ b/payloads/libpayload/include/pci/pci.h
@@ -67,6 +67,7 @@
#define PCI_ROM_ADDRESS_MASK ~0x7ff
#define PCI_CLASS_STORAGE_AHCI 0x0106
+#define PCI_CLASS_STORAGE_NVME 0x0108
#define PCI_CLASS_MEMORY_OTHER 0x0580
#define PCI_VENDOR_ID_INTEL 0x8086
diff --git a/payloads/libpayload/include/storage/nvme.h b/payloads/libpayload/include/storage/nvme.h
new file mode 100644
index 000000000000..61abf743cc1f
--- /dev/null
+++ b/payloads/libpayload/include/storage/nvme.h
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Libpayload NVMe device driver
+ * Copyright (C) 2019 secunet Security Networks AG
+ */
+
+#ifndef _STORAGE_NVME_H
+#define _STORAGE_NVME_H
+
+#include "storage.h"
+
+void nvme_initialize(struct pci_dev *dev);
+
+#endif /* _STORAGE_NVME_H */
diff --git a/payloads/libpayload/include/storage/storage.h b/payloads/libpayload/include/storage/storage.h
index 32933fd97ce8..78cfd69e6eae 100644
--- a/payloads/libpayload/include/storage/storage.h
+++ b/payloads/libpayload/include/storage/storage.h
@@ -42,6 +42,7 @@ typedef enum {
PORT_TYPE_IDE = (1 << 0),
PORT_TYPE_SATA = (1 << 1),
PORT_TYPE_USB = (1 << 2),
+ PORT_TYPE_NVME = (1 << 3),
} storage_port_t;
typedef enum {