coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <assert.h>
#include <console/console.h>
#include <device/pci.h>
#include <device/pci_def.h>
#include <device/pci_ops.h>
#include <intelblocks/gpio.h>
#include <intelblocks/irq.h>
#include <intelblocks/lpc_lib.h>
#include <soc/pci_devs.h>
#include <southbridge/intel/common/acpi_pirq_gen.h>
#include <stdlib.h>
#include <types.h>
Go to the source code of this file.
Data Structures | |
struct | pin_info |
Macros | |
#define | MIN_SHARED_IRQ 16 |
#define | MAX_SHARED_IRQ 23 |
#define | TOTAL_SHARED_IRQ (MAX_SHARED_IRQ - MIN_SHARED_IRQ + 1) |
#define | MAX_IRQS 120 |
#define | IDX2PIN(i) (enum pci_pin)((i) + PCI_INT_A) |
#define | PIN2IDX(p) (size_t)((p) - PCI_INT_A) |
Variables | |
static unsigned int | irq_share_count [TOTAL_SHARED_IRQ] |
static struct pci_irq_entry * | cached_entries |
#define TOTAL_SHARED_IRQ (MAX_SHARED_IRQ - MIN_SHARED_IRQ + 1) |
|
static |
Definition at line 267 of file irq.c.
References pci_irq_entry::devfn, pci_irq_entry::irq, malloc(), pci_irq_entry::next, NULL, and pci_irq_entry::pin.
Referenced by add_slot_entries().
|
static |
Definition at line 284 of file irq.c.
References add_entry(), pci_irq_entry::irq, MAX_FNS, PCI_DEVFN, PCI_INT_NONE, and PIN2IDX.
Referenced by assign_slot().
|
static |
Definition at line 197 of file irq.c.
References assign_pin(), BIOS_ERR, find_free_pin(), find_free_unique_irq(), INVALID_IRQ, pin_info::irq, MAX_FNS, PCI_INT_NONE, PIN2IDX, and printk.
Referenced by assign_slot().
|
static |
Definition at line 158 of file irq.c.
References assign_pin(), MAX_FNS, and PCI_INT_NONE.
Referenced by assign_slot().
|
static |
Definition at line 173 of file irq.c.
References assign_pirq(), BIOS_ERR, MAX_FNS, PCI_INT_NONE, PIRQ_INVALID, and printk.
Referenced by assign_slot().
bool assign_pci_irqs | ( | const struct slot_irq_constraints * | constraints, |
size_t | num_slots | ||
) |
Definition at line 328 of file irq.c.
References assign_slot(), BIOS_INFO, cached_entries, pci_irq_entry::devfn, pci_irq_entry::irq, pci_irq_entry::next, PCI_FUNC, PCI_SLOT, pci_irq_entry::pin, pin_to_str(), and printk.
Referenced by fill_fsps_irq_params(), and platform_fsp_silicon_init_params_cb().
|
static |
Definition at line 141 of file irq.c.
References BIOS_ERR, PCI_INT_D, PIN2IDX, printk, and pin_info::usage_count.
Referenced by assign_direct_irqs(), assign_fixed_pins(), and assign_shareable_pins().
|
static |
Definition at line 128 of file irq.c.
References BIOS_ERR, pin_info::irq, irq_share_count, PIN2IDX, PIRQ_H, pirq_idx(), pirq_to_irq(), and printk.
Referenced by assign_fixed_pirqs(), and assign_pirqs().
Definition at line 250 of file irq.c.
References assign_pirq(), find_global_least_used_pirq(), IDX2PIN, PCI_INT_MAX, and PIRQ_INVALID.
Referenced by assign_slot().
|
static |
Definition at line 224 of file irq.c.
References assign_pin(), BIOS_ERR, find_free_pin(), find_shareable_pin(), MAX_FNS, PCI_INT_NONE, and printk.
Referenced by assign_slot().
|
static |
Definition at line 297 of file irq.c.
References add_slot_entries(), assign_direct_irqs(), assign_fixed_pins(), assign_fixed_pirqs(), assign_pirqs(), assign_shareable_pins(), MAX_FNS, and PCI_INT_MAX.
Referenced by assign_pci_irqs().
Definition at line 62 of file irq.c.
References gpio_routes_ioapic_irq(), INVALID_IRQ, MAX_IRQS, and MAX_SHARED_IRQ.
Referenced by assign_direct_irqs(), and assign_shareable_pins().
|
static |
Definition at line 62 of file irq.c.
Referenced by assign_direct_irqs().
Definition at line 62 of file irq.c.
Referenced by assign_pirqs().
Definition at line 62 of file irq.c.
Referenced by assign_shareable_pins().
Definition at line 365 of file irq.c.
References slot_pin_irq_map::apic_gsi, cached_entries, calloc(), free(), pic_pirq_map::gsi, intel_write_pci0_PRT(), irq_to_pirq(), is_slot_pin_assigned(), lpc_get_pic_pirq_routing(), MAX_SLOTS, PCI_INT_MAX, PCI_SLOT, slot_pin_irq_map::pic_pirq, slot_pin_irq_map::pin, PIRQ_COUNT, PIRQ_GSI, slot_pin_irq_map::slot, and pic_pirq_map::type.
Referenced by cpu_fill_ssdt().
const struct pci_irq_entry* get_cached_pci_irqs | ( | void | ) |
Definition at line 347 of file irq.c.
References cached_entries.
Referenced by pci_irq_to_fsp().
int get_pci_devfn_irq | ( | unsigned int | devfn | ) |
Definition at line 433 of file irq.c.
References cached_entries, pci_irq_entry::devfn, INVALID_IRQ, pci_irq_entry::irq, and pci_irq_entry::next.
Definition at line 407 of file irq.c.
References cached_entries, pci_irq_entry::devfn, pci_irq_entry::irq, MIN_PCH_SLOT, pci_irq_entry::next, PCI_DEV, PCI_FUNC, PCI_INTERRUPT_LINE, PCI_INTERRUPT_PIN, pci_s_write_config8(), PCI_SLOT, and pci_irq_entry::pin.
Definition at line 347 of file irq.c.
Referenced by generate_pin_irq_map().
|
static |
Definition at line 123 of file irq.c.
References MIN_SHARED_IRQ, and pirq_idx().
Referenced by assign_pirq().
|
static |
Definition at line 326 of file irq.c.
Referenced by assign_pci_irqs(), generate_pin_irq_map(), get_cached_pci_irqs(), get_pci_devfn_irq(), and irq_program_non_pch().
|
static |
Definition at line 34 of file irq.c.
Referenced by assign_pirq().