Page MenuHomeFreeBSD

x86/pci: add sysctl for intel_graphics_gen
Needs ReviewPublic

Authored by corvink on May 24 2024, 11:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 3, 9:36 PM
Unknown Object (File)
Wed, May 29, 7:39 PM
Unknown Object (File)
May 26 2024, 6:48 PM
Subscribers

Details

Reviewers
jhb
markj
Group Reviewers
bhyve
Summary

Some register have changed for intel graphics of generation 11 and newer. Most
notably, the BDSM (Base Data Stolen Memory) register is located at a different
address and was changed from 32 bit to 64 bit. In order to properly emulate
this, bhyve has to know the generation of the intel graphics device. As we're
already filtering the devices for generation here, we can just add the
generation information and expose it as sysctl.

We know that the generation is not properly reported by the new sysctl. Some
generation don't differ much, so FreeBSD doesn't distinguish between them. As
we only need the sysctl for bhyve to check for generation 11 or newer, that's
totally fine for now. We don't want to take the hassle to split all device id's
without a use case. If a use case comes up where a more detailed value is
required, we can fix that easily and it shouldn't break old user.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 58045
Build 54933: arc lint + arc unit

Event Timeline

We know that the generation is not properly reported by the new sysctl.

I think there should be some comment explaining this.

sys/x86/pci/pci_early_quirks.c
66

Why can't it be an unsigned int?

  • use unsigned int
  • add comment
corvink added inline comments.
sys/x86/pci/pci_early_quirks.c
66

Changed it.