diff options
author | Aaron Durbin <adurbin@chromium.org> | 2016-03-12 08:41:34 +0100 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineeringinc.com> | 2016-03-14 21:30:01 +0100 |
commit | 08e920e50dd18febb410b730d02b6180b3071c39 (patch) | |
tree | dfeec7da13e87733f49a70c7357b00faa1a09313 /src/include | |
parent | 15fca66bf08db45937ce88b950491963654805b9 (diff) |
util/cbmem: Scale time stamp values correctly
Commit c49014e (timestamp: add tick frequency to exported table)
refactors the code, but forgets to correctly scale the frequency to
megahertz, where the value is read from sysfs, so that printing time
stamp information shows milliseconds instead of microseconds, as can be
seen on the output `cbmem -t` for the ASRock E350M1 below.
```
0:1st timestamp 515
10:start of ramstage 515 (0)
30:device enumeration 515 (0)
40:device configuration 610 (94)
50:device enable 614 (4)
60:device initialization 624 (9)
70:device setup done 639 (14)
75:cbmem post 844 (205)
80:write tables 844 (0)
90:load payload 849 (4)
15:starting LZMA decompress (ignore for x86) 849 (0)
16:finished LZMA decompress (ignore for x86) 869 (20)
99:selfboot jump 869 (0)
Total Time: 350
```
So scale the return value correctly to megahertz, by dividing it with
1000.
```
0:1st timestamp 515,655
10:start of ramstage 515,655 (0)
30:device enumeration 515,663 (7)
40:device configuration 610,620 (94,957)
50:device enable 614,680 (4,059)
60:device initialization 624,618 (9,938)
70:device setup done 639,553 (14,934)
75:cbmem post 844,707 (205,154)
80:write tables 844,710 (2)
90:load payload 849,532 (4,821)
15:starting LZMA decompress (ignore for x86) 849,655 (123)
16:finished LZMA decompress (ignore for x86) 869,903 (20,247)
99:selfboot jump 869,922 (19)
Total Time: 354,261
```
Change-Id: Iea032c62487c7946b6194a90268755034c6350df
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/14086
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Diffstat (limited to 'src/include')
0 files changed, 0 insertions, 0 deletions