Skip to content

Commit acdcaf7

Browse files
ikegami-tigaw
authored andcommitted
types: add ASQ, ACQ and BPMBL controller properties definitions
Since the base address fields shift amount is 12 but not 0. Signed-off-by: Tokunori Ikegami <[email protected]>
1 parent da60db0 commit acdcaf7

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

src/nvme/types.h

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,28 @@ enum nvme_aqa {
491491
#define NVME_AQA_ASQS(aqa) NVME_GET(aqa, AQA_ASQS)
492492
#define NVME_AQA_ACQS(aqa) NVME_GET(aqa, AQA_ACQS)
493493

494+
/**
495+
* enum nvme_asq - This field indicates the admin submission queue base address
496+
* @NVME_ASQ_ASQB_SHIFT: Shift amount to get the admin submission queue base
497+
*/
498+
enum nvme_asq {
499+
NVME_ASQ_ASQB_SHIFT = 12,
500+
};
501+
static const __u64 NVME_ASQ_ASQB_MASK = 0xfffffffffffffull;
502+
503+
#define NVME_ASQ_ASQB(asq) NVME_GET(asq, ASQ_ASQB)
504+
505+
/**
506+
* enum nvme_acq - This field indicates the admin completion queue base address
507+
* @NVME_ACQ_ACQB_SHIFT: Shift amount to get the admin completion queue base
508+
*/
509+
enum nvme_acq {
510+
NVME_ACQ_ACQB_SHIFT = 12,
511+
};
512+
static const __u64 NVME_ACQ_ACQB_MASK = 0xfffffffffffffull;
513+
514+
#define NVME_ACQ_ACQB(acq) NVME_GET(acq, ACQ_ACQB)
515+
494516
/**
495517
* enum nvme_cmbloc - This field indicates the controller memory buffer location
496518
* @NVME_CMBLOC_BIR_SHIFT: Shift amount to get the base indicator register
@@ -658,6 +680,17 @@ enum nvme_bprsel {
658680
#define NVME_BPRSEL_BPROF(bprsel) NVME_GET(bprsel, BPRSEL_BPROF)
659681
#define NVME_BPRSEL_BPID(bprsel) NVME_GET(bprsel, BPRSEL_BPID)
660682

683+
/**
684+
* enum nvme_bpmbl - This field indicates the boot partition memory buffer location
685+
* @NVME_BPMBL_BMBBA_SHIFT: Shift amount to get the boot partition memory buffer base address
686+
*/
687+
enum nvme_bpmbl {
688+
NVME_BPMBL_BMBBA_SHIFT = 12,
689+
};
690+
static const __u64 NVME_BPMBL_BMBBA_MASK = 0xfffffffffffffull;
691+
692+
#define NVME_BPMBL_BMBBA(bpmbl) NVME_GET(bpmbl, BPMBL_BMBBA)
693+
661694
/**
662695
* enum nvme_cmbmsc - This field indicates the controller memory buffer memory space control
663696
* @NVME_CMBMSC_CRE_SHIFT: Shift amount to get the capabilities registers enabled

0 commit comments

Comments
 (0)