Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
grub2.2117
0001-grub-core-kern-i386-tsc.c-calibrate_tsc-En...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-grub-core-kern-i386-tsc.c-calibrate_tsc-Ensure-that.patch of Package grub2.2117
From 2e62352bc28bd5d3efafc1b5cbe211ff9e9987fd Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko <phcoder@gmail.com> Date: Tue, 20 Jan 2015 21:07:08 +0100 Subject: [PATCH] * grub-core/kern/i386/tsc.c (calibrate_tsc): Ensure that no division by 0 occurs. --- ChangeLog | 5 +++++ grub-core/kern/i386/tsc.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) Index: grub-2.02~beta2/grub-core/kern/i386/tsc.c =================================================================== --- grub-2.02~beta2.orig/grub-core/kern/i386/tsc.c +++ grub-2.02~beta2/grub-core/kern/i386/tsc.c @@ -122,7 +122,11 @@ calibrate_tsc (void) grub_pit_wait (0xffff); end_tsc = grub_get_tsc (); - grub_tsc_rate = grub_divmod64 ((55ULL << 32), end_tsc - tsc_boot_time, 0); + grub_tsc_rate = 0; + if (end_tsc > tsc_boot_time) + grub_tsc_rate = grub_divmod64 ((55ULL << 32), end_tsc - tsc_boot_time, 0); + if (grub_tsc_rate == 0) + grub_tsc_rate = 5368;/* 800 MHz */ } #endif
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor