![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <console/console.h>
#include <device/pci_ops.h>
#include <acpi/acpi.h>
#include <acpi/acpigen.h>
#include <stdint.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <string.h>
#include <lib.h>
#include <cpu/cpu.h>
#include <AGESA.h>
#include <cpu/x86/lapic.h>
#include <cpu/amd/msr.h>
#include <cpu/amd/mtrr.h>
#include <Porting.h>
#include <Options.h>
#include <Topology.h>
#include <northbridge/amd/nb_common.h>
#include <northbridge/amd/agesa/state_machine.h>
#include <northbridge/amd/agesa/agesa_helper.h>
Go to the source code of this file.
Macros | |
#define | MAX_NODE_NUMS MAX_NODES |
Variables | |
static unsigned int | node_nums |
static unsigned int | sblink |
static struct device * | __f0_dev [MAX_NODE_NUMS] |
static struct device * | __f1_dev [MAX_NODE_NUMS] |
static struct device * | __f2_dev [MAX_NODE_NUMS] |
static struct device * | __f4_dev [MAX_NODE_NUMS] |
static unsigned int | fx_devs = 0 |
static struct device_operations | northbridge_operations |
static const struct pci_driver family15_northbridge | __pci_driver |
struct chip_operations | northbridge_amd_agesa_family15tn_ops |
static struct device_operations | pci_domain_ops |
static struct device_operations | cpu_bus_ops |
struct chip_operations | northbridge_amd_agesa_family15tn_root_complex_ops |
#define MAX_NODE_NUMS MAX_NODES |
Definition at line 25 of file northbridge.c.
|
static |
Definition at line 408 of file northbridge.c.
References acpi_create_hest_error_source(), addr, agesawrapper_getlateinitptr(), NULL, PICK_WHEA_CMC, and PICK_WHEA_MCE.
|
static |
Definition at line 464 of file northbridge.c.
|
static |
Definition at line 190 of file northbridge.c.
References IOINDEX, new_resource(), nodeid(), and reg_useable().
Referenced by amdfam15_link_read_bases().
Definition at line 218 of file northbridge.c.
References IOINDEX, new_resource(), nodeid(), and reg_useable().
Referenced by amdfam15_link_read_bases().
Definition at line 244 of file northbridge.c.
References resource::align, amdfam15_find_iopair(), amdfam15_find_mempair(), resource::base, resource::flags, resource::gran, HT_IO_HOST_ALIGN, HT_MEM_HOST_ALIGN, IORESOURCE_BRIDGE, IORESOURCE_IO, IORESOURCE_MEM, IORESOURCE_PREFETCH, resource::limit, log2(), nodeid(), and resource::size.
Referenced by nb_read_resources().
Definition at line 138 of file northbridge.c.
References DEV_CDB, pci_path::devfn, device::path, and device_path::pci.
Referenced by nb_read_resources(), and nb_set_resources().
Definition at line 886 of file northbridge.c.
References initialize_cpus(), and device::link_list.
Definition at line 770 of file northbridge.c.
References add_cpu_device(), add_more_links(), amd_cpu_topology, BIOS_ERR, BIOS_SPEW, BIT12, BIT13, BIT15, device::bus, cpuid_eax(), cpuid_ecx(), DEV_CDB, dev_path(), die(), device::enabled, device::link_list, node_nums, NULL, PCI_DEVFN, pci_probe_dev(), pci_read_config32(), pcidev_on_root(), printk, and sysconf_init().
I tried to reuse the resource allocation code in set_resource() but it is too difficult to deal with the resource allocation magic.
Definition at line 357 of file northbridge.c.
References BIOS_DEBUG, bus::bridge_ctrl, device::bus, bus::dev, dev_path(), device::link_list, bus::next, nodeid(), NULL, PCI_BRIDGE_CTL_VGA, printk, sblink, bus::secondary, set_vga_enable_reg(), bus::subordinate, and vga_pri.
Referenced by nb_set_resources().
Definition at line 580 of file northbridge.c.
References __f0_dev, base, f1_read_config32(), resource::flags, get_fx_devs(), IOINDEX, new_resource(), nodeid(), and pci_domain_read_resources().
Definition at line 663 of file northbridge.c.
References add_uma_resource_below_tolm(), amd_topmem2(), assign_resources(), BIOS_DEBUG, bus::children, find_pci_tolm(), get_dram_base_limit(), device::link_list, bus::next, node_nums, printk, and ram_resource.
Definition at line 84 of file northbridge.c.
References __f1_dev, fx_devs, get_fx_devs(), and pci_read_config32().
Referenced by domain_read_resources().
Definition at line 91 of file northbridge.c.
References __f1_dev, device::enabled, fx_devs, get_fx_devs(), pci_write_config32(), and value.
Referenced by set_vga_enable_reg().
|
static |
Definition at line 105 of file northbridge.c.
References __f1_dev, fx_devs, get_fx_devs(), nodeid(), and pci_read_config32().
Referenced by domain_set_resources().
Definition at line 67 of file northbridge.c.
References __f0_dev, __f1_dev, __f2_dev, __f4_dev, BIOS_DEBUG, die(), fx_devs, get_node_pci(), MAX_NODE_NUMS, NULL, and printk.
Referenced by domain_read_resources(), f1_read_config32(), f1_write_config32(), and get_dram_base_limit().
Definition at line 62 of file northbridge.c.
References DEV_CDB, nodeid(), and pcidev_on_root().
Referenced by get_fx_devs().
Definition at line 916 of file northbridge.c.
Definition at line 286 of file northbridge.c.
References amdfam15_link_read_bases(), amdfam15_nodeid(), bus::children, bus::dev, device::link_list, bus::link_num, mmconf_resource(), MMIO_CONF_BASE, bus::next, and nodeid().
Definition at line 385 of file northbridge.c.
References amdfam15_nodeid(), assign_resources(), bus::children, create_vga_resource(), device::link_list, bus::next, resource::next, nodeid(), device::resource_list, and set_resource().
Definition at line 428 of file northbridge.c.
References acpigen_pop_len(), acpigen_write_name_dword(), acpigen_write_scope(), msr_struct::hi, msr_struct::lo, rdmsr(), TOP_MEM, and TOP_MEM2.
|
static |
Definition at line 449 of file northbridge.c.
References acpi_checksum(), acpi_table_header::checksum, and acpi_table_header::length.
|
static |
2 | resource does not exist, usable |
0 | resource exists, not usable |
1 | resource exist, resource has been allocated before |
Definition at line 162 of file northbridge.c.
References __f0_dev, resource::flags, fx_devs, IOINDEX, nodeid(), and probe_resource().
Referenced by amdfam15_find_iopair(), and amdfam15_find_mempair().
Definition at line 898 of file northbridge.c.
|
static |
Definition at line 35 of file northbridge.c.
References __f1_dev, node_nums, nodeid(), and pci_write_config32().
Referenced by set_resource().
|
static |
Definition at line 49 of file northbridge.c.
References __f1_dev, node_nums, nodeid(), and pci_write_config32().
Referenced by set_resource().
Definition at line 306 of file northbridge.c.
References resource::base, buf, bus::dev, resource::flags, resource::index, IOINDEX_LINK, IORESOURCE_ASSIGNED, IORESOURCE_IO, IORESOURCE_MEM, IORESOURCE_STORED, bus::link_num, node_nums, nodeid(), report_resource_stored(), resource_end(), set_io_addr_reg(), set_mmio_addr_reg(), and snprintf().
Referenced by nb_set_resources().
Definition at line 143 of file northbridge.c.
References f1_write_config32(), nodeid(), and val.
Referenced by create_vga_resource().
Definition at line 764 of file northbridge.c.
References node_nums, pci_read_config32(), and sblink.
Referenced by cpu_bus_scan().
|
static |
Definition at line 29 of file northbridge.c.
Referenced by domain_read_resources(), get_fx_devs(), and reg_useable().
|
static |
Definition at line 30 of file northbridge.c.
Referenced by f1_read_config32(), f1_write_config32(), get_dram_base_limit(), get_fx_devs(), set_io_addr_reg(), and set_mmio_addr_reg().
|
static |
Definition at line 31 of file northbridge.c.
Referenced by get_fx_devs().
|
static |
Definition at line 32 of file northbridge.c.
Referenced by get_fx_devs().
|
static |
Definition at line 464 of file northbridge.c.
|
static |
Definition at line 886 of file northbridge.c.
|
static |
Definition at line 33 of file northbridge.c.
Referenced by f1_read_config32(), f1_write_config32(), get_dram_base_limit(), get_fx_devs(), and reg_useable().
|
static |
Definition at line 27 of file northbridge.c.
Referenced by cpu_bus_scan(), domain_set_resources(), get_node_nums(), set_io_addr_reg(), set_mmio_addr_reg(), set_resource(), and sysconf_init().
struct chip_operations northbridge_amd_agesa_family15tn_ops |
Definition at line 464 of file northbridge.c.
struct chip_operations northbridge_amd_agesa_family15tn_root_complex_ops |
Definition at line 898 of file northbridge.c.
|
static |
Definition at line 464 of file northbridge.c.
|
static |
Definition at line 663 of file northbridge.c.
|
static |
Definition at line 28 of file northbridge.c.
Referenced by create_vga_resource(), and sysconf_init().