err = BS->LocateProtocol(MAKE_GUID_PTR(EFI_MEMORY_ATTRIBUTE_PROTOCOL), NULL, (void **) &memory_proto);
if (err != EFI_SUCCESS) {
- log_debug("No EFI_MEMORY_ATTRIBUTE_PROTOCOL found, skipping NX_COMPAT support.");
+ /* only log if the UEFI should have support in the first place (version >=2.10) */
+ if (ST->Hdr.Revision >= ((2U << 16) | 100U))
+ log_debug("No EFI_MEMORY_ATTRIBUTE_PROTOCOL found, skipping NX_COMPAT support.");
+
return EFI_SUCCESS; /* ignore if firmware lacks support */
}
if (err != EFI_SUCCESS)
return log_error_status(err, "Cannot make kernel image executable: %m");
- log_debug("Changed kernel image to read-only for NX_COMPAT support.");
-
return EFI_SUCCESS;
}
err = BS->LocateProtocol(MAKE_GUID_PTR(EFI_MEMORY_ATTRIBUTE_PROTOCOL), NULL, (void **) &memory_proto);
if (err != EFI_SUCCESS) {
- log_debug("No EFI_MEMORY_ATTRIBUTE_PROTOCOL found, skipping NX_COMPAT support.");
+ /* only log if the UEFI should have support in the first place (version >=2.10) */
+ if (ST->Hdr.Revision >= ((2U << 16) | 100U))
+ log_debug("No EFI_MEMORY_ATTRIBUTE_PROTOCOL found, skipping NX_COMPAT support.");
+
return EFI_SUCCESS; /* ignore if firmware lacks support */
}