the following patch was just integrated into master:
commit 32610462d12bee4f901e7f5eefef63f200f22805
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Tue May 21 14:07:41 2013 -0500
spd.h: Add all known SPD_MEMORY_TYPE definitions.
This file was missing some definitions, so add them. Also turn the defines
into an enum. The reason for doing this is that functions can now
explicitly take an spd_memory_type as a parameter:
> int do_something_with_dram(enum spd_memory_type type, ...)
Which is a lot more explicit and readable than:
> int do_something_with_dram(u8 type, ...)
These are used in the VX900 branch.
Change-Id: Ic7871e82c2523a94eac8e07979a8e34e0b459b46
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Reviewed-on: http://review.coreboot.org/3266
Tested-by: build bot (Jenkins)
See http://review.coreboot.org/3266 for details.
-gerrit
the following patch was just integrated into master:
commit 8e4bb92898992446b6264f06b4f20236a65ae962
Author: Nico Huber <nico.huber(a)secunet.com>
Date: Sun May 26 18:17:54 2013 +0200
util/cbmem: Fix format string in cbmem.c
Use PRIx64 to print a u64 instead of "llx". Fixes the following error:
cbmem.c: In function 'parse_cbtable':
cbmem.c:135:2: error: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'u64' [-Werror=format=]
Change-Id: Ibc2bf8597cb86db5b2e71fba77ec837a08c5e3d4
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
Reviewed-on: http://review.coreboot.org/3301
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See http://review.coreboot.org/3301 for details.
-gerrit
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/3266
-gerrit
commit 2e70616c0249c26e99a6112a32fcb05b8fc5d2fa
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Tue May 21 14:07:41 2013 -0500
spd.h: Add all known SPD_MEMORY_TYPE definitions.
This file was missing some definitions, so add them. Also turn the defines
into an enum. The reason for doing this is that functions can now
explicitly take an spd_memory_type as a parameter:
> int do_something_with_dram(enum spd_memory_type type, ...)
Which is a lot more explicit and readable than:
> int do_something_with_dram(u8 type, ...)
These are used in the VX900 branch.
Change-Id: Ic7871e82c2523a94eac8e07979a8e34e0b459b46
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
---
src/include/spd.h | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/src/include/spd.h b/src/include/spd.h
index e8d35cf..2b07fb1 100644
--- a/src/include/spd.h
+++ b/src/include/spd.h
@@ -108,15 +108,20 @@
/* SPD_MEMORY_TYPE values. */
-#define SPD_MEMORY_TYPE_FPM_DRAM 1
-#define SPD_MEMORY_TYPE_EDO 2
-#define SPD_MEMORY_TYPE_PIPELINED_NIBBLE 3
-#define SPD_MEMORY_TYPE_SDRAM 4
-#define SPD_MEMORY_TYPE_MULTIPLEXED_ROM 5
-#define SPD_MEMORY_TYPE_SGRAM_DDR 6
-#define SPD_MEMORY_TYPE_SDRAM_DDR 7
-#define SPD_MEMORY_TYPE_SDRAM_DDR2 8
-#define SPD_MEMORY_TYPE_SDRAM_DDR3 0xb
+enum spd_memory_type {
+ SPD_MEMORY_TYPE_UNDEFINED = 0x00,
+ SPD_MEMORY_TYPE_FPM_DRAM = 0x01,
+ SPD_MEMORY_TYPE_EDO = 0x02,
+ SPD_MEMORY_TYPE_PIPELINED_NIBBLE = 0x03,
+ SPD_MEMORY_TYPE_SDRAM = 0x04,
+ SPD_MEMORY_TYPE_MULTIPLEXED_ROM = 0x05,
+ SPD_MEMORY_TYPE_SGRAM_DDR = 0x06,
+ SPD_MEMORY_TYPE_SDRAM_DDR = 0x07,
+ SPD_MEMORY_TYPE_SDRAM_DDR2 = 0x08,
+ SPD_MEMORY_TYPE_FBDIMM_DDR2 = 0x09,
+ SPD_MEMORY_TYPE_FB_PROBE_DDR2 = 0x0a,
+ SPD_MEMORY_TYPE_SDRAM_DDR3 = 0x0b,
+};
/* SPD_MODULE_VOLTAGE values. */
#define SPD_VOLTAGE_TTL 0 /* 5.0 Volt/TTL */
Nico Huber (nico.huber(a)secunet.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3301
-gerrit
commit bf8a4aa59118a14720ecacc475e0a54ce048f79a
Author: Nico Huber <nico.huber(a)secunet.com>
Date: Sun May 26 18:17:54 2013 +0200
util/cbmem: Fix format string in cbmem.c
Use PRIx64 to print a u64 instead of "llx". Fixes the following error:
cbmem.c: In function 'parse_cbtable':
cbmem.c:135:2: error: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'u64' [-Werror=format=]
Change-Id: Ibc2bf8597cb86db5b2e71fba77ec837a08c5e3d4
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
---
util/cbmem/cbmem.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/util/cbmem/cbmem.c b/util/cbmem/cbmem.c
index 1ff9a08..74e0fd4 100644
--- a/util/cbmem/cbmem.c
+++ b/util/cbmem/cbmem.c
@@ -17,6 +17,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -132,7 +133,7 @@ static int parse_cbtable(u64 address)
int i, found = 0;
void *buf;
- debug("Looking for coreboot table at %llx\n", address);
+ debug("Looking for coreboot table at %" PRIx64 "\n", address);
buf = map_memory(address);
/* look at every 16 bytes within 4K of the base */