coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
boardid.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <baseboard/variants.h>
4
#include <
boardid.h
>
5
#include <
stddef.h
>
6
#include <
ec/acpi/ec.h
>
7
8
#define BOARD_ID_GLK_RVP1_DDR4 0x5
/* RVP1 - DDR4 */
9
#define BOARD_ID_GLK_RVP2_LP4SD 0x7
/* RVP2 - LP4 Solder Down */
10
#define BOARD_ID_GLK_RVP2_LP4 0x8
/* RVP2 - LP4 Socket */
11
#define EC_FAB_ID_CMD 0x0D
/* Get the board fab ID in the lower 3 bits */
12
13
uint32_t
board_id
(
void
)
14
{
15
MAYBE_STATIC_NONZERO
int
id
= -1;
16
if
(
id
< 0) {
17
if
(
CONFIG
(EC_GOOGLE_CHROMEEC))
18
id
=
variant_board_id
();
19
else
{
20
if
(
send_ec_command
(
EC_FAB_ID_CMD
) == 0)
21
id
= (
recv_ec_data
() & 0x07);
22
}
23
}
24
return
id;
25
}
boardid.h
CONFIG
@ CONFIG
Definition:
dsi_common.h:201
send_ec_command
int send_ec_command(u8 command)
Definition:
ec.c:13
recv_ec_data
u8 recv_ec_data(void)
Definition:
ec.c:65
ec.h
board_id
uint32_t board_id(void)
board_id() - Get the board version
Definition:
boardid.c:6
EC_FAB_ID_CMD
#define EC_FAB_ID_CMD
Definition:
boardid.c:11
variant_board_id
int variant_board_id(void)
variant_board_id() - Get the board id for the current board variant
Definition:
boardid.c:7
stddef.h
MAYBE_STATIC_NONZERO
#define MAYBE_STATIC_NONZERO
Definition:
stddef.h:38
uint32_t
unsigned int uint32_t
Definition:
stdint.h:14
src
mainboard
intel
glkrvp
boardid.c
Generated by
1.9.1