Paul Menzel (paulepanter@users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3776
-gerrit
commit 55f9c6e91db754aed3c6007ebc8543c07b5b8a0c Author: Paul Menzel paulepanter@users.sourceforge.net Date: Wed Jul 17 14:07:27 2013 +0200
inteltool/inteltool.c: Prepend hexadecimal values with `0x`
Currently, it is not clear what base is used in inteltool’s output.
$ sudo ./inteltool | grep Model CPU: Processor Type: 0, Family 6, Model 17, Stepping a $ grep -i model /proc/cpuinfo model : 23 model name : Pentium(R) Dual-Core CPU E5300 @ 2.60GHz […]
To avoid confusion, make it clear, that `inteltool` outputs hexadecimal numbers by prepending it with `0x` by using the `#` flag in the format string.
$ sudo ./inteltool | grep Model CPU: Processor Type: 0, Family 0x6, Model 0x17, Stepping 0xa
Change-Id: I379e11bfd804e82e2a3c460b1de915a93513bf5f Signed-off-by: Paul Menzel paulepanter@users.sourceforge.net --- util/inteltool/inteltool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/inteltool/inteltool.c b/util/inteltool/inteltool.c index 5cd964a..d4ebe58 100644 --- a/util/inteltool/inteltool.c +++ b/util/inteltool/inteltool.c @@ -374,7 +374,7 @@ int main(int argc, char *argv[]) * left-shifted "Extended Model" fields. * http://download.intel.com/design/processor/applnots/24161832.pdf */ - printf("CPU: Processor Type: %x, Family %x, Model %x, Stepping %x\n", + printf("CPU: Processor Type: %#x, Family %#x, Model %#x, Stepping %#x\n", (id >> 12) & 0x3, ((id >> 8) & 0xf) + ((id >> 20) & 0xff), ((id >> 12) & 0xf0) + ((id >> 4) & 0xf), (id & 0xf));