summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/vendorcode/google/chromeos/vboot_wrapper.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vendorcode/google/chromeos/vboot_wrapper.c b/src/vendorcode/google/chromeos/vboot_wrapper.c
index fe3c022833..d008de17cb 100644
--- a/src/vendorcode/google/chromeos/vboot_wrapper.c
+++ b/src/vendorcode/google/chromeos/vboot_wrapper.c
@@ -17,7 +17,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <console/vtxprintf.h>
+#if CONFIG_ARCH_X86
#include <cpu/x86/tsc.h>
+#else
+#include <timer.h>
+#endif
#include <rmodule.h>
#include <stdlib.h>
#include <string.h>
@@ -123,7 +127,13 @@ void VbExDebug(const char *format, ...)
uint64_t VbExGetTimer(void)
{
+#if CONFIG_ARCH_X86
return rdtscll();
+#else
+ struct mono_time mt;
+ timer_monotonic_get(&mt);
+ return mt.microseconds;
+#endif
}
VbError_t VbExNvStorageRead(uint8_t *buf)