Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: firmware/stub/utility_stub.c

Issue 6719005: Cherry-pick vboot_reference files from TOT to support crossystem (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git@0.11.257.B
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « firmware/stub/load_firmware_stub.c ('k') | host/lib/crossystem.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: firmware/stub/utility_stub.c
diff --git a/firmware/stub/utility_stub.c b/firmware/stub/utility_stub.c
index 61417856985b5d5c85a2fa1a5ed5251e2dbd2d9b..2d56f72b643709da8984cc4a319ff072e95351b9 100644
--- a/firmware/stub/utility_stub.c
+++ b/firmware/stub/utility_stub.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
@@ -13,6 +13,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/time.h>
void error(const char *format, ...) {
va_list ap;
@@ -51,3 +52,13 @@ int Memcmp(const void* src1, const void* src2, size_t n) {
void* Memcpy(void* dest, const void* src, uint64_t n) {
return memcpy(dest, src, (size_t)n);
}
+
+uint64_t VbGetTimer(void) {
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ return (uint64_t)tv.tv_sec * 1000000 + (uint64_t)tv.tv_usec;
+}
+
+uint64_t VbGetTimerMaxFreq(void) {
+ return UINT64_C(1000000);
+}
« no previous file with comments | « firmware/stub/load_firmware_stub.c ('k') | host/lib/crossystem.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698