coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
ec_boardid.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <
boardid.h
>
4
#include <
ec/google/chromeec/ec.h
>
5
6
uint32_t
board_id
(
void
)
7
{
8
MAYBE_STATIC_NONZERO
uint32_t
id
=
BOARD_ID_INIT
;
9
10
if
(
id
==
BOARD_ID_INIT
) {
11
if
(
google_chromeec_get_board_version
(&
id
))
12
id
=
BOARD_ID_UNKNOWN
;
13
}
14
15
return
id;
16
}
boardid.h
BOARD_ID_INIT
#define BOARD_ID_INIT
Definition:
boardid.h:11
BOARD_ID_UNKNOWN
#define BOARD_ID_UNKNOWN
Definition:
boardid.h:10
google_chromeec_get_board_version
int google_chromeec_get_board_version(uint32_t *version)
google_chromeec_get_board_version() - Get the board version
Definition:
ec.c:915
ec.h
board_id
uint32_t board_id(void)
board_id() - Get the board version
Definition:
ec_boardid.c:6
MAYBE_STATIC_NONZERO
#define MAYBE_STATIC_NONZERO
Definition:
stddef.h:38
uint32_t
unsigned int uint32_t
Definition:
stdint.h:14
src
ec
google
chromeec
ec_boardid.c
Generated by
1.9.1