Cheng-Yi Chiang has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36028 )
Change subject: google/chromeos: Add a library to get DSM calibration data
......................................................................
google/chromeos: Add a library to get DSM calibration data
On ChromeOS, there will be VPD values for DSM (dynamic speaker
management) calibration data. They are resistor calibration values and
temperature during calibration.
These VPD fields use "dsm_calib," prefix.
Known keys are
"dsm_calib, r0_0"
"dsm_calib, r0_1"
"dsm_calib, r0_2"
"dsm_calib, r0_3"
"dsm_calib, temp_0"
The values for unsigned long.
This library will be used for RT1011 device driver in the patch series.
Signed-off-by: Cheng-Yi Chiang <cychiang(a)chromium.org>
Change-Id: Ib9579a5cc055f8f438cb30a8acaf250a343db19e
---
A src/include/dsm_calib.h
M src/vendorcode/google/chromeos/Kconfig
M src/vendorcode/google/chromeos/Makefile.inc
A src/vendorcode/google/chromeos/dsm_calib.c
4 files changed, 80 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/28/36028/1
diff --git a/src/include/dsm_calib.h b/src/include/dsm_calib.h
new file mode 100644
index 0000000..e398d87
--- /dev/null
+++ b/src/include/dsm_calib.h
@@ -0,0 +1,23 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2019 Google Inc.
+ *
+ * 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.
+ */
+
+#ifndef _DSM_CALIB_H_
+#define _DSM_CALIB_H_
+
+#include <stdint.h>
+
+int get_dsm_calibration_from_key(const char *key, uint64_t *value);
+
+#endif /* _DSM_CALIB_H_ */
diff --git a/src/vendorcode/google/chromeos/Kconfig b/src/vendorcode/google/chromeos/Kconfig
index 2ff7ec7..c7d3adf 100644
--- a/src/vendorcode/google/chromeos/Kconfig
+++ b/src/vendorcode/google/chromeos/Kconfig
@@ -95,5 +95,9 @@
help
Use the AP watchdog flag stored in EC.
+config CHROMEOS_DSM_CALIB
+ bool
+ default n
+
endif # CHROMEOS
endmenu
diff --git a/src/vendorcode/google/chromeos/Makefile.inc b/src/vendorcode/google/chromeos/Makefile.inc
index 000d056..05acdee 100644
--- a/src/vendorcode/google/chromeos/Makefile.inc
+++ b/src/vendorcode/google/chromeos/Makefile.inc
@@ -21,6 +21,7 @@
ramstage-$(CONFIG_CHROMEOS_DISABLE_PLATFORM_HIERARCHY_ON_RESUME) += tpm2.c
ramstage-$(CONFIG_HAVE_REGULATORY_DOMAIN) += wrdd.c
ramstage-$(CONFIG_USE_SAR) += sar.c
+ramstage-$(CONFIG_CHROMEOS_DSM_CALIB) += dsm_calib.c
ramstage-$(CONFIG_TPM_CR50) += cr50_enable_update.c
ifeq ($(CONFIG_ARCH_MIPS),)
bootblock-y += watchdog.c
diff --git a/src/vendorcode/google/chromeos/dsm_calib.c b/src/vendorcode/google/chromeos/dsm_calib.c
new file mode 100644
index 0000000..a4480bc
--- /dev/null
+++ b/src/vendorcode/google/chromeos/dsm_calib.c
@@ -0,0 +1,52 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2019 Google Inc.
+ *
+ * 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 <console/console.h>
+#include <drivers/vpd/vpd.h>
+#include <dsm_calib.h>
+#include <stdint.h>
+#include <string.h>
+
+#define DSM_BUF_LEN 128
+#define DSM_PREFIX "dsm_calib"
+
+int get_dsm_calibration_from_key(const char* key, uint64_t *value)
+{
+ char buf[DSM_BUF_LEN];
+ char* ret;
+ long value_from_vpd;
+
+ if (strncmp(key, DSM_PREFIX, strlen(DSM_PREFIX))) {
+ printk(BIOS_ERR, "@@ got invalid dsm_calib key: %s\n", key);
+ return -1;
+ }
+
+ ret = vpd_gets(key, buf, DSM_BUF_LEN, VPD_RO);
+ if (!ret) {
+ printk(BIOS_ERR, "@@ failed to find key in VPD: %s\n", key);
+ return -1;
+ }
+
+ value_from_vpd = atol(buf);
+ if (value < 0) {
+ printk(BIOS_ERR, "@@ got invalid dsm_calib from VPD: %ld\n",
+ value_from_vpd);
+ return -1;
+ }
+
+ *value = value_from_vpd;
+
+ return 0;
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/36028
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib9579a5cc055f8f438cb30a8acaf250a343db19e
Gerrit-Change-Number: 36028
Gerrit-PatchSet: 1
Gerrit-Owner: Cheng-Yi Chiang <cychiang(a)chromium.org>
Gerrit-MessageType: newchange
Hello Angel Pons, Thomas Heijligen, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/29480
to look at the new patch set (#11).
Change subject: [WIP] mb/kontron/bsl6: Add new Skylake COMe module
......................................................................
[WIP] mb/kontron/bsl6: Add new Skylake COMe module
Add Kontron/bSL6 together with Siemens/Boxer26, a baseboard for the
bSL6.
Change-Id: If2b6a3f1e9dd095463f1f1521068b9f66a9189c5
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
---
A src/mainboard/kontron/bsl6/Kconfig
A src/mainboard/kontron/bsl6/Kconfig.name
A src/mainboard/kontron/bsl6/Makefile.inc
A src/mainboard/kontron/bsl6/acpi/ec.asl
A src/mainboard/kontron/bsl6/acpi/mainboard.asl
A src/mainboard/kontron/bsl6/acpi/superio.asl
A src/mainboard/kontron/bsl6/acpi_tables.c
A src/mainboard/kontron/bsl6/board_info.txt
A src/mainboard/kontron/bsl6/bootblock.c
A src/mainboard/kontron/bsl6/cmos.default
A src/mainboard/kontron/bsl6/cmos.layout
A src/mainboard/kontron/bsl6/dsdt.asl
A src/mainboard/kontron/bsl6/gpio.h
A src/mainboard/kontron/bsl6/ramstage.c
A src/mainboard/kontron/bsl6/romstage.c
A src/mainboard/kontron/bsl6/variant.h
A src/mainboard/kontron/bsl6/variants/boxer26/devicetree.cb
A src/mainboard/kontron/bsl6/variants/boxer26/gma-mainboard.ads
A src/mainboard/kontron/bsl6/variants/boxer26/romstage.c
A src/mainboard/kontron/bsl6/variants/bsl6/devicetree.cb
A src/mainboard/kontron/bsl6/variants/bsl6/gma-mainboard.ads
A src/mainboard/kontron/bsl6/variants/bsl6/romstage.c
22 files changed, 1,228 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/29480/11
--
To view, visit https://review.coreboot.org/c/coreboot/+/29480
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If2b6a3f1e9dd095463f1f1521068b9f66a9189c5
Gerrit-Change-Number: 29480
Gerrit-PatchSet: 11
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: newpatchset
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36275 )
Change subject: arch/arm64: Pass cbmem_top to ramstage via calling argument
......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/36275/3/src/arch/arm64/boot.c
File src/arch/arm64/boot.c:
https://review.coreboot.org/c/coreboot/+/36275/3/src/arch/arm64/boot.c@57
PS3, Line 57: _cbmem_top_ptr= (uintptr_t)stage_arg;
spaces required around that '=' (ctx:VxW)
--
To view, visit https://review.coreboot.org/c/coreboot/+/36275
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I86cdc5c2fac76797732a3a3398f50c4d1ff6647a
Gerrit-Change-Number: 36275
Gerrit-PatchSet: 3
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Thu, 24 Oct 2019 08:05:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Hello Julius Werner, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36275
to look at the new patch set (#3).
Change subject: arch/arm64: Pass cbmem_top to ramstage via calling argument
......................................................................
arch/arm64: Pass cbmem_top to ramstage via calling argument
This solution is very generic and can in principle be implemented on
all arch/soc. Currently the old infrastructure to pass on information
from romstage to ramstage is left in place and will be removed in a
follow-up commit.
Nvidia Tegra will be handled in a separate patch because it has a
custom ramstage entry.
Instead trying to figure out which files can be removed from stages
and which cbmem_top implementations need with preprocessor, rename all
cbmem_top implementation to cbmem_top_romstage.
Mechanisms set in place to pass on information from rom- to ram-stage
will be replaced in a followup commit.
Change-Id: I86cdc5c2fac76797732a3a3398f50c4d1ff6647a
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/arch/arm64/Kconfig
M src/arch/arm64/boot.c
M src/arch/arm64/include/arch/stages.h
M src/mainboard/emulation/qemu-aarch64/cbmem.c
M src/soc/cavium/cn81xx/cbmem.c
M src/soc/mediatek/common/cbmem.c
M src/soc/qualcomm/qcs405/cbmem.c
M src/soc/qualcomm/sdm845/cbmem.c
M src/soc/rockchip/common/cbmem.c
9 files changed, 14 insertions(+), 15 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/75/36275/3
--
To view, visit https://review.coreboot.org/c/coreboot/+/36275
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I86cdc5c2fac76797732a3a3398f50c4d1ff6647a
Gerrit-Change-Number: 36275
Gerrit-PatchSet: 3
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset