Re: git: d780c6a6abb5 - main - x86/pci_early_quirks: Support Intel 11th+ gen

From: Konstantin Belousov <kostikbel_at_gmail.com>
Date: Tue, 21 Mar 2023 15:08:24 UTC
On Tue, Mar 21, 2023 at 03:20:12PM +0100, Corvin Köhne wrote:
> On Tue, 2023-03-21 at 16:02 +0200, Konstantin Belousov wrote:
> > On Mon, Mar 20, 2023 at 08:47:53PM +0000, Jean-Sébastien Pédron
> > wrote:
> > > The branch main has been updated by dumbbell:
> > > 
> > > URL:
> > > https://cgit.FreeBSD.org/src/commit/?id=d780c6a6abb5275c8c7219539553d51ac94a023e
> > > 
> > > commit d780c6a6abb5275c8c7219539553d51ac94a023e
> > > Author:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
> > > AuthorDate: 2023-03-13 14:28:22 +0000
> > > Commit:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
> > > CommitDate: 2023-03-20 20:47:36 +0000
> > > 
> > >     x86/pci_early_quirks: Support Intel 11th+ gen
> > >     
> > >     Newer Intel CPUs/iGPUs use a new method to determine the base
> > > address of
> > >     the stolen memory. This code was ported from Linux.
> > >     
> > >     Reviewed by:    manu
> > >     Approved by:    manu
> > >     Differential Revision:  https://reviews.freebsd.org/D39057
> > > ---
> > >  sys/x86/pci/pci_early_quirks.c | 26 ++++++++++++
> > >  sys/x86/pci/pci_early_quirks.h | 95
> > > ++++++++++++++++++++++++++++++++++++++++++
> > >  2 files changed, 121 insertions(+)
> > Is this stuff still needed or useful?  When it was added, the claim
> > was that
> > it would be soon used to reserve regions of physical memory that
> > buggy BIOSes
> > did not.  That never happen.
> > 
> > If the only current consumer of the stolen memory calculations are in
> > drm
> > kmods, wouldn't it be better to move the code there?
> 
> I'm going to make use of intel_graphics_stolen_base and
> intel_graphics_stolen_size for GPU passthrough of bhyve vms. See
> https://reviews.freebsd.org/D26209

Then perhaps the quirks should be moved to separate module.  Both your
stuff and drm could depend on it.