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 <boardid.h>
4 #include "commands.h"
5 
7 {
9 
10  if (id == BOARD_ID_INIT) {
11  uint8_t ec_id;
12  if (wilco_ec_get_board_id(&ec_id) <= 0)
13  id = BOARD_ID_UNKNOWN;
14  else
15  id = ec_id;
16  }
17 
18  return id;
19 }
#define BOARD_ID_INIT
Definition: boardid.h:11
#define BOARD_ID_UNKNOWN
Definition: boardid.h:10
int wilco_ec_get_board_id(uint8_t *id)
wilco_ec_get_board_id
Definition: commands.c:125
uint32_t board_id(void)
board_id() - Get the board version
Definition: boardid.c:6
#define MAYBE_STATIC_NONZERO
Definition: stddef.h:38
unsigned int uint32_t
Definition: stdint.h:14
unsigned char uint8_t
Definition: stdint.h:8