acrn-hypervisor/hypervisor/debug
Junjie Mao e75cca64c8 HV: timer: keep TSC frequency in KHz
This patch represents TSC freqeuency in KHz using a 32-bit unsigned integer.

The conversion macros between ticks and us/ms are changed to inline functions to
enforce the types of the input parameters. Note that us_to_ticks accepts only
uint32_t (~4K us at most) and never overflows.

Results of some unit tests on the conversion functions:

    calibrate_tsc, tsc_khz=1881600
    64us -> ticks: 120422
    64us -> ticks -> us: 63
    511us -> ticks: 961497
    511us -> ticks -> us: 510
    1280000 ticks -> us: 680
    1280000 ticks -> us -> ticks: 1279488

Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-07-03 10:18:06 +08:00
..
console.c HV:debug:fix "expression is not Boolean" 2018-06-20 14:19:47 +08:00
dump.c hv: save registers on exception 2018-06-19 17:30:24 +08:00
logmsg.c HV: timer: keep TSC frequency in KHz 2018-07-03 10:18:06 +08:00
printf.c HV:debug:fix "expression is not Boolean" 2018-06-20 14:19:47 +08:00
sbuf.c fix "function return type inconsistent" 2018-06-29 00:50:01 +08:00
serial_internal.h HV: treewide: convert hexadecimals used in bitops to unsigned 2018-06-21 13:12:39 +08:00
serial.c HV:debug:fix "expression is not Boolean" 2018-06-20 14:19:47 +08:00
shell_internal.c HV: Remove vm->attr.name 2018-07-02 10:48:36 +08:00
shell_internal.h hv: add shell command to trigger crash 2018-06-19 15:32:04 +08:00
shell_public.c hv: add shell command to trigger crash 2018-06-19 15:32:04 +08:00
uart16550.c HV: treewide: convert hexadecimals used in bitops to unsigned 2018-06-21 13:12:39 +08:00
uart16550.h HV: treewide: convert hexadecimals used in bitops to unsigned 2018-06-21 13:12:39 +08:00
vuart.c HV:treewide:transfer the struct member types to non-basic types 2018-06-29 15:48:19 +08:00