blob: 6d2d9c6e97ce697e87349b901c1f29b8362055ce [file] [edit]
#pragma once
#include <xyz/openbmc_project/NVMe/Format/server.hpp>
#include <cstdint>
namespace nvme
{
using SecureEraseSetting =
sdbusplus::xyz::openbmc_project::NVMe::server::Format::SecureEraseSetting;
using DataProtectionType =
sdbusplus::xyz::openbmc_project::NVMe::server::Format::DataProtectionType;
enum class FormatScope
{
Subsystem,
Controller,
Namespace,
};
// Format NVM Attributes (Identify Controller Byte 524)
namespace fna
{
constexpr uint8_t fmtAllRestriction = 1 << 0; // Bit 0
constexpr uint8_t secureEraseAllRestriction = 1 << 1; // Bit 1
constexpr uint8_t cryptoEraseSupport = 1 << 2; // Bit 2
constexpr uint8_t nsidAllRestriction = 1 << 3; // Bit 3
} // namespace fna
// End-to-end Data Protection Capabilities (Identify Namespace Byte 28,
// Protection Information)
namespace dpc
{
constexpr uint8_t piType1 = 1 << 0;
constexpr uint8_t piType2 = 1 << 1;
constexpr uint8_t piType3 = 1 << 2;
} // namespace dpc
} // namespace nvme