Do not check whether AcpiOsGetTimer() is called during boot.

From ACPICA 20170929, AcpiOsGetTimer() should be available early because
While() loop timeout mechanism was reimplemented with it.  Unfortunately,
it means AcpiLoadTables() may cause panic when a While() loop is executed.
After having lengthy discussions with ACPICA developers, I have concluded
that dummy timecounter is good enough for the purpose and it is the least
intrusive solution for now.  Also, they reminded me the ACPI specification
implies OS timer function should be available before loading tables.
This commit is contained in:
Jung-uk Kim 2017-10-10 19:20:38 +00:00
parent 307a8f2c21
commit 11738fb0f6

View File

@ -274,9 +274,6 @@ AcpiOsGetTimer(void)
struct bintime bt;
UINT64 t;
/* XXX During early boot there is no (decent) timer available yet. */
KASSERT(cold == 0, ("acpi: timer op not yet supported during boot"));
binuptime(&bt);
t = (uint64_t)bt.sec * 10000000;
t += ((uint64_t)10000000 * (uint32_t)(bt.frac >> 32)) >> 32;