SANTHOSH JANARDHANA HASSAN has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31426
Change subject: google/mistrtal: Add board ID API. ......................................................................
google/mistrtal: Add board ID API.
BUG=None TEST=Verified GPIO assignment and board ID values. BRANCH=None
Change-Id: Ic81b41f799c7bfc47a0daee705db1c01cd0af1a3 Signed-off-by: Santhosh Hassan sahassan@google.com --- M src/mainboard/google/mistral/Makefile.inc A src/mainboard/google/mistral/boardid.c 2 files changed, 49 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/31426/1
diff --git a/src/mainboard/google/mistral/Makefile.inc b/src/mainboard/google/mistral/Makefile.inc index e9013af..ae418f2 100644 --- a/src/mainboard/google/mistral/Makefile.inc +++ b/src/mainboard/google/mistral/Makefile.inc @@ -3,6 +3,7 @@ bootblock-y += chromeos.c bootblock-y += bootblock.c
+verstage-y += boardid.c verstage-y += memlayout.ld verstage-y += chromeos.c verstage-y += verstage.c @@ -10,7 +11,9 @@ romstage-y += memlayout.ld romstage-y += chromeos.c romstage-y += romstage.c +romstage-y += boardid.c
+ramstage-y += boardid.c ramstage-y += memlayout.ld ramstage-y += chromeos.c ramstage-y += mainboard.c diff --git a/src/mainboard/google/mistral/boardid.c b/src/mainboard/google/mistral/boardid.c new file mode 100644 index 0000000..f20960c --- /dev/null +++ b/src/mainboard/google/mistral/boardid.c @@ -0,0 +1,46 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2018 Google LLC + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <boardid.h> +#include <gpio.h> +#include <console/console.h> +#include <stdlib.h> + +/* + * Mistral boards dedicate to the board ID three GPIOs in ternary mode: 105, 106 + * and 107. + */ + +static uint32_t board_id_val = UNDEFINED_STRAPPING_ID; + +static uint32_t get_board_id(void) +{ + uint32_t bid; + const gpio_t pins[] = {[2] = GPIO(107), [1] = GPIO(106), [0] = GPIO(105)}; + + bid = gpio_binary_first_base3_value(pins, ARRAY_SIZE(pins)); + printk(BIOS_INFO, "Board ID %d\n", bid); + + return bid; +} + +uint32_t board_id(void) +{ + if (board_id_val == UNDEFINED_STRAPPING_ID) + board_id_val = get_board_id(); + + return board_id_val; +} +
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31426 )
Change subject: google/mistrtal: Add board ID API. ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/31426/1/src/mainboard/google/mistral/boardid... File src/mainboard/google/mistral/boardid.c:
https://review.coreboot.org/#/c/31426/1/src/mainboard/google/mistral/boardid... PS1, Line 31: const gpio_t pins[] = {[2] = GPIO(107), [1] = GPIO(106), [0] = GPIO(105)}; line over 80 characters
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31426 )
Change subject: google/mistrtal: Add board ID API. ......................................................................
Patch Set 1: Code-Review+2
(1 comment)
I guess at some point we may want names for the board id values, but that can wait until we make use of them.
https://review.coreboot.org/#/c/31426/1/src/mainboard/google/mistral/boardid... File src/mainboard/google/mistral/boardid.c:
https://review.coreboot.org/#/c/31426/1/src/mainboard/google/mistral/boardid... PS1, Line 4: 2018 2019?
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31426 )
Change subject: google/mistrtal: Add board ID API. ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/31426/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/31426/1//COMMIT_MSG@7 PS1, Line 7: mistrtal mistral
Hello build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31426
to look at the new patch set (#2).
Change subject: google/mistral: Add board ID API. ......................................................................
google/mistral: Add board ID API.
BUG=None TEST=Verified GPIO assignment and board ID values. BRANCH=None
Change-Id: Ic81b41f799c7bfc47a0daee705db1c01cd0af1a3 Signed-off-by: Santhosh Hassan sahassan@google.com --- M src/mainboard/google/mistral/Makefile.inc A src/mainboard/google/mistral/boardid.c 2 files changed, 51 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/31426/2
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31426 )
Change subject: google/mistral: Add board ID API. ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/#/c/31426/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/31426/2//COMMIT_MSG@7 PS2, Line 7: google/mistral: Add board ID API. Please remove the dot at the end.
Hello build bot (Jenkins), nsekar@codeaurora.org, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31426
to look at the new patch set (#5).
Change subject: TEMP: NOT FOR REVIEW: google/mistral: Add board ID API ......................................................................
TEMP: NOT FOR REVIEW: google/mistral: Add board ID API
BUG=None TEST=Verified GPIO assignment and board ID values. BRANCH=None
Change-Id: Ic81b41f799c7bfc47a0daee705db1c01cd0af1a3 Signed-off-by: Santhosh Hassan sahassan@google.com --- M src/mainboard/google/mistral/Makefile.inc A src/mainboard/google/mistral/boardid.c 2 files changed, 50 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/31426/5
nsekar@codeaurora.org has uploaded a new patch set (#6) to the change originally created by SANTHOSH JANARDHANA HASSAN. ( https://review.coreboot.org/c/coreboot/+/31426 )
Change subject: TEMP: NOT FOR REVIEW: Mistral: Add board id detection using TPM ......................................................................
TEMP: NOT FOR REVIEW: Mistral: Add board id detection using TPM
This patch adds support to select the board id based on the TPM availability.
Change-Id: Ic81b41f799c7bfc47a0daee705db1c01cd0af1a3 Signed-off-by: Santhosh Hassan sahassan@google.com --- M src/mainboard/google/mistral/Makefile.inc A src/mainboard/google/mistral/boardid.c 2 files changed, 50 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/31426/6
nsekar@codeaurora.org has uploaded a new patch set (#7) to the change originally created by SANTHOSH JANARDHANA HASSAN. ( https://review.coreboot.org/c/coreboot/+/31426 )
Change subject: TEMP: NOT FOR REVIEW: google/mistral: Add board ID API ......................................................................
TEMP: NOT FOR REVIEW: google/mistral: Add board ID API
BUG=None TEST=Verified GPIO assignment and board ID values. BRANCH=None
Change-Id: Ic81b41f799c7bfc47a0daee705db1c01cd0af1a3 Signed-off-by: Santhosh Hassan sahassan@google.com --- M src/mainboard/google/mistral/Makefile.inc A src/mainboard/google/mistral/boardid.c 2 files changed, 50 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/31426/7
Patrick Georgi has uploaded a new patch set (#12) to the change originally created by SANTHOSH JANARDHANA HASSAN. ( https://review.coreboot.org/c/coreboot/+/31426 )
Change subject: TEMP: NOT FOR REVIEW: google/mistral: Add board ID API ......................................................................
TEMP: NOT FOR REVIEW: google/mistral: Add board ID API
BUG=None TEST=Verified GPIO assignment and board ID values. BRANCH=None
Change-Id: Ic81b41f799c7bfc47a0daee705db1c01cd0af1a3 Signed-off-by: Santhosh Hassan sahassan@google.com --- M src/mainboard/google/mistral/Makefile.inc A src/mainboard/google/mistral/boardid.c 2 files changed, 49 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/31426/12
Patrick Georgi has uploaded a new patch set (#14) to the change originally created by SANTHOSH JANARDHANA HASSAN. ( https://review.coreboot.org/c/coreboot/+/31426 )
Change subject: TEMP: NOT FOR REVIEW: google/mistral: Add board ID API ......................................................................
TEMP: NOT FOR REVIEW: google/mistral: Add board ID API
BUG=None TEST=Verified GPIO assignment and board ID values. BRANCH=None
Change-Id: Ic81b41f799c7bfc47a0daee705db1c01cd0af1a3 Signed-off-by: Santhosh Hassan sahassan@google.com --- M src/mainboard/google/mistral/Makefile.inc A src/mainboard/google/mistral/boardid.c 2 files changed, 49 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/31426/14
Patrick Georgi has uploaded a new patch set (#16) to the change originally created by SANTHOSH JANARDHANA HASSAN. ( https://review.coreboot.org/c/coreboot/+/31426 )
Change subject: TEMP: NOT FOR REVIEW: google/mistral: Add board ID API ......................................................................
TEMP: NOT FOR REVIEW: google/mistral: Add board ID API
BUG=None TEST=Verified GPIO assignment and board ID values. BRANCH=None
Change-Id: Ic81b41f799c7bfc47a0daee705db1c01cd0af1a3 Signed-off-by: Santhosh Hassan sahassan@google.com --- M src/mainboard/google/mistral/Makefile.inc A src/mainboard/google/mistral/boardid.c 2 files changed, 49 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/31426/16
Patrick Georgi has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/31426 )
Change subject: google/mistral: Add board ID API ......................................................................
Abandoned
won't be finished here