coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mmio_util.c File Reference
#include <types.h>
#include <arch/io.h>
#include <amdblocks/acpimmio.h>
Include dependency graph for mmio_util.c:

Go to the source code of this file.

Macros

#define DECLARE_ACPIMMIO(ptr, bank)   uint8_t *ptr
 

Functions

 DECLARE_ACPIMMIO (acpimmio_aoac, AOAC)
 
 DECLARE_ACPIMMIO (acpimmio_iomux, IOMUX)
 
 DECLARE_ACPIMMIO (acpimmio_gpio0, GPIO0)
 
 DECLARE_ACPIMMIO (acpimmio_misc, MISC)
 
void enable_acpimmio_decode_pm24 (void)
 
void enable_acpimmio_decode_pm04 (void)
 
void fch_enable_cf9_io (void)
 
void fch_enable_legacy_io (void)
 
void fch_disable_legacy_dma_io (void)
 
void fch_io_enable_legacy_io (void)
 
void fch_enable_ioapic_decode (void)
 
void fch_configure_hpet (void)
 
void fch_disable_kb_rst (void)
 
uint8_t pm_io_read8 (uint8_t reg)
 
uint16_t pm_io_read16 (uint8_t reg)
 
uint32_t pm_io_read32 (uint8_t reg)
 
void pm_io_write8 (uint8_t reg, uint8_t value)
 
void pm_io_write16 (uint8_t reg, uint16_t value)
 
void pm_io_write32 (uint8_t reg, uint32_t value)
 

Macro Definition Documentation

◆ DECLARE_ACPIMMIO

#define DECLARE_ACPIMMIO (   ptr,
  bank 
)    uint8_t *ptr

Definition at line 15 of file mmio_util.c.

Function Documentation

◆ DECLARE_ACPIMMIO() [1/4]

DECLARE_ACPIMMIO ( acpimmio_aoac  ,
AOAC   
)

◆ DECLARE_ACPIMMIO() [2/4]

DECLARE_ACPIMMIO ( acpimmio_gpio0  ,
GPIO0   
)

◆ DECLARE_ACPIMMIO() [3/4]

DECLARE_ACPIMMIO ( acpimmio_iomux  ,
IOMUX   
)

◆ DECLARE_ACPIMMIO() [4/4]

DECLARE_ACPIMMIO ( acpimmio_misc  ,
MISC   
)

◆ enable_acpimmio_decode_pm04()

void enable_acpimmio_decode_pm04 ( void  )

Definition at line 54 of file mmio_util.c.

References ACPIMMIO_DECODE_REGISTER_04, PM_04_ACPIMMIO_DECODE_EN, pm_io_read32(), and pm_io_write32().

Referenced by bootblock_early_southbridge_init(), bootblock_fch_early_init(), and fch_pre_init().

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

◆ enable_acpimmio_decode_pm24()

void enable_acpimmio_decode_pm24 ( void  )

Definition at line 45 of file mmio_util.c.

References ACPIMMIO_DECODE_REGISTER_24, PM_24_ACPIMMIO_DECODE_EN, pm_io_read32(), and pm_io_write32().

Referenced by bootblock_early_southbridge_init().

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

◆ fch_configure_hpet()

void fch_configure_hpet ( void  )

Definition at line 89 of file mmio_util.c.

References HPET_EN, HPET_MSI_EN, HPET_WIDTH_SEL, PM_DECODE_EN, pm_read32(), and pm_write32().

Referenced by lpc_init().

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

◆ fch_disable_kb_rst()

void fch_disable_kb_rst ( void  )

Definition at line 97 of file mmio_util.c.

References KBRSTEN, pm_read8(), PM_RST_CTRL1, and pm_write8().

Referenced by bootblock_fch_early_init(), and fch_pre_init().

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

◆ fch_disable_legacy_dma_io()

void fch_disable_legacy_dma_io ( void  )

Definition at line 73 of file mmio_util.c.

References LEGACY_DMA_IO_80_EN, LEGACY_DMA_IO_EN, PM_DECODE_EN, pm_read32(), and pm_write32().

Referenced by car_stage_entry(), and fch_pre_init().

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

◆ fch_enable_cf9_io()

void fch_enable_cf9_io ( void  )

Definition at line 63 of file mmio_util.c.

References CF9_IO_EN, PM_DECODE_EN, pm_read32(), and pm_write32().

Referenced by bootblock_fch_early_init(), and fch_pre_init().

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

◆ fch_enable_ioapic_decode()

void fch_enable_ioapic_decode ( void  )

Definition at line 84 of file mmio_util.c.

References FCH_IOAPIC_EN, PM_DECODE_EN, pm_read32(), and pm_write32().

Referenced by fch_ioapic_init().

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

◆ fch_enable_legacy_io()

void fch_enable_legacy_io ( void  )

Definition at line 68 of file mmio_util.c.

References LEGACY_IO_EN, PM_DECODE_EN, pm_read32(), and pm_write32().

Referenced by bootblock_fch_early_init(), and fch_pre_init().

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

◆ fch_io_enable_legacy_io()

void fch_io_enable_legacy_io ( void  )

Definition at line 79 of file mmio_util.c.

References LEGACY_IO_EN, PM_DECODE_EN, pm_io_read32(), and pm_io_write32().

Referenced by Main().

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

◆ pm_io_read16()

uint16_t pm_io_read16 ( uint8_t  reg)

Definition at line 109 of file mmio_util.c.

References pm_io_read8().

Referenced by pm_io_read32().

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

◆ pm_io_read32()

uint32_t pm_io_read32 ( uint8_t  reg)

Definition at line 114 of file mmio_util.c.

References pm_io_read16().

Referenced by enable_acpimmio_decode_pm04(), enable_acpimmio_decode_pm24(), fch_io_enable_legacy_io(), and verstage_mainboard_espi_init().

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

◆ pm_io_read8()

uint8_t pm_io_read8 ( uint8_t  reg)

Definition at line 103 of file mmio_util.c.

References inb(), outb(), PM_DATA, and PM_INDEX.

Referenced by lpc_enable_controller(), pm_io_read16(), and sb_enable_lpc().

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

◆ pm_io_write16()

void pm_io_write16 ( uint8_t  reg,
uint16_t  value 
)

Definition at line 125 of file mmio_util.c.

References pm_io_write8(), and value.

Referenced by pm_io_write32().

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

◆ pm_io_write32()

void pm_io_write32 ( uint8_t  reg,
uint32_t  value 
)

Definition at line 132 of file mmio_util.c.

References pm_io_write16(), and value.

Referenced by enable_acpimmio_decode_pm04(), enable_acpimmio_decode_pm24(), fch_io_enable_legacy_io(), and verstage_mainboard_espi_init().

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

◆ pm_io_write8()

void pm_io_write8 ( uint8_t  reg,
uint8_t  value 
)

Definition at line 119 of file mmio_util.c.

References outb(), PM_DATA, PM_INDEX, and value.

Referenced by bootblock_mainboard_early_init(), lpc_enable_controller(), pci_ehci_dbg_dev(), pm_io_write16(), pm_set_power_failure_state(), and sb_enable_lpc().

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