Patrick Rudolph (siro(a)das-labor.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14278
-gerrit
commit 8c88c6f25d5914c6223b39656b01f52686f2f3b5
Author: Patrick Rudolph <siro(a)das-labor.org>
Date: Thu Apr 7 18:51:12 2016 +0200
mb/samsung/lumpy/romstage: read SPD data of removable DIMM
The removable DIMM SPD data wasn't read.
As a result the system only uses the 2GB onboard memory and
the GNU Linux kernel paniced in acpi_ds_build_internal_package_obj.
Read the SPD and allow native raminit and MRC blob to use the
removable DIMM.
The system is able to use the removable dimm and the kernel panic
is gone.
Change-Id: I30eed747f924cb0029de55d2ab85c5a94075dc1b
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
src/mainboard/samsung/lumpy/romstage.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/mainboard/samsung/lumpy/romstage.c b/src/mainboard/samsung/lumpy/romstage.c
index 650c8d7..8a37356 100644
--- a/src/mainboard/samsung/lumpy/romstage.c
+++ b/src/mainboard/samsung/lumpy/romstage.c
@@ -216,6 +216,8 @@ void mainboard_fill_pei_data(struct pei_data *pei_data)
*pei_data = pei_data_template;
// leave onboard dimm address at f0, and copy spd data there.
memcpy(pei_data->spd_data[0], locate_spd(), 256);
+ /* read removable dimm spd */
+ read_spd(&pei_data->spd_data[2], 0x50);
}
const struct southbridge_usb_port mainboard_usb_ports[] = {
@@ -238,7 +240,10 @@ const struct southbridge_usb_port mainboard_usb_ports[] = {
void mainboard_get_spd(spd_raw_data *spd)
{
- memcpy(&spd[0], locate_spd(), 128);
+ /* get onbard dimm spd */
+ memcpy(&spd[0], locate_spd(), 256);
+ /* read removable dimm spd */
+ read_spd(&spd[2], 0x50);
}
void mainboard_early_init(int s3resume)
Patrick Rudolph (siro(a)das-labor.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14278
-gerrit
commit 03b1ac8bbdb6d2f62c6fccbab3998644b0e61e4f
Author: Patrick Rudolph <siro(a)das-labor.org>
Date: Thu Apr 7 18:51:12 2016 +0200
mb/samsung/lumpy/romstage: read SPD data of removable DIMM
The removable DIMM SPD data wasn't read. As a result the system
only uses the 2GB onboard memory and showed strange behaviour
when booting into GNU Linux.
Read the SPD and allow native raminit and MRC blob to use the
removable DIMM, too.
Change-Id: I30eed747f924cb0029de55d2ab85c5a94075dc1b
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
src/mainboard/samsung/lumpy/romstage.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/mainboard/samsung/lumpy/romstage.c b/src/mainboard/samsung/lumpy/romstage.c
index 650c8d7..8a37356 100644
--- a/src/mainboard/samsung/lumpy/romstage.c
+++ b/src/mainboard/samsung/lumpy/romstage.c
@@ -216,6 +216,8 @@ void mainboard_fill_pei_data(struct pei_data *pei_data)
*pei_data = pei_data_template;
// leave onboard dimm address at f0, and copy spd data there.
memcpy(pei_data->spd_data[0], locate_spd(), 256);
+ /* read removable dimm spd */
+ read_spd(&pei_data->spd_data[2], 0x50);
}
const struct southbridge_usb_port mainboard_usb_ports[] = {
@@ -238,7 +240,10 @@ const struct southbridge_usb_port mainboard_usb_ports[] = {
void mainboard_get_spd(spd_raw_data *spd)
{
- memcpy(&spd[0], locate_spd(), 128);
+ /* get onbard dimm spd */
+ memcpy(&spd[0], locate_spd(), 256);
+ /* read removable dimm spd */
+ read_spd(&spd[2], 0x50);
}
void mainboard_early_init(int s3resume)
Andrey Petrov (andrey.petrov(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14252
-gerrit
commit 7625de1986b225d38b75888de4481d9967d8f568
Author: Hannah Williams <hannah.williams(a)intel.com>
Date: Mon Mar 14 17:38:51 2016 -0700
soc/intel/apollolake: Enable CACHE_MRC_SETTINGS
Change-Id: I0248001892ef763c39097848b5adc8c1befed1f0
Signed-off-by: Hannah Williams <hannah.williams(a)intel.com>
---
src/soc/intel/apollolake/Kconfig | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/soc/intel/apollolake/Kconfig b/src/soc/intel/apollolake/Kconfig
index 30ee7e5..c911338 100644
--- a/src/soc/intel/apollolake/Kconfig
+++ b/src/soc/intel/apollolake/Kconfig
@@ -100,4 +100,8 @@ config ROMSTAGE_ADDR
help
The base address (in CAR) where romstage should be linked
+config CACHE_MRC_SETTINGS
+ bool
+ default y
+
endif
Andrey Petrov (andrey.petrov(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14247
-gerrit
commit e51ec14b711c0e32a8555d88b5d4539369c89772
Author: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
Date: Thu Mar 3 10:58:30 2016 -0800
soc/intel/common/nvm: Allow overriding to_flash_offset() function
On apollolake, the flash is memory-mapped differently, and the default
MMIO to flash calculation does not produce correct results. While the
long-term solution is to rewrite the NVM functionality to keep the
flash offset as part of its context, as a temporary measure, allow
overriding the to_flash_offset() function by declaring it weak.
Change-Id: Ic54baeba2441a08cfe1a47e235747797f6efb59b
Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com>
Signed-off-by: Andrey Petrov <andrey.petrov(a)intel.com>
---
src/soc/intel/common/nvm.c | 22 +++++++++++++++++-----
src/soc/intel/common/nvm.h | 3 +++
2 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/src/soc/intel/common/nvm.c b/src/soc/intel/common/nvm.c
index fe73408..e55638a 100644
--- a/src/soc/intel/common/nvm.c
+++ b/src/soc/intel/common/nvm.c
@@ -46,8 +46,20 @@ static int nvm_init(void)
return 0;
}
-/* Convert memory mapped pointer to flash offset. */
-static inline uint32_t to_flash_offset(void *p)
+/*
+ * Convert memory mapped pointer to flash offset.
+ *
+ * This is weak because not every platforms memory-maps the NVM media in the
+ * same manner. This is a stop-gap solution.
+ *
+ * The root of the problem is that users of this API work in memory space for
+ * both reads and writes, but erase and write must be done in flash space. This
+ * also only works when the media is memory-mapped, which is no longer
+ * universally true. The long-term approach should be to rewrite this and its
+ * users to work in flash space, while using rdev_read() instead of rdev_mmap().
+ */
+__attribute__((weak))
+uint32_t nvm_mmio_to_flash_offset(void *p)
{
return CONFIG_ROM_SIZE + (uintptr_t)p;
}
@@ -70,7 +82,7 @@ int nvm_erase(void *start, size_t size)
{
if (nvm_init() < 0)
return -1;
- return flash->erase(flash, to_flash_offset(start), size);
+ return flash->erase(flash, nvm_mmio_to_flash_offset(start), size);
}
/* Write data to NVM. Returns 0 on success < 0 on error. */
@@ -78,7 +90,7 @@ int nvm_write(void *start, const void *data, size_t size)
{
if (nvm_init() < 0)
return -1;
- return flash->write(flash, to_flash_offset(start), size, data);
+ return flash->write(flash, nvm_mmio_to_flash_offset(start), size, data);
}
/* Read flash status register to determine if write protect is active */
@@ -115,7 +127,7 @@ int nvm_protect(void *start, size_t size)
#if IS_ENABLED(CONFIG_MRC_SETTINGS_PROTECT)
if (nvm_init() < 0)
return -1;
- return spi_flash_protect(to_flash_offset(start), size);
+ return spi_flash_protect(nvm_mmio_to_flash_offset(start), size);
#else
return -1;
#endif
diff --git a/src/soc/intel/common/nvm.h b/src/soc/intel/common/nvm.h
index feae5c3..074a2ce 100644
--- a/src/soc/intel/common/nvm.h
+++ b/src/soc/intel/common/nvm.h
@@ -33,4 +33,7 @@ int nvm_is_write_protected(void);
/* Apply protection to a range of flash */
int nvm_protect(void *start, size_t size);
+/* Map MMIO address to actual address in flash */
+uint32_t nvm_mmio_to_flash_offset(void *p);
+
#endif /* _COMMON_NVM_H_ */