HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36882 )
Change subject: mb/(ich7): Use 'intel/common/acpi/platform.asl'
......................................................................
mb/(ich7): Use 'intel/common/acpi/platform.asl'
Change-Id: I547801efeb91aa2cbe9b4336bf2f3f00b8a8c07c
Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr>
---
D src/mainboard/apple/macbook21/acpi/platform.asl
M src/mainboard/apple/macbook21/dsdt.asl
D src/mainboard/gigabyte/ga-945gcm-s2l/acpi/platform.asl
M src/mainboard/gigabyte/ga-945gcm-s2l/dsdt.asl
D src/mainboard/ibase/mb899/acpi/platform.asl
M src/mainboard/ibase/mb899/dsdt.asl
D src/mainboard/intel/d945gclf/acpi/platform.asl
M src/mainboard/intel/d945gclf/dsdt.asl
D src/mainboard/kontron/986lcd-m/acpi/platform.asl
M src/mainboard/kontron/986lcd-m/dsdt.asl
D src/mainboard/roda/rk886ex/acpi/platform.asl
M src/mainboard/roda/rk886ex/dsdt.asl
12 files changed, 0 insertions(+), 360 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/36882/1
diff --git a/src/mainboard/apple/macbook21/acpi/platform.asl b/src/mainboard/apple/macbook21/acpi/platform.asl
deleted file mode 100644
index 84807ec..0000000
--- a/src/mainboard/apple/macbook21/acpi/platform.asl
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007-2009 coresystems GmbH
- *
- * 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.
- */
-
-/* The _WAK method is called on system wakeup */
-
-Method(_WAK,1)
-{
- // CPU specific part
-
- // Notify PCI Express slots in case a card
- // was inserted while a sleep state was active.
-
- // Are we going to S3?
- If (LEqual(Arg0, 3)) {
- // ..
- }
-
- // Are we going to S4?
- If (LEqual(Arg0, 4)) {
- // ..
- }
-
- // TODO: Windows XP SP2 P-State restore
-
- Return(Package(){0,0})
-}
-
-/* System Bus */
-
-Scope(\_SB)
-{
- /* This method is placed on the top level, so we can make sure it's the
- * first executed _INI method.
- */
- Method(_INI, 0)
- {
- /* The DTS data in NVS is probably not up to date.
- * Update temperature values and make sure AP thermal
- * interrupts can happen
- */
-
- // TRAP(71) // TODO
-
- \GOS()
-
- /* And the OS workarounds start right after we know what we're
- * running: Windows XP SP1 needs to have C-State coordination
- * enabled in SMM.
- */
- If (LAnd(LEqual(OSYS, 2001), MPEN)) {
- // TRAP(61) // TODO
- }
-
- /* SMM power state and C4-on-C3 settings need to be updated */
- // TRAP(43) // TODO
- }
-}
diff --git a/src/mainboard/apple/macbook21/dsdt.asl b/src/mainboard/apple/macbook21/dsdt.asl
index 40af217..76457a4 100644
--- a/src/mainboard/apple/macbook21/dsdt.asl
+++ b/src/mainboard/apple/macbook21/dsdt.asl
@@ -28,9 +28,6 @@
0x20090419 // OEM revision
)
{
- // Some generic macros
- #include "acpi/platform.asl"
-
// global NVS and variables
#include <southbridge/intel/i82801gx/acpi/globalnvs.asl>
#include <southbridge/intel/common/acpi/platform.asl>
diff --git a/src/mainboard/gigabyte/ga-945gcm-s2l/acpi/platform.asl b/src/mainboard/gigabyte/ga-945gcm-s2l/acpi/platform.asl
deleted file mode 100644
index 21eb3df..0000000
--- a/src/mainboard/gigabyte/ga-945gcm-s2l/acpi/platform.asl
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007-2009 coresystems GmbH
- *
- * 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.
- */
-
-/* The _PTS method (Prepare To Sleep) is called before the OS is
- * entering a sleep state. The sleep state number is passed in Arg0
- */
-
-Method(_PTS,1)
-{
- // Call a trap so SMI can prepare for Sleep as well.
- // TRAP(0x55)
-}
-
-/* The _WAK method is called on system wakeup */
-
-Method(_WAK,1)
-{
- // CPU specific part
-
- // Notify PCI Express slots in case a card
- // was inserted while a sleep state was active.
-
- // Are we going to S3?
- If (LEqual(Arg0, 3)) {
- // ..
- }
-
- // Are we going to S4?
- If (LEqual(Arg0, 4)) {
- // ..
- }
-
- // TODO: Windows XP SP2 P-State restore
-
- Return(Package(){0,0})
-}
diff --git a/src/mainboard/gigabyte/ga-945gcm-s2l/dsdt.asl b/src/mainboard/gigabyte/ga-945gcm-s2l/dsdt.asl
index afc5386..3b594be 100644
--- a/src/mainboard/gigabyte/ga-945gcm-s2l/dsdt.asl
+++ b/src/mainboard/gigabyte/ga-945gcm-s2l/dsdt.asl
@@ -23,9 +23,6 @@
0x20090419 // OEM revision
)
{
- // Some generic macros
- #include "acpi/platform.asl"
-
// global NVS and variables
#include <southbridge/intel/i82801gx/acpi/globalnvs.asl>
#include <southbridge/intel/common/acpi/platform.asl>
diff --git a/src/mainboard/ibase/mb899/acpi/platform.asl b/src/mainboard/ibase/mb899/acpi/platform.asl
deleted file mode 100644
index 9866110..0000000
--- a/src/mainboard/ibase/mb899/acpi/platform.asl
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007-2009 coresystems GmbH
- *
- * 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.
- */
-
-/* The _PTS method (Prepare To Sleep) is called before the OS is
- * entering a sleep state. The sleep state number is passed in Arg0
- */
-
-Method(_PTS,1)
-{
- // Call a trap so SMI can prepare for Sleep as well.
- // TRAP(0x55)
-}
-
-/* The _WAK method is called on system wakeup */
-
-Method(_WAK,1)
-{
- // CPU specific part
-
- // Notify PCI Express slots in case a card
- // was inserted while a sleep state was active.
-
- // Are we going to S3?
- If (LEqual(Arg0, 3)) {
- // ..
- }
-
- // Are we going to S4?
- If (LEqual(Arg0, 4)) {
- // ..
- }
-
- // TODO: Windows XP SP2 P-State restore
-
- Return(Package(){0,0})
-}
diff --git a/src/mainboard/ibase/mb899/dsdt.asl b/src/mainboard/ibase/mb899/dsdt.asl
index 31b67a7..e142624 100644
--- a/src/mainboard/ibase/mb899/dsdt.asl
+++ b/src/mainboard/ibase/mb899/dsdt.asl
@@ -23,9 +23,6 @@
0x20090419 // OEM revision
)
{
- // Some generic macros
- #include "acpi/platform.asl"
-
// global NVS and variables
#include <southbridge/intel/i82801gx/acpi/globalnvs.asl>
diff --git a/src/mainboard/intel/d945gclf/acpi/platform.asl b/src/mainboard/intel/d945gclf/acpi/platform.asl
deleted file mode 100644
index 21eb3df..0000000
--- a/src/mainboard/intel/d945gclf/acpi/platform.asl
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007-2009 coresystems GmbH
- *
- * 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.
- */
-
-/* The _PTS method (Prepare To Sleep) is called before the OS is
- * entering a sleep state. The sleep state number is passed in Arg0
- */
-
-Method(_PTS,1)
-{
- // Call a trap so SMI can prepare for Sleep as well.
- // TRAP(0x55)
-}
-
-/* The _WAK method is called on system wakeup */
-
-Method(_WAK,1)
-{
- // CPU specific part
-
- // Notify PCI Express slots in case a card
- // was inserted while a sleep state was active.
-
- // Are we going to S3?
- If (LEqual(Arg0, 3)) {
- // ..
- }
-
- // Are we going to S4?
- If (LEqual(Arg0, 4)) {
- // ..
- }
-
- // TODO: Windows XP SP2 P-State restore
-
- Return(Package(){0,0})
-}
diff --git a/src/mainboard/intel/d945gclf/dsdt.asl b/src/mainboard/intel/d945gclf/dsdt.asl
index afc5386..3b594be 100644
--- a/src/mainboard/intel/d945gclf/dsdt.asl
+++ b/src/mainboard/intel/d945gclf/dsdt.asl
@@ -23,9 +23,6 @@
0x20090419 // OEM revision
)
{
- // Some generic macros
- #include "acpi/platform.asl"
-
// global NVS and variables
#include <southbridge/intel/i82801gx/acpi/globalnvs.asl>
#include <southbridge/intel/common/acpi/platform.asl>
diff --git a/src/mainboard/kontron/986lcd-m/acpi/platform.asl b/src/mainboard/kontron/986lcd-m/acpi/platform.asl
deleted file mode 100644
index 9866110..0000000
--- a/src/mainboard/kontron/986lcd-m/acpi/platform.asl
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007-2009 coresystems GmbH
- *
- * 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.
- */
-
-/* The _PTS method (Prepare To Sleep) is called before the OS is
- * entering a sleep state. The sleep state number is passed in Arg0
- */
-
-Method(_PTS,1)
-{
- // Call a trap so SMI can prepare for Sleep as well.
- // TRAP(0x55)
-}
-
-/* The _WAK method is called on system wakeup */
-
-Method(_WAK,1)
-{
- // CPU specific part
-
- // Notify PCI Express slots in case a card
- // was inserted while a sleep state was active.
-
- // Are we going to S3?
- If (LEqual(Arg0, 3)) {
- // ..
- }
-
- // Are we going to S4?
- If (LEqual(Arg0, 4)) {
- // ..
- }
-
- // TODO: Windows XP SP2 P-State restore
-
- Return(Package(){0,0})
-}
diff --git a/src/mainboard/kontron/986lcd-m/dsdt.asl b/src/mainboard/kontron/986lcd-m/dsdt.asl
index d4ffd7b..c3d1910 100644
--- a/src/mainboard/kontron/986lcd-m/dsdt.asl
+++ b/src/mainboard/kontron/986lcd-m/dsdt.asl
@@ -23,9 +23,6 @@
0x20090419 // OEM revision
)
{
- // Some generic macros
- #include "acpi/platform.asl"
-
// global NVS and variables
#include <southbridge/intel/i82801gx/acpi/globalnvs.asl>
#include <southbridge/intel/common/acpi/platform.asl>
diff --git a/src/mainboard/roda/rk886ex/acpi/platform.asl b/src/mainboard/roda/rk886ex/acpi/platform.asl
deleted file mode 100644
index ebd22af..0000000
--- a/src/mainboard/roda/rk886ex/acpi/platform.asl
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007-2009 coresystems GmbH
- *
- * 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.
- */
-
-/* The _PTS method (Prepare To Sleep) is called before the OS is
- * entering a sleep state. The sleep state number is passed in Arg0
- */
-
-Method(_PTS,1)
-{
- // Call a trap so SMI can prepare for Sleep as well.
- // TRAP(0x55)
-}
-
-/* The _WAK method is called on system wakeup */
-
-Method(_WAK,1)
-{
- // CPU specific part
-
- // Notify PCI Express slots in case a card
- // was inserted while a sleep state was active.
-
- // Are we going to S3?
- If (LEqual(Arg0, 3)) {
- // ..
- }
-
- // Are we going to S4?
- If (LEqual(Arg0, 4)) {
- // ..
- }
-
- // TODO: Windows XP SP2 P-State restore
-
- Return(Package(){0,0})
-}
-
-/* System Bus */
-
-Scope(\_SB)
-{
- /* This method is placed on the top level, so we can make sure it's the
- * first executed _INI method.
- */
- Method(_INI, 0)
- {
- /* The DTS data in NVS is probably not up to date.
- * Update temperature values and make sure AP thermal
- * interrupts can happen
- */
-
- // TRAP(71) // TODO
-
- \GOS()
-
- /* And the OS workarounds start right after we know what we're
- * running: Windows XP SP1 needs to have C-State coordination
- * enabled in SMM.
- */
- If (LAnd(LEqual(OSYS, 2001), MPEN)) {
- // TRAP(61) // TODO
- }
-
- /* SMM power state and C4-on-C3 settings need to be updated */
- // TRAP(43) // TODO
- }
-}
diff --git a/src/mainboard/roda/rk886ex/dsdt.asl b/src/mainboard/roda/rk886ex/dsdt.asl
index f9a2abe..1132ad9 100644
--- a/src/mainboard/roda/rk886ex/dsdt.asl
+++ b/src/mainboard/roda/rk886ex/dsdt.asl
@@ -24,9 +24,6 @@
0x20090419 // OEM revision
)
{
- // Some generic macros
- #include "acpi/platform.asl"
-
// global NVS and variables
#include <southbridge/intel/i82801gx/acpi/globalnvs.asl>
#include <southbridge/intel/common/acpi/platform.asl>
--
To view, visit https://review.coreboot.org/c/coreboot/+/36882
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I547801efeb91aa2cbe9b4336bf2f3f00b8a8c07c
Gerrit-Change-Number: 36882
Gerrit-PatchSet: 1
Gerrit-Owner: HAOUAS Elyes <ehaouas(a)noos.fr>
Gerrit-MessageType: newchange
HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37341 )
Change subject: sb/intel/i82801gx: Fix conversion from 'int' to 'signed char:1'
......................................................................
sb/intel/i82801gx: Fix conversion from 'int' to 'signed char:1'
Error found using -Wconversion on mainboard/macbook21/static.c
Change-Id: I23d7b876f778ab78e922709a0a36f5eec4d60e3d
Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr>
---
M src/southbridge/intel/i82801gx/chip.h
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/37341/1
diff --git a/src/southbridge/intel/i82801gx/chip.h b/src/southbridge/intel/i82801gx/chip.h
index 75b9575..f844515 100644
--- a/src/southbridge/intel/i82801gx/chip.h
+++ b/src/southbridge/intel/i82801gx/chip.h
@@ -76,9 +76,9 @@
/* Enable linear PCIe Root Port function numbers starting at zero */
uint8_t pcie_port_coalesce;
- int c4onc3_enable:1;
- int docking_supported:1;
- int p_cnt_throttling_supported:1;
+ signed char c4onc3_enable:1;
+ signed char docking_supported:1;
+ signed char p_cnt_throttling_supported:1;
int c3_latency;
/* Additional LPC IO decode ranges */
--
To view, visit https://review.coreboot.org/c/coreboot/+/37341
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I23d7b876f778ab78e922709a0a36f5eec4d60e3d
Gerrit-Change-Number: 37341
Gerrit-PatchSet: 1
Gerrit-Owner: HAOUAS Elyes <ehaouas(a)noos.fr>
Gerrit-MessageType: newchange
HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37342 )
Change subject: sb/intel/i82801{i,j}x: Fix conversion from 'int' to 'signed char:6'
......................................................................
sb/intel/i82801{i,j}x: Fix conversion from 'int' to 'signed char:6'
Error found using option -Wconversion:
"error: conversion from 'int' to 'signed char:6' changes value from '49' to '-15'"
Change-Id: I3cdf4bf1b78b463846b3070ad4c6e82a7a329f5f
Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr>
---
M src/southbridge/intel/i82801ix/chip.h
M src/southbridge/intel/i82801jx/chip.h
2 files changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/37342/1
diff --git a/src/southbridge/intel/i82801ix/chip.h b/src/southbridge/intel/i82801ix/chip.h
index 73ee822..a11e00b 100644
--- a/src/southbridge/intel/i82801ix/chip.h
+++ b/src/southbridge/intel/i82801ix/chip.h
@@ -79,7 +79,7 @@
int throttle_duty : 3;
/* Bit mask to tell whether a PCIe slot is implemented as slot. */
- int pcie_slot_implemented : 6;
+ signed char pcie_slot_implemented : 6;
/* Power limits for PCIe ports. Values are in 10^(-scale) watts. */
struct {
diff --git a/src/southbridge/intel/i82801jx/chip.h b/src/southbridge/intel/i82801jx/chip.h
index e4c68fb..d84de8e 100644
--- a/src/southbridge/intel/i82801jx/chip.h
+++ b/src/southbridge/intel/i82801jx/chip.h
@@ -69,7 +69,7 @@
int throttle_duty : 3;
/* Bit mask to tell whether a PCIe slot is implemented as slot. */
- int pcie_slot_implemented : 6;
+ signed char pcie_slot_implemented : 6;
/* Power limits for PCIe ports. Values are in 10^(-scale) watts. */
struct {
--
To view, visit https://review.coreboot.org/c/coreboot/+/37342
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3cdf4bf1b78b463846b3070ad4c6e82a7a329f5f
Gerrit-Change-Number: 37342
Gerrit-PatchSet: 1
Gerrit-Owner: HAOUAS Elyes <ehaouas(a)noos.fr>
Gerrit-MessageType: newchange
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