Date: Mon, 27 Mar 2023 11:57:58 +0200 From: Corvin =?ISO-8859-1?Q?K=F6hne?= <corvink@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: e8988d60d24b - main - pci: expose intel_graphics_stolen as sysctl Message-ID: <2a4906a9b1063a75223abdd4de91cc5be4edc0cf.camel@FreeBSD.org> In-Reply-To: <202303270941.32R9fEau088949@gitrepo.freebsd.org> References: <202303270941.32R9fEau088949@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Mon, 2023-03-27 at 09:41 +0000, Corvin Köhne wrote: > The branch main has been updated by corvink: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=e8988d60d24b05e98919e912329880a54cdfdd70 > > commit e8988d60d24b05e98919e912329880a54cdfdd70 > Author: Corvin Köhne <corvink@FreeBSD.org> > AuthorDate: 2023-03-27 08:21:37 +0000 > Commit: Corvin Köhne <corvink@FreeBSD.org> > CommitDate: 2023-03-27 09:40:49 +0000 > > pci: expose intel_graphics_stolen as sysctl > > The Intel graphics stolen memory is used by the Intel GOP driver > on > boot. When using bhyve with GPU passthrough, it's also used by > the guest > GOP driver at guest boot. For that reason, bhyve needs to know > the > address and size of this region to inform the guest about this > region. > Exposing the variables as sysctl allows bhyve to easily read > them. > --- > sys/x86/pci/pci_early_quirks.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/sys/x86/pci/pci_early_quirks.c > b/sys/x86/pci/pci_early_quirks.c > index b9de1d78e022..7eb3fcd91927 100644 > --- a/sys/x86/pci/pci_early_quirks.c > +++ b/sys/x86/pci/pci_early_quirks.c > @@ -32,6 +32,8 @@ __FBSDID("$FreeBSD$"); > #include <sys/systm.h> > #include <sys/bus.h> > #include <sys/kernel.h> > +#include <sys/sysctl.h> > + > #include <vm/vm.h> > /* XXX: enable this once the KPI is available */ > /* #include <x86/physmem.h> */ > @@ -56,6 +58,12 @@ struct pci_device_id { > */ > vm_paddr_t intel_graphics_stolen_base = 0; > vm_paddr_t intel_graphics_stolen_size = 0; > +SYSCTL_U64(_hw, OID_AUTO, intel_graphics_stolen_base, CTLFLAG_RD, > + &intel_graphics_stolen_base, 0, > + "Base address of the intel graphics stolen memory."); > +SYSCTL_U64(_hw, OID_AUTO, intel_graphics_stolen_size, CTLFLAG_RD, > + &intel_graphics_stolen_size, 0, > + "Size of the intel graphics stolen memory."); > > /* > * Intel early quirks functions Reviewed by: manu MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D39281 -- Kind regards, Corvin [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- iQIyBAABCAAdFiEEgvRSla3m2t/H2U9G2FTaVjFeAmoFAmQhaKYACgkQ2FTaVjFe Amp/gg/4tW2Ess3YVGjA1eOjb47BJ7ZJMnt+1CgvWWxNiLEco56PRRXkHq8Vhi8L AAbGZUf/BBHGIB83jNXnlWqs0Joj/fNFrjLVnEOf1rqJ99yjBo5wF/PaYpojkF3Q 3iz5xmpFu5/2Go4FU51KDqNOx4YE9z/X6LgcpJheJoAKzdvQwiEDFpfDI+TUHjiD 1o5X/nyKdZFoOHv7pUTGw1BlutlIgqfoLlUH5vXp/40E2nWlEJYYsfo98PY/GR8l bekKdiW67lq/Qqj37OmjAiFML/8+IsFYhnXoyX7tRrfuGzNB8oRm02kJtpsJM4Rx IMiipbkrWIfTk2m9r09rf6td9PAlPlpxs6q5kdz20OesKwuMKZiUdJtQN0/ycsRl PBqR76yoo9dOfty8YIts6kaTwkzpTMzjgvrCejfVu9sArjW3f9ZFQktvEWLzr8XI wgUpNf9VlwTfPeSHVaEWobklfAtu1JziBcmc1/fRQbyyCEcccaC8qqd9+skqQZpS B1IU7h8/vFbIqpEvmLdrL2KqWWOggl9g1rn6qmz1GiMzmG+gRqizdWgeFhDQOFm6 ktRDmf5riiPD/UJxzAEqXUEPcK7chwfoMB+ePL/gVB/JWozTfuzi4hITyOBcOkYh I5IqzCyb5JCOc44gHFGp/lVjtIx+wk030iQalKo+765SaxWJ/w== =rwAD -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2a4906a9b1063a75223abdd4de91cc5be4edc0cf.camel>
