diff --git a/genprotimg/src/include/pv_hdr_def.h b/genprotimg/src/include/pv_hdr_def.h index 79d4252f..270de0d0 100644 --- a/genprotimg/src/include/pv_hdr_def.h +++ b/genprotimg/src/include/pv_hdr_def.h @@ -24,11 +24,14 @@ #define PV_MAGIC_NUMBER 0x49424d5365634578ULL #define PV_VERSION_1 0x00000100U +/* Internal helper macro */ +#define __PV_BIT(nr) (1ULL << (63 - (nr))) + /* Plaintext control flags */ -#define PV_PCF_PCKM_ECC (1ULL << 5) /* PCKMO encrypt-ECC-key functions allowed */ -#define PV_PCF_PCKMO_AES (1ULL << 6) /* PCKMO encrypt-AES-key functions allowed */ -#define PV_PCF_PCKMO_DEA_TDEA (1ULL << 7) /* PCKMO encrypt-DEA/TDEA-key functions allowed */ -#define PV_PCF_NO_DECRYPTION (1ULL << 28) /* prevent Ultravisor decryption during unpack operation */ +#define PV_PCF_NO_DECRYPTION __PV_BIT(35) /* prevent Ultravisor decryption during unpack operation */ +#define PV_PCF_PCKMO_DEA_TDEA __PV_BIT(56) /* PCKMO encrypt-DEA/TDEA-key functions allowed */ +#define PV_PCF_PCKMO_AES __PV_BIT(57) /* PCKMO encrypt-AES-key functions allowed */ +#define PV_PCF_PCKM_ECC __PV_BIT(58) /* PCKMO encrypt-ECC-key functions allowed */ /* maxima for the PV version 1 */ #define PV_V1_IPIB_MAX_SIZE PAGE_SIZE