coreboot-kgpe-d16/payloads
Vadim Bendebury 1c5cdad09e libpayload: improve us timer accuracy
In cases where timer clock frequency is not an integer number of
megahertz, the calculations in timer_us() lack accuracy.

This patch modifies calculations to reduce the error. The maximum
interval this calculation would support decreases, but it still is in
excess of 1844674 seconds for a timer clocked by 10 MHz, which is more
than enough.

BUG=none
TEST=manual
  . verified timer accuracy using a depthcharge CLI command

Original-Change-Id: Iffb323db10e74b0ce3b4d59a56983bfee12e6805
Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/207358
Original-Reviewed-by: David Hendricks <dhendrix@chromium.org>
(cherry picked from commit e1abf87d438de1a04714482d5b610671e8cc0663)
Signed-off-by: Marc Jones <marc.jones@se-eng.com>

Change-Id: Ia892726187ab040dd235f493c92856c15951cc06
Reviewed-on: http://review.coreboot.org/8128
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
2015-01-12 05:55:45 +01:00
..
bayou
coreinfo payloads/coreinfo/multiboot_module.c: Trivial fix indents 2014-05-23 09:50:21 +02:00
external SeaBIOS Makefile.inc: Remove build dir for uppermem option 2014-11-02 08:15:35 +01:00
libpayload libpayload: improve us timer accuracy 2015-01-12 05:55:45 +01:00
nvramcui