coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pmbase.c File Reference
#include <stdint.h>
#include <acpi/acpi.h>
#include <arch/io.h>
#include <bootmode.h>
#include <device/pci_ops.h>
#include <device/device.h>
#include <device/pci.h>
#include <assert.h>
#include "pmbase.h"
#include "pmutil.h"
Include dependency graph for pmbase.c:

Go to the source code of this file.

Macros

#define PMBASE   0x40
 
#define PMSIZE   0x80
 

Functions

u16 lpc_get_pmbase (void)
 
void write_pmbase32 (const u8 addr, const u32 val)
 
void write_pmbase16 (const u8 addr, const u16 val)
 
void write_pmbase8 (const u8 addr, const u8 val)
 
u32 read_pmbase32 (const u8 addr)
 
u16 read_pmbase16 (const u8 addr)
 
u8 read_pmbase8 (const u8 addr)
 
int acpi_get_sleep_type (void)
 
int platform_is_resuming (void)
 

Macro Definition Documentation

◆ PMBASE

#define PMBASE   0x40

Definition at line 16 of file pmbase.c.

◆ PMSIZE

#define PMSIZE   0x80

Definition at line 17 of file pmbase.c.

Function Documentation

◆ acpi_get_sleep_type()

int acpi_get_sleep_type ( void  )

Definition at line 78 of file pmbase.c.

References PM1_CNT, and read_pmbase32().

Referenced by platform_is_resuming().

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

◆ lpc_get_pmbase()

u16 lpc_get_pmbase ( void  )

Definition at line 19 of file pmbase.c.

References PCI_DEV, pci_read_config16(), pcidev_on_root(), PMBASE, and pmbase.

Referenced by acpi_fill_fadt(), get_pmbase(), read_pmbase16(), read_pmbase32(), read_pmbase8(), smi_enabled(), write_pmbase16(), write_pmbase32(), and write_pmbase8().

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

◆ platform_is_resuming()

int platform_is_resuming ( void  )

Definition at line 87 of file pmbase.c.

References acpi_get_sleep_type(), acpi_read16(), ACPI_S3, MMIO_ACPI_PM1_STS, PM1_STS, read_pmbase16(), and WAK_STS.

Referenced by handle_digest_result(), and verstage_main().

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

◆ read_pmbase16()

u16 read_pmbase16 ( const u8  addr)

Definition at line 64 of file pmbase.c.

References addr, ASSERT, inw(), lpc_get_pmbase(), and PMSIZE.

Referenced by alt_gpi_mask(), dump_pm1_status(), early_usb_init(), intel_pch_finalize_smm(), platform_is_resuming(), reset_alt_gp_smi_status(), reset_pm1_status(), southbridge_smi_gpi(), and watchdog_off().

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

◆ read_pmbase32()

◆ read_pmbase8()

u8 read_pmbase8 ( const u8  addr)

Definition at line 71 of file pmbase.c.

References addr, ASSERT, inb(), lpc_get_pmbase(), and PMSIZE.

Referenced by smi_set_eos(), southbridge_smi_set_eos(), and southbridge_smi_sleep().

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

◆ write_pmbase16()

void write_pmbase16 ( const u8  addr,
const u16  val 
)

Definition at line 43 of file pmbase.c.

References addr, ASSERT, lpc_get_pmbase(), outw(), PMSIZE, and val.

Referenced by alt_gpi_mask(), early_usb_init(), i82801gx_power_options(), i82801jx_early_init(), intel_pch_finalize_smm(), pch_generic_setup(), reset_alt_gp_smi_status(), reset_pm1_status(), smm_southbridge_enable(), southbridge_smi_gpi(), and watchdog_off().

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

◆ write_pmbase32()

void write_pmbase32 ( const u8  addr,
const u32  val 
)

◆ write_pmbase8()

void write_pmbase8 ( const u8  addr,
const u8  val 
)

Definition at line 50 of file pmbase.c.

References addr, ASSERT, lpc_get_pmbase(), outb(), PMSIZE, and val.

Referenced by smi_set_eos(), southbridge_smi_set_eos(), and southbridge_smi_sleep().

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