Arthur Heymans (arthur(a)aheymans.xyz) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15493
-gerrit
commit a81768ecee815cd9c764951571a27b75e6f1f44d
Author: Arthur Heymans <arthur(a)aheymans.xyz>
Date: Sat Jun 18 23:26:46 2016 +0200
ga-g41m-es2l: add cmos.layout
This adds a cmos.layout and a cmos.default to ga-g41m-es2l.
This allows to set things like baud_rate, debug_level, etc.
from cmos.
Change-Id: I25df7a1f3a0ce486b96cfe05bda628f604b0baec
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
src/mainboard/gigabyte/ga-g41m-es2l/Kconfig | 2 +
src/mainboard/gigabyte/ga-g41m-es2l/cmos.default | 5 +
src/mainboard/gigabyte/ga-g41m-es2l/cmos.layout | 119 +++++++++++++++++++++++
3 files changed, 126 insertions(+)
diff --git a/src/mainboard/gigabyte/ga-g41m-es2l/Kconfig b/src/mainboard/gigabyte/ga-g41m-es2l/Kconfig
index 7dec921..6452f4d 100644
--- a/src/mainboard/gigabyte/ga-g41m-es2l/Kconfig
+++ b/src/mainboard/gigabyte/ga-g41m-es2l/Kconfig
@@ -30,6 +30,8 @@ config BOARD_SPECIFIC_OPTIONS
select PCIEXP_CLK_PM
select PCIEXP_L1_SUB_STATE
select REALTEK_8168_RESET
+ select HAVE_OPTION_TABLE
+ select HAVE_CMOS_DEFAULT
config MMCONF_BASE_ADDRESS
hex
diff --git a/src/mainboard/gigabyte/ga-g41m-es2l/cmos.default b/src/mainboard/gigabyte/ga-g41m-es2l/cmos.default
new file mode 100644
index 0000000..c20ba94
--- /dev/null
+++ b/src/mainboard/gigabyte/ga-g41m-es2l/cmos.default
@@ -0,0 +1,5 @@
+boot_option=Fallback
+baud_rate=115200
+debug_level=Spew
+power_on_after_fail=Enable
+nmi=Enable
\ No newline at end of file
diff --git a/src/mainboard/gigabyte/ga-g41m-es2l/cmos.layout b/src/mainboard/gigabyte/ga-g41m-es2l/cmos.layout
new file mode 100644
index 0000000..f92de11
--- /dev/null
+++ b/src/mainboard/gigabyte/ga-g41m-es2l/cmos.layout
@@ -0,0 +1,119 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2007-2008 coresystems GmbH
+## Copyright (C) 2014 Vladimir Serbinenko
+##
+## 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.
+##
+
+# -----------------------------------------------------------------
+entries
+
+# -----------------------------------------------------------------
+# Status Register A
+# -----------------------------------------------------------------
+# Status Register B
+# -----------------------------------------------------------------
+# Status Register C
+#96 4 r 0 status_c_rsvd
+#100 1 r 0 uf_flag
+#101 1 r 0 af_flag
+#102 1 r 0 pf_flag
+#103 1 r 0 irqf_flag
+# -----------------------------------------------------------------
+# Status Register D
+#104 7 r 0 status_d_rsvd
+#111 1 r 0 valid_cmos_ram
+# -----------------------------------------------------------------
+# Diagnostic Status Register
+#112 8 r 0 diag_rsvd1
+
+# -----------------------------------------------------------------
+0 120 r 0 reserved_memory
+#120 264 r 0 unused
+
+# -----------------------------------------------------------------
+# RTC_BOOT_BYTE (coreboot hardcoded)
+384 1 e 4 boot_option
+388 4 r 0 reboot_bits
+#390 2 r 0 unused?
+
+# -----------------------------------------------------------------
+# coreboot config options: console
+392 3 e 5 baud_rate
+395 4 e 6 debug_level
+#399 1 r 0 unused
+
+# coreboot config options: southbridge
+408 1 e 1 nmi
+409 2 e 7 power_on_after_fail
+
+# coreboot config options: cpu
+#424 1 e 2 hyper_threading
+#425 7 r 0 unused
+
+# coreboot config options: northbridge
+432 4 e 11 gfx_uma_size
+#435 549 r 0 unused
+
+
+# coreboot config options: check sums
+984 16 h 0 check_sum
+
+# -----------------------------------------------------------------
+
+enumerations
+
+#ID value text
+1 0 Disable
+1 1 Enable
+2 0 Enable
+2 1 Disable
+4 0 Fallback
+4 1 Normal
+5 0 115200
+5 1 57600
+5 2 38400
+5 3 19200
+5 4 9600
+5 5 4800
+5 6 2400
+5 7 1200
+6 1 Emergency
+6 2 Alert
+6 3 Critical
+6 4 Error
+6 5 Warning
+6 6 Notice
+6 7 Info
+6 8 Debug
+6 9 Spew
+7 0 Disable
+7 1 Enable
+7 2 Keep
+11 0 1M
+11 1 4M
+11 2 8M
+11 3 16M
+11 4 32M
+11 5 48M
+11 6 64M
+11 7 128M
+11 8 256M
+11 9 96M
+11 10 160M
+11 11 224M
+11 12 352M
+
+# -----------------------------------------------------------------
+checksums
+
+checksum 392 983 984
Arthur Heymans (arthur(a)aheymans.xyz) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15492
-gerrit
commit c94e51ae02e859e700be6640eea74791f1a5f2bd
Author: Arthur Heymans <arthur(a)aheymans.xyz>
Date: Sat Jun 18 21:52:30 2016 +0200
x4x: make preallocated IGD memory a cmos option
This allows to set the preallocated memory for the IGD on x4x
using a cmos option.
If no cmos option is found a default value of 64M is used.
Change-Id: I9051d080be82f6dfab37d353252e29b2ed1fca7f
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
src/northbridge/intel/x4x/early_init.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/northbridge/intel/x4x/early_init.c b/src/northbridge/intel/x4x/early_init.c
index b522293..a430538 100644
--- a/src/northbridge/intel/x4x/early_init.c
+++ b/src/northbridge/intel/x4x/early_init.c
@@ -18,6 +18,7 @@
#include <arch/io.h>
#include "iomap.h"
#include <southbridge/intel/i82801gx/i82801gx.h> /* DEFAULT_PMBASE */
+#include <pc80/mc146818rtc.h>
#include "x4x.h"
void x4x_early_init(void)
@@ -51,5 +52,12 @@ void x4x_early_init(void)
/* Enable internal GFX */
pci_write_config32(d0f0, D0F0_DEVEN, BOARD_DEVEN);
- pci_write_config16(d0f0, D0F0_GGC, 0x0170);
+ /* Set preallocated IGD size from cmos */
+ u8 gfxsize;
+
+ if (get_option(&gfxsize, "gfx_uma_size") != CB_SUCCESS) {
+ /* 6 for 64MB, default if not set in cmos */
+ gfxsize = 6;
+ }
+ pci_write_config16(d0f0, D0F0_GGC, 0x0100 | ((gfxsize + 1) << 4));
}
the following patch was just integrated into master:
commit 3d0e2871cbf6d0c639ed1c4864c919318c3a8e28
Author: Saurabh Satija <saurabh.satija(a)intel.com>
Date: Thu Mar 31 15:41:30 2016 -0700
soc/intel/apollolake: Add NHLT table region to ACPI global nvs
Add address and length of NHLT table in ACPI.
Change-Id: Ic0959a8aae18d54e10e3fcd95bfc98a6b6e0385a
Signed-off-by: Saurabh Satija <saurabh.satija(a)intel.com>
Reviewed-on: https://review.coreboot.org/15025
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Reviewed-by: Furquan Shaikh <furquan(a)google.com>
See https://review.coreboot.org/15025 for details.
-gerrit
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15489
-gerrit
commit bc286472571b1ea6136094c6023b0896bbb04da1
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Tue Jun 28 15:36:01 2016 -0500
lib/nhlt: drop nhlt_soc_add_endpoint()
The nhlt_soc_add_endpoint() is no longer used. Drop its declaration.
Change-Id: I3b68471650a43c5faae44bde523abca7ba250a34
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/include/nhlt.h | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/include/nhlt.h b/src/include/nhlt.h
index 3300d43..17b7d11 100644
--- a/src/include/nhlt.h
+++ b/src/include/nhlt.h
@@ -45,7 +45,7 @@ struct nhlt_format_config;
* An example sequence:
*
* nhlt = nhlt_init()
- * ep = nhlt_soc_add_endpoint()
+ * ep = nhlt_add_endpoint()
* nhlt_endpoint_append_config(ep)
* nhlt_endpoint_add_formats(ep)
* nhlt_soc_serialize()
@@ -97,19 +97,13 @@ int nhlt_add_ssp_endpoints(struct nhlt *nhlt, int virtual_bus_id,
/*
* Add endpoint to NHLT object. Returns NULL on error.
*
- * Note that the SoC variant uses SoC-specifc types for the hardware interface
- * and device types. This is to allow the SoC code to validate its particular
- * device support for specific hardware interfaces.
- *
- * The more generic nhlt_add_endpoint() is called by the SoC code to provide
+ * generic nhlt_add_endpoint() is called by the SoC code to provide
* the specific assumptions/uses for NHLT for that platform. All fields
* are the NHLT enumerations found within this header file.
*/
struct nhlt_endpoint *nhlt_add_endpoint(struct nhlt *nhlt, int link_type,
int device_type, int dir,
uint16_t vid, uint16_t did);
-struct nhlt_endpoint *nhlt_soc_add_endpoint(struct nhlt *nhlt, int soc_hwintf,
- int soc_devtype, int dir);
/*
* Append blob of configuration to the endpoint proper. Returns 0 on
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15490
-gerrit
commit 8f55d9f7d54ea5aa1d85c6aaae62c6bc33a5c76e
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Tue Jun 28 15:41:07 2016 -0500
soc/intel/{common,skylake}: provide common NHLT SoC support
The nhlt_soc_serialize() and nhlt_soc_serialize_oem_overrides()
functions should be able to be levearaged on all Intel SoCs
which support NHLT. Therefore provide that functionality and
make skylake use it.
Change-Id: Ib5535cc874f2680ec22554cecaf97b09753cacd0
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/soc/intel/common/Kconfig | 4 ++++
src/soc/intel/common/Makefile.inc | 1 +
src/soc/intel/common/nhlt.c | 41 +++++++++++++++++++++++++++++++++
src/soc/intel/skylake/Kconfig | 1 +
src/soc/intel/skylake/nhlt/Makefile.inc | 1 -
src/soc/intel/skylake/nhlt/nhlt.c | 41 ---------------------------------
6 files changed, 47 insertions(+), 42 deletions(-)
diff --git a/src/soc/intel/common/Kconfig b/src/soc/intel/common/Kconfig
index fdd8f04..776004b 100644
--- a/src/soc/intel/common/Kconfig
+++ b/src/soc/intel/common/Kconfig
@@ -99,4 +99,8 @@ config SOC_INTEL_COMMON_ACPI
bool
default n
+config SOC_INTEL_COMMON_NHLT
+ bool
+ default n
+
endif # SOC_INTEL_COMMON
diff --git a/src/soc/intel/common/Makefile.inc b/src/soc/intel/common/Makefile.inc
index 88d5fd2..e9ad508 100644
--- a/src/soc/intel/common/Makefile.inc
+++ b/src/soc/intel/common/Makefile.inc
@@ -20,6 +20,7 @@ ramstage-$(CONFIG_SOC_INTEL_COMMON_ACPI_WAKE_SOURCE) += acpi_wake_source.c
ramstage-y += vbt.c
ramstage-$(CONFIG_SOC_INTEL_COMMON_GFX_OPREGION) += opregion.c
ramstage-$(CONFIG_SOC_INTEL_COMMON_ACPI) += ./acpi/acpi.c
+ramstage-$(CONFIG_SOC_INTEL_COMMON_NHLT) += nhlt.c
smm-$(CONFIG_SOC_INTEL_COMMON_SMI) += smihandler.c
diff --git a/src/soc/intel/common/nhlt.c b/src/soc/intel/common/nhlt.c
new file mode 100644
index 0000000..d498152
--- /dev/null
+++ b/src/soc/intel/common/nhlt.c
@@ -0,0 +1,41 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2015 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 <cbmem.h>
+#include <nhlt.h>
+#include <soc/acpi.h>
+
+uintptr_t nhlt_soc_serialize(struct nhlt *nhlt, uintptr_t acpi_addr)
+{
+ return nhlt_soc_serialize_oem_overrides(nhlt, acpi_addr, NULL, NULL);
+}
+
+uintptr_t nhlt_soc_serialize_oem_overrides(struct nhlt *nhlt,
+ uintptr_t acpi_addr, const char *oem_id, const char *oem_table_id)
+{
+ global_nvs_t *gnvs;
+
+ gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS);
+
+ if (gnvs == NULL)
+ return acpi_addr;
+
+ /* Update NHLT GNVS Data */
+ gnvs->nhla = (uintptr_t)acpi_addr;
+ gnvs->nhll = nhlt_current_size(nhlt);
+
+ return nhlt_serialize_oem_overrides(nhlt, acpi_addr,
+ oem_id, oem_table_id);
+}
diff --git a/src/soc/intel/skylake/Kconfig b/src/soc/intel/skylake/Kconfig
index a134d1c..6843cef 100644
--- a/src/soc/intel/skylake/Kconfig
+++ b/src/soc/intel/skylake/Kconfig
@@ -38,6 +38,7 @@ config CPU_SPECIFIC_OPTIONS
select SOC_INTEL_COMMON
select SOC_INTEL_COMMON_ACPI_WAKE_SOURCE
select SOC_INTEL_COMMON_LPSS_I2C
+ select SOC_INTEL_COMMON_NHLT
select SOC_INTEL_COMMON_RESET
select SMM_TSEG
select SMP
diff --git a/src/soc/intel/skylake/nhlt/Makefile.inc b/src/soc/intel/skylake/nhlt/Makefile.inc
index aff182c..e022482 100644
--- a/src/soc/intel/skylake/nhlt/Makefile.inc
+++ b/src/soc/intel/skylake/nhlt/Makefile.inc
@@ -1,4 +1,3 @@
-ramstage-y += nhlt.c
ramstage-y += dmic.c
ramstage-y += nau88l25.c
ramstage-y += max98357.c
diff --git a/src/soc/intel/skylake/nhlt/nhlt.c b/src/soc/intel/skylake/nhlt/nhlt.c
deleted file mode 100644
index d498152..0000000
--- a/src/soc/intel/skylake/nhlt/nhlt.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2015 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 <cbmem.h>
-#include <nhlt.h>
-#include <soc/acpi.h>
-
-uintptr_t nhlt_soc_serialize(struct nhlt *nhlt, uintptr_t acpi_addr)
-{
- return nhlt_soc_serialize_oem_overrides(nhlt, acpi_addr, NULL, NULL);
-}
-
-uintptr_t nhlt_soc_serialize_oem_overrides(struct nhlt *nhlt,
- uintptr_t acpi_addr, const char *oem_id, const char *oem_table_id)
-{
- global_nvs_t *gnvs;
-
- gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS);
-
- if (gnvs == NULL)
- return acpi_addr;
-
- /* Update NHLT GNVS Data */
- gnvs->nhla = (uintptr_t)acpi_addr;
- gnvs->nhll = nhlt_current_size(nhlt);
-
- return nhlt_serialize_oem_overrides(nhlt, acpi_addr,
- oem_id, oem_table_id);
-}