[coreboot-gerrit] Change in coreboot[master]: util/cbmem: Print timestamp frequency in verbose mode

Martin Roth (Code Review) gerrit at coreboot.org
Mon Dec 11 22:34:52 CET 2017


Martin Roth has uploaded this change for review. ( https://review.coreboot.org/22821


Change subject: util/cbmem: Print timestamp frequency in verbose mode
......................................................................

util/cbmem: Print timestamp frequency in verbose mode

The code flow is changed slightly to print the timestamp frequency from
either method of determining it.

BUG=b:70432544
TEST=Build and test cbmem -t -V

Change-Id: I02286fa67919e70a3592cdbcc1c9ca2991b7f385
Signed-off-by: Martin Roth <martinroth at google.com>
---
M util/cbmem/cbmem.c
1 file changed, 5 insertions(+), 5 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/22821/1

diff --git a/util/cbmem/cbmem.c b/util/cbmem/cbmem.c
index dea2c0b..09957ba 100644
--- a/util/cbmem/cbmem.c
+++ b/util/cbmem/cbmem.c
@@ -501,16 +501,16 @@
 {
 	tick_freq_mhz = table_tick_freq_mhz;
 
-	/* Honor table frequency. */
-	if (tick_freq_mhz)
-		return;
-
-	tick_freq_mhz = arch_tick_frequency();
+	/* Honor table frequency if present. */
+	if (!tick_freq_mhz)
+		tick_freq_mhz = arch_tick_frequency();
 
 	if (!tick_freq_mhz) {
 		fprintf(stderr, "Cannot determine timestamp tick frequency.\n");
 		exit(1);
 	}
+
+	debug("Timestamp tick frequency: %ld MHz\n", tick_freq_mhz);
 }
 
 u64 arch_convert_raw_ts_entry(u64 ts)

-- 
To view, visit https://review.coreboot.org/22821
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I02286fa67919e70a3592cdbcc1c9ca2991b7f385
Gerrit-Change-Number: 22821
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171211/f494ca29/attachment.html>


More information about the coreboot-gerrit mailing list