coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mainboard.c File Reference
#include <console/console.h>
#include <device/device.h>
#include <amdblocks/amd_pci_util.h>
#include <FspsUpd.h>
#include <gpio.h>
#include <soc/cpu.h>
#include <soc/southbridge.h>
#include <soc/pci_devs.h>
#include <soc/platform_descriptors.h>
#include <types.h>
#include <commonlib/helpers.h>
#include <soc/amd/picasso/chip.h>
#include "mainboard.h"
Include dependency graph for mainboard.c:

Go to the source code of this file.

Data Structures

struct  fch_irq_routing
 

Macros

#define MAINBOARD_SHARED_DDI_PORTS   2
 

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 program_display_sel_gpios (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 bilby_fch []
 
struct chip_operations mainboard_ops
 

Macro Definition Documentation

◆ MAINBOARD_SHARED_DDI_PORTS

#define MAINBOARD_SHARED_DDI_PORTS   2

Definition at line 18 of file mainboard.c.

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 65 of file mainboard.c.

References fch_irq_routing::apic_irq_num, ARRAY_SIZE, bilby_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 120 of file mainboard.c.

References init_tables(), and pirq_setup().

Here is the call graph for this function:

◆ mainboard_init()

◆ pirq_setup()

static void pirq_setup ( void  )
static

Definition at line 80 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:

◆ program_display_sel_gpios()

static void program_display_sel_gpios ( void  )
static

Definition at line 86 of file mainboard.c.

References get_ddi_port_conn_type(), GPIO_29, GPIO_31, gpio_output(), and MAINBOARD_SHARED_DDI_PORTS.

Referenced by mainboard_init().

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

Variable Documentation

◆ bilby_fch

const struct fch_irq_routing bilby_fch[]
static
Initial value:
= {
{ PIRQ_A, 8, 16 },
{ PIRQ_B, 10, 17 },
{ PIRQ_C, 11, 18 },
{ PIRQ_D, 12, 19 },
{ PIRQ_SCI, 9, 9 },
{ PIRQ_SD, PIRQ_NC, 16 },
{ PIRQ_SDIO, PIRQ_NC, 16 },
{ PIRQ_SATA, PIRQ_NC, 19 },
{ PIRQ_EMMC, PIRQ_NC, 17 },
{ PIRQ_GPIO, 7, 7 },
{ PIRQ_I2C2, 6, 6 },
{ PIRQ_I2C3, 14, 14 },
{ PIRQ_UART0, 4, 4 },
{ PIRQ_UART1, 3, 3 },
{ PIRQ_UART2, 4, 4 },
{ PIRQ_UART3, 3, 3 },
{ PIRQ_MISC, 0xfa, 0x00 },
{ PIRQ_MISC0, 0x91, 0x00 },
{ PIRQ_MISC1, 0x00, 0x00 },
{ PIRQ_MISC2, 0x00, 0x00 },
}
@ PIRQ_A
Definition: acpi_pirq_gen.h:22
@ PIRQ_C
Definition: acpi_pirq_gen.h:24
@ PIRQ_D
Definition: acpi_pirq_gen.h:25
@ PIRQ_B
Definition: acpi_pirq_gen.h:23
#define PIRQ_EMMC
#define PIRQ_SATA
#define PIRQ_SDIO
#define PIRQ_MISC0
#define PIRQ_SCI
#define PIRQ_MISC
#define PIRQ_SD
#define PIRQ_NC
#define PIRQ_UART0
#define PIRQ_I2C3
#define PIRQ_I2C2
#define PIRQ_UART1
#define PIRQ_GPIO
#define PIRQ_MISC2
#define PIRQ_UART3
#define PIRQ_MISC1
#define PIRQ_UART2

Referenced by init_tables().

◆ fch_apic_routing

uint8_t fch_apic_routing[0x80]
static

Definition at line 31 of file mainboard.c.

Referenced by init_tables(), and pirq_setup().

◆ fch_pic_routing

uint8_t fch_pic_routing[0x80]
static

Definition at line 30 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:102
static void mainboard_enable(struct device *dev)
Definition: mainboard.c:120

Definition at line 120 of file mainboard.c.