Search
j0ke.net Open Build Service
>
Projects
>
stresslinux
>
memtest86+
> work-around-4G-virtual-overflow
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File work-around-4G-virtual-overflow of Package memtest86+
--- 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;