Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4681
-gerrit
commit 780a03850e5def3d41e466fc337d7eaa25a7b440
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Sun Jan 12 15:42:58 2014 -0600
lib: Make log2() available in romstage on ARM, not just x86
On x86, log2() is defined as an inline functions in arch/io.h. This is
a remnant of ROMCC, and forced us to not include clog2.c in romstage.
As a result, romstage on ARM has no log2().
Use the inline log2 only with ROMCC, but otherwise, use the one in
clog2.c.
Change-Id: Ifef2aa0a7b5a1db071a66f2eec0be421b8b2a56d
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
---
src/arch/x86/include/arch/io.h | 6 +++++-
src/include/lib.h | 2 +-
src/lib/Makefile.inc | 1 +
src/northbridge/amd/amdk8/incoherent_ht.c | 1 +
src/northbridge/intel/e7505/raminit.c | 1 +
5 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/arch/x86/include/arch/io.h b/src/arch/x86/include/arch/io.h
index 955d8e2..b10fb8a 100644
--- a/src/arch/x86/include/arch/io.h
+++ b/src/arch/x86/include/arch/io.h
@@ -167,7 +167,8 @@ static inline __attribute__((always_inline)) void write32(unsigned long addr, ui
*((volatile uint32_t *)(addr)) = value;
}
-#if defined(__PRE_RAM__) || defined(__SMM__)
+/* Conflicts with definition in lib.h */
+#if defined(__ROMCC__) || defined(__SMM__)
static inline int log2(int value)
{
unsigned int r = 0;
@@ -180,6 +181,9 @@ static inline int log2(int value)
return r;
}
+#endif
+
+#if defined(__PRE_RAM__) || defined(__SMM__)
static inline int log2f(int value)
{
unsigned int r = 0;
diff --git a/src/include/lib.h b/src/include/lib.h
index 5fc390a..3a51533 100644
--- a/src/include/lib.h
+++ b/src/include/lib.h
@@ -23,7 +23,7 @@
#define __LIB_H__
#include <stdint.h>
-#ifndef __PRE_RAM__ /* Conflicts with inline function in arch/io.h */
+#if !defined(__ROMCC__) /* Conflicts with inline function in arch/io.h */
/* Defined in src/lib/clog2.c */
unsigned long log2(unsigned long x);
#endif
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index b09dace..37c7dea 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -88,6 +88,7 @@ ramstage-y += lzma.c
ramstage-y += stack.c
ramstage-$(CONFIG_ARCH_X86) += gcc.c
ramstage-y += clog2.c
+romstage-y += clog2.c
ramstage-$(CONFIG_CONSOLE_SERIAL8250) += uart8250.c
ramstage-$(CONFIG_CONSOLE_SERIAL8250MEM) += uart8250mem.c
ramstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c
diff --git a/src/northbridge/amd/amdk8/incoherent_ht.c b/src/northbridge/amd/amdk8/incoherent_ht.c
index 6cbe7dc..c1509f0 100644
--- a/src/northbridge/amd/amdk8/incoherent_ht.c
+++ b/src/northbridge/amd/amdk8/incoherent_ht.c
@@ -6,6 +6,7 @@
#include <device/pci_def.h>
#include <device/pci_ids.h>
#include <device/hypertransport_def.h>
+#include <lib.h>
// Do we need allocate MMIO? Current We direct last 64M to sblink only, We can not lose access to last 4M range to ROM
#ifndef K8_ALLOCATE_MMIO_RANGE
diff --git a/src/northbridge/intel/e7505/raminit.c b/src/northbridge/intel/e7505/raminit.c
index 3d4dfe2..455f3ab 100644
--- a/src/northbridge/intel/e7505/raminit.c
+++ b/src/northbridge/intel/e7505/raminit.c
@@ -16,6 +16,7 @@
#include <device/pci_def.h>
#include <arch/io.h>
#include <arch/cpu.h>
+#include <lib.h>
#include <stdlib.h>
#include <console/console.h>
Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4681
-gerrit
commit 17f8172dd00cbd7224b511331c8211fc94bdf264
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Sun Jan 12 15:42:58 2014 -0600
lib: Make log2() available in romstage on ARM, not just x86
On x86, log2() is defined as an inline functions in arch/io.h. This is
a remnant of ROMCC, and forced us to not include clog2.c in romstage.
As a result, romstage on ARM has no log2().
Use the inline log2 only with ROMCC, but otherwise, use the one in
clog2.c.
Change-Id: Ifef2aa0a7b5a1db071a66f2eec0be421b8b2a56d
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
---
src/arch/x86/include/arch/io.h | 4 +++-
src/include/lib.h | 2 +-
src/lib/Makefile.inc | 1 +
src/northbridge/amd/amdk8/incoherent_ht.c | 1 +
4 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/arch/x86/include/arch/io.h b/src/arch/x86/include/arch/io.h
index 955d8e2..6ee834d 100644
--- a/src/arch/x86/include/arch/io.h
+++ b/src/arch/x86/include/arch/io.h
@@ -167,7 +167,8 @@ static inline __attribute__((always_inline)) void write32(unsigned long addr, ui
*((volatile uint32_t *)(addr)) = value;
}
-#if defined(__PRE_RAM__) || defined(__SMM__)
+/* Conflicts with definition in lib.h */
+#if defined(__ROMCC__) || defined(__SMM__)
static inline int log2(int value)
{
unsigned int r = 0;
@@ -180,6 +181,7 @@ static inline int log2(int value)
return r;
}
+
static inline int log2f(int value)
{
unsigned int r = 0;
diff --git a/src/include/lib.h b/src/include/lib.h
index 5fc390a..3a51533 100644
--- a/src/include/lib.h
+++ b/src/include/lib.h
@@ -23,7 +23,7 @@
#define __LIB_H__
#include <stdint.h>
-#ifndef __PRE_RAM__ /* Conflicts with inline function in arch/io.h */
+#if !defined(__ROMCC__) /* Conflicts with inline function in arch/io.h */
/* Defined in src/lib/clog2.c */
unsigned long log2(unsigned long x);
#endif
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index b09dace..37c7dea 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -88,6 +88,7 @@ ramstage-y += lzma.c
ramstage-y += stack.c
ramstage-$(CONFIG_ARCH_X86) += gcc.c
ramstage-y += clog2.c
+romstage-y += clog2.c
ramstage-$(CONFIG_CONSOLE_SERIAL8250) += uart8250.c
ramstage-$(CONFIG_CONSOLE_SERIAL8250MEM) += uart8250mem.c
ramstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c
diff --git a/src/northbridge/amd/amdk8/incoherent_ht.c b/src/northbridge/amd/amdk8/incoherent_ht.c
index 6cbe7dc..c1509f0 100644
--- a/src/northbridge/amd/amdk8/incoherent_ht.c
+++ b/src/northbridge/amd/amdk8/incoherent_ht.c
@@ -6,6 +6,7 @@
#include <device/pci_def.h>
#include <device/pci_ids.h>
#include <device/hypertransport_def.h>
+#include <lib.h>
// Do we need allocate MMIO? Current We direct last 64M to sblink only, We can not lose access to last 4M range to ROM
#ifndef K8_ALLOCATE_MMIO_RANGE
Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4681
-gerrit
commit 3508e377cb58a17b10a1998d0707b71a629dd821
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Sun Jan 12 15:42:58 2014 -0600
lib: Make log2() available in romstage on ARM, not just x86
On x86, log2() is defined as an inline functions in arch/io.h. This is
a remnant of ROMCC, and forced us to not include clog2.c in romstage.
As a result, romstage on ARM has no log2().
Use the inline log2 only with ROMCC, but otherwise, use the one in
clog2.c.
Change-Id: Ifef2aa0a7b5a1db071a66f2eec0be421b8b2a56d
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
---
src/arch/x86/include/arch/io.h | 4 +++-
src/include/lib.h | 2 +-
src/lib/Makefile.inc | 1 +
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/arch/x86/include/arch/io.h b/src/arch/x86/include/arch/io.h
index 955d8e2..6ee834d 100644
--- a/src/arch/x86/include/arch/io.h
+++ b/src/arch/x86/include/arch/io.h
@@ -167,7 +167,8 @@ static inline __attribute__((always_inline)) void write32(unsigned long addr, ui
*((volatile uint32_t *)(addr)) = value;
}
-#if defined(__PRE_RAM__) || defined(__SMM__)
+/* Conflicts with definition in lib.h */
+#if defined(__ROMCC__) || defined(__SMM__)
static inline int log2(int value)
{
unsigned int r = 0;
@@ -180,6 +181,7 @@ static inline int log2(int value)
return r;
}
+
static inline int log2f(int value)
{
unsigned int r = 0;
diff --git a/src/include/lib.h b/src/include/lib.h
index 5fc390a..3a51533 100644
--- a/src/include/lib.h
+++ b/src/include/lib.h
@@ -23,7 +23,7 @@
#define __LIB_H__
#include <stdint.h>
-#ifndef __PRE_RAM__ /* Conflicts with inline function in arch/io.h */
+#if !defined(__ROMCC__) /* Conflicts with inline function in arch/io.h */
/* Defined in src/lib/clog2.c */
unsigned long log2(unsigned long x);
#endif
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index b09dace..37c7dea 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -88,6 +88,7 @@ ramstage-y += lzma.c
ramstage-y += stack.c
ramstage-$(CONFIG_ARCH_X86) += gcc.c
ramstage-y += clog2.c
+romstage-y += clog2.c
ramstage-$(CONFIG_CONSOLE_SERIAL8250) += uart8250.c
ramstage-$(CONFIG_CONSOLE_SERIAL8250MEM) += uart8250mem.c
ramstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c
Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4681
-gerrit
commit 537b4ca11062f4fd6c80e81c39e4c72cb334b4c1
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Sun Jan 12 15:42:58 2014 -0600
lib: Make log2() available in romstage on ARM, not just x86
On x86, log2() is defined as an inline functions in arch/io.h. This is
a remnant of ROMCC, and forced us to not include clog2.c in romstage.
As a result, romstage on ARM has no log2().
Use the inline log2 only with ROMCC, but otherwise, use the one in
clog2.c.
Change-Id: Ifef2aa0a7b5a1db071a66f2eec0be421b8b2a56d
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
---
src/arch/x86/include/arch/io.h | 5 ++++-
src/include/lib.h | 2 +-
src/lib/Makefile.inc | 1 +
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/arch/x86/include/arch/io.h b/src/arch/x86/include/arch/io.h
index 955d8e2..8ac9c1e 100644
--- a/src/arch/x86/include/arch/io.h
+++ b/src/arch/x86/include/arch/io.h
@@ -167,7 +167,8 @@ static inline __attribute__((always_inline)) void write32(unsigned long addr, ui
*((volatile uint32_t *)(addr)) = value;
}
-#if defined(__PRE_RAM__) || defined(__SMM__)
+/* Conflicts with definition in lib.h */
+#if defined(__ROMCC__) || defined(__SMM__)
static inline int log2(int value)
{
unsigned int r = 0;
@@ -180,6 +181,8 @@ static inline int log2(int value)
return r;
}
+#endif
+
static inline int log2f(int value)
{
unsigned int r = 0;
diff --git a/src/include/lib.h b/src/include/lib.h
index 5fc390a..3a51533 100644
--- a/src/include/lib.h
+++ b/src/include/lib.h
@@ -23,7 +23,7 @@
#define __LIB_H__
#include <stdint.h>
-#ifndef __PRE_RAM__ /* Conflicts with inline function in arch/io.h */
+#if !defined(__ROMCC__) /* Conflicts with inline function in arch/io.h */
/* Defined in src/lib/clog2.c */
unsigned long log2(unsigned long x);
#endif
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index b09dace..37c7dea 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -88,6 +88,7 @@ ramstage-y += lzma.c
ramstage-y += stack.c
ramstage-$(CONFIG_ARCH_X86) += gcc.c
ramstage-y += clog2.c
+romstage-y += clog2.c
ramstage-$(CONFIG_CONSOLE_SERIAL8250) += uart8250.c
ramstage-$(CONFIG_CONSOLE_SERIAL8250MEM) += uart8250mem.c
ramstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c
Vladimir Serbinenko (phcoder(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4680
-gerrit
commit 7279d025d078da50dc99d1cf990fc37fdf99ae50
Author: Vladimir Serbinenko <phcoder(a)gmail.com>
Date: Sun Jan 12 19:25:00 2014 +0100
sandybridge: Allow skipping mrc.cache
On X230 MRC fails if cache is passed to it. Until better solution is found
do not create mrc.cache
Change-Id: I7e70ebe3c4879e7ab33a9c95a0c9e40408ff5ca4
Signed-off-by: Vladimir Serbinenko <phcoder(a)gmail.com>
---
src/northbridge/intel/sandybridge/Kconfig | 4 ++++
src/northbridge/intel/sandybridge/Makefile.inc | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/northbridge/intel/sandybridge/Kconfig b/src/northbridge/intel/sandybridge/Kconfig
index 5b6285f..83da527 100644
--- a/src/northbridge/intel/sandybridge/Kconfig
+++ b/src/northbridge/intel/sandybridge/Kconfig
@@ -70,6 +70,10 @@ config HAVE_MRC
Note: Without this binary coreboot will not work
+config HAVE_MRC_CACHE
+ bool
+ default HAVE_MRC
+
config MRC_FILE
string "Intel System Agent path and filename"
depends on HAVE_MRC
diff --git a/src/northbridge/intel/sandybridge/Makefile.inc b/src/northbridge/intel/sandybridge/Makefile.inc
index be07e93..aa1739a 100644
--- a/src/northbridge/intel/sandybridge/Makefile.inc
+++ b/src/northbridge/intel/sandybridge/Makefile.inc
@@ -43,7 +43,7 @@ $(obj)/mrc.cache:
bs=$(shell printf "%d" $(CONFIG_MRC_CACHE_SIZE) ) | \
tr '\000' '\377' > $@
-cbfs-files-$(CONFIG_HAVE_MRC) += mrc.cache
+cbfs-files-$(CONFIG_HAVE_MRC_CACHE) += mrc.cache
mrc.cache-file := $(obj)/mrc.cache
mrc.cache-position := 0xfff80000
mrc.cache-type := 0xac
Vladimir Serbinenko (phcoder(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4650
-gerrit
commit 3e2fdb08af25a4b0bb529086deb5f2b392692f47
Author: Vladimir Serbinenko <phcoder(a)gmail.com>
Date: Fri Jun 7 02:11:41 2013 +0200
Make version look like something thinkpad_acpi would accept
thinkpad_acpi checks that BIOS version matches some pattern.
Report version in this form.
Not cleaned up as the idea of this patch seems to be met with resistance.
Can make it Thinkpad-specific if the idea is accepted.
Change-Id: I15e33e87e7a7f42d6a06f12fb39b5172153af8a1
Signed-off-by: Vladimir Serbinenko <phcoder(a)gmail.com>
---
src/arch/x86/boot/smbios.c | 7 +++++--
src/mainboard/lenovo/Kconfig | 4 ++++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/arch/x86/boot/smbios.c b/src/arch/x86/boot/smbios.c
index 65bf538..25bdb37 100644
--- a/src/arch/x86/boot/smbios.c
+++ b/src/arch/x86/boot/smbios.c
@@ -130,12 +130,15 @@ static int smbios_write_type0(unsigned long *current, int handle)
t->vendor = smbios_add_string(t->eos, "coreboot");
#if !CONFIG_CHROMEOS
+#ifndef CONFIG_VENDOR_VERSION
+#define CONFIG_VENDOR_VERSION ""
+#endif
t->bios_release_date = smbios_add_string(t->eos, COREBOOT_DMI_DATE);
if (strlen(CONFIG_LOCALVERSION))
- t->bios_version = smbios_add_string(t->eos, CONFIG_LOCALVERSION);
+ t->bios_version = smbios_add_string(t->eos, CONFIG_VENDOR_VERSION CONFIG_LOCALVERSION);
else
- t->bios_version = smbios_add_string(t->eos, COREBOOT_VERSION);
+ t->bios_version = smbios_add_string(t->eos, CONFIG_VENDOR_VERSION COREBOOT_VERSION);
#else
#define SPACES \
" "
diff --git a/src/mainboard/lenovo/Kconfig b/src/mainboard/lenovo/Kconfig
index de9d56f..8c56283 100644
--- a/src/mainboard/lenovo/Kconfig
+++ b/src/mainboard/lenovo/Kconfig
@@ -35,4 +35,8 @@ config MAINBOARD_VENDOR
string
default "Lenovo"
+config VENDOR_VERSION
+ string
+ default "CBET4000 "
+
endif # VENDOR_LENOVO