[coreboot-gerrit] New patch to review for coreboot: b00aa36 msrtool: Fix verbose ignored by cpuid().

Benoît Legat (benoit.legat@gmail.com) gerrit at coreboot.org
Mon Jul 8 12:34:08 CEST 2013


Benoît Legat (benoit.legat at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3627

-gerrit

commit b00aa36166eff3b33a4f8b31dd1fc83e71ff2354
Author: Benoît Legat <benoit.legat at gmail.com>
Date:   Mon Jul 8 12:23:27 2013 +0200

    msrtool: Fix verbose ignored by cpuid().
    
    This is a trivial patch moving cpuid() call after reading argv
    so that verbose is set.
    
    Change-Id: Ic621191ef650495614a041413c1a0f707d4469e6
    Signed-off-by: Benoît Legat <benoit.legat at gmail.com>
---
 util/msrtool/msrtool.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/util/msrtool/msrtool.c b/util/msrtool/msrtool.c
index 5329eb1..356d460 100644
--- a/util/msrtool/msrtool.c
+++ b/util/msrtool/msrtool.c
@@ -271,7 +271,6 @@ int main(int argc, char *argv[]) {
 	int ret = 1;
 	const struct sysdef *s;
 	const struct targetdef *t;
-	const struct cpuid_t *id = cpuid();
 	uint8_t tn, listmsrs = 0, listknown = 0, input = 0;
 	uint32_t addr = 0;
 	const char *streamfn = NULL, *difffn = NULL;
@@ -334,6 +333,9 @@ int main(int argc, char *argv[]) {
 			break;
 		}
 
+	/** cpuid is called after reading argv so that verbose is set */
+	const struct cpuid_t *id = cpuid();
+
 	printf_quiet("msrtool %s\n", VERSION);
 
 	pacc = pci_alloc();



More information about the coreboot-gerrit mailing list