Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34696 )
Change subject: soc/intel: Obsolete mmap_region_granularity()
......................................................................
soc/intel: Obsolete mmap_region_granularity()
Change-Id: I471598d3ce61b70e35adba3bd983f5d823ba3816
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
M Documentation/Intel/SoC/soc.html
M src/drivers/intel/fsp1_1/include/fsp/memmap.h
M src/drivers/intel/fsp2_0/include/fsp/memmap.h
M src/soc/intel/braswell/memmap.c
M src/soc/intel/denverton_ns/include/soc/smm.h
M src/soc/intel/skylake/memmap.c
6 files changed, 0 insertions(+), 40 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/96/34696/1
diff --git a/Documentation/Intel/SoC/soc.html b/Documentation/Intel/SoC/soc.html
index fff536b..6b1bb30 100644
--- a/Documentation/Intel/SoC/soc.html
+++ b/Documentation/Intel/SoC/soc.html
@@ -148,7 +148,6 @@
<li>Edit the src/soc/<Vendor>/<Chip Family>/memmap.c file
<ol type="A">
<li>Add the fsp/memmap.h include file</li>
- <li>Add the mmap_region_granularity routine</li>
</ol>
</li>
<li>Add the necessary .h files to define the necessary values and structures</li>
diff --git a/src/drivers/intel/fsp1_1/include/fsp/memmap.h b/src/drivers/intel/fsp1_1/include/fsp/memmap.h
index 965bce6..3f3850f 100644
--- a/src/drivers/intel/fsp1_1/include/fsp/memmap.h
+++ b/src/drivers/intel/fsp1_1/include/fsp/memmap.h
@@ -18,13 +18,6 @@
#include <types.h>
-/*
- * mmap_region_granularity must to return a size which is a positive non-zero
- * integer multiple of the SMM size when SMM is in use. When not using SMM,
- * this value should be set to 8 MiB.
- */
-size_t mmap_region_granularity(void);
-
/* Fills in the arguments for the entire SMM region covered by chipset
* protections. e.g. TSEG. */
void smm_region(void **start, size_t *size);
diff --git a/src/drivers/intel/fsp2_0/include/fsp/memmap.h b/src/drivers/intel/fsp2_0/include/fsp/memmap.h
index 965bce6..3f3850f 100644
--- a/src/drivers/intel/fsp2_0/include/fsp/memmap.h
+++ b/src/drivers/intel/fsp2_0/include/fsp/memmap.h
@@ -18,13 +18,6 @@
#include <types.h>
-/*
- * mmap_region_granularity must to return a size which is a positive non-zero
- * integer multiple of the SMM size when SMM is in use. When not using SMM,
- * this value should be set to 8 MiB.
- */
-size_t mmap_region_granularity(void);
-
/* Fills in the arguments for the entire SMM region covered by chipset
* protections. e.g. TSEG. */
void smm_region(void **start, size_t *size);
diff --git a/src/soc/intel/braswell/memmap.c b/src/soc/intel/braswell/memmap.c
index 207c843..a4692ce 100644
--- a/src/soc/intel/braswell/memmap.c
+++ b/src/soc/intel/braswell/memmap.c
@@ -34,13 +34,6 @@
*size = smm_region_size();
}
-size_t mmap_region_granularity(void)
-{
- /* Align to TSEG size when SMM is in use, and 8MiB by default */
- return CONFIG(HAVE_SMI_HANDLER) ? smm_region_size()
- : 8 << 20;
-}
-
/*
* Subregions within SMM
* +-------------------------+ BUNIT_SMRRH
diff --git a/src/soc/intel/denverton_ns/include/soc/smm.h b/src/soc/intel/denverton_ns/include/soc/smm.h
index 771c3d8..ca01cf8 100644
--- a/src/soc/intel/denverton_ns/include/soc/smm.h
+++ b/src/soc/intel/denverton_ns/include/soc/smm.h
@@ -24,13 +24,6 @@
uint32_t smrr_mask;
};
-/*
- * mmap_region_granularity must to return a size which is a positive non-zero
- * integer multiple of the SMM size when SMM is in use. When not using SMM,
- * this value should be set to 8 MiB.
- */
-size_t mmap_region_granularity(void);
-
/* Fills in the arguments for the entire SMM region covered by chipset
* protections. e.g. TSEG. */
void smm_region(void **start, size_t *size);
diff --git a/src/soc/intel/skylake/memmap.c b/src/soc/intel/skylake/memmap.c
index 5133c21..d2c223e 100644
--- a/src/soc/intel/skylake/memmap.c
+++ b/src/soc/intel/skylake/memmap.c
@@ -30,17 +30,6 @@
#include "chip.h"
-size_t mmap_region_granularity(void)
-{
- if (CONFIG(HAVE_SMI_HANDLER))
- /* Align to TSEG size when SMM is in use */
- if (CONFIG_SMM_TSEG_SIZE != 0)
- return CONFIG_SMM_TSEG_SIZE;
-
- /* Make it 8MiB by default. */
- return 8*MiB;
-}
-
void smm_region(void **start, size_t *size)
{
*start = (void *)sa_get_tseg_base();
--
To view, visit https://review.coreboot.org/c/coreboot/+/34696
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I471598d3ce61b70e35adba3bd983f5d823ba3816
Gerrit-Change-Number: 34696
Gerrit-PatchSet: 1
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-MessageType: newchange
Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34673 )
Change subject: opencellular/rotundu: Disable HAVE_ACPI_RESUME support
......................................................................
opencellular/rotundu: Disable HAVE_ACPI_RESUME support
FSP1.0 has low memory corruptions below CONFIG_RAMTOP
on S3 resume path, as romstage ram stack will be utilised
before there is a chance to make the necessary backup
to CBMEM.
Previously done for intel/minnowmax in commit b6fc727.
Change-Id: I2e128079b180f9978e8519b190648d516aaee0dc
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
M src/mainboard/opencellular/rotundu/Kconfig
1 file changed, 0 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/73/34673/1
diff --git a/src/mainboard/opencellular/rotundu/Kconfig b/src/mainboard/opencellular/rotundu/Kconfig
index fe1cbf9..ddacbe7 100644
--- a/src/mainboard/opencellular/rotundu/Kconfig
+++ b/src/mainboard/opencellular/rotundu/Kconfig
@@ -23,7 +23,6 @@
select HAVE_OPTION_TABLE
select ENABLE_BUILTIN_COM1
select ENABLE_FSP_FAST_BOOT
- select HAVE_ACPI_RESUME
select USE_BLOBS
select HAVE_FSP_BIN if FSP_PACKAGE_DEFAULT
select MAINBOARD_HAS_LPC_TPM
--
To view, visit https://review.coreboot.org/c/coreboot/+/34673
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2e128079b180f9978e8519b190648d516aaee0dc
Gerrit-Change-Number: 34673
Gerrit-PatchSet: 1
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
Gerrit-MessageType: newchange
Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34672 )
Change subject: intel/nehalem,sandybridge: Move stage_cache support function
......................................................................
intel/nehalem,sandybridge: Move stage_cache support function
Let garbage-collection take care of stage_cache_external_region()
if it is no needed and move implementation to a suitable file already
building for needed stages.
Remove aliasing CONFIG_RESERVED_SMM_SIZE as RESERVED_SMM_SIZE and
(unused) aliasing of CONFIG_IED_REGION_SIZE as IED_SIZE.
Change-Id: Idf00ba3180d8c3bc974dd3c5ca5f98a6c08bf34d
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
M src/cpu/intel/model_2065x/Makefile.inc
M src/cpu/intel/model_2065x/model_2065x.h
D src/cpu/intel/model_2065x/stage_cache.c
M src/cpu/intel/model_206ax/Makefile.inc
M src/cpu/intel/model_206ax/model_206ax.h
D src/cpu/intel/model_206ax/stage_cache.c
M src/northbridge/intel/nehalem/nehalem.h
M src/northbridge/intel/nehalem/northbridge.c
M src/northbridge/intel/nehalem/ram_calc.c
M src/northbridge/intel/sandybridge/northbridge.c
M src/northbridge/intel/sandybridge/ram_calc.c
M src/northbridge/intel/sandybridge/sandybridge.h
12 files changed, 40 insertions(+), 126 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/34672/1
diff --git a/src/cpu/intel/model_2065x/Makefile.inc b/src/cpu/intel/model_2065x/Makefile.inc
index 9a11b06..1f6d1a2 100644
--- a/src/cpu/intel/model_2065x/Makefile.inc
+++ b/src/cpu/intel/model_2065x/Makefile.inc
@@ -19,10 +19,6 @@
smm-y += finalize.c
-romstage-y += stage_cache.c
-ramstage-y += stage_cache.c
-postcar-y += stage_cache.c
-
cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-25-*)
cpu_incs-y += $(src)/cpu/intel/car/non-evict/cache_as_ram.S
diff --git a/src/cpu/intel/model_2065x/model_2065x.h b/src/cpu/intel/model_2065x/model_2065x.h
index eab2dd5..2f3584a 100644
--- a/src/cpu/intel/model_2065x/model_2065x.h
+++ b/src/cpu/intel/model_2065x/model_2065x.h
@@ -80,16 +80,9 @@
int cpu_config_tdp_levels(void);
#endif
-/*
- * Region of SMM space is reserved for multipurpose use. It falls below
- * the IED region and above the SMM handler.
- */
-#define RESERVED_SMM_SIZE CONFIG_SMM_RESERVED_SIZE
-#define RESERVED_SMM_OFFSET (CONFIG_SMM_TSEG_SIZE - RESERVED_SMM_SIZE)
-
/* Sanity check config options. */
-#if (CONFIG_SMM_TSEG_SIZE <= RESERVED_SMM_SIZE)
-# error "CONFIG_SMM_TSEG_SIZE <= RESERVED_SMM_SIZE"
+#if (CONFIG_SMM_TSEG_SIZE <= CONFIG_SMM_RESERVED_SIZE)
+# error "CONFIG_SMM_TSEG_SIZE <= CONFIG_SMM_RESERVED_SIZE"
#endif
#if (CONFIG_SMM_TSEG_SIZE < 0x800000)
# error "CONFIG_SMM_TSEG_SIZE must at least be 8MiB"
diff --git a/src/cpu/intel/model_2065x/stage_cache.c b/src/cpu/intel/model_2065x/stage_cache.c
deleted file mode 100644
index ab8ac97..0000000
--- a/src/cpu/intel/model_2065x/stage_cache.c
+++ /dev/null
@@ -1,30 +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 <stage_cache.h>
-#include <cpu/intel/smm/gen1/smi.h>
-#include "model_2065x.h"
-
-void stage_cache_external_region(void **base, size_t *size)
-{
- /*
- * The ramstage cache lives in the TSEG region at RESERVED_SMM_OFFSET.
- * The top of RAM is defined to be the TSEG base address.
- */
- *size = RESERVED_SMM_SIZE;
- *base = (void *)((uintptr_t)northbridge_get_tseg_base()
- + RESERVED_SMM_OFFSET);
-}
diff --git a/src/cpu/intel/model_206ax/Makefile.inc b/src/cpu/intel/model_206ax/Makefile.inc
index f5de8c3..e723d74 100644
--- a/src/cpu/intel/model_206ax/Makefile.inc
+++ b/src/cpu/intel/model_206ax/Makefile.inc
@@ -24,10 +24,6 @@
smm-y += finalize.c
-romstage-$(CONFIG_CACHE_RELOCATED_RAMSTAGE_OUTSIDE_CBMEM) += stage_cache.c
-postcar-$(CONFIG_CACHE_RELOCATED_RAMSTAGE_OUTSIDE_CBMEM) += stage_cache.c
-ramstage-$(CONFIG_CACHE_RELOCATED_RAMSTAGE_OUTSIDE_CBMEM) += stage_cache.c
-
cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-2a-*)
cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-3a-*)
diff --git a/src/cpu/intel/model_206ax/model_206ax.h b/src/cpu/intel/model_206ax/model_206ax.h
index c0d2434..2dc9293 100644
--- a/src/cpu/intel/model_206ax/model_206ax.h
+++ b/src/cpu/intel/model_206ax/model_206ax.h
@@ -81,17 +81,9 @@
#define PSS_LATENCY_TRANSITION 10
#define PSS_LATENCY_BUSMASTER 10
-/*
- * Region of SMM space is reserved for multipurpose use. It falls below
- * the IED region and above the SMM handler.
- */
-#define RESERVED_SMM_SIZE CONFIG_SMM_RESERVED_SIZE
-#define RESERVED_SMM_OFFSET \
- (CONFIG_SMM_TSEG_SIZE - CONFIG_IED_REGION_SIZE - RESERVED_SMM_SIZE)
-
/* Sanity check config options. */
-#if (CONFIG_SMM_TSEG_SIZE <= (CONFIG_IED_REGION_SIZE + RESERVED_SMM_SIZE))
-# error "CONFIG_SMM_TSEG_SIZE <= (CONFIG_IED_REGION_SIZE + RESERVED_SMM_SIZE)"
+#if (CONFIG_SMM_TSEG_SIZE <= (CONFIG_IED_REGION_SIZE + CONFIG_SMM_RESERVED_SIZE))
+# error "CONFIG_SMM_TSEG_SIZE <= (CONFIG_IED_REGION_SIZE + CONFIG_SMM_RESERVED_SIZE)"
#endif
#if (CONFIG_SMM_TSEG_SIZE < 0x800000)
# error "CONFIG_SMM_TSEG_SIZE must at least be 8MiB"
diff --git a/src/cpu/intel/model_206ax/stage_cache.c b/src/cpu/intel/model_206ax/stage_cache.c
deleted file mode 100644
index 26dc5e0..0000000
--- a/src/cpu/intel/model_206ax/stage_cache.c
+++ /dev/null
@@ -1,28 +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 <stage_cache.h>
-#include "model_206ax.h"
-
-void stage_cache_external_region(void **base, size_t *size)
-{
- /*
- * The ramstage cache lives in the TSEG region at RESERVED_SMM_OFFSET.
- * The top of RAM is defined to be the TSEG base address.
- */
- *size = RESERVED_SMM_SIZE;
- *base = (void *)((uintptr_t)cbmem_top() + RESERVED_SMM_OFFSET);
-}
diff --git a/src/northbridge/intel/nehalem/nehalem.h b/src/northbridge/intel/nehalem/nehalem.h
index b220c2d..93024f6 100644
--- a/src/northbridge/intel/nehalem/nehalem.h
+++ b/src/northbridge/intel/nehalem/nehalem.h
@@ -122,9 +122,6 @@
#define IVB_STEP_K0 (BASE_REV_IVB + 5)
#define IVB_STEP_D0 (BASE_REV_IVB + 6)
-/* Intel Enhanced Debug region must be 4MB */
-#define IED_SIZE 0x400000
-
/* Northbridge BARs */
#ifndef __ACPI__
#define DEFAULT_MCHBAR ((u8 *)0xfed10000) /* 16 KB */
diff --git a/src/northbridge/intel/nehalem/northbridge.c b/src/northbridge/intel/nehalem/northbridge.c
index 485cb27..a058d3f 100644
--- a/src/northbridge/intel/nehalem/northbridge.c
+++ b/src/northbridge/intel/nehalem/northbridge.c
@@ -171,11 +171,6 @@
add_fixed_resources(dev, 10);
}
-u32 northbridge_get_tseg_size(void)
-{
- return CONFIG_SMM_TSEG_SIZE;
-}
-
static void mc_set_resources(struct device *dev)
{
/* And call the normal set_resources */
diff --git a/src/northbridge/intel/nehalem/ram_calc.c b/src/northbridge/intel/nehalem/ram_calc.c
index ba37610..ec036c9 100644
--- a/src/northbridge/intel/nehalem/ram_calc.c
+++ b/src/northbridge/intel/nehalem/ram_calc.c
@@ -23,6 +23,7 @@
#include <cpu/intel/romstage.h>
#include <cpu/x86/mtrr.h>
#include <program_loading.h>
+#include <stage_cache.h>
#include <cpu/intel/smm/gen1/smi.h>
#include "nehalem.h"
@@ -38,11 +39,25 @@
return (u32)smm_region_start();
}
+u32 northbridge_get_tseg_size(void)
+{
+ return CONFIG_SMM_TSEG_SIZE;
+}
+
void *cbmem_top(void)
{
return (void *) smm_region_start();
}
+void stage_cache_external_region(void **base, size_t *size)
+{
+ /* The stage cache lives at the end of TSEG region.
+ * The top of RAM is defined to be the TSEG base address. */
+ *size = CONFIG_SMM_RESERVED_SIZE;
+ *base = (void *)((uintptr_t)northbridge_get_tseg_base() +
+ northbridge_get_tseg_size() - CONFIG_SMM_RESERVED_SIZE);
+}
+
/* platform_enter_postcar() determines the stack to use after
* cache-as-ram is torn down as well as the MTRR settings to use,
* and continues execution in postcar stage. */
diff --git a/src/northbridge/intel/sandybridge/northbridge.c b/src/northbridge/intel/sandybridge/northbridge.c
index 5aa06c8..233384c 100644
--- a/src/northbridge/intel/sandybridge/northbridge.c
+++ b/src/northbridge/intel/sandybridge/northbridge.c
@@ -444,28 +444,6 @@
MCHBAR32(0x5500) = 0x00100001;
}
-static u32 northbridge_get_base_reg(struct device *dev, int reg)
-{
- u32 value;
-
- value = pci_read_config32(dev, reg);
- /* Base registers are at 1MiB granularity. */
- value &= ~((1 << 20) - 1);
- return value;
-}
-
-u32 northbridge_get_tseg_base(void)
-{
- struct device *dev = pcidev_on_root(0, 0);
-
- return northbridge_get_base_reg(dev, TSEG);
-}
-
-u32 northbridge_get_tseg_size(void)
-{
- return CONFIG_SMM_TSEG_SIZE;
-}
-
void northbridge_write_smram(u8 smram)
{
pci_write_config8(pcidev_on_root(0, 0), SMRAM, smram);
diff --git a/src/northbridge/intel/sandybridge/ram_calc.c b/src/northbridge/intel/sandybridge/ram_calc.c
index 343ae62..7d5c173 100644
--- a/src/northbridge/intel/sandybridge/ram_calc.c
+++ b/src/northbridge/intel/sandybridge/ram_calc.c
@@ -20,17 +20,12 @@
#include <cbmem.h>
#include <console/console.h>
#include <cpu/intel/romstage.h>
+#include <cpu/intel/smm/gen1/smi.h>
#include <cpu/x86/mtrr.h>
#include <program_loading.h>
+#include <stage_cache.h>
#include "sandybridge.h"
-#if (CONFIG_SMM_TSEG_SIZE < 0x800000)
-# error "CONFIG_SMM_TSEG_SIZE must at least be 8MiB"
-#endif
-#if ((CONFIG_SMM_TSEG_SIZE & (CONFIG_SMM_TSEG_SIZE - 1)) != 0)
-# error "CONFIG_SMM_TSEG_SIZE is not a power of 2"
-#endif
-
static uintptr_t smm_region_start(void)
{
/* Base of TSEG is top of usable DRAM */
@@ -43,6 +38,25 @@
return (void *) smm_region_start();
}
+u32 northbridge_get_tseg_base(void)
+{
+ return ALIGN_DOWN(smm_region_start(), 1*MiB);
+}
+
+u32 northbridge_get_tseg_size(void)
+{
+ return CONFIG_SMM_TSEG_SIZE;
+}
+
+void stage_cache_external_region(void **base, size_t *size)
+{
+ /* The stage cache lives at the end of TSEG region.
+ * The top of RAM is defined to be the TSEG base address. */
+ *size = CONFIG_SMM_RESERVED_SIZE;
+ *base = (void *)((uintptr_t)northbridge_get_tseg_base() + northbridge_get_tseg_size()
+ - CONFIG_IED_REGION_SIZE - CONFIG_SMM_RESERVED_SIZE);
+}
+
/* platform_enter_postcar() determines the stack to use after
* cache-as-ram is torn down as well as the MTRR settings to use,
* and continues execution in postcar stage. */
diff --git a/src/northbridge/intel/sandybridge/sandybridge.h b/src/northbridge/intel/sandybridge/sandybridge.h
index 88b7b56..b488f2c 100644
--- a/src/northbridge/intel/sandybridge/sandybridge.h
+++ b/src/northbridge/intel/sandybridge/sandybridge.h
@@ -34,10 +34,6 @@
#define IVB_STEP_K0 (BASE_REV_IVB + 5)
#define IVB_STEP_D0 (BASE_REV_IVB + 6)
-/* Intel Enhanced Debug region must be 4MB */
-
-#define IED_SIZE CONFIG_IED_REGION_SIZE
-
/* Northbridge BARs */
#ifndef __ACPI__
#define DEFAULT_MCHBAR ((u8 *)0xfed10000) /* 16 KB */
--
To view, visit https://review.coreboot.org/c/coreboot/+/34672
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Idf00ba3180d8c3bc974dd3c5ca5f98a6c08bf34d
Gerrit-Change-Number: 34672
Gerrit-PatchSet: 1
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: newchange
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34684 )
Change subject: lib/spd_bin: Fix bug with rank parsing for DDR4
......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/34684/1/src/lib/spd_bin.c
File src/lib/spd_bin.c:
https://review.coreboot.org/c/coreboot/+/34684/1/src/lib/spd_bin.c@a76
PS1, Line 76:
> However it should be ranks = spd_ranks[(spd[12] >> 3) & 7] + 1; because in spec 00 is 1 and 01 is 2 etc
Right. Either you need ((spd[12] >> 3) & 7) + 1 or you need spd_ranks_ddr4[] = {1, 2, 3, 4, 5, 6, 7, 8}
Actually, it might be a good exercise to check if other arrays[] at the start of this function look good for DDR4.
--
To view, visit https://review.coreboot.org/c/coreboot/+/34684
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3184c5a7fd4b5ae5882914e62d1cb0c28bb881e7
Gerrit-Change-Number: 34684
Gerrit-PatchSet: 1
Gerrit-Owner: Andrey Petrov <anpetrov(a)fb.com>
Gerrit-Reviewer: Andrey Petrov <anpetrov(a)fb.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 07 Aug 2019 00:43:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Andrey Petrov <anpetrov(a)fb.com>
Comment-In-Reply-To: Furquan Shaikh <furquan(a)google.com>
Gerrit-MessageType: comment
Andrey Petrov has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34684 )
Change subject: lib/spd_bin: Fix bug with rank parsing for DDR4
......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/34684/1/src/lib/spd_bin.c
File src/lib/spd_bin.c:
https://review.coreboot.org/c/coreboot/+/34684/1/src/lib/spd_bin.c@a76
PS1, Line 76:
> Shouldn't this be: […]
you are right, SPD_ORGANIZATION is different on ddr3 and ddr4.
However it should be ranks = spd_ranks[(spd[12] >> 3) & 7] + 1; because in spec 00 is 1 and 01 is 2 etc
--
To view, visit https://review.coreboot.org/c/coreboot/+/34684
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3184c5a7fd4b5ae5882914e62d1cb0c28bb881e7
Gerrit-Change-Number: 34684
Gerrit-PatchSet: 1
Gerrit-Owner: Andrey Petrov <anpetrov(a)fb.com>
Gerrit-Reviewer: Andrey Petrov <anpetrov(a)fb.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 07 Aug 2019 00:12:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Furquan Shaikh <furquan(a)google.com>
Gerrit-MessageType: comment
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34684 )
Change subject: lib/spd_bin: Fix bug with rank parsing for DDR4
......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/34684/1/src/lib/spd_bin.c
File src/lib/spd_bin.c:
https://review.coreboot.org/c/coreboot/+/34684/1/src/lib/spd_bin.c@a76
PS1, Line 76:
Shouldn't this be:
ranks = spd_ranks[(spd[12] >> 3) & 7];
Basically, SPD_ORGANIZATION for DDR4 is byte 12 instead of byte 7 as in the case of DDR3.
--
To view, visit https://review.coreboot.org/c/coreboot/+/34684
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3184c5a7fd4b5ae5882914e62d1cb0c28bb881e7
Gerrit-Change-Number: 34684
Gerrit-PatchSet: 1
Gerrit-Owner: Andrey Petrov <anpetrov(a)fb.com>
Gerrit-Reviewer: Andrey Petrov <anpetrov(a)fb.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 06 Aug 2019 23:48:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment