Re: [PATCH RFC] function probe_roms accessing improper addresseson UEFI systems

From: Matthew Garrett
Date: Thu Oct 04 2012 - 15:22:57 EST


On Wed, Oct 03, 2012 at 05:53:46PM -0600, Randy Wright wrote:

> The following proposed patch takes advantage of the fact that on EFI
> systems, the memory map provides a better description of the physical
> space than on pre-EFI legacy systems. If the efi_enabled state variable
> indicates the kernel is running on an UEFI system, the patch will use
> information from the UEFI memory map so as not to access addresses that
> should avoided according to the UEFI specification.

This turns out to be awkward. Some (mostly older) EFI platforms still
only provide the video ROM through the 0xc0000 window, and that's
sometimes needed even if the platform isn't using int10 for anything
(for instance, some Intel graphics machines only provide the VBT through
the video ROM and don't provide that via the PCI BAR). And, of course,
they have an EFI memory map that just shows a hole there.

So we can't distinguish between the two cases easily. The only thing I
can think of would be to push that policy out to the graphics drivers
and have them trigger a scan only if they can't get the required
information from any other source. I suspect that this patch as is would
break graphics on a reasonable number of EFI platforms.

--
Matthew Garrett | mjg59@xxxxxxxxxxxxx
--
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/