* Indigo2 patch
@ 1999-05-02 16:24 Andrew R. Baker
1999-05-02 18:53 ` Ulf Carlsson
1999-05-07 15:11 ` Andrew R. Baker
0 siblings, 2 replies; 8+ messages in thread
From: Andrew R. Baker @ 1999-05-02 16:24 UTC (permalink / raw)
To: Linux SGI
[-- Attachment #1: Type: TEXT/PLAIN, Size: 763 bytes --]
OK, since this is my first time making a patch I am not sure I got
everything quite right. This will let people with an Indigo2 actually
boot into Linux. However, they probably won't be able to do much
thereafter (I get the kernel to die while doing a 'cat README' in the root
directory). Unfortunately, this won't print the console boot messages to
the screen either. To do this, I replaced the printk code in
kernel/printk.c with the printf code in arch/mips/arc/printf.c. I'm sure
there is a better way, but I haven't found it yet. These were made
against the yesterday's (1999.05.01) version of the CVS tree.
-Andrew
P.S. It would be nice to get someone to make sure this doesn't break
anything on the Indy. I don't have one to test things on.
[-- Attachment #2: indigo2.patch --]
[-- Type: TEXT/PLAIN, Size: 4713 bytes --]
diff --exclude=*CVS* -r -u src/linux/arch/mips/Makefile src2/linux/arch/mips/Makefile
--- src/linux/arch/mips/Makefile Tue Feb 9 17:11:30 1999
+++ src2/linux/arch/mips/Makefile Sat May 1 21:35:01 1999
@@ -6,6 +6,7 @@
#
# Copyright (C) 1994, 1995, 1996 by Ralf Baechle
# DECStation modifications by Paul M. Antoine, 1996
+# LINKFLAGS changed by Andrew R. Baker, 1999
#
# This file is included by the global makefile so that you can add your own
# architecture-specific flags and dependencies. Remember to do have actions
@@ -36,7 +37,8 @@
CROSS_COMPILE = $(tool-prefix)
endif
-LINKFLAGS = -static -N
+# having -N in LINKFLAGS causes my Indigo2 not to boot
+LINKFLAGS = -static
MODFLAGS += -mlong-calls
#
diff --exclude=*CVS* -r -u src/linux/arch/mips/sgi/kernel/indy_hpc.c src2/linux/arch/mips/sgi/kernel/indy_hpc.c
--- src/linux/arch/mips/sgi/kernel/indy_hpc.c Tue Aug 25 04:14:48 1998
+++ src2/linux/arch/mips/sgi/kernel/indy_hpc.c Sat May 1 21:50:42 1999
@@ -43,7 +43,8 @@
prom_printf("sgihpc_init: ");
#endif
- if(sid & 1) {
+ /* This test works now thanks to William J. Earl */
+ if ((sid & 1) == 0 ) {
#ifdef DEBUG_SGIHPC
prom_printf("GUINESS ");
#endif
diff --exclude=*CVS* -r -u src/linux/arch/mips/sgi/kernel/indy_int.c src2/linux/arch/mips/sgi/kernel/indy_int.c
--- src/linux/arch/mips/sgi/kernel/indy_int.c Mon Jan 4 10:03:56 1999
+++ src2/linux/arch/mips/sgi/kernel/indy_int.c Sat May 1 21:43:15 1999
@@ -5,6 +5,7 @@
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
* Copyright (C) 1997, 1998 Ralf Baechle (ralf@gnu.org)
+ * Copyright (C) 1999 Andrew R. Baker (andrewb@uab.edu) - Indigo2 changes
*/
#include <linux/config.h>
#include <linux/init.h>
@@ -563,9 +564,16 @@
}
}
- ioc_icontrol = &sgi_i3regs->ints;
- ioc_timers = &sgi_i3regs->timers;
- ioc_tclear = &sgi_i3regs->tclear;
+ /* Indy uses an INT3, Indigo2 uses an INT2 */
+ if (sgi_guiness) {
+ ioc_icontrol = &sgi_i3regs->ints;
+ ioc_timers = &sgi_i3regs->timers;
+ ioc_tclear = &sgi_i3regs->tclear;
+ } else {
+ ioc_icontrol = &sgi_i2regs->ints;
+ ioc_timers = &sgi_i2regs->timers;
+ ioc_tclear = &sgi_i2regs->tclear;
+ }
/* Mask out all interrupts. */
ioc_icontrol->imask0 = 0;
diff --exclude=*CVS* -r -u src/linux/arch/mips/sgi/kernel/indy_mc.c src2/linux/arch/mips/sgi/kernel/indy_mc.c
--- src/linux/arch/mips/sgi/kernel/indy_mc.c Mon May 4 04:12:57 1998
+++ src2/linux/arch/mips/sgi/kernel/indy_mc.c Sat May 1 21:39:09 1999
@@ -2,6 +2,7 @@
* indy_mc.c: Routines for manipulating the INDY memory controller.
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ * Copyright (C) 1999 Andrew R. Baker (andrewb@uab.edu) - Indigo2 changes
*
* $Id: indy_mc.c,v 1.3 1998/05/04 09:12:57 ralf Exp $
*/
@@ -150,6 +151,8 @@
tmpreg |= SGIMC_GIOPARM_PLINEEXP0; /* exp[01] pipelined */
tmpreg |= SGIMC_GIOPARM_PLINEEXP1;
tmpreg |= SGIMC_GIOPARM_MASTEREISA;/* EISA masters */
+ /* someone forgot this poor little guy... */
+ tmpreg |= SGIMC_GIOPARM_GFX64; /* GFX at 64 bits */
}
}
mcmisc_regs->gioparm = tmpreg; /* poof */
diff --exclude=*CVS* -r -u src/linux/include/asm-mips/sgint23.h src2/linux/include/asm-mips/sgint23.h
--- src/linux/include/asm-mips/sgint23.h Wed Mar 11 09:21:45 1998
+++ src2/linux/include/asm-mips/sgint23.h Sat May 1 21:44:56 1999
@@ -2,6 +2,7 @@
* sgint23.h: Defines for the SGI INT2 and INT3 chipsets.
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ * Copyright (C) 1999 Andrew R. Baker (andrewb@uab.edu) - INT2 corrections
*/
#ifndef _MIPS_SGINT23_H
#define _MIPS_SGINT23_H
@@ -20,7 +21,7 @@
#define SGINT_END 52 /* End of 'spaces' */
/* INT2 occupies HPC PBUS slot 4, INT3 uses slot 6. */
-#define SGI_INT2_BASE 0x1fb80100 /* physical */
+#define SGI_INT2_BASE 0x1fbd9000 /* physical */
#define SGI_INT3_BASE 0x1fbd9880 /* physical */
struct sgi_ioc_ints {
@@ -128,6 +129,10 @@
#define SGINT_TCSAMP_COUNTER 10255
+/* FIXME: What does this really look like? It was written to have
+ * 17 registers, but there are only 16 in my Indigo2.
+ * I guessed at which one to remove... - andrewb
+ */
struct sgi_int2_regs {
struct sgi_ioc_ints ints;
@@ -147,8 +152,11 @@
#endif
#define INT2_TCLEAR_T0CLR 0x1 /* Clear timer0 IRQ */
#define INT2_TCLEAR_T1CLR 0x2 /* Clear timer1 IRQ */
-
- unsigned long _unused[3];
+/* I am guesing there are only two unused registers here
+ * but I could be wrong... - andrewb
+ */
+/* unsigned long _unused[3]; */
+ unsigned long _unused[2];
struct sgi_ioc_timers timers;
};
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Indigo2 patch
1999-05-02 16:24 Indigo2 patch Andrew R. Baker
@ 1999-05-02 18:53 ` Ulf Carlsson
1999-05-03 1:31 ` Andrew R. Baker
1999-05-07 15:11 ` Andrew R. Baker
1 sibling, 1 reply; 8+ messages in thread
From: Ulf Carlsson @ 1999-05-02 18:53 UTC (permalink / raw)
To: Andrew R. Baker; +Cc: Linux SGI
> OK, since this is my first time making a patch I am not sure I got
> everything quite right. This will let people with an Indigo2 actually
> boot into Linux. However, they probably won't be able to do much
Cool!
> thereafter (I get the kernel to die while doing a 'cat README' in the root
> directory). Unfortunately, this won't print the console boot messages to
> the screen either. To do this, I replaced the printk code in
> kernel/printk.c with the printf code in arch/mips/arc/printf.c. I'm sure
> there is a better way, but I haven't found it yet. These were made
Yes, there's a better way. A PROM console can be implemented. I have hacked some
code for this PROM console for this purpose. I can't get it to open the initial
console though. I'll send it to you, maybe you have time to figure out what's
wrong...
> -LINKFLAGS = -static -N
> +# having -N in LINKFLAGS causes my Indigo2 not to boot
> +LINKFLAGS = -static
This is a problem with the cross linker and not with the kernel itself, it's the
same for Indy's. The code in the CVS tree should remain as it is.
- Ulf
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Indigo2 patch
1999-05-02 18:53 ` Ulf Carlsson
@ 1999-05-03 1:31 ` Andrew R. Baker
1999-05-04 10:59 ` Ralf Baechle
0 siblings, 1 reply; 8+ messages in thread
From: Andrew R. Baker @ 1999-05-03 1:31 UTC (permalink / raw)
To: Ulf Carlsson; +Cc: Linux SGI
On Sun, 2 May 1999, Ulf Carlsson wrote:
> Yes, there's a better way. A PROM console can be implemented. I have hacked some
> code for this PROM console for this purpose. I can't get it to open the initial
> console though. I'll send it to you, maybe you have time to figure out what's
> wrong...
Great, most of the work has already been done for me. ;) This is what I
had thought about, I just hadn't tried to figure out where to start yet.
A PROM console would probably be a help on any of the SGIs until some sort
of graphics support is worked out.
> > -LINKFLAGS = -static -N
> > +# having -N in LINKFLAGS causes my Indigo2 not to boot
> > +LINKFLAGS = -static
>
> This is a problem with the cross linker and not with the kernel itself, it's the
> same for Indy's. The code in the CVS tree should remain as it is.
Any chance on getting the cross linker fixed?
-Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Indigo2 patch
1999-05-03 1:31 ` Andrew R. Baker
@ 1999-05-04 10:59 ` Ralf Baechle
0 siblings, 0 replies; 8+ messages in thread
From: Ralf Baechle @ 1999-05-04 10:59 UTC (permalink / raw)
To: Andrew R. Baker, Ulf Carlsson; +Cc: Linux SGI
On Sun, May 02, 1999 at 08:31:20PM -0500, Andrew R. Baker wrote:
> Any chance on getting the cross linker fixed?
I'll have the time to work on this soon again. However just removing -N
does the job; there are no other known kernel build problems with
binutils 2.8.1.
Ralf
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Indigo2 patch
1999-05-02 16:24 Indigo2 patch Andrew R. Baker
1999-05-02 18:53 ` Ulf Carlsson
@ 1999-05-07 15:11 ` Andrew R. Baker
1999-05-07 17:43 ` Ulf Carlsson
1 sibling, 1 reply; 8+ messages in thread
From: Andrew R. Baker @ 1999-05-07 15:11 UTC (permalink / raw)
To: Linux SGI
I am just wondering if anyone has tried out my patch. I haven't received
much feedback. Also, has anyone checked to make sure it doesn't break the
anything on the Indy? If it doesn't than could someone think about
committing the changes to the CVS tree (I don't have CVS commit access).
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Indigo2 patch
1999-05-07 15:11 ` Andrew R. Baker
@ 1999-05-07 17:43 ` Ulf Carlsson
0 siblings, 0 replies; 8+ messages in thread
From: Ulf Carlsson @ 1999-05-07 17:43 UTC (permalink / raw)
To: Andrew R. Baker; +Cc: Linux SGI
> I am just wondering if anyone has tried out my patch. I haven't received
> much feedback.
I have the same problem with the HAL2 sounddriver I think. ;-)
- Ulf
^ permalink raw reply [flat|nested] 8+ messages in thread
* Indigo2 patch
@ 1999-06-03 19:57 Andrew R. Baker
1999-06-04 20:07 ` Andrew R. Baker
0 siblings, 1 reply; 8+ messages in thread
From: Andrew R. Baker @ 1999-06-03 19:57 UTC (permalink / raw)
To: Linux SGI
[-- Attachment #1: Type: TEXT/PLAIN, Size: 275 bytes --]
Here is the latest patch for the Indigo2, it looks good so far...
Things still left to do:
allow 8254 timer acks (it actually works on the Indigo2)
clean up IRQ data structure
enable 2nd SCSI controller
I am going to work on these once I get back from USENIX.
-Andrew
[-- Attachment #2: Type: TEXT/PLAIN, Size: 1746 bytes --]
--- indy_int.c.orig Tue Jun 1 07:27:58 1999
+++ indy_int.c Wed Jun 2 10:56:46 1999
@@ -5,7 +5,9 @@
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
* Copyright (C) 1997, 1998 Ralf Baechle (ralf@gnu.org)
- * Copyright (C) 1999 Andrew R. Baker (andrewb@uab.edu) - Indigo2 changes
+ * Copyright (C) 1999 Andrew R. Baker (andrewb@uab.edu)
+ * - Indigo2 changes
+ * - Interrupt handling fixes
*/
#include <linux/config.h>
#include <linux/init.h>
@@ -449,10 +451,23 @@
action = local_irq_action[irq];
}
+ /* if irq == 0, then the interrupt has already been cleared */
+ if ( irq == 0 ) { goto end; }
+ /* if action == NULL, then we do have a handler for the irq */
+ if ( action == NULL ) { goto no_handler; }
+
hardirq_enter(cpu);
kstat.irqs[0][irq + 16]++;
action->handler(irq, action->dev_id, regs);
hardirq_exit(cpu);
+ goto end;
+
+no_handler:
+ printk("No handler for local0 irq: %i\n", irq);
+
+end:
+ return;
+
}
void indy_local1_irqdispatch(struct pt_regs *regs)
@@ -473,10 +488,23 @@
irq = lc1msk_to_irqnr[mask];
action = local_irq_action[irq];
}
+ /* if irq == 0, then the interrupt has already been cleared */
+ /* not sure if it is needed here, but it is needed for local0 */
+ if ( irq == 0 ) { goto end; }
+ /* if action == NULL, then we do have a handler for the irq */
+ if ( action == NULL ) { goto no_handler; }
+
hardirq_enter(cpu);
kstat.irqs[0][irq + 24]++;
action->handler(irq, action->dev_id, regs);
hardirq_exit(cpu);
+ goto end;
+
+no_handler:
+ printk("No handler for local1 irq: %i\n", irq);
+
+end:
+ return;
}
void indy_buserror_irq(struct pt_regs *regs)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Indigo2 patch
1999-06-03 19:57 Andrew R. Baker
@ 1999-06-04 20:07 ` Andrew R. Baker
0 siblings, 0 replies; 8+ messages in thread
From: Andrew R. Baker @ 1999-06-04 20:07 UTC (permalink / raw)
To: Linux SGI
On Thu, 3 Jun 1999, Andrew R. Baker wrote:
>
> Here is the latest patch for the Indigo2, it looks good so far...
> Things still left to do:
> allow 8254 timer acks (it actually works on the Indigo2)
> clean up IRQ data structure
> enable 2nd SCSI controller
>
> I am going to work on these once I get back from USENIX.
BTW, with this patch, I have managed to successfully boot my Indigo2 and
have gone as far as installing hardhat on it. It hasn't crashed so far,
even after I got it up to a load average of 164... ;) However, I do
consistently get "signal 11" errors while trying to compile a kernel on
it.
Please beat it up as much as possible and let me know what I still need to
do. ;)
-Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~1999-06-04 20:01 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-05-02 16:24 Indigo2 patch Andrew R. Baker
1999-05-02 18:53 ` Ulf Carlsson
1999-05-03 1:31 ` Andrew R. Baker
1999-05-04 10:59 ` Ralf Baechle
1999-05-07 15:11 ` Andrew R. Baker
1999-05-07 17:43 ` Ulf Carlsson
-- strict thread matches above, loose matches on Subject: below --
1999-06-03 19:57 Andrew R. Baker
1999-06-04 20:07 ` Andrew R. Baker
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.