diff --git a/genprotimg/src/include/pv_hdr_def.h b/genprotimg/src/include/pv_hdr_def.h index 850ed267..2e0a15aa 100644 --- a/genprotimg/src/include/pv_hdr_def.h +++ b/genprotimg/src/include/pv_hdr_def.h @@ -24,8 +24,8 @@ #define PV_MAGIC_NUMBER 0x49424d5365634578ULL #define PV_VERSION_1 0x00000100U -/* prevent Ultravisor decryption during unpack operation */ -#define PV_CFLAG_NO_DECRYPTION 0x10000000ULL +/* Plaintext control flags */ +#define PV_PCF_NO_DECRYPTION (1ULL << 28) /* prevent Ultravisor decryption during unpack operation */ /* maxima for the PV version 1 */ #define PV_V1_IPIB_MAX_SIZE PAGE_SIZE diff --git a/genprotimg/src/pv/pv_hdr.c b/genprotimg/src/pv/pv_hdr.c index e46e1761..f2ac90cf 100644 --- a/genprotimg/src/pv/pv_hdr.c +++ b/genprotimg/src/pv/pv_hdr.c @@ -41,7 +41,7 @@ uint32_t pv_hdr_size(const PvHdr *hdr) gboolean pv_hdr_uses_encryption(const PvHdr *hdr) { - return !(GUINT64_FROM_BE(hdr->head.pcf) & PV_CFLAG_NO_DECRYPTION); + return !(GUINT64_FROM_BE(hdr->head.pcf) & PV_PCF_NO_DECRYPTION); } uint64_t pv_hdr_enc_size(const PvHdr *hdr) diff --git a/genprotimg/src/pv/pv_image.c b/genprotimg/src/pv/pv_image.c index 375e40f6..a0dd8fb4 100644 --- a/genprotimg/src/pv/pv_image.c +++ b/genprotimg/src/pv/pv_image.c @@ -61,7 +61,7 @@ static gint pv_img_prepare_component(const PvImage *img, PvComponent *comp, void *opaque = NULL; gint rc; - if (img->pcf & PV_CFLAG_NO_DECRYPTION) { + if (img->pcf & PV_PCF_NO_DECRYPTION) { /* we only need to align the components */ func = pv_component_align; opaque = NULL;