![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <types.h>
Go to the source code of this file.
Data Structures | |
struct | ec_response_get_ec_info |
struct | ec_pm_event_state |
Macros | |
#define | EC_INFO_MAX_SIZE 9 |
Functions | |
int | wilco_ec_radio_control (enum ec_radio radio, uint8_t state) |
wilco_ec_radio_control() - Control wireless radios. More... | |
int | wilco_ec_get_info (enum get_ec_info_cmd cmd, char *info) |
wilco_ec_get_info More... | |
void | wilco_ec_print_all_info (void) |
wilco_ec_print_all_info More... | |
void | wilco_ec_power_off (enum ec_power_off_reason reason) |
wilco_ec_power_off More... | |
void | wilco_ec_slp_en (void) |
wilco_ec_slp_en More... | |
int | wilco_ec_get_pm (struct ec_pm_event_state *pm, bool clear) |
wilco_ec_get_pm More... | |
int | wilco_ec_get_lid_state (void) |
wilco_ec_get_lid_state More... | |
int | wilco_ec_get_board_id (uint8_t *id) |
wilco_ec_get_board_id More... | |
int | wilco_ec_change_wake (uint8_t source, enum ec_wake_change change) |
wilco_ec_change_wake_source More... | |
int | wilco_ec_signed_fw (void) |
wilco_ec_signed_fw More... | |
void | wilco_ec_save_post_code (uint8_t post_code) |
wilco_ec_save_post_code More... | |
int | wilco_ec_set_cpuid (uint32_t cpuid, uint8_t cpu_cores, uint8_t gpu_cores) |
wilco_ec_set_cpuid More... | |
#define EC_INFO_MAX_SIZE 9 |
Definition at line 112 of file commands.h.
anonymous enum |
Definition at line 8 of file commands.h.
enum bios_progress_code |
Enumerator | |
---|---|
BIOS_PROGRESS_BEFORE_MEMORY | |
BIOS_PROGRESS_MEMORY_INIT | |
BIOS_PROGRESS_VIDEO_INIT | |
BIOS_PROGRESS_LOGO_DISPLAYED | |
BIOS_PROGRESS_POST_COMPLETE |
Definition at line 57 of file commands.h.
enum ec_acpi_wake_events |
Enumerator | |
---|---|
EC_ACPI_WAKE_PWRB | |
EC_ACPI_WAKE_LID | |
EC_ACPI_WAKE_RTC |
Definition at line 302 of file commands.h.
enum ec_audio_mute |
Enumerator | |
---|---|
AUDIO_MUTE | |
AUDIO_UNMUTE_125MS |
Definition at line 65 of file commands.h.
enum ec_camera |
Enumerator | |
---|---|
CAMERA_ON | |
CAMERA_OFF |
Definition at line 82 of file commands.h.
enum ec_err_code |
Enumerator | |
---|---|
DLED_MEMORY | |
DLED_PANEL | |
DLED_ROM |
Definition at line 87 of file commands.h.
enum ec_pm1_event |
Enumerator | |
---|---|
EC_EV1_PWRB_PRESSED | |
EC_EV1_HOTKEY_PRESSED | |
EC_EV1_STATE_CHANGED |
Definition at line 236 of file commands.h.
enum ec_pm1_state |
Enumerator | |
---|---|
EC_PM1_AC_AVAIL | |
EC_PM1_BAT_AVAIL | |
EC_PM1_LO_BAT1 | |
EC_PM1_LO_BAT2 | |
EC_PM1_LID_OPEN | |
EC_PM1_LCD_POWER | |
EC_PM1_OVER_TEMP | |
EC_PM1_DOCKED |
Definition at line 192 of file commands.h.
enum ec_pm2_event |
Enumerator | |
---|---|
EC_EV2_ACPI_MONSWITCH |
Definition at line 242 of file commands.h.
enum ec_pm2_state |
Enumerator | |
---|---|
EC_PM2_SYS_MB_PCIE | |
EC_PM2_SYS_MB_SATA | |
EC_PM2_PWRB_PRESSED | |
EC_PM2_TURBO_MODE |
Definition at line 203 of file commands.h.
enum ec_pm3_state |
Enumerator | |
---|---|
EC_PM3_BAT1_PRES | |
EC_PM3_BAT2_PRES | |
EC_PM3_LOWER_PSTATE | |
EC_PM3_CPU_THROTTLE |
Definition at line 210 of file commands.h.
enum ec_pm4_state |
Enumerator | |
---|---|
EC_PM4_BAT1_CHG | |
EC_PM4_BAT2_CHG | |
EC_PM4_BAT1_PWR | |
EC_PM4_BAT2_PWR | |
EC_PM4_PANEL_STATE |
Definition at line 217 of file commands.h.
enum ec_pm5_state |
Enumerator | |
---|---|
EC_PM5_INT_HD_SATA |
Definition at line 225 of file commands.h.
enum ec_pm6_state |
Enumerator | |
---|---|
EC_PM6_WLAN_SWITCH | |
EC_PM6_SYS_MB_MODEM | |
EC_PM6_ETH_STATE | |
EC_PM6_AC_UPDATE |
Definition at line 229 of file commands.h.
enum ec_power_off_reason |
Definition at line 147 of file commands.h.
enum ec_radio |
Enumerator | |
---|---|
RADIO_WIFI | |
RADIO_WWAN | |
RADIO_BT |
Definition at line 70 of file commands.h.
enum ec_radio_action |
Enumerator | |
---|---|
RADIO_READ | |
RADIO_WRITE | |
RADIO_TOGGLE |
Definition at line 76 of file commands.h.
enum ec_ram_addr |
Enumerator | |
---|---|
EC_RAM_SIGNED_FW | |
EC_RAM_S0IX_SUPPORT |
Definition at line 45 of file commands.h.
enum ec_wake_change |
Enumerator | |
---|---|
WAKE_OFF | |
WAKE_ON |
Definition at line 287 of file commands.h.
enum get_ec_info_cmd |
Enumerator | |
---|---|
GET_EC_LABEL | |
GET_EC_SVN_REV | |
GET_EC_MODEL_NO | |
GET_EC_BUILD_DATE |
Definition at line 105 of file commands.h.
enum set_acpi_mode_cmd |
Enumerator | |
---|---|
ACPI_OFF | |
ACPI_ON |
Definition at line 52 of file commands.h.
int wilco_ec_change_wake | ( | uint8_t | source, |
enum ec_wake_change | change | ||
) |
wilco_ec_change_wake_source
Change acpi wake up source. @source: Wake up source that can be enabled/disabled. @ec_wake_change: On/off switch.
Returns -1 if the EC command failed
Definition at line 156 of file commands.c.
References ARRAY_SIZE, KB_ACPI_WAKEUP_CHANGE, NULL, wilco_ec_mailbox(), and WILCO_EC_MSG_DEFAULT.
Referenced by wilco_ec_smi_sleep().
int wilco_ec_get_board_id | ( | uint8_t * | id | ) |
wilco_ec_get_board_id
Retrieve the board ID value from the EC. @id: Pointer to variable to store the ID read from the EC.
Returns number of bytes transferred from the EC Returns -1 if the EC command failed
Definition at line 125 of file commands.c.
References KB_BOARD_ID, NULL, wilco_ec_mailbox(), and WILCO_EC_MSG_RAW.
Referenced by board_id().
int wilco_ec_get_info | ( | enum get_ec_info_cmd | cmd, |
char * | info | ||
) |
wilco_ec_get_info
Read a specific information string from the EC and return it in the caller-provided buffer of at least EC_INFO_MAX_SIZE bytes.
@cmd: Information to retrieve @info: Character array of EC_INFO_MAX_SIZE bytes
Returns 0 if successful and resulting string is in 'info' Returns -1 if the EC command fails
Definition at line 11 of file commands.c.
References ec_response_get_ec_info::data, info, KB_EC_INFO, strncpy(), type, and wilco_ec_sendrecv().
Referenced by wilco_ec_print_all_info().
int wilco_ec_get_lid_state | ( | void | ) |
wilco_ec_get_lid_state
Retrieve the lid state without clearing it in the EC.
Returns 1 if the lid is open, 0 if it is closed Returns -1 if the EC command failed
Definition at line 115 of file commands.c.
References EC_PM1_LID_OPEN, ec_pm_event_state::state, and wilco_ec_get_power_status().
int wilco_ec_get_pm | ( | struct ec_pm_event_state * | pm, |
bool | clear | ||
) |
wilco_ec_get_pm
Retrieve power and event information from the EC.
@pm: Power event state structure to fill out @clear: Clear EC event state after reading
Returns 0 if EC command was successful Returns -1 if EC command failed
Definition at line 107 of file commands.c.
References wilco_ec_get_power_smi(), and wilco_ec_get_power_status().
Referenced by wilco_ec_smi_espi().
void wilco_ec_power_off | ( | enum ec_power_off_reason | reason | ) |
wilco_ec_power_off
Tell the EC why the host is about to power off.
Definition at line 139 of file commands.c.
References BIOS_ERR, KB_POWER_OFF, NULL, printk, wilco_ec_mailbox(), and WILCO_EC_MSG_NO_RESPONSE.
Referenced by wilco_ec_smi_sleep().
wilco_ec_print_all_info
Retrieve and print all the information strings from the EC:
GET_EC_LABEL GET_EC_SVN_REV GET_EC_MODEL_NO GET_EC_BUILD_DATE
Definition at line 25 of file commands.c.
References BIOS_INFO, EC_INFO_MAX_SIZE, GET_EC_BUILD_DATE, GET_EC_LABEL, GET_EC_MODEL_NO, GET_EC_SVN_REV, info, printk, and wilco_ec_get_info().
Referenced by wilco_ec_init().
wilco_ec_radio_control() - Control wireless radios.
@ec_radio: Wireless radio type. @state: Turn radio on or off. Return: 0 if successful or negative error code on failure.
Definition at line 147 of file commands.c.
References ARRAY_SIZE, KB_RADIO_CONTROL, NULL, RADIO_WRITE, wilco_ec_mailbox(), and WILCO_EC_MSG_DEFAULT.
Referenced by wilco_ec_init().
wilco_ec_save_post_code
Save this post code as the most recent progress step. If the boot fails and calls die_notify() this post code will be used to send an error code to the EC indicating the failure.
@post_code: Post code to save
Definition at line 189 of file commands.c.
References post_code, and wilco_ec_saved_post_code.
Referenced by mainboard_post().
wilco_ec_set_cpuid
Set CPU ID to EC.
@cpuid: read CPU ID from cpu_eax(1) @cpu_cores: cores of CPU @gpu_cores: cores of GPU
Returns 0 if EC command was successful Returns -1 if EC command failed
Definition at line 225 of file commands.c.
References ARRAY_SIZE, cpu_id, cpuid, KB_CPU_ID, NULL, wilco_ec_mailbox(), and WILCO_EC_MSG_DEFAULT.
Referenced by wilco_set_cpu_id().
int wilco_ec_signed_fw | ( | void | ) |
wilco_ec_signed_fw
Indicate if the EC uses signed firmware.
Returns 1 if EC uses signed firmware, otherwise returns 0
Definition at line 165 of file commands.c.
Referenced by get_sku_index(), sku_id(), and smbios_system_sku().
wilco_ec_slp_en
Tell the EC that the host is entering a sleep state.
Definition at line 131 of file commands.c.
References BIOS_ERR, KB_SLP_EN, NULL, printk, wilco_ec_mailbox(), and WILCO_EC_MSG_NO_RESPONSE.
Referenced by wilco_ec_smi_sleep().