opnsense-src/sys/dev/pci
Stefan Eßer 586164cc09 dev/pci: simplify PCI VPD access functions
This update contains a rewrite of the VPD parser based on the
definition of the structure of the VPD data (ident, R/O resource
data, optional R/W data, end tag).

The parser it replaces was based on a state machine, with the tags
and the parsed data controlling the state changes. The flexibility
of this parser is actually not required, and it has caused kernel
panics when operating on malformed data.

Analysis of the VPD code to make it more robust lead me to believe
that it was easier to write a "strict" parser than to restrict the
flexible state machine to detect and reject non-well-formed data.
A number of restrictions had already been added, but they make the
state machine ever more complex and harder to understand.

This updated parser has been verified to return identical parsed data
as the current implementation for the example VPD data given in the
PCI standard and in some actual PCIe VPD data.

It is strict in the sense that it detects and rejects any deviation
from a well-formed VPD structure.

PR:		272018
Approved by:	kib
MFC after:	4 weeks
Differential Revision:	https://reviews.freebsd.org/D34268
2023-06-21 19:36:39 +02:00
..
controller Remove redundant data from pci host generic 2023-04-24 12:33:50 +01:00
fixup_pci.c
hostb_pci.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
ignore_pci.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
isa_pci.c
pci.c dev/pci: simplify PCI VPD access functions 2023-06-21 19:36:39 +02:00
pci_dw.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
pci_dw.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
pci_dw_if.m
pci_dw_mv.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
pci_host_generic.c Remove redundant data from pci host generic 2023-04-24 12:33:50 +01:00
pci_host_generic.h Remove redundant data from pci host generic 2023-04-24 12:33:50 +01:00
pci_host_generic_acpi.c Add PCI_ID_OFW_IOMMU to the pci ecam ACPI driver 2023-04-24 12:47:38 +01:00
pci_host_generic_acpi.h
pci_host_generic_den0115.c Clean up PCI DEN0115 driver probing 2023-04-24 16:34:21 +01:00
pci_host_generic_fdt.c Add fdt to name of a fdt specific function 2022-05-23 15:24:35 +01:00
pci_host_generic_fdt.h Add fdt to name of a fdt specific function 2022-05-23 15:24:35 +01:00
pci_if.m
pci_iov.c
pci_iov.h
pci_iov_if.m
pci_iov_private.h
pci_iov_schema.c
pci_pci.c pcib: Allocate the memory BAR with the MSI-X table. 2023-06-19 09:15:48 -07:00
pci_private.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
pci_subr.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
pci_user.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
pcib_if.m
pcib_private.h pcib: Allocate the memory BAR with the MSI-X table. 2023-06-19 09:15:48 -07:00
pcib_support.c
pcireg.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
pcivar.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
schema_private.h
vga_pci.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00