Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36449 )
Change subject: mainboard/google: Allow Hatch variants to read SPD data over SMBus
......................................................................
mainboard/google: Allow Hatch variants to read SPD data over SMBus
All Hatch variants so far embed static SPD data encoded within the
firmware image. However we wish the flexibility for romstage
implementations that allow for reading the SPD data dynamically over
SMBus. This romstage variant allows for reading the SPD data over
SMBus.
BRANCH=none
BUG=b:143134702
TEST=./util/abuild/abuild -p none -t google/hatch -x -a
Change-Id: I3516a46b91840a9f6d1f4cffb2553d939d79cda2
Signed-off-by: Edward O'Callaghan <quasisec(a)chromium.org>
---
M src/mainboard/google/hatch/Kconfig
M src/mainboard/google/hatch/Makefile.inc
A src/mainboard/google/hatch/romstage_spd_smbus.c
3 files changed, 63 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/36449/1
diff --git a/src/mainboard/google/hatch/Kconfig b/src/mainboard/google/hatch/Kconfig
index 219be22..e339693 100644
--- a/src/mainboard/google/hatch/Kconfig
+++ b/src/mainboard/google/hatch/Kconfig
@@ -60,7 +60,11 @@
config ROMSTAGE_SPD_CBFS
bool
- default y
+ default y if !ROMSTAGE_SPD_SMBUS
+
+config ROMSTAGE_SPD_SMBUS
+ bool
+ default n
config DRIVER_TPM_SPI_BUS
default 0x1
diff --git a/src/mainboard/google/hatch/Makefile.inc b/src/mainboard/google/hatch/Makefile.inc
index 3ed82e7..0740c08 100644
--- a/src/mainboard/google/hatch/Makefile.inc
+++ b/src/mainboard/google/hatch/Makefile.inc
@@ -21,6 +21,7 @@
ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC) += ec.c
romstage-$(CONFIG_ROMSTAGE_SPD_CBFS) += romstage_spd_cbfs.c
+romstage-$(CONFIG_ROMSTAGE_SPD_SMBUS) += romstage_spd_smbus.c
romstage-$(CONFIG_CHROMEOS) += chromeos.c
verstage-$(CONFIG_CHROMEOS) += chromeos.c
diff --git a/src/mainboard/google/hatch/romstage_spd_smbus.c b/src/mainboard/google/hatch/romstage_spd_smbus.c
new file mode 100644
index 0000000..245b61d
--- /dev/null
+++ b/src/mainboard/google/hatch/romstage_spd_smbus.c
@@ -0,0 +1,57 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2019 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 <baseboard/variants.h>
+#include <soc/cnl_memcfg_init.h>
+#include <soc/romstage.h>
+#include <variant/gpio.h>
+#include <spd_bin.h>
+#include <gpio.h>
+
+/*
+ * GPIO_MEM_CH_SEL is set to 1 for single channel skus
+ * and 0 for dual channel skus.
+ */
+#define GPIO_MEM_CH_SEL GPP_F2
+
+void mainboard_memory_init_params(FSPM_UPD *memupd)
+{
+ int is_single_ch_mem;
+ struct cnl_mb_cfg memcfg;
+ variant_memory_params(&memcfg);
+
+ /*
+ * GPP_F2 is the MEM_CH_SEL gpio, which is set to 1 for single
+ * channel skus and 0 for dual channel skus.
+ */
+ is_single_ch_mem = gpio_get(GPIO_MEM_CH_SEL);
+
+ /* Read spd block to get memory config */
+ struct spd_block blk = {
+ .addr_map = { 0x50, 0x52 },
+ };
+
+ memcfg.dq_pins_interleaved = 1;
+ get_spd_smbus(&blk);
+ memcfg.spd[0].read_type = READ_SMBUS;
+ memcfg.spd[0].spd_spec.spd_smbus_address = (uintptr_t)blk.spd_array[0];
+ if (!is_single_ch_mem) {
+ memcfg.spd[1].read_type = READ_SMBUS;
+ memcfg.spd[1].spd_spec.spd_smbus_address = (uintptr_t)blk.spd_array[1];
+ }
+ dump_spd_info(&blk);
+
+ cannonlake_memcfg_init(&memupd->FspmConfig, &memcfg);
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/36449
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3516a46b91840a9f6d1f4cffb2553d939d79cda2
Gerrit-Change-Number: 36449
Gerrit-PatchSet: 1
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: newchange
Martin Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36176 )
Change subject: RFC) src/acpi: Update license headers to SPDX
......................................................................
RFC) src/acpi: Update license headers to SPDX
While I was working on updating the headers to move copyrights into
the AUTHORS file, I got a request to switch to SPDX headers as well.
Linux has moved completely to SPDX headers, which are easier to
maintain, have good definitions, are very short, and can be checked
automatically. This is completely unlike our current header situation.
Signed-off-by: Martin Roth <martin(a)coreboot.org>
Change-Id: Ie86d34f7fa7bf7434ad8a38aa1eadcfece7124b3
---
M src/acpi/Kconfig
M src/acpi/Makefile.inc
M src/acpi/sata.c
M src/acpi/sata.h
4 files changed, 9 insertions(+), 24 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/36176/1
diff --git a/src/acpi/Kconfig b/src/acpi/Kconfig
index 72cfff5..3c6aeb1 100644
--- a/src/acpi/Kconfig
+++ b/src/acpi/Kconfig
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-only
+# This file is part of the coreboot project.
config ACPI_SATA_GENERATOR
bool
diff --git a/src/acpi/Makefile.inc b/src/acpi/Makefile.inc
index 53ac679..7c2092d 100644
--- a/src/acpi/Makefile.inc
+++ b/src/acpi/Makefile.inc
@@ -1 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-only
+# This file is part of the coreboot project.
+
ramstage-$(CONFIG_ACPI_SATA_GENERATOR) += sata.c
diff --git a/src/acpi/sata.c b/src/acpi/sata.c
index d7fcbd6..ae43e7d 100644
--- a/src/acpi/sata.c
+++ b/src/acpi/sata.c
@@ -1,15 +1,5 @@
-/*
- * This file is part of the coreboot project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * 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.
- */
+// SPDX-License-Identifier: GPL-2.0-only
+/* This file is part of the coreboot project. */
#include "sata.h"
diff --git a/src/acpi/sata.h b/src/acpi/sata.h
index fecf4c6..04cd80c 100644
--- a/src/acpi/sata.h
+++ b/src/acpi/sata.h
@@ -1,15 +1,5 @@
-/*
- * This file is part of the coreboot project.
- *
- * 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.
- */
+// SPDX-License-Identifier: GPL-2.0-only
+/* This file is part of the coreboot project. */
#ifndef __ACPI_SATA_H__
#define __ACPI_SATA_H__
--
To view, visit https://review.coreboot.org/c/coreboot/+/36176
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie86d34f7fa7bf7434ad8a38aa1eadcfece7124b3
Gerrit-Change-Number: 36176
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth(a)google.com>
Gerrit-MessageType: newchange
Martin Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36175 )
Change subject: util/lint: Update license header text for SPDX headers.
......................................................................
util/lint: Update license header text for SPDX headers.
Signed-off-by: Martin Roth <martin(a)coreboot.org>
Change-Id: I07a7ca408ac8563e03e189d05ef7729dfb6fc24e
---
M util/lint/lint-000-license-headers
1 file changed, 13 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/75/36175/1
diff --git a/util/lint/lint-000-license-headers b/util/lint/lint-000-license-headers
index 9b3553b..db4390a 100755
--- a/util/lint/lint-000-license-headers
+++ b/util/lint/lint-000-license-headers
@@ -62,6 +62,8 @@
cmos\.default\
"
+HEADER_TEXT="license header"
+
#space separated list of directories to test
if [ "$1" = "" ]; then
HEADER_DIRS="src util"
@@ -69,6 +71,11 @@
HEADER_DIRS="$1"
fi
+if [ "$2" = "SPDX_ONLY" ]; then
+SPDX_ONLY=1
+HEADER_TEXT="SPDX identifer"
+fi
+
LC_ALL=C export LC_ALL
#get initial list from git, removing HEADER_EXCLUDED files.
@@ -96,6 +103,10 @@
}
#search the files for license headers
+check_for_license 'SPDX-License-Identifier: *GPL-2.0-or-later'
+check_for_license 'SPDX-License-Identifier: *GPL-2.0-only'
+
+if [ ! "${SPDX_ONLY}" = "1" ]; then
check_for_license "under the terms of the GNU General Public License" \
"WITHOUT ANY WARRANTY"
check_for_license 'IS PROVIDED .*"AS IS"'
@@ -106,13 +117,13 @@
check_for_license 'THE AUTHORS DISCLAIM.*ALL WARRANTIES WITH REGARD TO THIS SOFTWARE'
check_for_license 'No license required'
check_for_license 'GNU Lesser General Public'
-check_for_license 'SPDX-License-Identifier:.*GPL-2.0-or-later'
+fi
for file in $headerlist; do
# Verify the file exists, and has content that requires a header
# This assumes that a file that has 4 lines or fewer is not notable
# enough to require a license.
if [ -f "$file" ] && [ "$(wc -l < "$file")" -gt 4 ]; then
- echo "$file has no recognized license header."
+ echo "$file has no recognized ${HEADER_TEXT}."
fi
done
--
To view, visit https://review.coreboot.org/c/coreboot/+/36175
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I07a7ca408ac8563e03e189d05ef7729dfb6fc24e
Gerrit-Change-Number: 36175
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth(a)google.com>
Gerrit-MessageType: newchange
Mike Banon has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38026 )
Change subject: MAINTAINERS: Add myself as a maintainer for Lenovo G505S and ASUS AM1I-A
......................................................................
MAINTAINERS: Add myself as a maintainer for Lenovo G505S and ASUS AM1I-A
These are the boards I have and currently working on.
Signed-off-by: Mike Banon <mikebdp2(a)gmail.com>
Change-Id: I3f366105371c7d2568da6682b24cb52bce2d5467
---
M MAINTAINERS
1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/38026/1
diff --git a/MAINTAINERS b/MAINTAINERS
index 6c565f7..97ffaee 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -163,6 +163,11 @@
S: Maintained
F: src/mainboard/lenovo/
+LENOVO G505S MAINBOARD
+M: Mike Banon <mikebdp2(a)gmail.com>
+S: Maintained
+F: src/mainboard/lenovo/g505s/
+
APPLE MAINBOARDS
M: Evgeny Zinoviev <me(a)ch1p.io>
S: Maintained
@@ -282,6 +287,11 @@
S: Maintained
F: src/mainboard/asrock/h81m-hds/
+ASUS AM1I-A MAINBOARD
+M: Mike Banon <mikebdp2(a)gmail.com>
+S: Maintained
+F: src/mainboard/asus/am1i-a/
+
ASUS MAXIMUS IV GENE-Z MAINBOARD
M: Tristan Corrick <tristan(a)corrick.kiwi>
S: Maintained
--
To view, visit https://review.coreboot.org/c/coreboot/+/38026
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3f366105371c7d2568da6682b24cb52bce2d5467
Gerrit-Change-Number: 38026
Gerrit-PatchSet: 1
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-MessageType: newchange
Mike Banon has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33777
Change subject: asus/am1i-a: set VGA_BIOS_ID to 1002,9830 instead of default 1002,9836
......................................................................
asus/am1i-a: set VGA_BIOS_ID to 1002,9830 instead of default 1002,9836
The majority of Socket AM1 APUs [1] - three out of five (three Athlons, the
most powerful for this socket) - have the integrated VGA with 1002,9830 ID,
while only one Sempron has 1002,9836. Set the default to more common one.
[1] https://en.wikipedia.org/wiki/List_of_AMD_accelerated_processing_units#%22K…
Signed-off-by: Mike Banon <mikebdp2(a)gmail.com>
Change-Id: I75c815b13934afcb5be316f85933f7c200d55bbd
---
M src/mainboard/asus/am1i-a/Kconfig
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/33777/1
diff --git a/src/mainboard/asus/am1i-a/Kconfig b/src/mainboard/asus/am1i-a/Kconfig
index d50edbe..42ab5c6 100644
--- a/src/mainboard/asus/am1i-a/Kconfig
+++ b/src/mainboard/asus/am1i-a/Kconfig
@@ -44,7 +44,7 @@
config VGA_BIOS_ID
string
- default "1002,9836"
+ default "1002,9830"
config HUDSON_LEGACY_FREE
bool
--
To view, visit https://review.coreboot.org/c/coreboot/+/33777
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I75c815b13934afcb5be316f85933f7c200d55bbd
Gerrit-Change-Number: 33777
Gerrit-PatchSet: 1
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-MessageType: newchange