From 5d75b732af5a3449bdb477c394e0aab4934aef1e278b05bd06da26e2235989cb Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 28 Nov 2008 15:28:03 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/memtest86+?expand=0&rev=8 --- memtest86+.changes | 6 +++++ memtest86+.spec | 18 +++++++++++--- work-around-4G-virtual-overflow | 42 +++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 work-around-4G-virtual-overflow diff --git a/memtest86+.changes b/memtest86+.changes index 061d31f..89f0e94 100644 --- a/memtest86+.changes +++ b/memtest86+.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Nov 28 16:09:47 CET 2008 - duwe@suse.de + +- work around a virtual address wrap at 4G, if > 5GB are installed + (bnc#388191) + ------------------------------------------------------------------- Wed Apr 30 14:45:38 CEST 2008 - coolo@suse.de diff --git a/memtest86+.spec b/memtest86+.spec index 9b66396..f477e6f 100644 --- a/memtest86+.spec +++ b/memtest86+.spec @@ -2,9 +2,16 @@ # spec file for package memtest86+ (Version 2.01) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. -# This file and all modifications and additions to the pristine -# package are under the same license as the package itself. # +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + # Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -12,7 +19,7 @@ Name: memtest86+ Version: 2.01 -Release: 1 +Release: 46 # License: BSD 3-Clause Group: System/Boot @@ -34,6 +41,7 @@ Patch1: include-linkonce Patch2: serial-enable Patch3: include-gnuhash Patch4: fix-overflows.diff +Patch5: work-around-4G-virtual-overflow # Summary: Memory Testing Image for x86 Architecture @@ -63,6 +71,7 @@ Authors: %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build %ifarch x86_64 @@ -90,6 +99,9 @@ test -x /sbin/update-bootloader && /sbin/update-bootloader --remove --force --im %doc README* changelog FAQ %changelog +* Fri Nov 28 2008 duwe@suse.de +- work around a virtual address wrap at 4G, if > 5GB are installed + (bnc#388191) * Wed Apr 30 2008 coolo@suse.de - update to 2.01 - among others: - Solved a major bug in Memory Address Errors Reporting diff --git a/work-around-4G-virtual-overflow b/work-around-4G-virtual-overflow new file mode 100644 index 0000000..cba7492 --- /dev/null +++ b/work-around-4G-virtual-overflow @@ -0,0 +1,42 @@ +--- memtest86+-2.01/init.c.orig 2008-11-26 13:28:22.000000000 +0100 ++++ memtest86+-2.01/init.c 2008-11-28 16:06:50.000000000 +0100 +@@ -238,7 +238,7 @@ + unsigned long addr_hi; + }; + extern unsigned char pdp[]; +- extern struct pde pd2[]; ++ extern struct pde pd1[]; + unsigned long window = page >> 19; + if (FLAT || (window == mapped_window)) { + return 0; +@@ -266,11 +266,11 @@ + * Bit 6 = Dirty. 1 = memory has been written to. + * Bit 7 = Page Size. 1 = page size is 2 MBytes + * --------------------------------------------------*/ +- pd2[i].addr_lo = ((window & 1) << 31) + ((i & 0x3ff) << 21) + 0xE3; +- pd2[i].addr_hi = (window >> 1); ++ pd1[i].addr_lo = ((window & 1) << 31) + ((i & 0x3ff) << 21) + 0xE3; ++ pd1[i].addr_hi = (window >> 1); + } + paging_off(); +- if (window > 1) { ++ if (window > 0) { + paging_on(pdp); + } + mapped_window = window; +@@ -281,13 +281,13 @@ + { + void *result; + if (FLAT || (page_addr < 0x80000)) { +- /* If the address is less that 1GB directly use the address */ ++ /* If the address is less than 2GB directly use the address */ + result = (void *)(page_addr << 12); + } + else { + unsigned long alias; + alias = page_addr & 0x7FFFF; +- alias += 0x80000; ++ alias += 0x40000; + result = (void *)(alias << 12); + } + return result;