[coreboot-gerrit] Change in ...coreboot[master]: security/vboot: Add new hook function verstage_soc_init

You-Cheng Syu (Code Review) gerrit at coreboot.org
Fri Dec 21 09:30:55 CET 2018


You-Cheng Syu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30351


Change subject: security/vboot: Add new hook function verstage_soc_init
......................................................................

security/vboot: Add new hook function verstage_soc_init

Some SoCs might have some common initialization steps need to be done.
Add a new hook function verstage_soc_init so that we don't have to
duplicate those code again and again for every board.

BRANCH=none
BUG=b:120588396
TEST=manually print some message to console in the new hook function

Change-Id: I31a43ae42f828a9439c03433cba19631b96408ff
Signed-off-by: You-Cheng Syu <youcheng at google.com>
---
M src/security/vboot/vboot_common.h
M src/security/vboot/verstage.c
2 files changed, 7 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/51/30351/1

diff --git a/src/security/vboot/vboot_common.h b/src/security/vboot/vboot_common.h
index 61f5931..dc8286f 100644
--- a/src/security/vboot/vboot_common.h
+++ b/src/security/vboot/vboot_common.h
@@ -102,6 +102,7 @@
  */
 void verstage_main(void);
 void verstage_mainboard_init(void);
+void verstage_soc_init(void);
 
 /* Check boot modes */
 #if IS_ENABLED(CONFIG_VBOOT)
diff --git a/src/security/vboot/verstage.c b/src/security/vboot/verstage.c
index afd73f1..089ecb5 100644
--- a/src/security/vboot/verstage.c
+++ b/src/security/vboot/verstage.c
@@ -19,6 +19,11 @@
 #include <program_loading.h>
 #include <security/vboot/vboot_common.h>
 
+void __weak verstage_soc_init(void)
+{
+	/* Default empty implementation. */
+}
+
 void __weak verstage_mainboard_init(void)
 {
 	/* Default empty implementation. */
@@ -28,6 +33,7 @@
 {
 	console_init();
 	exception_init();
+	verstage_soc_init();
 	verstage_mainboard_init();
 
 	if (IS_ENABLED(CONFIG_VBOOT_RETURN_FROM_VERSTAGE)) {

-- 
To view, visit https://review.coreboot.org/c/coreboot/+/30351
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I31a43ae42f828a9439c03433cba19631b96408ff
Gerrit-Change-Number: 30351
Gerrit-PatchSet: 1
Gerrit-Owner: You-Cheng Syu <youcheng at google.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181221/adfedf3b/attachment.html>


More information about the coreboot-gerrit mailing list