mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-02 16:30:12 +00:00
check UART valid or not when setup console timer
if no valid UART in hypervisor, not need setup console timer. Signed-off-by: Minggui Cao <minggui.cao@intel.com>
This commit is contained in:
parent
04323a0663
commit
cd5d8c8da7
@ -201,6 +201,12 @@ void console_setup_timer(void)
|
|||||||
static struct timer console_timer;
|
static struct timer console_timer;
|
||||||
uint64_t period_in_cycle, fire_tsc;
|
uint64_t period_in_cycle, fire_tsc;
|
||||||
|
|
||||||
|
if (serial_handle == SERIAL_INVALID_HANDLE) {
|
||||||
|
pr_err("%s: no uart, not need setup console timer",
|
||||||
|
__func__);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
period_in_cycle = CYCLES_PER_MS * CONSOLE_KICK_TIMER_TIMEOUT;
|
period_in_cycle = CYCLES_PER_MS * CONSOLE_KICK_TIMER_TIMEOUT;
|
||||||
fire_tsc = rdtsc() + period_in_cycle;
|
fire_tsc = rdtsc() + period_in_cycle;
|
||||||
initialize_timer(&console_timer,
|
initialize_timer(&console_timer,
|
||||||
|
Loading…
Reference in New Issue
Block a user