--- linux/include/asm-i386/page.h.orig Tue Apr 17 13:18:47 2001 +++ linux/include/asm-i386/page.h Tue Apr 17 13:18:55 2001 @@ -78,7 +78,9 @@ * and CONFIG_HIGHMEM64G options in the kernel configuration. */ -#define __PAGE_OFFSET (0xC0000000) +#include + +#define __PAGE_OFFSET (PAGE_OFFSET_RAW) #ifndef __ASSEMBLY__ --- linux/include/asm-i386/page_offset.h.orig Tue Apr 17 13:18:55 2001 +++ linux/include/asm-i386/page_offset.h Tue Apr 17 13:18:55 2001 @@ -0,0 +1,8 @@ +#include +#ifdef CONFIG_1GB +#define PAGE_OFFSET_RAW 0xC0000000 +#elif defined(CONFIG_2GB) +#define PAGE_OFFSET_RAW 0x80000000 +#elif defined(CONFIG_3GB) +#define PAGE_OFFSET_RAW 0x40000000 +#endif --- linux/arch/i386/Makefile.orig Tue Apr 17 13:18:42 2001 +++ linux/arch/i386/Makefile Tue Apr 17 13:18:55 2001 @@ -106,6 +106,9 @@ MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot +arch/i386/vmlinux.lds: arch/i386/vmlinux.lds.S FORCE + $(CPP) -C -P -I$(HPATH) -imacros $(HPATH)/asm-i386/page_offset.h -Ui386 arch/i386/vmlinux.lds.S >arch/i386/vmlinux.lds + vmlinux: arch/i386/vmlinux.lds FORCE: ; --- linux/arch/i386/config.in.orig Tue Apr 17 13:18:42 2001 +++ linux/arch/i386/config.in Tue Apr 17 13:18:55 2001 @@ -165,6 +165,11 @@ define_bool CONFIG_X86_PAE y fi +choice 'Maximum Virtual Memory' \ + "3GB CONFIG_1GB \ + 2GB CONFIG_2GB \ + 1GB CONFIG_3GB" 3GB + bool 'Math emulation' CONFIG_MATH_EMULATION bool 'MTRR (Memory Type Range Register) support' CONFIG_MTRR bool 'Symmetric multi-processing support' CONFIG_SMP --- linux/arch/i386/vmlinux.lds.S.orig Tue Apr 17 13:18:55 2001 +++ linux/arch/i386/vmlinux.lds.S Tue Apr 17 13:18:55 2001 @@ -0,0 +1,82 @@ +/* ld script to make i386 Linux kernel + * Written by Martin Mares ; + */ +OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") +OUTPUT_ARCH(i386) +ENTRY(_start) +SECTIONS +{ + . = PAGE_OFFSET_RAW + 0x100000; + _text = .; /* Text and read-only data */ + .text : { + *(.text) + *(.fixup) + *(.gnu.warning) + } = 0x9090 + .text.lock : { *(.text.lock) } /* out-of-line lock text */ + .rodata : { *(.rodata) } + .kstrtab : { *(.kstrtab) } + + . = ALIGN(16); /* Exception table */ + __start___ex_table = .; + __ex_table : { *(__ex_table) } + __stop___ex_table = .; + + __start___ksymtab = .; /* Kernel symbol table */ + __ksymtab : { *(__ksymtab) } + __stop___ksymtab = .; + + _etext = .; /* End of text section */ + + .data : { /* Data */ + *(.data) + CONSTRUCTORS + } + + _edata = .; /* End of data section */ + + . = ALIGN(8192); /* init_task */ + .data.init_task : { *(.data.init_task) } + + . = ALIGN(4096); /* Init code and data */ + __init_begin = .; + .text.init : { *(.text.init) } + .data.init : { *(.data.init) } + . = ALIGN(16); + __setup_start = .; + .setup.init : { *(.setup.init) } + __setup_end = .; + __initcall_start = .; + .initcall.init : { *(.initcall.init) } + __initcall_end = .; + . = ALIGN(4096); + __init_end = .; + + . = ALIGN(4096); + .data.page_aligned : { *(.data.idt) } + + . = ALIGN(32); + .data.cacheline_aligned : { *(.data.cacheline_aligned) } + + __bss_start = .; /* BSS */ + .bss : { + *(.bss) + } + _end = . ; + + /* Sections to be discarded */ + /DISCARD/ : { + *(.text.exit) + *(.data.exit) + *(.exitcall.exit) + } + + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } +} --- linux/Rules.make.orig Tue Apr 17 13:18:38 2001 +++ linux/Rules.make Tue Apr 17 13:18:55 2001 @@ -212,12 +212,29 @@ # # Added the SMP separator to stop module accidents between uniprocessor # and SMP Intel boxes - AC - from bits by Michael Chastain +# Added separator for different PAGE_OFFSET memory models - Ingo. # ifdef CONFIG_SMP genksyms_smp_prefix := -p smp_ else genksyms_smp_prefix := +endif + +ifdef CONFIG_2GB +ifdef CONFIG_SMP + genksyms_smp_prefix := -p smp_2gig_ +else + genksyms_smp_prefix := -p 2gig_ +endif +endif + +ifdef CONFIG_3GB +ifdef CONFIG_SMP + genksyms_smp_prefix := -p smp_3gig_ +else + genksyms_smp_prefix := -p 3gig_ +endif endif $(MODINCL)/%.ver: %.c