coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
Go to the source code of this file.
Data Structures | |
struct | pad_config |
struct | reset_mapping |
struct | pad_group |
struct | vw_entries |
struct | pad_community |
struct | gpi_status |
struct | pmc_to_gpio_route |
struct | gpio_lock_config |
Macros | |
#define | MISCCFG_GPVNNREQEN (1 << 7) |
#define | MISCCFG_GPPGCBDPCGEN (1 << 6) |
#define | MISCCFG_GPSIDEDPCGEN (1 << 5) |
#define | MISCCFG_GPRCOMPCDLCGEN (1 << 4) |
#define | MISCCFG_GPRTCDLCGEN (1 << 3) |
#define | MISCCFG_GSXSLCGEN (1 << 2) |
#define | MISCCFG_GPDPCGEN (1 << 1) |
#define | MISCCFG_GPDLCGEN (1 << 0) |
#define | INTEL_GPP_BASE(first_of_community, start_of_group, end_of_group, group_pad_base) |
#define | PAD_BASE_NONE -1 |
#define | INTEL_GPP(first_of_community, start_of_group, end_of_group) |
Typedefs | |
typedef uint32_t | gpio_t |
Enumerations | |
enum | gpio_lock_action { GPIO_UNLOCK = 0x0 , GPIO_LOCK_CONFIG = 0x1 , GPIO_LOCK_TX = 0x2 , GPIO_LOCK_FULL = GPIO_LOCK_CONFIG | GPIO_LOCK_TX } |
#define INTEL_GPP | ( | first_of_community, | |
start_of_group, | |||
end_of_group | |||
) |
#define INTEL_GPP_BASE | ( | first_of_community, | |
start_of_group, | |||
end_of_group, | |||
group_pad_base | |||
) |
enum gpio_lock_action |
Definition at line 24 of file gpio_dev.c.
References assert, block_gpio_ops, DEVICE_PATH_GPIO, device::ops, device::path, and device_path::type.
Referenced by chip_enable_dev(), enable_dev(), soc_enable(), and soc_enable_dev().
void gpi_clear_get_smi_status | ( | struct gpi_status * | sts | ) |
Definition at line 700 of file gpio.c.
References CONFIG, DEBUG_SMI, GPI_SMI_EN_OFFSET, GPI_SMI_STS_OFFSET, pad_community::gpi_status_offset, gpi_status::grp, pad_community::num_gpi_regs, pad_community::num_groups, pcr_read32(), pcr_write32(), pad_community::port, print_gpi_status(), and soc_gpio_get_community().
Referenced by smihandler_southbridge_gpi().
Definition at line 820 of file gpio.c.
References GPI_IE_OFFSET, GPI_IS_OFFSET, pad_community::num_gpi_regs, pad_community::num_groups, pcr_read32(), pcr_write32(), pad_community::port, and soc_gpio_get_community().
Referenced by bootblock_pch_init(), and soc_init().
int gpi_status_get | ( | const struct gpi_status * | sts, |
gpio_t | gpi | ||
) |
Definition at line 733 of file gpio.c.
References pad_community::gpi_status_offset, gpio_bitmask_within_group(), gpio_get_community(), gpio_group_index(), gpi_status::grp, and relative_pad_in_comm().
Referenced by mainboard_smi_gpi_handler().
void gpio_configure_pads | ( | const struct pad_config * | cfg, |
size_t | num_pads | ||
) |
Definition at line 353 of file gpio.c.
References gpio_configure_pad().
void gpio_configure_pads_with_override | ( | const struct pad_config * | base_cfg, |
size_t | base_num_pads, | ||
const struct pad_config * | override_cfg, | ||
size_t | override_num_pads | ||
) |
Definition at line 383 of file gpio.c.
References c, gpio_configure_pad(), and gpio_get_config().
Definition at line 398 of file gpio.c.
References gpio_get_community(), pad_config_offset(), pcr_reg_address(), and pad_community::port.
Referenced by acpigen_soc_get_gpio_val(), acpigen_soc_set_gpio_val(), fw_config_handle(), and soc_fill_gnvs().
Definition at line 861 of file gpio.c.
References gpio_get_community(), gpio_within_group(), and relative_pad_in_comm().
Definition at line 977 of file gpio.c.
References pad_community::cpu_port, and gpio_get_community().
Referenced by calc_bias_ctrl_reg_value().
Definition at line 411 of file gpio.c.
References gpio_get_community(), and pad_community::port.
Referenced by soc_fill_gnvs().
Definition at line 953 of file gpio.c.
References vw_entries::first_pad, gpio_get_community(), vw_entries::last_pad, pad_community::num_vw_entries, offset, pad_community::vw_base, and pad_community::vw_entries.
Referenced by calc_bias_ctrl_reg_value().
int gpio_lock_pad | ( | const gpio_t | pad, |
enum gpio_lock_action | lock_action | ||
) |
Definition at line 618 of file gpio.c.
References CONFIG, ENV_ROMSTAGE_OR_BEFORE, ENV_SMM, gpio_lock_pads(), gpio_non_smm_lock_pad(), gpio_lock_config::lock_action, gpio_lock_config::pad, and vboot_recovery_mode_enabled().
Referenced by gpio_configure_pad(), and mainboard_config_cbi_wp().
int gpio_lock_pads | ( | const struct gpio_lock_config * | pad_list, |
const size_t | count | ||
) |
Definition at line 504 of file gpio.c.
References BIOS_ERR, CONFIG, count, ENV_SMM, gpio_bitmask_within_group(), gpio_get_community(), gpio_group_index_scaled(), gpio_pad_config_lock_using_sbi(), NULL, offset, p2sb_hide(), p2sb_unhide(), gpio_lock_config::pad, pad_community::pad_cfg_lock_offset, pad_community::port, printk, relative_pad_in_comm(), and x.
Referenced by gpio_lock_pad(), and soc_lock_gpios().
Definition at line 844 of file gpio.c.
References die(), GPIO_MISCCFG, MISCCFG_GPIO_PM_CONFIG_BITS, pcr_rmw8(), pad_community::port, and soc_gpio_get_community().
Referenced by soc_fill_gpio_pm_configuration(), and soc_gpio_pm_configuration().
Definition at line 760 of file gpio.c.
References BIOS_DEBUG, CONFIG, GPIO_MISCCFG, gpio_route_pmc_gpio_gpe(), MISCCFG_GPE0_DW0_MASK, MISCCFG_GPE0_DW0_SHIFT, MISCCFG_GPE0_DW1_MASK, MISCCFG_GPE0_DW1_SHIFT, MISCCFG_GPE0_DW2_MASK, MISCCFG_GPE0_DW2_SHIFT, pcr_rmw32(), pad_community::port, printk, and soc_gpio_get_community().
Referenced by pmc_gpe_init().
Definition at line 232 of file gpio.c.
References ARRAY_SIZE, assert, BIT, and gpio_ioapic_irqs_used.
Referenced by find_free_pin().
const struct pad_community* soc_gpio_get_community | ( | size_t * | num_communities | ) |
Definition at line 241 of file gpio.c.
References adl_communities, apl_gpio_communities, ARRAY_SIZE, cnl_communities, dnv_gpio_communities, ehl_communities, glk_gpio_communities, icl_communities, jsl_communities, lewisburg_gpio_communities, skl_gpio_communities, and tgl_communities.
Referenced by allocate_snapshot_space(), gpi_clear_get_smi_status(), gpi_clear_int_cfg(), gpio_get_community(), gpio_pm_configure(), gpio_route_gpe(), gpio_snapshot(), gpio_verify_snapshot(), and print_gpi_status().
const struct gpio_lock_config* soc_gpio_lock_config | ( | size_t * | num | ) |
Definition at line 314 of file smihandler.c.
References NULL.
Referenced by soc_lock_gpios().
uint32_t soc_gpio_pad_config_fixup | ( | const struct pad_config * | cfg, |
int | dw_reg, | ||
uint32_t | reg_val | ||
) |
Definition at line 814 of file gpio.c.
References CONFIG, GPP_F11, GPP_F4, and pad_config::pad.
Referenced by gpio_configure_pad().
const struct pmc_to_gpio_route* soc_pmc_gpio_routes | ( | size_t * | num | ) |
Definition at line 247 of file gpio.c.
References ARRAY_SIZE, GPD, GPIO_GPE_AUDIO_31_0, GPIO_GPE_N_31_0, GPIO_GPE_N_63_32, GPIO_GPE_N_95_64, GPIO_GPE_NW_31_0, GPIO_GPE_NW_63_32, GPIO_GPE_NW_95_64, GPIO_GPE_SCC_31_0, GPIO_GPE_SCC_63_32, GPIO_GPE_SW_31_0, GPIO_GPE_SW_63_32, GPIO_GPE_W_31_0, GPP_A, GPP_B, GPP_C, GPP_D, GPP_E, GPP_F, GPP_G, GPP_GPD, GPP_H, GPP_I, GPP_J, GPP_K, GPP_R, GPP_S, GPP_T, GPP_U, GPP_V, PMC_GPD, PMC_GPE_N_31_0, PMC_GPE_N_63_32, PMC_GPE_NW_31_0, PMC_GPE_NW_63_32, PMC_GPE_NW_95_64, PMC_GPE_SW_31_0, PMC_GPE_SW_63_32, PMC_GPE_W_31_0, PMC_GPP_A, PMC_GPP_B, PMC_GPP_C, PMC_GPP_D, PMC_GPP_E, PMC_GPP_F, PMC_GPP_G, PMC_GPP_H, PMC_GPP_R, PMC_GPP_S, PMC_GPP_T, PMC_GPP_U, PMC_GPP_V, PMC_VGPIO, and VGPIO.
Referenced by gpio_route_pmc_gpio_gpe().