IP28 support
Thomas Bogendoerfer
maintainerPATCH 1/1 IP28 support
Add support for SGI IP28 machines (Indigo 2 with R10k CPUs) This work is mainly based on Peter Fuersts work.
Signed-off-by Thomas Bogendoerfer <[email protected]>
---
Changes to last version:
- restructered Kconfig to make device/feature selection easier
arch/mips/Kconfig | 66 ++- arch/mips/Makefile | 14 + arch/mips/sgi-ip22/Makefile | 8 +- arch/mips/sgi-ip22/ip22-mc.c | 4 + arch/mips/sgi-ip22/ip28-berr.c | 700 ++++++++++++++++++++ include/asm-mips/dma.h | 7 +- include/asm-mips/mach-ip28/cpu-feature-overrides.h | 50 ++ include/asm-mips/mach-ip28/ds1286.h | 4 + include/asm-mips/mach-ip28/spaces.h | 22 + include/asm-mips/mach-ip28/war.h | 25 + 10 files changed, 890 insertions(+), 10 deletions(-)
arch/mips/Kconfig +63 -3
@@ -122,6 +122,7 @@ config MACH_JAZZ select ARCH_MAY_HAVE_PC_FDC select CEVT_R4K select CSRC_R4K + select DEFAULT_SGI_PARTITION if CPU_BIG_ENDIAN select GENERIC_ISA_DMA select IRQ_CPU select I8253
@@ -398,6 +399,7 @@ config SGI_IP22 select BOOT_ELF32 select CEVT_R4K select CSRC_R4K + select DEFAULT_SGI_PARTITION select DMA_NONCOHERENT select HW_HAS_EISA select I8253
@@ -405,6 +407,12 @@ config SGI_IP22 select IP22_CPU_SCACHE select IRQ_CPU select GENERIC_ISA_DMA_SUPPORT_BROKEN + select SGI_HAS_DS1286 + select SGI_HAS_I8042 + select SGI_HAS_INDYDOG + select SGI_HAS_SEEQ + select SGI_HAS_WD93 + select SGI_HAS_ZILOG select SWAP_IO_SPACE select SYS_HAS_CPU_R4X00 select SYS_HAS_CPU_R5000
@@ -422,6 +430,7 @@ config SGI_IP27 select ARC select ARC64 select BOOT_ELF64 + select DEFAULT_SGI_PARTITION select DMA_IP27 select SYS_HAS_EARLY_PRINTK select HW_HAS_PCI
@@ -438,6 +447,35 @@ config SGI_IP27 workstations. To compile a Linux kernel that runs on these, say Y here. +config SGI_IP28 + bool "SGI IP28 (Indigo2 R10k) (EXPERIMENTAL)" + depends on EXPERIMENTAL + select ARC + select ARC64 + select BOOT_ELF64 + select CEVT_R4K + select CSRC_R4K + select DEFAULT_SGI_PARTITION + select DMA_NONCOHERENT + select IRQ_CPU + select HW_HAS_EISA + select I8253 + select I8259 + select SGI_HAS_DS1286 + select SGI_HAS_I8042 + select SGI_HAS_INDYDOG + select SGI_HAS_SEEQ + select SGI_HAS_WD93 + select SGI_HAS_ZILOG + select SWAP_IO_SPACE + select SYS_HAS_CPU_R10000 + select SYS_HAS_EARLY_PRINTK + select SYS_SUPPORTS_64BIT_KERNEL + select SYS_SUPPORTS_BIG_ENDIAN + help + This is the SGI Indigo2 with R10000 processor. To compile a Linux + kernel that runs on these, say Y here. + config SGI_IP32 bool "SGI IP32 (O2)" select ARC
@@ -577,6 +615,7 @@ config SNI_RM select BOOT_ELF32 select CEVT_R4K select CSRC_R4K + select DEFAULT_SGI_PARTITION if CPU_BIG_ENDIAN select DMA_NONCOHERENT select GENERIC_ISA_DMA select HW_HAS_EISA
@@ -950,6 +989,27 @@ config EMMA2RH config SERIAL_RM9000 bool +config SGI_HAS_DS1286 + bool + +config SGI_HAS_INDYDOG + bool + +config SGI_HAS_SEEQ + bool + +config SGI_HAS_WD93 + bool + +config SGI_HAS_ZILOG + bool + +config SGI_HAS_I8042 + bool + +config DEFAULT_SGI_PARTITION + bool + config ARC32 bool
@@ -959,7 +1019,7 @@ config BOOT_ELF32 config MIPS_L1_CACHE_SHIFT int default "4" if MACH_DECSTATION - default "7" if SGI_IP27 || SNI_RM + default "7" if SGI_IP27 || SGI_IP28 || SNI_RM default "4" if PMC_MSP4200_EVAL default "5"
@@ -968,7 +1028,7 @@ config HAVE_STD_PC_SERIAL_PORT config ARC_CONSOLE bool "ARC console support" - depends on SGI_IP22 || (SNI_RM && CPU_LITTLE_ENDIAN) + depends on SGI_IP22 || SGI_IP28 || (SNI_RM && CPU_LITTLE_ENDIAN) config ARC_MEMORY bool
@@ -977,7 +1037,7 @@ config ARC_MEMORY config ARC_PROMLIB bool - depends on MACH_JAZZ || SNI_RM || SGI_IP22 || SGI_IP32 + depends on MACH_JAZZ || SNI_RM || SGI_IP22 || SGI_IP28 || SGI_IP32 default y config ARC64
arch/mips/Makefile +14 -0
@@ -475,6 +475,20 @@ endif endif # +# SGI IP28 (Indigo2 R10k) +# +# Set the load address to >= 0xa800000020080000 if you want to leave space for +# symmon, 0xa800000020004000 for production kernels ? Note that the value must +# be 16kb aligned or the handling of the current variable will break. +# Simplified: what IP22 does at 128MB+ in ksegN, IP28 does at 512MB+ in xkphys +# +#core-$(CONFIG_SGI_IP28) += arch/mips/sgi-ip22/ arch/mips/arc/arc_con.o +core-$(CONFIG_SGI_IP28) += arch/mips/sgi-ip22/ +cflags-$(CONFIG_SGI_IP28) += -mr10k-cache-barrier=1 -Iinclude/asm-mips/mach-ip28 +#cflags-$(CONFIG_SGI_IP28) += -Iinclude/asm-mips/mach-ip28 +load-$(CONFIG_SGI_IP28) += 0xa800000020004000 + +# # SGI-IP32 (O2) # # Set the load address to >= 80069000 if you want to leave space for symmon,
arch/mips/sgi-ip22/Makefile +5 -3
@@ -3,9 +3,11 @@ # under Linux. # -obj-y += ip22-mc.o ip22-hpc.o ip22-int.o ip22-berr.o \ - ip22-time.o ip22-nvram.o ip22-platform.o ip22-reset.o ip22-setup.o +obj-y += ip22-mc.o ip22-hpc.o ip22-int.o ip22-time.o ip22-nvram.o \ + ip22-platform.o ip22-reset.o ip22-setup.o +obj-$(CONFIG_SGI_IP22) += ip22-berr.o +obj-$(CONFIG_SGI_IP28) += ip28-berr.o obj-$(CONFIG_EISA) += ip22-eisa.o -EXTRA_CFLAGS += -Werror +# EXTRA_CFLAGS += -Werror
arch/mips/sgi-ip22/ip22-mc.c +4 -0
@@ -4,6 +4,7 @@* Copyright (C) 1996 David S. Miller ([email protected]) * Copyright (C) 1999 Andrew R. Baker ([email protected]) - Indigo2 changes * Copyright (C) 2003 Ladislav Michl ([email protected]) +* Copyright (C) 2004 Peter Fuerst ([email protected]) - IP28 */ #include <linux/init.h>
@@ -137,9 +138,12 @@ void __init sgimc_init(void)/* Step 2: Enable all parity checking in cpu control register * zero. */ +/* don't touch parity settings for IP28 */ +#ifndef CONFIG_SGI_IP28 tmp = sgimc->cpuctrl0; tmp |= (SGIMC_CCTRL0_EPERRGIO |SGIMC_CCTRL0_EPERRMEM |SGIMC_CCTRL0_R4KNOCHKPARR ); +#endif sgimc->cpuctrl0 = tmp;/* Step 3: Setup the MC write buffer depth, this is controlled
arch/mips/sgi-ip22/ip28-berr.c new file +700 -0
700 lines not on this page · raw message
include/asm-mips/dma.h +3 -4
@@ -84,10 +84,9 @@* Deskstations or Acer PICA but not the much more versatile DMA logic used * for the local devices on Acer PICA or Magnums. */ -#ifdef CONFIG_SGI_IP22 -/* Horrible hack to have a correct DMA window on IP22 */ -#include <asm/sgi/mc.h> -#define MAX_DMA_ADDRESS (PAGE_OFFSET + SGIMC_SEG0_BADDR + 0x01000000) +#if defined(CONFIG_SGI_IP22 ) || defined(CONFIG_SGI_IP28 ) +/* don't care; ISA bus master won't work, ISA slave DMA supports 32bit addr */ +#define MAX_DMA_ADDRESS PAGE_OFFSET#else #define MAX_DMA_ADDRESS (PAGE_OFFSET + 0x01000000)#endif
include/asm-mips/mach-ip28/cpu-feature-overrides.h new file +50 -0
50 lines not on this page · raw message
include/asm-mips/mach-ip28/ds1286.h new file +4 -0
@@ -0,0 +1,4 @@ +#ifndef __ASM_MACH_IP28_DS1286_H +#define __ASM_MACH_IP28_DS1286_H +#include <asm/mach-ip22/ds1286.h> +#endif /* __ASM_MACH_IP28_DS1286_H */
include/asm-mips/mach-ip28/spaces.h new file +22 -0
@@ -0,0 +1,22 @@ +/* +* This file is subject to the terms and conditions of the GNU General Public +* License. See the file "COPYING" in the main directory of this archive +* for more details. +* +* Copyright (C) 1994 - 1999, 2000, 03, 04 Ralf Baechle +* Copyright (C) 2000, 2002 Maciej W. Rozycki +* Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc. +* 2004 pf +*/ +#ifndef _ASM_MACH_IP28_SPACES_H +#define _ASM_MACH_IP28_SPACES_H + +#define CAC_BASE 0xa800000000000000 + +#define HIGHMEM_START (~0UL) + +#define PHYS_OFFSET _AC(0x20000000, UL) + +#include <asm/mach-generic/spaces.h> + +#endif /* _ASM_MACH_IP28_SPACES_H */
include/asm-mips/mach-ip28/war.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* This file is subject to the terms and conditions of the GNU General Public +* License. See the file "COPYING" in the main directory of this archive +* for more details. +* +* Copyright (C) 2002, 2004, 2007 by Ralf Baechle <[email protected]> +*/ +#ifndef __ASM_MIPS_MACH_IP28_WAR_H +#define __ASM_MIPS_MACH_IP28_WAR_H + +#define R4600_V1_INDEX_ICACHEOP_WAR 0 +#define R4600_V1_HIT_CACHEOP_WAR 0 +#define R4600_V2_HIT_CACHEOP_WAR 0 +#define R5432_CP0_INTERRUPT_WAR 0 +#define BCM1250_M3_WAR 0 +#define SIBYTE_1956_WAR 0 +#define MIPS4K_ICACHE_REFILL_WAR 0 +#define MIPS_CACHE_SYNC_WAR 0 +#define TX49XX_ICACHE_INDEX_INV_WAR 0 +#define RM9000_CDEX_SMP_WAR 0 +#define ICACHE_REFILLS_WORKAROUND_WAR 0 +#define R10000_LLSC_WAR 1 +#define MIPS34K_MISSED_ITLB_WAR 0 + +#endif /* __ASM_MIPS_MACH_IP28_WAR_H */
IP28 Installation Success report Was: [UPDATED PATCH] IP28 support
Quoted 2 lines · Thomas Bogendoerfer
Add support for SGI IP28 machines (Indigo 2 with R10k CPUs) This work is mainly based on Peter Fuersts work.
I thought an installation success report is sometimes nice to have:
flo@ip28:~$ cat /proc/cpuinfo system type : SGI Indigo2 processor : 0 cpu model : R10000 V2.5 FPU V0.0 BogoMIPS : 194.04 wait instruction : no microsecond timers : yes tlb_entries : 64 extra interrupt vector : no hardware watchpoint : yes ASEs implemented : shadow register sets : 1 VCED exceptions : not available VCEI exceptions : not available
flo@ip28:~$ uptime
19:49:15 up 4 days, 9:09, 2 users, load average: 0.00, 0.00, 0.00
flo@ip28:~$ uname -a
Linux ip28 2.6.24-rc5-g8b3ba06b-dirty #21 Tue Dec 18 12:48:29 CET 2007 mips64 GNU/Linux
flo@ip28:~$ cat /proc/interrupts
CPU0
0: 1 XT-PIC timer
2: 0 XT-PIC cascade
18: 0 MIPS local0 cascade
19: 0 MIPS local1 cascade
22: 1 MIPS Bus Error
23: 94680570 MIPS timer
25: 3863916 IP22 local 0 SGI WD93
26: 7 IP22 local 0 SGI WD93
27: 677582 IP22 local 0 SGI Seeq8003
31: 0 IP22 local 0 mapable0 cascade
33: 0 IP22 local 1 Front Panel
43: 1 IP22 local 2 EISA
44: 5 IP22 local 2 i8042, i8042
45: 6462546 IP22 local 2 IP22-ZilogERR: 0
The maschine successfully compiled multiple gcc version and had no hickups so far ...
Peter and Thomas did great work ....
Flo
Signature · 2 lines
Florian Lohoff [email protected] +49-171-2280134 security shall soon have neither - Benjamin Franklin