Skip to content

Commit d0c64d4

Browse files
ikegami-tigaw
authored andcommitted
types: Add boot partition information definitions
The changes for boot partition log print function. Signed-off-by: Tokunori Ikegami <[email protected]>
1 parent 660ed36 commit d0c64d4

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

src/nvme/types.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3830,6 +3830,27 @@ struct nvme_boot_partition {
38303830
__u8 boot_partition_data[];
38313831
};
38323832

3833+
/**
3834+
* enum nvme_boot_partition_info - This field indicates the boot partition information
3835+
* @NVME_BOOT_PARTITION_INFO_BPSZ_SHIFT: Shift amount to get the boot partition size from
3836+
* the &struct nvme_boot_partition.bpinfo field.
3837+
* @NVME_BOOT_PARTITION_INFO_ABPID_SHIFT: Shift amount to get the active boot partition ID
3838+
* from the &struct nvme_boot_partition.bpinfo field.
3839+
* @NVME_BOOT_PARTITION_INFO_BPSZ_MASK: Mask to get the boot partition size from the
3840+
* &struct nvme_boot_partition.bpinfo field.
3841+
* @NVME_BOOT_PARTITION_INFO_ABPID_MASK: Mask to get the active boot partition ID from the
3842+
* &struct nvme_boot_partition.bpinfo field.
3843+
*/
3844+
enum nvme_boot_partition_info {
3845+
NVME_BOOT_PARTITION_INFO_BPSZ_SHIFT = 0,
3846+
NVME_BOOT_PARTITION_INFO_ABPID_SHIFT = 31,
3847+
NVME_BOOT_PARTITION_INFO_BPSZ_MASK = 0x7fff,
3848+
NVME_BOOT_PARTITION_INFO_ABPID_MASK = 0x1,
3849+
};
3850+
3851+
#define NVME_BOOT_PARTITION_INFO_BPSZ(bpinfo) NVME_GET(bpinfo, BOOT_PARTITION_INFO_BPSZ)
3852+
#define NVME_BOOT_PARTITION_INFO_ABPID(bpinfo) NVME_GET(bpinfo, BOOT_PARTITION_INFO_ABPID)
3853+
38333854
/**
38343855
* struct nvme_eom_lane_desc - EOM Lane Descriptor
38353856
* @rsvd0: Reserved

0 commit comments

Comments
 (0)