The legacy option ROM memory range from 0xc0000-0xeffff is not defined
on UEFI machines so don't attempt to scan it. This avoids lockdown log
spam when Secure Boot is enabled (avoids use of /dev/mem).
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
static const struct imsm_orom *find_imsm_hba_orom(struct sys_dev *hba)
{
+ struct stat st;
unsigned long align;
if (check_env("IMSM_TEST_OROM"))
if (check_env("IMSM_TEST_AHCI_EFI") || check_env("IMSM_TEST_SCU_EFI"))
return NULL;
+ /* Skip legacy option ROM scan when EFI booted */
+ if (stat("/sys/firmware/efi", &st) == 0 && S_ISDIR(st.st_mode))
+ return NULL;
+
find_intel_devices();
if (intel_devices == NULL)