coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
early_setup.c File Reference
#include <assert.h>
#include <stdint.h>
#include <amdblocks/acpimmio.h>
#include <device/mmio.h>
#include <device/pci_ops.h>
#include "hudson.h"
#include "pci_devs.h"
#include <Fch/Fch.h>
Include dependency graph for early_setup.c:

Go to the source code of this file.

Macros

#define _HUDSON_EARLY_SETUP_C_
 

Functions

void hudson_pci_port80 (void)
 
void hudson_lpc_port80 (void)
 
void hudson_lpc_decode (void)
 
static void enable_wideio (uint8_t port, uint16_t size)
 
static void lpc_wideio_window (uint16_t base, uint16_t size)
 
void lpc_wideio_512_window (uint16_t base)
 
void lpc_wideio_16_window (uint16_t base)
 
void hudson_clk_output_48Mhz (void)
 
static uintptr_t hudson_spibase (void)
 
void hudson_set_spi100 (u16 norm, u16 fast, u16 alt, u16 tpm)
 
void hudson_disable_4dw_burst (void)
 
void hudson_set_readspeed (u16 norm, u16 fast)
 
void hudson_read_mode (u32 mode)
 
void hudson_tpm_decode_spi (void)
 

Macro Definition Documentation

◆ _HUDSON_EARLY_SETUP_C_

#define _HUDSON_EARLY_SETUP_C_

Definition at line 4 of file early_setup.c.

Function Documentation

◆ enable_wideio()

static void enable_wideio ( uint8_t  port,
uint16_t  size 
)
static

◆ hudson_clk_output_48Mhz()

void hudson_clk_output_48Mhz ( void  )

Definition at line 179 of file early_setup.c.

References misc_read32(), and misc_write32().

Referenced by bootblock_mainboard_early_init().

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

◆ hudson_disable_4dw_burst()

void hudson_disable_4dw_burst ( void  )

Definition at line 222 of file early_setup.c.

References base, hudson_spibase(), read16(), SPI100_HOST_PREF_CONFIG, SPI_RD4DW_EN_HOST, and write16().

Here is the call graph for this function:

◆ hudson_lpc_decode()

◆ hudson_lpc_port80()

void hudson_lpc_port80 ( void  )

Definition at line 61 of file early_setup.c.

References PCI_DEV, pci_read_config8(), and pci_write_config8().

Here is the call graph for this function:

◆ hudson_pci_port80()

void hudson_pci_port80 ( void  )

Definition at line 16 of file early_setup.c.

References PCI_DEV, pci_read_config8(), and pci_write_config8().

Here is the call graph for this function:

◆ hudson_read_mode()

void hudson_read_mode ( u32  mode)

Definition at line 241 of file early_setup.c.

References base, hudson_spibase(), read32(), SPI_CNTRL0, SPI_READ_MODE_MASK, and write32().

Here is the call graph for this function:

◆ hudson_set_readspeed()

void hudson_set_readspeed ( u16  norm,
u16  fast 
)

Definition at line 231 of file early_setup.c.

References base, hudson_spibase(), read16(), SPI_CNTRL1, SPI_CNTRL1_SPEED_MASK, SPI_FAST_SPEED_SH, SPI_NORM_SPEED_SH, and write16().

Here is the call graph for this function:

◆ hudson_set_spi100()

void hudson_set_spi100 ( u16  norm,
u16  fast,
u16  alt,
u16  tpm 
)

◆ hudson_spibase()

static uintptr_t hudson_spibase ( void  )
static

Definition at line 194 of file early_setup.c.

References base, PCI_DEV, pci_read_config32(), pci_write_config32(), SPI_BASE_ADDRESS, SPI_ROM_ENABLE, and SPIROM_BASE_ADDRESS_REGISTER.

Referenced by hudson_disable_4dw_burst(), hudson_read_mode(), hudson_set_readspeed(), and hudson_set_spi100().

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

◆ hudson_tpm_decode_spi()

void hudson_tpm_decode_spi ( void  )

Definition at line 249 of file early_setup.c.

References PCI_DEV, pci_read_config32(), pci_write_config32(), ROUTE_TPM_2_SPI, and SPIROM_BASE_ADDRESS_REGISTER.

Here is the call graph for this function:

◆ lpc_wideio_16_window()

void lpc_wideio_16_window ( uint16_t  base)

Definition at line 173 of file early_setup.c.

References assert, base, IS_ALIGNED, and lpc_wideio_window().

Here is the call graph for this function:

◆ lpc_wideio_512_window()

void lpc_wideio_512_window ( uint16_t  base)

Definition at line 167 of file early_setup.c.

References assert, base, IS_ALIGNED, and lpc_wideio_window().

Here is the call graph for this function:

◆ lpc_wideio_window()

static void lpc_wideio_window ( uint16_t  base,
uint16_t  size 
)
static

Definition at line 136 of file early_setup.c.

References assert, base, BUG, enable_wideio(), LPC_FUNC, LPC_WIDEIO2_GENERIC_PORT, LPC_WIDEIO_GENERIC_PORT, PCI_DEV, pci_read_config32(), pci_write_config32(), and PCU_DEV.

Referenced by lpc_wideio_16_window(), and lpc_wideio_512_window().

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