Skip to content

Commit

Permalink
types: add ASQ, ACQ and BPMBL controller properties definitions
Browse files Browse the repository at this point in the history
Since the base address fields shift amount is 12 but not 0.

Signed-off-by: Tokunori Ikegami <[email protected]>
  • Loading branch information
ikegami-t authored and igaw committed May 2, 2024
1 parent da60db0 commit acdcaf7
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/nvme/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,28 @@ enum nvme_aqa {
#define NVME_AQA_ASQS(aqa) NVME_GET(aqa, AQA_ASQS)
#define NVME_AQA_ACQS(aqa) NVME_GET(aqa, AQA_ACQS)

/**
* enum nvme_asq - This field indicates the admin submission queue base address
* @NVME_ASQ_ASQB_SHIFT: Shift amount to get the admin submission queue base
*/
enum nvme_asq {
NVME_ASQ_ASQB_SHIFT = 12,
};
static const __u64 NVME_ASQ_ASQB_MASK = 0xfffffffffffffull;

#define NVME_ASQ_ASQB(asq) NVME_GET(asq, ASQ_ASQB)

/**
* enum nvme_acq - This field indicates the admin completion queue base address
* @NVME_ACQ_ACQB_SHIFT: Shift amount to get the admin completion queue base
*/
enum nvme_acq {
NVME_ACQ_ACQB_SHIFT = 12,
};
static const __u64 NVME_ACQ_ACQB_MASK = 0xfffffffffffffull;

#define NVME_ACQ_ACQB(acq) NVME_GET(acq, ACQ_ACQB)

/**
* enum nvme_cmbloc - This field indicates the controller memory buffer location
* @NVME_CMBLOC_BIR_SHIFT: Shift amount to get the base indicator register
Expand Down Expand Up @@ -658,6 +680,17 @@ enum nvme_bprsel {
#define NVME_BPRSEL_BPROF(bprsel) NVME_GET(bprsel, BPRSEL_BPROF)
#define NVME_BPRSEL_BPID(bprsel) NVME_GET(bprsel, BPRSEL_BPID)

/**
* enum nvme_bpmbl - This field indicates the boot partition memory buffer location
* @NVME_BPMBL_BMBBA_SHIFT: Shift amount to get the boot partition memory buffer base address
*/
enum nvme_bpmbl {
NVME_BPMBL_BMBBA_SHIFT = 12,
};
static const __u64 NVME_BPMBL_BMBBA_MASK = 0xfffffffffffffull;

#define NVME_BPMBL_BMBBA(bpmbl) NVME_GET(bpmbl, BPMBL_BMBBA)

/**
* enum nvme_cmbmsc - This field indicates the controller memory buffer memory space control
* @NVME_CMBMSC_CRE_SHIFT: Shift amount to get the capabilities registers enabled
Expand Down

0 comments on commit acdcaf7

Please sign in to comment.