coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pcie_gpp.c File Reference
#include <acpi/acpi_device.h>
#include <acpi/acpigen.h>
#include <acpi/acpigen_pci.h>
#include <amdblocks/amd_pci_util.h>
#include <assert.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pciexp.h>
#include <soc/pci_devs.h>
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for pcie_gpp.c:

Go to the source code of this file.

Functions

static const char * pcie_gpp_acpi_name (const struct device *dev)
 
static void acpi_device_write_gpp_pci_dev (const struct device *dev)
 

Variables

static struct device_operations internal_pcie_gpp_ops
 
static const unsigned short internal_pci_gpp_ids []
 
static const struct pci_driver internal_pcie_gpp_driver __pci_driver
 
static struct device_operations external_pcie_gpp_ops
 
static const unsigned short external_pci_gpp_ids []
 

Function Documentation

◆ acpi_device_write_gpp_pci_dev()

static void acpi_device_write_gpp_pci_dev ( const struct device dev)
static

◆ pcie_gpp_acpi_name()

static const char* pcie_gpp_acpi_name ( const struct device dev)
static

Definition at line 16 of file pcie_gpp.c.

References ACPI_NAME_BUFFER_SIZE, pci_path::devfn, DEVICE_PATH_PCI, malloc(), name, NULL, device::path, device_path::pci, snprintf(), and device_path::type.

Here is the call graph for this function:

Variable Documentation

◆ __pci_driver

static const struct pci_driver external_pcie_gpp_driver __pci_driver
static
Initial value:
= {
.vendor = PCI_VID_AMD,
}
static const unsigned short internal_pci_gpp_ids[]
Definition: pcie_gpp.c:61
static struct device_operations internal_pcie_gpp_ops
Definition: pcie_gpp.c:51
#define PCI_VID_AMD
Definition: pci_ids.h:496

Definition at line 61 of file pcie_gpp.c.

◆ external_pci_gpp_ids

const unsigned short external_pci_gpp_ids[]
static
Initial value:
= {
0
}
#define PCI_DID_AMD_FAM17H_MODEL60H_PCIE_GPP_D2
Definition: pci_ids.h:588
#define PCI_DID_AMD_FAM17H_MODEL60H_PCIE_GPP_D1
Definition: pci_ids.h:587
#define PCI_DID_AMD_FAM17H_MODEL18H_PCIE_GPP
Definition: pci_ids.h:586
#define PCI_DID_AMD_FAM17H_MODELA0H_PCIE_GPP
Definition: pci_ids.h:589

Definition at line 85 of file pcie_gpp.c.

◆ external_pcie_gpp_ops

struct device_operations external_pcie_gpp_ops
static
Initial value:
= {
.read_resources = pci_bus_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_bus_enable_resources,
.scan_bus = pciexp_scan_bridge,
.reset_bus = pci_bus_reset,
.acpi_name = pcie_gpp_acpi_name,
.acpi_fill_ssdt = acpi_device_write_gpp_pci_dev,
}
static const char * pcie_gpp_acpi_name(const struct device *dev)
Definition: pcie_gpp.c:16
static void acpi_device_write_gpp_pci_dev(const struct device *dev)
Definition: pcie_gpp.c:30
void pci_bus_enable_resources(struct device *dev)
Definition: pci_device.c:758
void pci_bus_read_resources(struct device *dev)
Definition: pci_device.c:540
void pci_bus_reset(struct bus *bus)
Definition: pci_device.c:777
void pci_dev_set_resources(struct device *dev)
Definition: pci_device.c:691
void pciexp_scan_bridge(struct device *dev)

Definition at line 61 of file pcie_gpp.c.

◆ internal_pci_gpp_ids

const unsigned short internal_pci_gpp_ids[]
static
Initial value:
= {
0
}
#define PCI_DID_AMD_FAM17H_MODEL18H_PCIE_GPP_BUSB
Definition: pci_ids.h:591
#define PCI_DID_AMD_FAM17H_MODELA0H_PCIE_GPP_BUSABC
Definition: pci_ids.h:593
#define PCI_DID_AMD_FAM17H_MODEL60H_PCIE_GPP_BUSABC
Definition: pci_ids.h:592
#define PCI_DID_AMD_FAM17H_MODEL18H_PCIE_GPP_BUSA
Definition: pci_ids.h:590

Definition at line 61 of file pcie_gpp.c.

◆ internal_pcie_gpp_ops

struct device_operations internal_pcie_gpp_ops
static
Initial value:
= {
.read_resources = pci_bus_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_bus_enable_resources,
.scan_bus = pci_scan_bridge,
.reset_bus = pci_bus_reset,
.acpi_name = pcie_gpp_acpi_name,
.acpi_fill_ssdt = acpi_device_write_gpp_pci_dev,
}
void pci_scan_bridge(struct device *dev)
Scan a PCI bridge and the buses behind the bridge.
Definition: pci_device.c:1598

Definition at line 30 of file pcie_gpp.c.