coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
chromeos.c File Reference
#include <baseboard/gpio.h>
#include <bootmode.h>
#include <boot/coreboot_tables.h>
#include <gpio.h>
#include <soc/gpio.h>
#include <variant/gpio.h>
#include <types.h>
#include <vendorcode/google/chromeos/chromeos.h>
#include <security/tpm/tss.h>
#include <device/device.h>
#include <intelblocks/pmclib.h>
#include <soc/pmc.h>
#include <soc/pci_devs.h>
Include dependency graph for chromeos.c:

Go to the source code of this file.

Enumerations

enum  rec_mode_state {
  REC_MODE_UNINITIALIZED , REC_MODE_NOT_REQUESTED , REC_MODE_REQUESTED , REC_MODE_UNINITIALIZED ,
  REC_MODE_NOT_REQUESTED , REC_MODE_REQUESTED , REC_MODE_UNINITIALIZED , REC_MODE_NOT_REQUESTED ,
  REC_MODE_REQUESTED
}
 

Functions

void fill_lb_gpios (struct lb_gpios *gpios)
 
int get_write_protect_state (void)
 Only used if CONFIG(CHROMEOS) is set. More...
 
static bool raw_get_recovery_mode_switch (void)
 
int get_recovery_mode_switch (void)
 HACK: Use Fn-Key as recovery mode switch. More...
 
int get_lid_switch (void)
 
void mainboard_prepare_cr50_reset (void)
 
int get_ec_is_trusted (void)
 

Enumeration Type Documentation

◆ rec_mode_state

Enumerator
REC_MODE_UNINITIALIZED 
REC_MODE_NOT_REQUESTED 
REC_MODE_REQUESTED 
REC_MODE_UNINITIALIZED 
REC_MODE_NOT_REQUESTED 
REC_MODE_REQUESTED 
REC_MODE_UNINITIALIZED 
REC_MODE_NOT_REQUESTED 
REC_MODE_REQUESTED 

Definition at line 17 of file chromeos.c.

Function Documentation

◆ fill_lb_gpios()

void fill_lb_gpios ( struct lb_gpios gpios)

Definition at line 23 of file chromeos.c.

References ACTIVE_HIGH, ARRAY_SIZE, get_lid_switch(), gfx_get_init_done(), and lb_add_gpios().

Here is the call graph for this function:

◆ get_ec_is_trusted()

int get_ec_is_trusted ( void  )

Definition at line 91 of file chromeos.c.

◆ get_lid_switch()

int get_lid_switch ( void  )

Definition at line 79 of file chromeos.c.

◆ get_recovery_mode_switch()

int get_recovery_mode_switch ( void  )

HACK: Use Fn-Key as recovery mode switch.

Wait for sense register ready and read Fn-Key state.

Definition at line 45 of file chromeos.c.

References ENV_SEPARATE_VERSTAGE, raw_get_recovery_mode_switch(), REC_MODE_NOT_REQUESTED, REC_MODE_REQUESTED, REC_MODE_UNINITIALIZED, tlcl_cr50_get_recovery_button(), and TPM_SUCCESS.

Here is the call graph for this function:

◆ get_write_protect_state()

int get_write_protect_state ( void  )

Only used if CONFIG(CHROMEOS) is set.

Always zero as the WP pin of the flash is tied high.

Definition at line 34 of file chromeos.c.

References gpio_get(), and GPIO_PCH_WP.

Here is the call graph for this function:

◆ mainboard_prepare_cr50_reset()

void mainboard_prepare_cr50_reset ( void  )

Definition at line 84 of file chromeos.c.

References ENV_RAMSTAGE, and pmc_soc_set_afterg3_en().

Here is the call graph for this function:

◆ raw_get_recovery_mode_switch()

static bool raw_get_recovery_mode_switch ( void  )
static

Definition at line 39 of file chromeos.c.

References gpio_get(), and GPIO_REC_MODE.

Referenced by get_recovery_mode_switch().

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