coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
sku.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <
boardid.h
>
4
#include <smbios.h>
5
#include <
ec/google/wilco/commands.h
>
6
#include <variant/variant.h>
7
8
static
const
uint32_t
get_sku_index
(
void
)
9
{
10
return
((!
has_360_sensor_board
()) | (
wilco_ec_signed_fw
() << 1));
11
}
12
13
uint32_t
sku_id
(
void
)
14
{
15
return
skus
[
get_sku_index
()].
id
;
16
}
17
18
const
char
*
smbios_system_sku
(
void
)
19
{
20
return
skus
[
get_sku_index
()].
name
;
21
}
boardid.h
wilco_ec_signed_fw
int wilco_ec_signed_fw(void)
wilco_ec_signed_fw
Definition:
commands.c:165
commands.h
smbios_system_sku
const char * smbios_system_sku(void)
Definition:
sku.c:19
sku_id
uint32_t sku_id(void)
Definition:
sku.c:14
get_sku_index
static const uint32_t get_sku_index(void)
Definition:
sku.c:8
skus
static const sku_info skus[]
Definition:
variant.h:10
has_360_sensor_board
int __weak has_360_sensor_board(void)
Definition:
gpio.c:426
uint32_t
unsigned int uint32_t
Definition:
stdint.h:14
sku_info::id
int id
Definition:
variants.h:23
sku_info::name
const char * name
Definition:
variants.h:24
src
mainboard
google
drallion
variants
drallion
sku.c
Generated by
1.9.1