The branch main has been updated by seuros: URL: https://cgit.FreeBSD.org/src/commit/?id=22039031a15238c69497bbd9d8dea3cd97ee6bc6
commit 22039031a15238c69497bbd9d8dea3cd97ee6bc6 Author: Abdelkader Boudih <[email protected]> AuthorDate: 2026-09-26 08:22:46 +0000 Commit: Abdelkader Boudih <[email protected]> CommitDate: 2026-09-26 08:22:46 +0000 nvme: name the reserved Identify Controller fields at bytes 102 through 110 Bytes 102 through 110 of the I/O Command Set Independent Identify Controller data structure were reserved padding. Name them: Boot Partition Capabilities (byte 102), CXL HDM Support Information (byte 103), NVM Subsystem Shutdown Latency (bytes 107:104) and Power Loss Signaling Information (byte 110). Bytes 109:108 stay reserved. CXL HDM Support Information was added in NVM Express Base Specification 2.4, Figure 338; the others appear in 2.3, Figure 328. Report the new fields from nvmecontrol identify. Reviewed by: imp, adrian Differential Revision: https://reviews.freebsd.org/D60000 --- sbin/nvmecontrol/identify_ext.c | 11 +++++++++++ sys/dev/nvme/nvme.h | 40 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/sbin/nvmecontrol/identify_ext.c b/sbin/nvmecontrol/identify_ext.c index 13b1d21ce97e..521151989115 100644 --- a/sbin/nvmecontrol/identify_ext.c +++ b/sbin/nvmecontrol/identify_ext.c @@ -140,6 +140,17 @@ nvme_print_controller(struct nvme_controller_data *cdata) cdata->ver & 0xff); printf("Traffic Based Keep Alive: %sSupported\n", NVMEV(NVME_CTRLR_DATA_CTRATT_TBKAS, cdata->ctratt) ? "" : "Not "); + printf("CXL HDM: %sSupported\n", + NVMEV(NVME_CTRLR_DATA_CHSI_CHS, cdata->chsi) ? "" : "Not "); + printf("NVMSS Shutdown Latency: "); + if (cdata->nssl == 0) + printf("Not Reported\n"); + else + printf("%u us\n", cdata->nssl); + printf("PLS Emergency Power Fail: %sSupported\n", + NVMEV(NVME_CTRLR_DATA_PLSI_PLSEPF, cdata->plsi) ? "" : "Not "); + printf("PLS Forced Quiescence: %sSupported\n", + NVMEV(NVME_CTRLR_DATA_PLSI_PLSFQ, cdata->plsi) ? "" : "Not "); printf("Controller Type: "); switch (cdata->cntrltype) { case 0: diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index f6ca0500ea75..5b6ee1026678 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -378,6 +378,31 @@ enum nvme_psdt { #define NVME_CTRLR_DATA_CTRATT_UUID_LIST_SHIFT (9) #define NVME_CTRLR_DATA_CTRATT_UUID_LIST_MASK (0x1) +/** BPCAP - boot partition capabilities */ +/* RPMB boot partition write protection support */ +#define NVME_CTRLR_DATA_BPCAP_RPMBBPWPS_SHIFT (0) +#define NVME_CTRLR_DATA_BPCAP_RPMBBPWPS_MASK (0x3) +/* supports Set Features boot partition write protection */ +#define NVME_CTRLR_DATA_BPCAP_SFBPWPS_SHIFT (2) +#define NVME_CTRLR_DATA_BPCAP_SFBPWPS_MASK (0x1) + +#define NVME_CTRLR_DATA_BPCAP_RPMBBPWPS_UNSPEC (0x0) +#define NVME_CTRLR_DATA_BPCAP_RPMBBPWPS_NO (0x1) +#define NVME_CTRLR_DATA_BPCAP_RPMBBPWPS_YES (0x2) + +/** CHSI - CXL HDM support information */ +/* supports CXL host managed device memory */ +#define NVME_CTRLR_DATA_CHSI_CHS_SHIFT (0) +#define NVME_CTRLR_DATA_CHSI_CHS_MASK (0x1) + +/** PLSI - power loss signaling information */ +/* supports power loss signaling with emergency power fail */ +#define NVME_CTRLR_DATA_PLSI_PLSEPF_SHIFT (0) +#define NVME_CTRLR_DATA_PLSI_PLSEPF_MASK (0x1) +/* supports power loss signaling with forced quiescence */ +#define NVME_CTRLR_DATA_PLSI_PLSFQ_SHIFT (1) +#define NVME_CTRLR_DATA_PLSI_PLSFQ_MASK (0x1) + /** OACS - optional admin command support */ /* supports security send/receive commands */ #define NVME_CTRLR_DATA_OACS_SECURITY_SHIFT (0) @@ -1230,7 +1255,19 @@ struct nvme_controller_data { /** Read Recovery Levels Supported */ uint16_t rrls; - uint8_t reserved1[9]; + /** Boot Partition Capabilities */ + uint8_t bpcap; + + /** CXL HDM Support Information */ + uint8_t chsi; + + /** NVM Subsystem Shutdown Latency */ + uint32_t nssl; + + uint8_t reserved1[2]; + + /** Power Loss Signaling Information */ + uint8_t plsi; /** Controller Type */ uint8_t cntrltype; @@ -2153,6 +2190,7 @@ void nvme_controller_data_swapbytes(struct nvme_controller_data *s __unused) s->oaes = le32toh(s->oaes); s->ctratt = le32toh(s->ctratt); s->rrls = le16toh(s->rrls); + s->nssl = le32toh(s->nssl); s->crdt1 = le16toh(s->crdt1); s->crdt2 = le16toh(s->crdt2); s->crdt3 = le16toh(s->crdt3);
