coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
late.c File Reference
#include <amdblocks/acpimmio.h>
#include <device/mmio.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ops.h>
#include <device/pci_ids.h>
#include <bootstate.h>
#include <arch/ioapic.h>
#include <device/smbus.h>
#include <pc80/mc146818rtc.h>
#include <pc80/i8254.h>
#include <pc80/i8259.h>
#include <console/console.h>
#include <acpi/acpi.h>
#include <device/pci_ehci.h>
#include "lpc.h"
#include "SBPLATFORM.h"
#include "cfg.h"
#include "chip.h"
#include "sb_cimx.h"
#include "smbus.h"
#include "fan.h"
#include "pci_devs.h"
#include <southbridge/amd/common/amd_pci_util.h>
Include dependency graph for late.c:

Go to the source code of this file.

Macros

#define HOST_CAP   0x00 /* host capabilities */
 
#define HOST_CTL   0x04 /* global host control */
 
#define HOST_IRQ_STAT   0x08 /* interrupt status */
 
#define HOST_PORTS_IMPL   0x0c /* bitmap of implemented ports */
 
#define HOST_CTL_AHCI_EN   (1 << 31) /* AHCI enabled */
 

Functions

static u32 sb800_callout_entry (u32 func, u32 data, void *config)
 Entry point of Southbridge CIMx callout. More...
 
static void ahci_raid_init (struct device *dev)
 
static void lpc_init (struct device *dev)
 
static const char * lpc_acpi_name (const struct device *dev)
 
static void sb800_init (void *chip_info)
 Fill build time defaults. More...
 
void sb_Before_Pci_Init (void)
 South Bridge CIMx ramstage entry point wrapper. More...
 
void sb_After_Pci_Init (void)
 
void sb_Mid_Post_Init (void)
 
void sb_Late_Post (void)
 
void sb_Before_Pci_Restore_Init (void)
 
void sb_After_Pci_Restore_Init (void)
 
static void set_pci_irqs (void *unused)
 
 BOOT_STATE_INIT_ENTRY (BS_DEV_ENABLE, BS_ON_ENTRY, set_pci_irqs, NULL)
 
static void sb800_enable (struct device *dev)
 SB Cimx entry point sbBeforePciInit wrapper. More...
 

Variables

static AMDSBCFG sb_late_cfg
 
static AMDSBCFG * sb_config = &sb_late_cfg
 
static struct device_operations lpc_ops
 
static const struct pci_driver lpc_driver __pci_driver
 
static struct device_operations sata_ops
 
static struct device_operations usb_ops
 
static struct device_operations azalia_ops
 
static struct device_operations gec_ops
 
struct chip_operations southbridge_amd_cimx_sb800_ops
 

Macro Definition Documentation

◆ HOST_CAP

#define HOST_CAP   0x00 /* host capabilities */

Definition at line 63 of file late.c.

◆ HOST_CTL

#define HOST_CTL   0x04 /* global host control */

Definition at line 64 of file late.c.

◆ HOST_CTL_AHCI_EN

#define HOST_CTL_AHCI_EN   (1 << 31) /* AHCI enabled */

Definition at line 68 of file late.c.

◆ HOST_IRQ_STAT

#define HOST_IRQ_STAT   0x08 /* interrupt status */

Definition at line 65 of file late.c.

◆ HOST_PORTS_IMPL

#define HOST_PORTS_IMPL   0x0c /* bitmap of implemented ports */

Definition at line 66 of file late.c.

Function Documentation

◆ ahci_raid_init()

◆ BOOT_STATE_INIT_ENTRY()

BOOT_STATE_INIT_ENTRY ( BS_DEV_ENABLE  ,
BS_ON_ENTRY  ,
set_pci_irqs  ,
NULL   
)

◆ lpc_acpi_name()

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

Definition at line 124 of file late.c.

◆ lpc_init()

static void lpc_init ( struct device dev)
static

Definition at line 105 of file late.c.

References BIOS_DEBUG, cmos_check_update_date(), cmos_init(), printk, setup_i8254(), and setup_i8259().

Here is the call graph for this function:

◆ sb800_callout_entry()

static u32 sb800_callout_entry ( u32  func,
u32  data,
void config 
)
static

Entry point of Southbridge CIMx callout.

prototype UINT32 (SBCIM_HOOK_ENTRY)(UINT32 Param1, UINT32 Param2, void pConfig)

Parameters
[in]funcSouthbridge CIMx Function ID.
[in]dataSouthbridge Input Data.
[in]configSouthbridge configuration structure pointer.

Definition at line 41 of file late.c.

References BIOS_DEBUG, and printk.

Referenced by sb800_init().

Here is the caller graph for this function:

◆ sb800_enable()

◆ sb800_init()

static void sb800_init ( void chip_info)
static

Fill build time defaults.

Definition at line 239 of file late.c.

References abcfg_reg, BIOS_DEBUG, printk, sb800_callout_entry(), sb800_cimx_config(), and sb_config.

Here is the call graph for this function:

◆ sb_After_Pci_Init()

void sb_After_Pci_Init ( void  )

Definition at line 259 of file late.c.

References BIOS_DEBUG, printk, and sb_config.

Referenced by platform_BeforeInitMid().

Here is the caller graph for this function:

◆ sb_After_Pci_Restore_Init()

void sb_After_Pci_Restore_Init ( void  )

Definition at line 287 of file late.c.

References BIOS_DEBUG, printk, and sb_config.

◆ sb_Before_Pci_Init()

void sb_Before_Pci_Init ( void  )

South Bridge CIMx ramstage entry point wrapper.

Definition at line 252 of file late.c.

References BIOS_DEBUG, printk, and sb_config.

Referenced by sb800_enable().

Here is the caller graph for this function:

◆ sb_Before_Pci_Restore_Init()

void sb_Before_Pci_Restore_Init ( void  )

Definition at line 280 of file late.c.

References BIOS_DEBUG, printk, and sb_config.

Referenced by sb800_enable().

Here is the caller graph for this function:

◆ sb_Late_Post()

void sb_Late_Post ( void  )

Definition at line 273 of file late.c.

References BIOS_DEBUG, printk, and sb_config.

Referenced by platform_AfterInitLate().

Here is the caller graph for this function:

◆ sb_Mid_Post_Init()

void sb_Mid_Post_Init ( void  )

Definition at line 266 of file late.c.

References BIOS_DEBUG, printk, and sb_config.

Referenced by platform_BeforeInitMid().

Here is the caller graph for this function:

◆ set_pci_irqs()

static void set_pci_irqs ( void unused)
static

Definition at line 298 of file late.c.

References write_pci_cfg_irqs(), and write_pci_int_table().

Here is the call graph for this function:

Variable Documentation

◆ __pci_driver

static const struct pci_driver gec_driver __pci_driver
static
Initial value:
= {
.ops = &lpc_ops,
.vendor = PCI_VID_ATI,
}
static struct device_operations lpc_ops
Definition: late.c:138
#define PCI_DID_ATI_SB800_LPC
Definition: pci_ids.h:327
#define PCI_VID_ATI
Definition: pci_ids.h:204

Definition at line 124 of file late.c.

◆ azalia_ops

struct device_operations azalia_ops
static
Initial value:
= {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.ops_pci = &pci_dev_ops_pci,
}
void pci_dev_enable_resources(struct device *dev)
Definition: pci_device.c:721
void pci_dev_read_resources(struct device *dev)
Definition: pci_device.c:534
struct pci_operations pci_dev_ops_pci
Default device operation for PCI devices.
Definition: pci_device.c:911
void pci_dev_set_resources(struct device *dev)
Definition: pci_device.c:691

Definition at line 124 of file late.c.

◆ gec_ops

struct device_operations gec_ops
static
Initial value:
= {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.ops_pci = &pci_dev_ops_pci,
}

Definition at line 124 of file late.c.

◆ lpc_ops

struct device_operations lpc_ops
static
Initial value:
= {
.read_resources = lpc_read_resources,
.set_resources = lpc_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = lpc_init,
.scan_bus = scan_static_bus,
.ops_pci = &pci_dev_ops_pci,
.acpi_name = lpc_acpi_name,
}
static const char * lpc_acpi_name(const struct device *dev)
Definition: late.c:124
static void lpc_init(struct device *dev)
Definition: late.c:105
void scan_static_bus(struct device *bus)
Definition: root_device.c:89
static void lpc_read_resources(struct device *dev)
Definition: lpc.c:99
static void lpc_set_resources(struct device *dev)
Definition: lpc.c:131

Definition at line 124 of file late.c.

◆ sata_ops

struct device_operations sata_ops
static
Initial value:
= {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = ahci_raid_init,
.ops_pci = &pci_dev_ops_pci,
}
static void ahci_raid_init(struct device *dev)
Definition: late.c:69

Definition at line 124 of file late.c.

◆ sb_config

◆ sb_late_cfg

AMDSBCFG sb_late_cfg
static

Definition at line 28 of file late.c.

◆ southbridge_amd_cimx_sb800_ops

struct chip_operations southbridge_amd_cimx_sb800_ops
Initial value:
= {
.init = sb800_init,
.enable_dev = sb800_enable,
}
static void sb800_init(void *chip_info)
Fill build time defaults.
Definition: late.c:239
static void sb800_enable(struct device *dev)
SB Cimx entry point sbBeforePciInit wrapper.
Definition: late.c:316

Definition at line 316 of file late.c.

◆ usb_ops

struct device_operations usb_ops
static
Initial value:
= {
.read_resources = pci_ehci_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.ops_pci = &pci_dev_ops_pci,
}
#define pci_ehci_read_resources
Definition: pci_ehci.h:22

Definition at line 124 of file late.c.