Messages in this thread Patch in this message | | | Subject | [PATCH] Cyrix setup | Date | Sun, 8 Mar 1998 21:28:38 +0100 (CET) | From | Jedi/Sector One <> |
| |
Here we go for a new Cyrix patch. Indeed, many Cyrix users use the K.Gadeyne's set6x86 program with a simple rc script in order to enable several 6x86 features at bootup. So why not just merging these initializations in the kernel ?
Patch for 2.1.89 follows :
-----------------------------[Cut here]----------------------------- diff --recursive -u linux-2.1.89/Documentation/Configure.help linux/Documentation/Configure.help --- linux-2.1.89/Documentation/Configure.help Sun Mar 8 20:28:19 1998 +++ linux-2.1.89-cyrix/Documentation/Configure.help Sun Mar 8 20:12:34 1998 @@ -7588,6 +7588,38 @@ from the running kernel whenever you want). If you want to compile it as a module, say M here and read Documentation/modules.txt. +Processor-specific optimizations (experimental) +CONFIG_MOPTS + Say Y if you want to use some nice features of your CPU (usually disabled + for compatibility reasons) in order to speed up a bit your box. + Please disable that option if you experiment any problem at bootup. + +Cyrix 6x86+ optimizations +CONFIG_CYRIX_OPTS + These optimizations are available from Cyrix 6x86 CPUs to newer ones, + like M2. You might want to say Y here and select all the following options. + +Suspend-on-halt +CONFIG_CYRIX_OPTS_SOH + By default, your CPU will eat a lot of power, even when it doesn't do + anything. Enabling that option will help you reduce the CPU temperature, + reduce your energy needs and maybe improve the overall performances. It's a + safe bet to say Y here. + +Fast ADS +CONFIG_CYRIX_OPTS_FASTADS + If you own a 6x86 CPU, try this option to speed it up. + +Fast FASTIORTDTE +CONFIG_CYRIX_OPTS_FASTIORTDTE + If you own a 6x86 CPU, try this option to speed it up. + +Fast LOOP +CONFIG_CYRIX_OPTS_FASTLOOP + The LOOP instruction, in newer releases of 6x86 CPUs, was slowed down for + software compatibilities issues. As Linux doesn't seem to need such a + kludge, say Y to use the Cyrix optimized LOOP code. + # need an empty line after last entry, for sed script in Configure. # diff --recursive -u linux-2.1.89/arch/i386/config.in linux/arch/i386/config.in --- linux-2.1.89/arch/i386/config.in Tue Feb 3 00:18:15 1998 +++ linux-2.1.89-cyrix/arch/i386/config.in Sun Mar 8 20:01:16 1998 @@ -17,6 +17,18 @@ Pentium/K5/5x86/6x86 CONFIG_M586 \ PPro/K6/6x86MX CONFIG_M686" Pentium bool 'Math emulation' CONFIG_MATH_EMULATION +if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then + bool 'Processor-specific optimizations (experimental)' CONFIG_MOPTS + if [ "$CONFIG_MOPTS" = "y" ]; then + bool 'Cyrix 6x86+ optimizations' CONFIG_CYRIX_OPTS + if [ "$CONFIG_CYRIX_OPTS" = "y" ]; then + bool 'Suspend-on-halt' CONFIG_CYRIX_OPTS_SOH + bool 'Fast ADS' CONFIG_CYRIX_OPTS_FASTADS + bool 'Fast IORT / Enable DTE' CONFIG_CYRIX_OPTS_FASTIORTDTE + bool 'Fast LOOP' CONFIG_CYRIX_OPTS_FASTLOOP + fi + fi +fi endmenu mainmenu_option next_comment diff --recursive -u linux-2.1.89/arch/i386/kernel/head.S linux/arch/i386/kernel/head.S --- linux-2.1.89/arch/i386/kernel/head.S Sun Feb 15 21:11:23 1998 +++ linux-2.1.89-cyrix/arch/i386/kernel/head.S Sun Mar 8 21:16:56 1998 @@ -8,6 +8,7 @@ */ .text +#include <linux/autoconf.h> #include <linux/tasks.h> #include <linux/linkage.h> #include <asm/segment.h> @@ -201,6 +202,48 @@ movb %al,%bl setCx86($0xe8,%bl) +/* + * Cyrix basic optimizations (Frank Denis/Koen Gadeyne) + */ + +#if defined (CONFIG_MOPTS) && defined (CONFIG_CYRIX_OPTS) +# ifdef CONFIG_CYRIX_OPTS_SOH + getCx86($0xc2) + orb $0x08,%al # Suspend-on-halt +# endif +# ifdef CONFIG_CYRIX_OPTS_FASTADS + andb $0xfd,%al # Fast ADS +# endif + movb %al,%bl + setCx86($0xc2,%bl) +# ifdef CONFIG_CYRIX_OPTS_FASTIORTDTE + getCx86($0xe8) + orb $0x17,%al # Fast IORT and enable DTE + movb %al,%bl + setCx86($0xe8,%bl) +# endif +# ifdef CONFIG_CYRIX_OPTS_FASTLOOP + getCx86($0xe9) + andb $0xfd,%al # Fast LOOP + movb %al,%bl + setCx86($0xe9,%bl) +# endif + pushl %ecx + pushl %edx + push %es + push %ds + movl $(__KERNEL_DS),%eax + mov %ax,%ds + mov %ax,%es + pushl $cyr_msg + call SYMBOL_NAME(printk) + popl %eax + pop %ds + pop %es + popl %edx + popl %ecx +#endif + setCx86($0xc3,%cl) # Restore old CCR3 ncyrix: movl $3,X86 # at least 386 @@ -338,6 +381,10 @@ L6: jmp L6 # main should never return here, but # just in case, we know what happens. + +cyr_msg: + .asciz "Cyrix optimizations enabled.\n" + ALIGN #ifdef __SMP__ ready: .byte 0 -----------------------------[Cut here]-----------------------------
Best regards, Frank.
-- If you have men who will exclude any of god's creatures from the shelter of compassion and pity, you will have men who will deal likewise with their fellow men. -St.Francis of Assisi. -=- Frank DENIS Email : ange@angelic.com
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |