diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2022-11-21 17:38:38 -0700 |
---|---|---|
committer | Jack Rosenthal <jrosenth@chromium.org> | 2023-03-05 00:28:33 +0000 |
commit | 1624a09e15a445ce3438df12d259a9cf0c1d751a (patch) | |
tree | ce21be723774feecb2ef3e88f0b9eb2fbe60821f /host/arch/arm/lib/crossystem_arch.c | |
parent | 0cebc9e8f01e72413d5e3577072749b8b41a078a (diff) | |
download | vboot-1624a09e15a445ce3438df12d259a9cf0c1d751a.tar.gz |
Reland "crossystem: Add board_id property"release-R108-15183.B
This reverts commit 87663c3bef0f6b198945cf3eb83632f461a5d6f8.
The parent CL to this commit should be sufficient to resolve the
failure that prevented "crossystem board_id" on ARM from working.
Original change's description:
> crossystem: Add board_id property
>
> futility is one of a few places in ChromeOS that uses "mosys platform
> version". The goal is to remove this command from mosys.
>
> This commit adds a new property to crossystem, "board_id", which
> reads the board revision from SMBIOS/FDT, and replaces the call in
> futility with the appropriate VbGetSystemPropertyInt.
>
> BUG=b:187790074
> BRANCH=none
> TEST="crossystem board_id" on hana and brya
>
> Change-Id: Id69c8e309c0e509a165aa6da2778573ac7de3455
> Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4029537
> Reviewed-by: Julius Werner <jwerner@chromium.org>
BUG=b:187790074,b:270917040
BRANCH=none
TEST="crossystem board_id" on hana and brya
Change-Id: I37b4c622e3c1d294b5be8e0d98ef14175902acc3
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4045047
Reviewed-by: Julius Werner <jwerner@chromium.org>
(cherry picked from commit 5bbd123cac5650dba0db6cc3c40c7cf33bfd7efc)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4300250
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Diffstat (limited to 'host/arch/arm/lib/crossystem_arch.c')
-rw-r--r-- | host/arch/arm/lib/crossystem_arch.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/host/arch/arm/lib/crossystem_arch.c b/host/arch/arm/lib/crossystem_arch.c index 897036d2..fac6013e 100644 --- a/host/arch/arm/lib/crossystem_arch.c +++ b/host/arch/arm/lib/crossystem_arch.c @@ -525,6 +525,8 @@ int VbGetArchPropertyInt(const char* name) } else if (!strcasecmp(name, "recoverysw_ec_boot")) { /* TODO: read correct value using ectool */ return 0; + } else if (!strcasecmp(name, "board_id")) { + return ReadFdtInt("firmware/coreboot/board-id"); } else { return -1; } |