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

Go to the source code of this file.

Macros

#define WP_STATUS_PAD_CFG0   0x4838
 
#define WP_STATUS_PAD_CFG1   0x483C
 
#define WP_GPIO   GP_E_22
 
#define ACTIVE_LOW   0
 
#define ACTIVE_HIGH   1
 

Functions

void fill_lb_gpios (struct lb_gpios *gpios)
 
int get_write_protect_state (void)
 Only used if CONFIG(CHROMEOS) is set. More...
 
 DECLARE_CROS_GPIOS (cros_gpios)
 
int get_ec_is_trusted (void)
 

Variables

static const struct cros_gpio cros_gpios []
 

Macro Definition Documentation

◆ ACTIVE_HIGH

#define ACTIVE_HIGH   1

Definition at line 18 of file chromeos.c.

◆ ACTIVE_LOW

#define ACTIVE_LOW   0

Definition at line 17 of file chromeos.c.

◆ WP_GPIO

#define WP_GPIO   GP_E_22

Definition at line 15 of file chromeos.c.

◆ WP_STATUS_PAD_CFG0

#define WP_STATUS_PAD_CFG0   0x4838

Definition at line 12 of file chromeos.c.

◆ WP_STATUS_PAD_CFG1

#define WP_STATUS_PAD_CFG1   0x483C

Definition at line 13 of file chromeos.c.

Function Documentation

◆ DECLARE_CROS_GPIOS()

DECLARE_CROS_GPIOS ( cros_gpios  )

◆ fill_lb_gpios()

void fill_lb_gpios ( struct lb_gpios gpios)

Definition at line 20 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 64 of file chromeos.c.

◆ 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 30 of file chromeos.c.

Variable Documentation

◆ cros_gpios

const struct cros_gpio cros_gpios[]
static
Initial value:
= {
CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME),
CROS_GPIO_WP_AH(0x10013, CROS_GPIO_DEVICE_NAME),
}
#define CROS_GPIO_DEVICE_NAME
Definition: gpio.h:14

Definition at line 30 of file chromeos.c.