coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mainboard.c File Reference
#include <amdblocks/amd_pci_util.h>
#include <commonlib/helpers.h>
#include <device/device.h>
#include <soc/acpi.h>
#include <string.h>
#include <types.h>
#include "gpio.h"
Include dependency graph for mainboard.c:

Go to the source code of this file.

Data Structures

struct  fch_irq_routing
 

Functions

 _Static_assert (sizeof(fch_pic_routing)==sizeof(fch_apic_routing), "PIC and APIC FCH interrupt tables must be the same size")
 
static void init_tables (void)
 
static void pirq_setup (void)
 
static void mainboard_init (void *chip_info)
 
static void mainboard_enable (struct device *dev)
 

Variables

static uint8_t fch_pic_routing [0x80]
 
static uint8_t fch_apic_routing [0x80]
 
static const struct fch_irq_routing chausie_fch []
 
struct chip_operations mainboard_ops
 

Function Documentation

◆ _Static_assert()

_Static_assert ( sizeof(fch_pic_routing = =sizeof(fch_apic_routing),
"PIC and APIC FCH interrupt tables must be the same size"   
)

◆ init_tables()

static void init_tables ( void  )
static

Definition at line 68 of file mainboard.c.

References fch_irq_routing::apic_irq_num, ARRAY_SIZE, chausie_fch, fch_apic_routing, fch_pic_routing, fch_irq_routing::intr_index, memset(), fch_irq_routing::pic_irq_num, and PIRQ_NC.

Referenced by mainboard_enable().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mainboard_enable()

static void mainboard_enable ( struct device dev)
static

Definition at line 94 of file mainboard.c.

References init_tables(), and pirq_setup().

Here is the call graph for this function:

◆ mainboard_init()

static void mainboard_init ( void chip_info)
static

Definition at line 89 of file mainboard.c.

References mainboard_program_gpios().

Here is the call graph for this function:

◆ pirq_setup()

static void pirq_setup ( void  )
static

Definition at line 83 of file mainboard.c.

References fch_apic_routing, fch_pic_routing, intr_data_ptr, and picr_data_ptr.

Referenced by mainboard_enable().

Here is the caller graph for this function:

Variable Documentation

◆ chausie_fch

const struct fch_irq_routing chausie_fch[]
static
Initial value:
= {
{ PIRQ_A, 12, PIRQ_NC },
{ PIRQ_B, 14, PIRQ_NC },
{ PIRQ_C, 15, PIRQ_NC },
{ PIRQ_D, 12, PIRQ_NC },
{ PIRQ_E, 14, PIRQ_NC },
{ PIRQ_F, 15, PIRQ_NC },
{ PIRQ_G, 12, PIRQ_NC },
{ PIRQ_H, 14, PIRQ_NC },
{ PIRQ_GPIO, 11, 11 },
{ PIRQ_I2C0, 10, 10 },
{ PIRQ_I2C1, 7, 7 },
{ PIRQ_I2C2, 6, 6 },
{ PIRQ_I2C3, 5, 5 },
{ PIRQ_UART0, 4, 4 },
{ PIRQ_UART1, 3, 3 },
{ PIRQ_MISC, 0xfa, 0x00 },
{ PIRQ_MISC0, 0x91, 0x00 },
{ PIRQ_HPET_L, 0x00, 0x00 },
{ PIRQ_HPET_H, 0x00, 0x00 },
}
@ PIRQ_A
Definition: acpi_pirq_gen.h:22
@ PIRQ_C
Definition: acpi_pirq_gen.h:24
@ PIRQ_G
Definition: acpi_pirq_gen.h:28
@ PIRQ_H
Definition: acpi_pirq_gen.h:29
@ PIRQ_E
Definition: acpi_pirq_gen.h:26
@ PIRQ_D
Definition: acpi_pirq_gen.h:25
@ PIRQ_F
Definition: acpi_pirq_gen.h:27
@ PIRQ_B
Definition: acpi_pirq_gen.h:23
#define ACPI_SCI_IRQ
Definition: acpi.h:11
#define PIRQ_EMMC
#define PIRQ_SDIO
#define PIRQ_I2C0
#define PIRQ_HPET_L
#define PIRQ_MISC0
#define PIRQ_SCI
#define PIRQ_MISC
#define PIRQ_SD
#define PIRQ_NC
#define PIRQ_UART0
#define PIRQ_HPET_H
#define PIRQ_I2C3
#define PIRQ_I2C2
#define PIRQ_UART1
#define PIRQ_I2C1
#define PIRQ_GPIO

Referenced by init_tables().

◆ fch_apic_routing

uint8_t fch_apic_routing[0x80]
static

Definition at line 20 of file mainboard.c.

Referenced by init_tables(), and pirq_setup().

◆ fch_pic_routing

uint8_t fch_pic_routing[0x80]
static

Definition at line 19 of file mainboard.c.

Referenced by init_tables(), and pirq_setup().

◆ mainboard_ops

struct chip_operations mainboard_ops
Initial value:
= {
.init = mainboard_init,
.enable_dev = mainboard_enable,
}
static void mainboard_init(void *chip_info)
Definition: mainboard.c:89
static void mainboard_enable(struct device *dev)
Definition: mainboard.c:94

Definition at line 94 of file mainboard.c.