Re: [PATCH] Fix devmem_is_allowed for below 1MB accesses for an efimachine

From: H. Peter Anvin
Date: Thu Oct 04 2012 - 17:06:18 EST


On 10/04/2012 01:07 PM, Randy Wright wrote:
>
> I wanted to mention in this context a patch RFC I posted yesterday as a
> distinct thread which is visible as https://lkml.org/lkml/2012/10/3/589
> with the subject: [PATCH RFC] function probe_roms accessing improper
> addresses on UEFI systems.
>

And it's equally as wrong. It has nothing to do with UEFI vs BIOS at
all; this is rather a change in the classic behavior on x86 to return -1
on an impossible read rather than #MC.

Normally I would say probe_roms() doesn't really make any sense in the
EFI context anyway, but I believe there are systems which actually need
to probe at least for the video ROM even when running under EFI (and I
think there are storage devices which have parameter blocks in their
ROMs with similar issues).

Excluding reserved regions in general is a non-option, because on a lot
of systems the ROMs that *do* need to be probed for are marked just
RESERVED.

One option would be to quirk it; obviously there is some piece of
hardware which does cause this #MC and hopefully we could use that to
detect that specific regions should be excluded; another option would be
to trap the #MC during ROM probing.

-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/