Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

types: Add boot partition information definitions #792

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/nvme/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -3795,6 +3795,27 @@ struct nvme_boot_partition {
__u8 boot_partition_data[];
};

/**
* enum nvme_boot_partition_info - This field indicates the boot partition information
* @NVME_BOOT_PARTITION_INFO_BPSZ_SHIFT: Shift amount to get the boot partition size from
* the &struct nvme_boot_partition.bpinfo field.
* @NVME_BOOT_PARTITION_INFO_ABPID_SHIFT: Shift amount to get the active boot partition ID
* from the &struct nvme_boot_partition.bpinfo field.
* @NVME_BOOT_PARTITION_INFO_BPSZ_MASK: Mask to get the boot partition size from the
* &struct nvme_boot_partition.bpinfo field.
* @NVME_BOOT_PARTITION_INFO_ABPID_MASK: Mask to get the active boot partition ID from the
* &struct nvme_boot_partition.bpinfo field.
*/
enum nvme_boot_partition_info {
NVME_BOOT_PARTITION_INFO_BPSZ_SHIFT = 0,
NVME_BOOT_PARTITION_INFO_ABPID_SHIFT = 31,
NVME_BOOT_PARTITION_INFO_BPSZ_MASK = 0x7fff,
NVME_BOOT_PARTITION_INFO_ABPID_MASK = 0x1,
};

#define NVME_BOOT_PARTITION_INFO_BPSZ(bpinfo) NVME_GET(bpinfo, BOOT_PARTITION_INFO_BPSZ)
#define NVME_BOOT_PARTITION_INFO_ABPID(bpinfo) NVME_GET(bpinfo, BOOT_PARTITION_INFO_ABPID)

/**
* struct nvme_eom_lane_desc - EOM Lane Descriptor
* @rsvd0: Reserved
Expand Down