From 37273c20c28f67223b63dab131288f7c1b6d19d1 Mon Sep 17 00:00:00 2001 From: Cunyin Chang Date: Tue, 30 Jan 2018 09:28:04 +0800 Subject: [PATCH] nvme: add Boot Partition Support to CAP register Add the section of boot partition support. Change-Id: I81357d657f1a55376ab98b5ffab511c6227e43c8 Signed-off-by: Cunyin Chang Reviewed-on: https://review.gerrithub.io/397033 Reviewed-by: Daniel Verkamp Tested-by: SPDK Automated Test System Reviewed-by: Ben Walker --- examples/nvme/identify/identify.c | 2 ++ include/spdk/nvme_spec.h | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/nvme/identify/identify.c b/examples/nvme/identify/identify.c index 837935909..5fa7b6f7f 100644 --- a/examples/nvme/identify/identify.c +++ b/examples/nvme/identify/identify.c @@ -629,6 +629,8 @@ print_controller(struct spdk_nvme_ctrlr *ctrlr, const struct spdk_nvme_transport printf("Command Sets Supported\n"); printf(" NVM Command Set: %s\n", cap.bits.css_nvm ? "Supported" : "Not Supported"); + printf("Boot Partition: %s\n", + cap.bits.bps ? "Supported" : "Not Supported"); printf("Memory Page Size Minimum: %" PRIu64 " bytes\n", (uint64_t)1 << (12 + cap.bits.mpsmin)); printf("Memory Page Size Maximum: %" PRIu64 " bytes\n", diff --git a/include/spdk/nvme_spec.h b/include/spdk/nvme_spec.h index 8278da3b9..68dcdf4b0 100644 --- a/include/spdk/nvme_spec.h +++ b/include/spdk/nvme_spec.h @@ -98,8 +98,12 @@ union spdk_nvme_cap_register { /** command sets supported */ uint32_t css_nvm : 1; - uint32_t css_reserved : 3; - uint32_t reserved2 : 7; + uint32_t css_reserved : 7; + + /** boot partition support */ + uint32_t bps : 1; + + uint32_t reserved2 : 2; /** memory page size minimum */ uint32_t mpsmin : 4;