diff --git a/MAINTAINERS b/MAINTAINERS index cf4abdd..fd90bc6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3433,6 +3433,12 @@ M: paulus@au.ibm.com W: http://www.ibm.com/linux/ltc/projects/ppc S: Supported +LINUX FOR NCR VOYAGER +P: James Bottomley +M: James.Bottomley@HansenPartnership.com +W: http://www.hansenpartnership.com/voyager +S: Maintained + LINUX FOR POWERPC (32-BIT AND 64-BIT) P: Benjamin Herrenschmidt M: benh@kernel.crashing.org diff --git a/arch/x86/Kbuild b/arch/x86/Kbuild index ad8ec35..64e4db9 100644 --- a/arch/x86/Kbuild +++ b/arch/x86/Kbuild @@ -7,6 +7,9 @@ obj-$(CONFIG_XEN) += xen/ # lguest paravirtualization support obj-$(CONFIG_LGUEST_GUEST) += lguest/ +# voyager support +obj-$(CONFIG_X86_VOYAGER) += mach-voyager/ + obj-y += kernel/ obj-y += mm/ diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 98d585d..beffbeb 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -314,6 +314,7 @@ config X86_EXTENDED_PLATFORM SGI 320/540 (Visual Workstation) Summit/EXA (IBM x440) Unisys ES7000 IA32 series + Voyager (NCR) If you have one of these systems, or if you want to build a generic distribution kernel, say Y here - otherwise say N. @@ -435,6 +436,19 @@ config X86_ES7000 Support for Unisys ES7000 systems. Say 'Y' here if this kernel is supposed to run on an IA32-based Unisys ES7000 system. +config X86_VOYAGER + bool "Voyager (NCR)" + depends on SMP && X86_32_NON_STANDARD + select MCA + ---help--- + Voyager is an MCA-based 32-way capable SMP architecture proprietary + to NCR Corp. Machine classes 345x/35xx/4100/51xx are Voyager-based. + + *** WARNING *** + + If you do not specifically know you have a Voyager based machine, + say N here, otherwise the kernel you build will not be bootable. + config SCHED_OMIT_FRAME_POINTER def_bool y prompt "Single-depth WCHAN output" diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index 8d16ada..9461f1e 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile @@ -26,6 +26,9 @@ targets := vmlinux.bin setup.bin setup.elf bzImage targets += fdimage fdimage144 fdimage288 image.iso mtools.conf subdir- := compressed +# Voyager must come first because there's a condition in a20.c +# that depends on voyager detection +setup-$(CONFIG_X86_VOYAGER) += voyager.o setup-y += a20.o bioscall.o cmdline.o copy.o cpu.o cpucheck.o edd.o setup-y += header.o main.o mca.o memory.o pm.o pmjump.o setup-y += printf.o regs.o string.o tty.o video.o video-mode.o diff --git a/arch/x86/boot/a20.c b/arch/x86/boot/a20.c index 64a31a6..95be8b1 100644 --- a/arch/x86/boot/a20.c +++ b/arch/x86/boot/a20.c @@ -129,6 +129,13 @@ static void enable_a20_fast(void) int enable_a20(void) { + if (is_voyager()) { + /* On Voyager, a20_test() is unsafe becuase it pokes + * about in areas that are VIC specific and causes + * a crash */ + enable_a20_kbc(); + return 0; + } int loops = A20_ENABLE_LOOPS; int kbc_err; diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h index 98239d2..824cfe9 100644 --- a/arch/x86/boot/boot.h +++ b/arch/x86/boot/boot.h @@ -25,6 +25,7 @@ #include #include #include +#include #include "bitops.h" #include #include @@ -35,7 +36,6 @@ #define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x))) extern struct setup_header hdr; -extern struct boot_params boot_params; /* Basic port I/O */ static inline void outb(u8 v, u16 port) @@ -350,6 +350,9 @@ void probe_cards(int unsafe); /* video-vesa.c */ void vesa_store_edid(void); +/* voyager.c */ +int query_voyager(void); + #endif /* __ASSEMBLY__ */ #endif /* BOOT_BOOT_H */ diff --git a/arch/x86/boot/main.c b/arch/x86/boot/main.c index 140172b..80659a6 100644 --- a/arch/x86/boot/main.c +++ b/arch/x86/boot/main.c @@ -152,6 +152,11 @@ void main(void) /* Query MCA information */ query_mca(); + /* Voyager */ +#ifdef CONFIG_X86_VOYAGER + query_voyager(); +#endif + /* Query Intel SpeedStep (IST) information */ query_ist(); diff --git a/arch/x86/boot/voyager.c b/arch/x86/boot/voyager.c new file mode 100644 index 0000000..c599ff7 --- /dev/null +++ b/arch/x86/boot/voyager.c @@ -0,0 +1,41 @@ +/* -*- linux-c -*- ------------------------------------------------------- * + * + * Copyright (C) 1991, 1992 Linus Torvalds + * Copyright 2007 rPath, Inc. - All Rights Reserved + * + * This file is part of the Linux kernel, and is made available under + * the terms of the GNU General Public License version 2. + * + * ----------------------------------------------------------------------- */ + +/* + * Get the Voyager config information + */ + +#include "boot.h" + +int query_voyager(void) +{ + u8 err; + u16 es, di; + /* Abuse the apm_bios_info area for this */ + u8 *data_ptr = (u8 *)&boot_params.voyager_bios_info; + + data_ptr[0] = NOT_VOYAGER_BIOS_SIG; + + asm("pushw %%es ; " + "int $0x15 ; " + "setc %0 ; " + "movw %%es, %1 ; " + "popw %%es" + : "=q" (err), "=r" (es), "=D" (di) + : "a" (0xffc0)); + + if (err) + return -1; /* Not Voyager */ + printf("Voyager detected\n"); + + set_fs(es); + copy_from_fs(data_ptr, di, 7); /* Table is 7 bytes apparently */ + return 0; +} diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/i386_defconfig index edb992e..6413a1f 100644 --- a/arch/x86/configs/i386_defconfig +++ b/arch/x86/configs/i386_defconfig @@ -213,6 +213,9 @@ CONFIG_X86_MPPARSE=y # CONFIG_X86_BIGSMP is not set CONFIG_X86_EXTENDED_PLATFORM=y # CONFIG_X86_ELAN is not set +# CONFIG_X86_VOYAGER is not set +# CONFIG_X86_GENERICARCH is not set +# CONFIG_X86_VSMP is not set # CONFIG_X86_RDC321X is not set # CONFIG_X86_32_NON_STANDARD is not set CONFIG_SCHED_OMIT_FRAME_POINTER=y diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig index cee1dd2..63cabaf 100644 --- a/arch/x86/configs/x86_64_defconfig +++ b/arch/x86/configs/x86_64_defconfig @@ -211,6 +211,9 @@ CONFIG_SMP=y CONFIG_SPARSE_IRQ=y CONFIG_X86_MPPARSE=y CONFIG_X86_EXTENDED_PLATFORM=y +# CONFIG_X86_ELAN is not set +# CONFIG_X86_VOYAGER is not set +# CONFIG_X86_GENERICARCH is not set # CONFIG_X86_VSMP is not set # CONFIG_X86_UV is not set CONFIG_SCHED_OMIT_FRAME_POINTER=y diff --git a/arch/x86/include/asm/Kbuild b/arch/x86/include/asm/Kbuild index 4a8e80c..e791087 100644 --- a/arch/x86/include/asm/Kbuild +++ b/arch/x86/include/asm/Kbuild @@ -2,6 +2,7 @@ include include/asm-generic/Kbuild.asm header-y += boot.h header-y += bootparam.h +header-y += voyager_bios.h header-y += debugreg.h header-y += ldt.h header-y += msr-index.h diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 229d0be..f1af4ca 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h @@ -238,6 +238,12 @@ static inline int apic_is_clustered_box(void) extern u8 setup_APIC_eilvt_mce(u8 vector, u8 msg_type, u8 mask); extern u8 setup_APIC_eilvt_ibs(u8 vector, u8 msg_type, u8 mask); +static inline void disable_APIC(void) +{ + disable_local_APIC(); + apic_disable(); + disable_apic = 1; +} #else /* !CONFIG_X86_LOCAL_APIC */ static inline void lapic_shutdown(void) { } @@ -245,6 +251,8 @@ static inline void lapic_shutdown(void) { } static inline void init_apic_mappings(void) { } static inline void disable_local_APIC(void) { } static inline void apic_disable(void) { } +static inline void disable_APIC(void) { } + #endif /* !CONFIG_X86_LOCAL_APIC */ #ifdef CONFIG_X86_64 diff --git a/arch/x86/include/asm/bootparam.h b/arch/x86/include/asm/bootparam.h index 1724e8d..8de5619 100644 --- a/arch/x86/include/asm/bootparam.h +++ b/arch/x86/include/asm/bootparam.h @@ -7,6 +7,7 @@ #include #include #include +#include #include