coreboot-kgpe-d16/util
Vadim Bendebury 6d18fd09c3 Utility to dump boot timing table
Coreboot and u-boot create a table of timestamps which allows to see
the boot process performance. The util/cbmem/cbmem.py script allows to
access the table after ChromeOS boots up and display its contents on
the console. The problem is that shipping images do not include Python
interpreter, so there is no way to access the table on a production
machine.

This change introduces a utility which is a Linux app displaying the
timestamp table. Conceivably the output of this utility might be
included in one of the ChromeOS :/system sections, so it was attempted
to write this procedure 'fail safe', namely reporting errors and not
continuing processing if something goes wrong.

Including of coreboot/src .h files will allow to keep the firmware
timestamp implementation and this utility in sync in the future.

Test:
    . build the utility (run 'make' while in chroot in  util/cbmem)
    . copy `cbmem' and 'cbmem.py' to the target
    . run both utilities (limiting cbmem.py output to 25 lines or so)
    . observe that the generated tables are identical (modulo rounding
      up of int division, resulting in 1 ns discrepancies in some
      cases)

      localhost var # ./cbmem
      18 entries total:

         1:62,080
         2:64,569 (2,489)
         3:82,520 (17,951)
         4:82,695 (174)
         8:84,384 (1,688)
         9:131,731 (47,347)
        10:131,821 (89)
        30:131,849 (27)
        40:132,618 (769)
        50:134,594 (1,975)
        60:134,729 (134)
        70:363,440 (228,710)
        75:363,453 (13)
        80:368,165 (4,711)
        90:370,018 (1,852)
        99:488,217 (118,199)
      1000:491,324 (3,107)
      1100:760,475 (269,150)

      localhost var # ./cbmem.py | head -25

      time base 4249800, total entries 18
      1:62,080
      2:64,569  (2,489)
      3:82,520  (17,951)
      4:82,695  (174)
      8:84,384  (1,688)
      9:131,731  (47,347)
      10:131,821  (89)
      30:131,849  (27)
      40:132,618  (769)
      50:134,594  (1,975)
      60:134,729  (134)
      70:363,440  (228,710)
      75:363,453  (13)
      80:368,165  (4,711)
      90:370,018  (1,852)
      99:488,217  (118,199)
      1000:491,324  (3,107)
      1100:760,475  (269,150)

Change-Id: I013e594d4afe323106d88e7938dd40b17760621c
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: http://review.coreboot.org/1759
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2012-11-12 03:35:20 +01:00
..
abuild Fix abuild output in Jenkins 2012-11-09 07:05:18 +01:00
acpi Remove whitespace. 2012-02-17 19:04:31 +01:00
amdtools Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
cbfstool cbfstool: Remove unused cmd_t 2012-11-12 03:26:08 +01:00
cbmem Utility to dump boot timing table 2012-11-12 03:35:20 +01:00
crossgcc crossgcc: build expat and python in silence 2012-11-02 20:08:01 +01:00
dtd_parser Add utility for parsing/modifying DTD array 2012-11-08 20:21:19 +01:00
dumpmmcr dumpmmcr: Fix compilation warnings in printf 2012-01-26 09:57:56 +01:00
ectool ectool: Allow build under Cygwin 2012-04-28 02:46:54 +02:00
genprof Fix ramstage location in trace scripts 2012-09-13 10:11:53 +02:00
getpir Cut the crap. 2010-09-21 21:16:27 +00:00
gitconfig gitconfig: Match the Change-Id line more exactly 2012-08-27 15:41:33 +02:00
i915tool Add a tool to work on i915 hardware in user mode 2012-05-08 00:40:36 +02:00
ifdtool ifdtool: Add locking/unlocking and dumping of access permissions 2012-11-09 18:59:42 +01:00
inteltool inteltool: Add output of 64bit registers in PMBASE 2012-10-27 02:54:23 +02:00
k8resdump add license headers to some trivial files and pc87427.h 2010-12-17 00:13:54 +00:00
kconfig kconfig: Some terms or curses libraries treat backspace as 0x08 2012-10-23 05:05:53 +02:00
lbtdump Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
lint lint: Get absolute path in compare_output 2012-10-05 22:06:04 +02:00
mkelfImage mkelfimage: pkgdata directory created but never used 2012-07-09 22:18:37 +02:00
mptable mptable: realign comments with code 2012-06-20 12:46:55 +02:00
msrtool msrtool: Factor out cpuid() from target probe functions into main() 2012-07-21 17:35:46 +02:00
nrv2b Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
nvramtool build: build coreboot on mingw. 2012-10-22 21:49:54 +02:00
optionlist Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
resetcf Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
romcc ROMCC: fix unused attribute lookup 2012-06-22 09:19:37 +02:00
sconfig Drop redundant CHIP_NAME in mainboard.c 2012-11-06 21:59:21 +01:00
superiotool superiotool: Fix for FreeBSD 2012-10-03 09:26:59 +02:00
vgabios Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
xcompile Update xcompile to search for x86_64 toolchain. 2012-03-31 12:49:45 +02:00