drivers/pci/pci-bridge-emul.h
Source file repositories/reference/linux-study-clean/drivers/pci/pci-bridge-emul.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/pci/pci-bridge-emul.h- Extension
.h- Size
- 4218 bytes
- Lines
- 165
- Domain
- Representative Device Path
- Bucket
- PCIe NVMe Storage Path
- Inferred role
- Representative Device Path: implementation source
- Status
- source implementation candidate
Why This File Exists
Part of the selected hardware vertical slice: PCI discovery, driver binding, NVMe queues, block requests, DMA, interrupts, and completion.
- Part of the selected hardware vertical slice: PCI discovery, driver binding, NVMe queues, block requests, DMA, interrupts, and completion.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.h
Detected Declarations
struct pci_bridge_emul_confstruct pci_bridge_emul_pcie_confstruct pci_bridge_emulstruct pci_bridge_emul_opsstruct pci_bridge_reg_behaviorstruct pci_bridge_emul
Annotated Snippet
struct pci_bridge_emul_conf {
__le16 vendor;
__le16 device;
__le16 command;
__le16 status;
__le32 class_revision;
u8 cache_line_size;
u8 latency_timer;
u8 header_type;
u8 bist;
__le32 bar[2];
u8 primary_bus;
u8 secondary_bus;
u8 subordinate_bus;
u8 secondary_latency_timer;
u8 iobase;
u8 iolimit;
__le16 secondary_status;
__le16 membase;
__le16 memlimit;
__le16 pref_mem_base;
__le16 pref_mem_limit;
__le32 prefbaseupper;
__le32 preflimitupper;
__le16 iobaseupper;
__le16 iolimitupper;
u8 capabilities_pointer;
u8 reserve[3];
__le32 romaddr;
u8 intline;
u8 intpin;
__le16 bridgectrl;
};
/* PCI configuration space of the PCIe capabilities */
struct pci_bridge_emul_pcie_conf {
u8 cap_id;
u8 next;
__le16 cap;
__le32 devcap;
__le16 devctl;
__le16 devsta;
__le32 lnkcap;
__le16 lnkctl;
__le16 lnksta;
__le32 slotcap;
__le16 slotctl;
__le16 slotsta;
__le16 rootctl;
__le16 rootcap;
__le32 rootsta;
__le32 devcap2;
__le16 devctl2;
__le16 devsta2;
__le32 lnkcap2;
__le16 lnkctl2;
__le16 lnksta2;
__le32 slotcap2;
__le16 slotctl2;
__le16 slotsta2;
};
struct pci_bridge_emul;
typedef enum { PCI_BRIDGE_EMUL_HANDLED,
PCI_BRIDGE_EMUL_NOT_HANDLED } pci_bridge_emul_read_status_t;
struct pci_bridge_emul_ops {
/*
* Called when reading from the regular PCI bridge
* configuration space. Return PCI_BRIDGE_EMUL_HANDLED when the
* operation has handled the read operation and filled in the
* *value, or PCI_BRIDGE_EMUL_NOT_HANDLED when the read should
* be emulated by the common code by reading from the
* in-memory copy of the configuration space.
*/
pci_bridge_emul_read_status_t (*read_base)(struct pci_bridge_emul *bridge,
int reg, u32 *value);
/*
* Same as ->read_base(), except it is for reading from the
* PCIe capability configuration space.
*/
pci_bridge_emul_read_status_t (*read_pcie)(struct pci_bridge_emul *bridge,
int reg, u32 *value);
/*
* Same as ->read_base(), except it is for reading from the
* PCIe extended capability configuration space.
*/
Annotation
- Immediate include surface: `linux/kernel.h`.
- Detected declarations: `struct pci_bridge_emul_conf`, `struct pci_bridge_emul_pcie_conf`, `struct pci_bridge_emul`, `struct pci_bridge_emul_ops`, `struct pci_bridge_reg_behavior`, `struct pci_bridge_emul`.
- Atlas domain: Representative Device Path / PCIe NVMe Storage Path.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.