FreeBSD kernel amd64 PCI device code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/bus.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/rman.h>
#include <sys/sysctl.h>
#include <sys/systm.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
#include <compat/x86bios/x86bios.h>
Go to the source code of this file.
Data Structures | |
struct | vga_resource |
struct | vga_pci_softc |
Functions | |
__FBSDID ("$FreeBSD$") | |
SYSCTL_DECL (_hw_pci) | |
static struct vga_resource * | lookup_res (struct vga_pci_softc *sc, int rid) |
static struct resource * | vga_pci_alloc_resource (device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) |
static int | vga_pci_release_resource (device_t dev, device_t child, int type, int rid, struct resource *r) |
SYSCTL_INT (_hw_pci, OID_AUTO, default_vgapci_unit, CTLFLAG_RDTUN, &vga_pci_default_unit, -1, "Default VGA-compatible display") | |
int | vga_pci_is_boot_display (device_t dev) |
static void | vga_pci_reset (device_t dev) |
void * | vga_pci_map_bios (device_t dev, size_t *size) |
void | vga_pci_unmap_bios (device_t dev, void *bios) |
int | vga_pci_repost (device_t dev) |
static int | vga_pci_probe (device_t dev) |
static int | vga_pci_attach (device_t dev) |
static int | vga_pci_suspend (device_t dev) |
static int | vga_pci_detach (device_t dev) |
static int | vga_pci_resume (device_t dev) |
static int | vga_pci_read_ivar (device_t dev, device_t child, int which, uintptr_t *result) |
static int | vga_pci_write_ivar (device_t dev, device_t child, int which, uintptr_t value) |
static int | vga_pci_setup_intr (device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filter, driver_intr_t *intr, void *arg, void **cookiep) |
static int | vga_pci_teardown_intr (device_t dev, device_t child, struct resource *irq, void *cookie) |
static uint32_t | vga_pci_read_config (device_t dev, device_t child, int reg, int width) |
static void | vga_pci_write_config (device_t dev, device_t child, int reg, uint32_t val, int width) |
static int | vga_pci_enable_busmaster (device_t dev, device_t child) |
static int | vga_pci_disable_busmaster (device_t dev, device_t child) |
static int | vga_pci_enable_io (device_t dev, device_t child, int space) |
static int | vga_pci_disable_io (device_t dev, device_t child, int space) |
static int | vga_pci_get_vpd_ident (device_t dev, device_t child, const char **identptr) |
static int | vga_pci_get_vpd_readonly (device_t dev, device_t child, const char *kw, const char **vptr) |
static int | vga_pci_set_powerstate (device_t dev, device_t child, int state) |
static int | vga_pci_get_powerstate (device_t dev, device_t child) |
static int | vga_pci_assign_interrupt (device_t dev, device_t child) |
static int | vga_pci_find_cap (device_t dev, device_t child, int capability, int *capreg) |
static int | vga_pci_find_next_cap (device_t dev, device_t child, int capability, int start, int *capreg) |
static int | vga_pci_find_extcap (device_t dev, device_t child, int capability, int *capreg) |
static int | vga_pci_find_next_extcap (device_t dev, device_t child, int capability, int start, int *capreg) |
static int | vga_pci_find_htcap (device_t dev, device_t child, int capability, int *capreg) |
static int | vga_pci_find_next_htcap (device_t dev, device_t child, int capability, int start, int *capreg) |
static int | vga_pci_alloc_msi (device_t dev, device_t child, int *count) |
static int | vga_pci_alloc_msix (device_t dev, device_t child, int *count) |
static int | vga_pci_remap_msix (device_t dev, device_t child, int count, const u_int *vectors) |
static int | vga_pci_release_msi (device_t dev, device_t child) |
static int | vga_pci_msi_count (device_t dev, device_t child) |
static int | vga_pci_msix_count (device_t dev, device_t child) |
static bus_dma_tag_t | vga_pci_get_dma_tag (device_t bus, device_t child) |
DRIVER_MODULE (vgapci, pci, vga_pci_driver, vga_devclass, 0, 0) | |
MODULE_DEPEND (vgapci, x86bios, 1, 1, 1) | |
Variables | |
int | vga_pci_default_unit = -1 |
static device_method_t | vga_pci_methods [] |
static driver_t | vga_pci_driver |
static devclass_t | vga_devclass |
__FBSDID | ( | "$FreeBSD$" | ) |
DRIVER_MODULE | ( | vgapci | , |
pci | , | ||
vga_pci_driver | , | ||
vga_devclass | , | ||
0 | , | ||
0 | |||
) |
|
static |
Definition at line 445 of file vga_pci.c.
References PCI_RID2BAR, PCIR_BIOS, PCIR_MAX_BAR_0, rid, vga_pci_softc::vga_bars, and vga_pci_softc::vga_bios.
Referenced by vga_pci_alloc_resource(), vga_pci_map_bios(), vga_pci_release_resource(), and vga_pci_unmap_bios().
MODULE_DEPEND | ( | vgapci | , |
x86bios | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
SYSCTL_DECL | ( | _hw_pci | ) |
SYSCTL_INT | ( | _hw_pci | , |
OID_AUTO | , | ||
default_vgapci_unit | , | ||
CTLFLAG_RDTUN | , | ||
& | vga_pci_default_unit, | ||
- | 1, | ||
"Default VGA-compatible display" | |||
) |
|
static |
|
static |
|
static |
Definition at line 458 of file vga_pci.c.
References count, dev, lookup_res(), rid, start, type, vga_resource::vr_refs, and vga_resource::vr_res.
Referenced by vga_pci_map_bios().
|
static |
|
static |
Definition at line 371 of file vga_pci.c.
References dev, and vga_pci_is_boot_display().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 612 of file vga_pci.c.
References capability, capreg, and dev.
|
static |
Definition at line 628 of file vga_pci.c.
References capability, capreg, and dev.
|
static |
Definition at line 644 of file vga_pci.c.
References capability, capreg, and dev.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
int vga_pci_is_boot_display | ( | device_t | dev | ) |
Definition at line 82 of file vga_pci.c.
References config, dev, pcib, PCIB_BCR_VGA_ENABLE, PCIC_DISPLAY, PCIC_OLD, PCIM_CMD_INTxDIS, PCIM_CMD_MEMEN, PCIM_CMD_PORTEN, PCIR_BRIDGECTL_1, PCIR_COMMAND, PCIS_OLD_VGA, and vga_pci_default_unit.
Referenced by vga_pci_attach(), vga_pci_map_bios(), vga_pci_probe(), vga_pci_repost(), and vga_pci_unmap_bios().
void * vga_pci_map_bios | ( | device_t | dev, |
size_t * | size | ||
) |
Definition at line 164 of file vga_pci.c.
References config, dev, lookup_res(), pcib, PCIB_BCR_VGA_ENABLE, PCIM_HDRTYPE_BRIDGE, PCIM_HDRTYPE_CARDBUS, PCIR_BIOS, PCIR_BIOS_1, PCIR_BRIDGECTL_1, PCIR_HDRTYPE, rid, vga_pci_alloc_resource(), VGA_PCI_BIOS_SHADOW_ADDR, VGA_PCI_BIOS_SHADOW_SIZE, vga_pci_is_boot_display(), vga_pci_release_resource(), vga_pci_reset(), and vga_resource::vr_res.
|
static |
|
static |
|
static |
Definition at line 349 of file vga_pci.c.
References dev, PCIC_DISPLAY, PCIC_OLD, PCIS_OLD_VGA, and vga_pci_is_boot_display().
|
static |
|
static |
|
static |
Definition at line 702 of file vga_pci.c.
References child, dev, and vga_pci_softc::vga_msi_child.
|
static |
Definition at line 484 of file vga_pci.c.
References dev, lookup_res(), rid, type, vga_resource::vr_refs, and vga_resource::vr_res.
Referenced by vga_pci_map_bios(), and vga_pci_unmap_bios().
|
static |
int vga_pci_repost | ( | device_t | dev | ) |
Definition at line 319 of file vga_pci.c.
References dev, VGA_PCI_BIOS_SHADOW_ADDR, and vga_pci_is_boot_display().
|
static |
Definition at line 146 of file vga_pci.c.
References dev.
Referenced by vga_pci_map_bios().
|
static |
|
static |
|
static |
|
static |
|
static |
void vga_pci_unmap_bios | ( | device_t | dev, |
void * | bios | ||
) |
Definition at line 276 of file vga_pci.c.
References dev, lookup_res(), PCIM_HDRTYPE_BRIDGE, PCIM_HDRTYPE_CARDBUS, PCIR_BIOS, PCIR_BIOS_1, PCIR_HDRTYPE, rid, VGA_PCI_BIOS_SHADOW_SIZE, vga_pci_is_boot_display(), vga_pci_release_resource(), and vga_resource::vr_res.
|
static |
|
static |
int vga_pci_default_unit = -1 |
Definition at line 77 of file vga_pci.c.
Referenced by vga_pci_is_boot_display().
|
static |