Change in coreboot[master]: src/ec,mainboard: Move weak smbios_system_sku() override inwards
Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/39146 ) Change subject: src/ec,mainboard: Move weak smbios_system_sku() override inwards ...................................................................... src/ec,mainboard: Move weak smbios_system_sku() override inwards Internalise smbios_system_sku() strong symbol inwards in the ec_skuid.c implementation and simply wrap a call to: google_chromeec_smbios_system_sku(). BUG=b:XXX BRANCH=none TEST=none Change-Id: I05ebfc8126c0fb176ca52c307c658f50611ab6ab Signed-off-by: Edward O'Callaghan <quasisec@google.com> --- M src/ec/google/chromeec/ec_skuid.c M src/mainboard/google/dedede/board_info.c M src/mainboard/google/hatch/mainboard.c M src/mainboard/google/octopus/Makefile.inc D src/mainboard/google/octopus/mainboard_misc.c M src/mainboard/google/volteer/mainboard.c 6 files changed, 5 insertions(+), 44 deletions(-) git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/39146/1 diff --git a/src/ec/google/chromeec/ec_skuid.c b/src/ec/google/chromeec/ec_skuid.c index f8fc203..aed41b3 100644 --- a/src/ec/google/chromeec/ec_skuid.c +++ b/src/ec/google/chromeec/ec_skuid.c @@ -34,3 +34,8 @@ snprintf(sku_str, sizeof(sku_str), "sku%u", sku_id); return sku_str; } + +const char *smbios_system_sku(void) +{ + return google_chromeec_smbios_system_sku(); +} diff --git a/src/mainboard/google/dedede/board_info.c b/src/mainboard/google/dedede/board_info.c index 7b10b23..1d222b2 100644 --- a/src/mainboard/google/dedede/board_info.c +++ b/src/mainboard/google/dedede/board_info.c @@ -12,11 +12,6 @@ #include <smbios.h> #include <string.h> -const char *smbios_system_sku(void) -{ - return google_chromeec_smbios_system_sku(); -} - const char *smbios_mainboard_manufacturer(void) { static char oem_name[32]; diff --git a/src/mainboard/google/hatch/mainboard.c b/src/mainboard/google/hatch/mainboard.c index 888acf7..e0e7a32 100644 --- a/src/mainboard/google/hatch/mainboard.c +++ b/src/mainboard/google/hatch/mainboard.c @@ -21,11 +21,6 @@ #include <string.h> #include <stdint.h> -const char *smbios_system_sku(void) -{ - return google_chromeec_smbios_system_sku(); -} - const char *smbios_mainboard_manufacturer(void) { static char oem_name[32]; diff --git a/src/mainboard/google/octopus/Makefile.inc b/src/mainboard/google/octopus/Makefile.inc index d36d5f7..aa05524 100644 --- a/src/mainboard/google/octopus/Makefile.inc +++ b/src/mainboard/google/octopus/Makefile.inc @@ -5,12 +5,10 @@ ramstage-$(CONFIG_CHROMEOS) += chromeos.c ramstage-y += ec.c -ramstage-y += mainboard_misc.c ramstage-y += mainboard.c verstage-$(CONFIG_CHROMEOS) += chromeos.c smm-y += smihandler.c -smm-y += mainboard_misc.c subdirs-y += variants/baseboard CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/baseboard/include diff --git a/src/mainboard/google/octopus/mainboard_misc.c b/src/mainboard/google/octopus/mainboard_misc.c deleted file mode 100644 index 8b281da..0000000 --- a/src/mainboard/google/octopus/mainboard_misc.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright 2019 Intel Corp. - * - * 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 <baseboard/variants.h> -#include <boardid.h> -#include <console/console.h> -#include <ec/google/chromeec/ec.h> -#include <ec/ec.h> -#include <smbios.h> -#include <string.h> - -const char *smbios_system_sku(void) -{ - return google_chromeec_smbios_system_sku(); -} diff --git a/src/mainboard/google/volteer/mainboard.c b/src/mainboard/google/volteer/mainboard.c index dcefb5d..6ed928a 100644 --- a/src/mainboard/google/volteer/mainboard.c +++ b/src/mainboard/google/volteer/mainboard.c @@ -17,11 +17,6 @@ #include <vendorcode/google/chromeos/chromeos.h> #include <variant/gpio.h> -const char *smbios_system_sku(void) -{ - return google_chromeec_smbios_system_sku(); -} - static void mainboard_init(struct device *dev) { mainboard_ec_init(); -- To view, visit https://review.coreboot.org/c/coreboot/+/39146 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-Change-Id: I05ebfc8126c0fb176ca52c307c658f50611ab6ab Gerrit-Change-Number: 39146 Gerrit-PatchSet: 1 Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org> Gerrit-MessageType: newchange
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39146 ) Change subject: src/ec,mainboard: Move weak smbios_system_sku() override inwards ...................................................................... Patch Set 1: (1 comment) https://review.coreboot.org/c/coreboot/+/39146/1/src/ec/google/chromeec/ec_s... File src/ec/google/chromeec/ec_skuid.c: https://review.coreboot.org/c/coreboot/+/39146/1/src/ec/google/chromeec/ec_s... PS1, Line 40: return google_chromeec_smbios_system_sku(); please, no spaces at the start of a line -- To view, visit https://review.coreboot.org/c/coreboot/+/39146 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-Change-Id: I05ebfc8126c0fb176ca52c307c658f50611ab6ab Gerrit-Change-Number: 39146 Gerrit-PatchSet: 1 Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Martin Roth <martinroth@google.com> Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com> Gerrit-CC: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-Comment-Date: Thu, 27 Feb 2020 04:29:33 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39146 ) Change subject: src/ec,mainboard: Move weak smbios_system_sku() override inwards ...................................................................... Patch Set 8: This change is ready for review. -- To view, visit https://review.coreboot.org/c/coreboot/+/39146 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-Change-Id: I05ebfc8126c0fb176ca52c307c658f50611ab6ab Gerrit-Change-Number: 39146 Gerrit-PatchSet: 8 Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Aaron Durbin <adurbin@chromium.org> Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Martin Roth <martinroth@google.com> Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net> Gerrit-Comment-Date: Wed, 04 Mar 2020 02:27:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39146 ) Change subject: src/ec,mainboard: Move weak smbios_system_sku() override inwards ...................................................................... Patch Set 8: (1 comment) https://review.coreboot.org/c/coreboot/+/39146/7/src/ec/google/chromeec/ec_s... File src/ec/google/chromeec/ec_skuid.c: https://review.coreboot.org/c/coreboot/+/39146/7/src/ec/google/chromeec/ec_s... PS7, Line 41: return google_chromeec_smbios_system_sku();
please, no spaces at the start of a line Ack
-- To view, visit https://review.coreboot.org/c/coreboot/+/39146 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-Change-Id: I05ebfc8126c0fb176ca52c307c658f50611ab6ab Gerrit-Change-Number: 39146 Gerrit-PatchSet: 8 Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Aaron Durbin <adurbin@chromium.org> Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Martin Roth <martinroth@google.com> Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net> Gerrit-Comment-Date: Wed, 04 Mar 2020 02:27:53 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-MessageType: comment
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39146 ) Change subject: src/ec,mainboard: Move weak smbios_system_sku() override inwards ...................................................................... Patch Set 8: Code-Review+2 -- To view, visit https://review.coreboot.org/c/coreboot/+/39146 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-Change-Id: I05ebfc8126c0fb176ca52c307c658f50611ab6ab Gerrit-Change-Number: 39146 Gerrit-PatchSet: 8 Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Aaron Durbin <adurbin@chromium.org> Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Martin Roth <martinroth@google.com> Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net> Gerrit-Comment-Date: Wed, 04 Mar 2020 02:56:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Karthik Ramasubramanian has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39146 ) Change subject: src/ec,mainboard: Move weak smbios_system_sku() override inwards ...................................................................... Patch Set 9: Code-Review+2 -- To view, visit https://review.coreboot.org/c/coreboot/+/39146 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-Change-Id: I05ebfc8126c0fb176ca52c307c658f50611ab6ab Gerrit-Change-Number: 39146 Gerrit-PatchSet: 9 Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Aaron Durbin <adurbin@chromium.org> Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Karthik Ramasubramanian <kramasub@google.com> Gerrit-Reviewer: Martin Roth <martinroth@google.com> Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net> Gerrit-Comment-Date: Wed, 04 Mar 2020 03:52:22 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Edward O'Callaghan has submitted this change. ( https://review.coreboot.org/c/coreboot/+/39146 ) Change subject: src/ec,mainboard: Move weak smbios_system_sku() override inwards ...................................................................... src/ec,mainboard: Move weak smbios_system_sku() override inwards Internalise smbios_system_sku() strong symbol inwards in the ec_skuid.c implementation and simply wrap a call to: google_chromeec_smbios_system_sku(). BUG=b:150735116 BRANCH=none TEST=none Change-Id: I05ebfc8126c0fb176ca52c307c658f50611ab6ab Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/39146 Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> --- M src/ec/google/chromeec/ec_skuid.c M src/mainboard/google/dedede/board_info.c M src/mainboard/google/hatch/mainboard.c M src/mainboard/google/octopus/Makefile.inc D src/mainboard/google/octopus/mainboard_misc.c M src/mainboard/google/volteer/mainboard.c 6 files changed, 6 insertions(+), 43 deletions(-) Approvals: build bot (Jenkins): Verified Aaron Durbin: Looks good to me, approved Karthik Ramasubramanian: Looks good to me, approved diff --git a/src/ec/google/chromeec/ec_skuid.c b/src/ec/google/chromeec/ec_skuid.c index f8fc203..ac69b13 100644 --- a/src/ec/google/chromeec/ec_skuid.c +++ b/src/ec/google/chromeec/ec_skuid.c @@ -11,6 +11,7 @@ #include <ec/google/chromeec/ec.h> #include <console/console.h> #include <string.h> +#include <smbios.h> #define SKU_UNKNOWN 0xFFFFFFFF @@ -34,3 +35,8 @@ snprintf(sku_str, sizeof(sku_str), "sku%u", sku_id); return sku_str; } + +const char *smbios_system_sku(void) +{ + return google_chromeec_smbios_system_sku(); +} diff --git a/src/mainboard/google/dedede/board_info.c b/src/mainboard/google/dedede/board_info.c index 7b10b23..1d222b2 100644 --- a/src/mainboard/google/dedede/board_info.c +++ b/src/mainboard/google/dedede/board_info.c @@ -12,11 +12,6 @@ #include <smbios.h> #include <string.h> -const char *smbios_system_sku(void) -{ - return google_chromeec_smbios_system_sku(); -} - const char *smbios_mainboard_manufacturer(void) { static char oem_name[32]; diff --git a/src/mainboard/google/hatch/mainboard.c b/src/mainboard/google/hatch/mainboard.c index 888acf7..e0e7a32 100644 --- a/src/mainboard/google/hatch/mainboard.c +++ b/src/mainboard/google/hatch/mainboard.c @@ -21,11 +21,6 @@ #include <string.h> #include <stdint.h> -const char *smbios_system_sku(void) -{ - return google_chromeec_smbios_system_sku(); -} - const char *smbios_mainboard_manufacturer(void) { static char oem_name[32]; diff --git a/src/mainboard/google/octopus/Makefile.inc b/src/mainboard/google/octopus/Makefile.inc index b8a7366..aa05524 100644 --- a/src/mainboard/google/octopus/Makefile.inc +++ b/src/mainboard/google/octopus/Makefile.inc @@ -5,7 +5,6 @@ ramstage-$(CONFIG_CHROMEOS) += chromeos.c ramstage-y += ec.c -ramstage-y += mainboard_misc.c ramstage-y += mainboard.c verstage-$(CONFIG_CHROMEOS) += chromeos.c diff --git a/src/mainboard/google/octopus/mainboard_misc.c b/src/mainboard/google/octopus/mainboard_misc.c deleted file mode 100644 index 8b281da..0000000 --- a/src/mainboard/google/octopus/mainboard_misc.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This file is part of the coreboot project. - * - * Copyright 2019 Intel Corp. - * - * 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 <baseboard/variants.h> -#include <boardid.h> -#include <console/console.h> -#include <ec/google/chromeec/ec.h> -#include <ec/ec.h> -#include <smbios.h> -#include <string.h> - -const char *smbios_system_sku(void) -{ - return google_chromeec_smbios_system_sku(); -} diff --git a/src/mainboard/google/volteer/mainboard.c b/src/mainboard/google/volteer/mainboard.c index dcefb5d..6ed928a 100644 --- a/src/mainboard/google/volteer/mainboard.c +++ b/src/mainboard/google/volteer/mainboard.c @@ -17,11 +17,6 @@ #include <vendorcode/google/chromeos/chromeos.h> #include <variant/gpio.h> -const char *smbios_system_sku(void) -{ - return google_chromeec_smbios_system_sku(); -} - static void mainboard_init(struct device *dev) { mainboard_ec_init(); -- To view, visit https://review.coreboot.org/c/coreboot/+/39146 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-Change-Id: I05ebfc8126c0fb176ca52c307c658f50611ab6ab Gerrit-Change-Number: 39146 Gerrit-PatchSet: 10 Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Aaron Durbin <adurbin@chromium.org> Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Karthik Ramasubramanian <kramasub@google.com> Gerrit-Reviewer: Martin Roth <martinroth@google.com> Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net> Gerrit-MessageType: merged
participants (4)
-
Aaron Durbin (Code Review) -
build bot (Jenkins) (Code Review) -
Edward O'Callaghan (Code Review) -
Karthik Ramasubramanian (Code Review)