From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id 1959F2FA69 for ; Thu, 21 Jun 2001 12:37:42 -0400 (EDT) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id f5LGaBw00768 for axp-list@listman.redhat.com; Thu, 21 Jun 2001 12:36:11 -0400 Received: from zcamail04.zca.compaq.com (zcamail04.zca.compaq.com [161.114.32.104]) by mail.redhat.com (8.11.0/8.8.7) with ESMTP id f5LGaAb00762 for ; Thu, 21 Jun 2001 12:36:11 -0400 Received: by zcamail04.zca.compaq.com (Postfix, from userid 12345) id DB71563E; Thu, 21 Jun 2001 09:39:14 -0700 (PDT) Received: from mailrelay01.cac.cpqcorp.net (mailrelay01.cac.cpqcorp.net [16.47.132.152]) by zcamail04.zca.compaq.com (Postfix) with ESMTP id CB3AF725 for ; Thu, 21 Jun 2001 09:39:14 -0700 (PDT) Received: by mailrelay01.cac.cpqcorp.net (Postfix, from userid 12345) id 24519716; Thu, 21 Jun 2001 09:37:16 -0700 (PDT) Received: from perf.zko.dec.com (aseng.zko.dec.com [16.31.80.86]) by mailrelay01.cac.cpqcorp.net (Postfix) with ESMTP id BA6D15F1 for ; Thu, 21 Jun 2001 09:37:15 -0700 (PDT) Received: from localhost by perf.zko.dec.com (8.9.3/1.1.10.5/07Mar97-1056AM) id MAA0000388268; Thu, 21 Jun 2001 12:37:15 -0400 (EDT) Date: Thu, 21 Jun 2001 12:37:15 -0400 (EDT) From: Phillip Ezolt To: Subject: Re: Redhat 7.1 Alpha In-Reply-To: <20010621112037.C20970@linux04.mro.cpqcorp.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: > 4. Even text mode install appears broken on my UDB/Multia; somewhere during > the initial part of the install, it starts "anaconda" and it never > completes, running forever. This may possibly be a CDROM problem at > my end; I'll have to attempt a network-based install to find out for > sure. This is the result the following. (See below.) I suggest that redhat/Linus/Alan apply last patch to the kernel. --Phil Compaq: High Performance Server Division/Benchmark Performance Engineering ---------------- Alpha, The Fastest Processor on Earth -------------------- Phillip.Ezolt@compaq.com |C|O|M|P|A|Q| ezolt@perf.zko.dec.com ------------------- See the results at www.spec.org ----------------------- ..... This is the result of a buggy SRM, and unfortunately, it isn't fixed in the final digital SRM release for the UDB. When entering the trap handler for an illegal instruction, the pc is not advanced properly. When the kernel hits a floating point error which is normally handled in the kernel, the pc never advances. The problem is handled, but since the pc isn't advanced, the program rexecutes the same instruction, and BAM, trap. This repeats infinitely. Workaround: Boot from MILO. It has the Palcode fixed. We hacked around the problem with the following code, but it is not in a state where it could be submitted to the kernel. It needs some sort of dynamic check for broken SRM. (Maybe from the HWRPB? ) Even better would be fixed palcode.... diff -Nau arch/alpha/kernel/traps.c ../linux-2.2.17-multia-kgdb/arch/alpha/kernel --- arch/alpha/kernel/traps.c Fri Jan 12 04:31:34 2001 +++ ../linux-2.2.17-multia-kgdb/arch/alpha/kernel/traps.c Tue Dec 19 18:19:02 2000 @@ -449,6 +449,9 @@ case 4: /* opDEC */ if (implver() == IMPLVER_EV4) { +#if 1 /* alpha SRM */ + regs.pc += 4; +#endif /* alpha SRM */ /* EV4 does not implement anything except normal rounding. Everything else will come here as an illegal instruction. Emulate them. */ ------------------------------------------------------------------------ Before he left, Bill Carr product the following patch.. It is more general than the one above: --- linux-2.2.17-kgdb/arch/alpha/kernel/traps.c Mon Nov 13 11:22:33 2000 +++ linux-2.2.17-multia-kgdb/arch/alpha/kernel/traps.c Sun Mar 11 15:59:10 2001 @@ -115,6 +115,27 @@ static alist * int_name[] = {inta_name, intl_name, ints_name, intm_name}; +static int opDEC_test = 0; +static int opDEC_fix = 0; +static unsigned long opDEC_test_pc = 0; + +static void +opDEC_check(void) +{ + unsigned long test_pc; + lock_kernel(); + opDEC_test = 1; + __asm__ __volatile__( + " br %0,1f\n" + "1: addq %0,8,%0\n" + " stq %0,%1\n" + " cvttq/svm $f31,$f31\n" +: "=&r"(test_pc), "=m"(opDEC_test_pc) +: ); + opDEC_test = 0; + unlock_kernel(); +} + static char * assoc(int fcode, alist * a) { @@ -379,7 +400,9 @@ /* If we are dealing with a breakpoint or the debug hook isn't * installed, don't die. */ if ((type != 0) ||(linux_debug_hook == (gdb_debug_hook *) NULL)) { - die_if_kernel("Instruction fault", ®s, type, 0); + if (!opDEC_test || type != 4) { + die_if_kernel("Instruction fault", ®s, type, 0); + } } #else asmlinkage void @@ -387,7 +410,9 @@ unsigned long a2, unsigned long a3, unsigned long a4, unsigned long a5, struct pt_regs regs) { - die_if_kernel("Instruction fault", ®s, type, 0); + if (!opDEC_test || type != 4) { + die_if_kernel("Instruction fault", ®s, type, 0); + } #endif switch (type) { case 0: /* breakpoint */ @@ -449,6 +474,25 @@ case 4: /* opDEC */ if (implver() == IMPLVER_EV4) { + /* We need to deal with the Multia (UDB) specially. + The last released SRM (V3.8) does not handle + the opDEC properly. It returns the pc of the + opDEC fault, not the instruction after as the + Alpha architecture requires. Here we fix it up. + We do this by intentionally causing an opDEC + fault during the boot sequence and testing if + we get the correct pc. If not, we set a flag + to correct it every time through. + */ + if (opDEC_test) { + if (regs.pc == opDEC_test_pc) { + opDEC_fix = 1; + } + } + if (opDEC_fix) { + regs.pc += 4; + } + /* EV4 does not implement anything except normal rounding. Everything else will come here as an illegal instruction. Emulate them. */ @@ -1141,4 +1185,9 @@ wrent(entUna, 4); wrent(entSys, 5); wrent(entDbg, 6); + + /* Hack for Multia (UDB)... the final released SRM has a bug in + the handling of the opDEC fault. Fix it up. + */ + opDEC_check(); }