OLD | NEW |
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
4 */ | 4 */ |
5 | 5 |
6 /* Helper functions/wrappers for memory allocations, manipulation and | 6 /* Helper functions/wrappers for memory allocations, manipulation and |
7 * comparison. | 7 * comparison. |
8 */ | 8 */ |
9 | 9 |
10 #ifndef VBOOT_REFERENCE_UTILITY_H_ | 10 #ifndef VBOOT_REFERENCE_UTILITY_H_ |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 /* Ensure that only our stub implementations are used, not standard C */ | 90 /* Ensure that only our stub implementations are used, not standard C */ |
91 #ifndef _STUB_IMPLEMENTATION_ | 91 #ifndef _STUB_IMPLEMENTATION_ |
92 #define malloc _do_not_use_standard_malloc | 92 #define malloc _do_not_use_standard_malloc |
93 #define free _do_not_use_standard_free | 93 #define free _do_not_use_standard_free |
94 #define memcmp _do_not_use_standard_memcmp | 94 #define memcmp _do_not_use_standard_memcmp |
95 #define memcpy _do_not_use_standard_memcpy | 95 #define memcpy _do_not_use_standard_memcpy |
96 #define memset _do_not_use_standard_memset | 96 #define memset _do_not_use_standard_memset |
97 #endif | 97 #endif |
98 | 98 |
| 99 /* Read a high-resolution timer. */ |
| 100 uint64_t VbGetTimer(void); |
| 101 |
| 102 /* Return the maximum frequency for the high-resolution timer, in Hz. |
| 103 * |
| 104 * Note that this call MUST be fast; the implementation must not |
| 105 * attempt to actually measure the frequency. This function need only |
| 106 * return an upper bound for the timer frequency, so that minimum |
| 107 * delays can be established. For example, if the same BIOS can run |
| 108 * on CPUs where the timer frequency varies between 1.2GHz and 1.8GHz, |
| 109 * return 1800000000 (or even 2000000000). */ |
| 110 uint64_t VbGetTimerMaxFreq(void); |
| 111 |
| 112 |
99 #endif /* VBOOT_REFERENCE_UTILITY_H_ */ | 113 #endif /* VBOOT_REFERENCE_UTILITY_H_ */ |
OLD | NEW |