diff options
author | Jordan Crouse <jordan.crouse@amd.com> | 2008-10-20 17:08:08 +0000 |
---|---|---|
committer | Jordan Crouse <jordan.crouse@amd.com> | 2008-10-20 17:08:08 +0000 |
commit | f2433a9d9e643d828e4f9bafe04657984778c27b (patch) | |
tree | 5a04892279ec199476a7c1b918ccb07473034e22 /payloads/libpayload/i386 | |
parent | c53cdd782a8551ac2e0dcda9cbd5b0d319102b85 (diff) |
[PATCH] libpayload: Fix overflow in _delay function
On faster machines, delta might be more then 32 bits
Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3677 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload/i386')
-rw-r--r-- | payloads/libpayload/i386/timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/payloads/libpayload/i386/timer.c b/payloads/libpayload/i386/timer.c index e1a886e302..3d8607b3cb 100644 --- a/payloads/libpayload/i386/timer.c +++ b/payloads/libpayload/i386/timer.c @@ -75,7 +75,7 @@ unsigned int get_cpu_speed(void) return cpu_khz; } -static inline void _delay(unsigned int delta) +static inline void _delay(unsigned long long delta) { unsigned long long timeout = rdtsc() + delta; while (rdtsc() < timeout) ; |