diff options
author | Subrata Banik <subratabanik@google.com> | 2024-02-29 23:13:19 +0530 |
---|---|---|
committer | Subrata Banik <subratabanik@google.com> | 2024-03-05 10:17:00 +0000 |
commit | dc073ca75c105b6c471954aff0c913797467ff26 (patch) | |
tree | 24e4e24c73b29bd761d3616550a57e7dbb243cff /src/drivers/vpd/vpd.h | |
parent | 3266dcbff0df9d36c77d0a3ba9b96f104bd80ef5 (diff) |
drivers/vpd: Add vpd_get_feature_level() API
This patch introduces the vpd_get_feature_level() API to specifically
extract the "feature_level" field from the "feature_device_info" VPD
key.
This is used to distinguish between Chromebook-Plus and regular
Chromebook devices.
The previous vpd_get_feature_device_info() API is removed as
vpd_get_feature_level() is enough to find VPD and extract the data.
Note: The new API decodes the base64-encoded "feature_device_info" VPD
data.
BUG=b:324107408
TEST=Able to build and boot google/rex0.
Change-Id: I76fc220ed792abdfefb0b1a37873b5b828bfdda8
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80805
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Diffstat (limited to 'src/drivers/vpd/vpd.h')
-rw-r--r-- | src/drivers/vpd/vpd.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/drivers/vpd/vpd.h b/src/drivers/vpd/vpd.h index a23005fca1..a6631aab55 100644 --- a/src/drivers/vpd/vpd.h +++ b/src/drivers/vpd/vpd.h @@ -60,8 +60,9 @@ bool vpd_get_bool(const char *key, enum vpd_region region, bool vpd_get_int(const char *key, enum vpd_region region, int *val); /* - * Return the value after reading the VPD key named "feature_device_info". + * Extracts the "feature_level" from the "feature_device_info" VPD key. + * This key holds a base64-encoded protobuf where "feature_level" is the first entry. */ -const char *vpd_get_feature_device_info(void); +uint8_t vpd_get_feature_level(void); #endif /* __VPD_H__ */ |