From anton at samba.org Tue Mar 11 13:27:28 2003 From: anton at samba.org (Anton Blanchard) Date: Tue, 11 Mar 2003 13:27:28 +1100 Subject: System Reset exception rewrite Message-ID: <20030311022728.GA19356@krispykreme> Hi, Ive been chasing a bug in 2.5 where we would hit the exception stack guard page. The problem with the guard page is that its impossible to debug the problem without a hardware debugger, every exception will hit the unmapped guard page and end up looping in a 0x300. I spoke to Paulus and he suggested we should just do a compare and branch to the debugger if we have overflowed our exception stack and I agree. However the whole thing got me thinking about the system reset exception. Since this is our last ditch effort to get debug out, we should make it as failsafe as possible. Ive started writing a handler that: - uses a page in the paca for its stack - does an slbia and enters slb entries manually before accessing areas of memory (eg the serial port ioremap segment and the kernel stack segment) - serialises all cpu output but has a timeout in case one cpu locks up before dropping the lock - starts with the safer things (registers, exception stack) then moves to more adventurous things (kernel stack backtrace) I also moved the RTAS allocation into the first (256MB) segment. With FWNMI it is critical to complete the rtas unlock method or all cpus behind it will lock up. Allocating the rtas segment ensures we wont take an SLB miss when reading the error info. TODO: - write the POWER3 equivalent for the segment entry code - perhaps print more info - pass control off to debugger once all cpus have dumped state The patch was good enough to catch my bug, notice the exception stack where we took a 0x380 in fast_exception_return after we loaded srr0. Anton cpu 6: System Reset pc = 000000000000036c lr = 000000001002e2ac sp = 00000000ffffdbc0 msr = 9000000000001000 dar = c0000000005ab03c dsisr = 000000000a000000 cr = 0000000028022448 ctr = 0000000000000000 xer = 0000000020000000 sprg0 = 0000000000000000 sprg1 = 00000000ffffe808 sprg2 = 0000000000000000 sprg3 = c0000000005aa000 curr = c000000000009f94 dec = 000000009492b228 exsp = c0000000005aafc0 ksp = c0000007b4c23e30 R00 = 0000000000000002 R10 = 0000000000000000 R20 = c0000000005aa000 R01 = 00000000ffffdbc0 R11 = 0000000000000000 R21 = c0000000005ab000 R02 = 0000000000000000 R12 = 0000000020022448 R22 = c0000000000089d4 R03 = 0000000000000000 R13 = 000000001009c498 R23 = b000000000001032 R04 = 00000000ffffe788 R14 = 0000000000000000 R24 = 0000000000000000 R05 = 0000000000000000 R15 = 0000000000000000 R25 = 0000000000000000 R06 = 00000049beae2dba R16 = 0000000000000000 R26 = 00000000ffffffff R07 = 0000000000000001 R17 = 0000000000000000 R27 = 0000000000000006 R08 = ffe55f5d00000080 R18 = 0000000000000000 R28 = 000000001009c7a0 R09 = 0000000000000000 R19 = 00000000100a11f0 R29 = 00000000100a11f0 R31 = 0000000000000000 R32 = 000000000000036c exception stack: c0000000000089bc 9000000000001030 00000000100a16b8 00000000ffffffff 0000000000000000 00000000ffffffff 00000000ffffe890 0020000000000380 c000000000008b34 9000000000001032 c0000000005aa000 c0000000005aaf00 00000000ffffe780 0000000028022448 00000000ffffe508 0220000000000380 exception stack overflow: c000000000008b34 9000000000001032 c0000000005aa000 c0000000005aaf40 00000000ffffe490 0000000028022448 00000000ffffe218 0220000000000380 diff -ru ppc64-2.5-old/arch/ppc64/kernel/asm-offsets.c ppc64-2.5/arch/ppc64/kernel/asm-offsets.c --- ppc64-2.5-old/arch/ppc64/kernel/asm-offsets.c 2003-02-12 07:02:23.000000000 -0600 +++ ppc64-2.5/arch/ppc64/kernel/asm-offsets.c 2003-03-10 15:30:04.000000000 -0600 @@ -96,6 +96,7 @@ DEFINE(PACAREGSAV, offsetof(struct paca_struct, xRegSav)); DEFINE(PACAEXC, offsetof(struct paca_struct, exception_stack)); DEFINE(PACAGUARD, offsetof(struct paca_struct, guard)); + DEFINE(PACA_SYSRESET_STACK, offsetof(struct paca_struct, system_reset_stack) + 0x1000); DEFINE(LPPACASRR0, offsetof(struct ItLpPaca, xSavedSrr0)); DEFINE(LPPACASRR1, offsetof(struct ItLpPaca, xSavedSrr1)); DEFINE(LPPACAANYINT, offsetof(struct ItLpPaca, xIntDword.xAnyInt)); @@ -135,6 +136,9 @@ DEFINE(GPR21, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[21])); DEFINE(GPR22, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[22])); DEFINE(GPR23, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[23])); + DEFINE(GPR30, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[30])); + DEFINE(GPR31, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[31])); + /* * Note: these symbols include _ because they overlap with special * register names diff -ru ppc64-2.5-old/arch/ppc64/kernel/head.S ppc64-2.5/arch/ppc64/kernel/head.S --- ppc64-2.5-old/arch/ppc64/kernel/head.S 2003-03-02 17:25:01.000000000 -0600 +++ ppc64-2.5/arch/ppc64/kernel/head.S 2003-03-10 16:19:54.000000000 -0600 @@ -209,6 +209,39 @@ mfcr r23; /* save CR in r23 */ \ rfid +#define SYSTEMRESET_PROLOG_PSERIES(label) \ + mtspr SPRG1,r30; \ + mtspr SPRG2,r31; \ + mfspr r30,SPRG3; \ + addi r31,r30,PACA_SYSRESET_STACK; \ + SAVE_2GPRS(28, r31); \ + mfspr r29,SRR0; \ + std r29,_NIP(r31); \ + mfspr r29,SRR1; \ + std r29,_MSR(r31); \ + mfspr r29,DAR; \ + std r29,_DAR(r31);\ + mfspr r29,DSISR; \ + std r29,_DSISR(r31); \ + mflr r29; \ + std r29,_LINK(r31); \ + mfcr r29; \ + std r29,_CCR(r31); \ + mfctr r29; \ + std r29,_CTR(r31); \ + mfspr r29,XER; \ + std r29,_XER(r31); \ + SAVE_8GPRS(0, r31); \ + SAVE_8GPRS(8, r31); \ + LOADADDR(r29,(label)); \ + mtspr SRR0,r29; \ + SET_REG_TO_CONST(r29,MSR_KERNEL); \ + mtspr SRR1,r29; \ + isync; \ + slbia; \ + isync; \ + rfid + /* * This is the start of the interrupt handlers for iSeries * This code runs with relocation on. @@ -342,7 +375,9 @@ .globl __start_interrupts __start_interrupts: - STD_EXCEPTION_PSERIES( 0x100, SystemReset ) + .globl SystemReset_Pseries + SYSTEMRESET_PROLOG_PSERIES(system_reset_handler) + STD_EXCEPTION_PSERIES( 0x200, MachineCheck ) STD_EXCEPTION_PSERIES( 0x300, DataAccess ) STD_EXCEPTION_PSERIES( 0x380, DataAccessSLB ) @@ -524,7 +559,7 @@ . = 0x8000 .globl SystemReset_FWNMI SystemReset_FWNMI: - EXCEPTION_PROLOG_PSERIES(0x100, SystemReset_common) + SYSTEMRESET_PROLOG_PSERIES(system_reset_handler) .globl MachineCheck_FWNMI MachineCheck_FWNMI: EXCEPTION_PROLOG_PSERIES(0x200, MachineCheck_common) @@ -1921,6 +1956,31 @@ blr #endif +#ifdef CONFIG_PPC_PSERIES +system_reset_handler: + /* save remaining (r16-r27, r30-r31) GPRs */ \ + SAVE_8GPRS(16, r31) + SAVE_4GPRS(24, r31) + mfspr r29,SPRG1 + std r29,GPR30(r31) + mfspr r29,SPRG2 + std r29,GPR31(r31) + /* load up stack and paca pointer */ + mr r1,r31 + ld r2,PACATOC(r30) + mr r13,r30 + /* *regs in r3 */ + addi r3,r1,STACK_FRAME_OVERHEAD + bl .system_reset_entry + + #if 0 + /* fixme - return from system reset */ + ld r31,PACASYSRESETSP(r13); + addi r31,r31,INT_FRAME_SIZE; + std r31,PACASYSRESETSP(r30); + #endif +#endif + /* * We put a few things here that have to be page-aligned. * This stuff goes at the beginning of the data segment, diff -ru ppc64-2.5-old/arch/ppc64/kernel/stab.c ppc64-2.5/arch/ppc64/kernel/stab.c --- ppc64-2.5-old/arch/ppc64/kernel/stab.c 2003-03-05 20:11:03.000000000 -0600 +++ ppc64-2.5/arch/ppc64/kernel/stab.c 2003-03-09 18:28:25.000000000 -0600 @@ -228,8 +228,8 @@ asm volatile("isync" : : : "memory" ); /* Order update */ } -static inline void __ste_allocate(unsigned long esid, unsigned long vsid, - int kernel_segment) +void __ste_allocate(unsigned long esid, unsigned long vsid, + int kernel_segment) { if (cpu_has_slb()) { #ifndef CONFIG_PPC_ISERIES diff -ru ppc64-2.5-old/arch/ppc64/kernel/traps.c ppc64-2.5/arch/ppc64/kernel/traps.c --- ppc64-2.5-old/arch/ppc64/kernel/traps.c 2003-02-12 07:02:23.000000000 -0600 +++ ppc64-2.5/arch/ppc64/kernel/traps.c 2003-03-09 20:30:51.000000000 -0600 @@ -96,7 +96,7 @@ * the actual r3 if possible, and a ptr to the error log entry * will be returned if found. */ -static struct rtas_error_log *FWNMI_get_errinfo(struct pt_regs *regs) +struct rtas_error_log *FWNMI_get_errinfo(struct pt_regs *regs) { unsigned long errdata = regs->gpr[3]; struct rtas_error_log *errhdr = NULL; @@ -117,7 +117,7 @@ * It will release the saved data area for other CPUs in the * partition to receive FWNMI errors. */ -static void FWNMI_release_errinfo(void) +void FWNMI_release_errinfo(void) { unsigned long ret = rtas_call(rtas_token("ibm,nmi-interlock"), 0, 1, NULL); if (ret != 0) diff -ru ppc64-2.5-old/arch/ppc64/xmon/privinst.h ppc64-2.5/arch/ppc64/xmon/privinst.h --- ppc64-2.5-old/arch/ppc64/xmon/privinst.h 2003-02-12 07:02:23.000000000 -0600 +++ ppc64-2.5/arch/ppc64/xmon/privinst.h 2003-03-09 18:26:03.000000000 -0600 @@ -33,7 +33,7 @@ GSETSPR(9, ctr) GSETSPR(18, dsisr) GSETSPR(19, dar) -GSETSPR(22, dec) +/* GSETSPR(22, dec) */ GSETSPR(25, sdr1) GSETSPR(26, srr0) GSETSPR(27, srr1) diff -ru ppc64-2.5-old/arch/ppc64/xmon/xmon.c ppc64-2.5/arch/ppc64/xmon/xmon.c --- ppc64-2.5-old/arch/ppc64/xmon/xmon.c 2003-03-02 17:25:01.000000000 -0600 +++ ppc64-2.5/arch/ppc64/xmon/xmon.c 2003-03-10 18:12:00.000000000 -0600 @@ -26,6 +26,7 @@ #include #include #include +#include #include "nonstdio.h" #include "privinst.h" @@ -2446,3 +2447,194 @@ cmd = skipbl(); } } + +#ifdef CONFIG_PPC_PSERIES +extern void *udbg_comport; +void __ste_allocate(unsigned long esid, unsigned long vsid, + int kernel_segment); +extern int fwnmi_active; + +static unsigned long system_reset_serialise; + +/* We wait this long before declaring the cpu to be locked up */ +#define SECONDS_TO_SPIN 20 + +static void insert_kernel_segment(unsigned long ea) +{ + if (cpu_has_slb()) { + unsigned long esid = ea >> SID_SHIFT; + unsigned long vsid; + + /* first kernel segment is always mapped */ + if (esid == (PAGE_OFFSET >> SID_SHIFT)) + return; + + /* XXX should search to see if we have this mapped */ + vsid = get_kernel_vsid(ea); + __ste_allocate(esid, vsid, 0); + } else { + /* XXX FIXME */ + } +} + +static void print_exception_stack() +{ + unsigned long *ex; + int i; + int overflow = 0; + + ex = (unsigned long *)&get_paca()->exception_stack[0]; + + printf("exception stack:\n"); + + for (i = 0; i < 4; i++) + printf("%.16lx %.16lx %.16lx %.16lx\n", ex[i*4], ex[i*4+1], + ex[i*4+2], ex[i*4+3]); + + /* check next frame for exception stack overflow */ + for (i = 0; i < 8; i++) { + if (ex[16+i]) { + overflow = 1; + break; + } + } + + if (overflow) { + printf("exception stack overflow:\n"); + + for (i = 0; i < 2; i++) + printf("%.16lx %.16lx %.16lx %.16lx\n", ex[i*4+16], + ex[i*4+17], ex[i*4+18], ex[i*4+19]); + } +} + +static void print_backtrace(unsigned long sp) +{ + unsigned long bottom, top; + int i = 1; + char *c; + + if (REGION_ID(sp) != KERNEL_REGION_ID) + return; + + if (!pfn_valid(__pa(sp) >> PAGE_SHIFT)) + return; + + insert_kernel_segment(sp); + + bottom = sp & ~(THREAD_SIZE-1UL); + top = bottom + THREAD_SIZE; + + /* very simple backtrace which doesnt handle irq stacks */ + + printk("Backtrace:\n"); + while (sp < top && sp >= bottom) { + printf("%.16lx ", *(unsigned long *)(sp + 16)); + sp = *(unsigned long *)sp; + if (!(i % 4)) + printf("\n"); + if (i++ == 32) + break; + } + i--; + if (i % 4) + printf("\n"); + + /* warn if we went close to bottom of stack */ + c = (unsigned char *)bottom; + + /* XXX * 4 temporary */ + for (i = sizeof(struct thread_info); i < 4096*4; i++) { + if (c[i]) { + printf("warning stack usage %d bytes from end\n", i); + break; + } + } +} + +void system_reset_entry(struct pt_regs *regs) +{ + int cpu = smp_processor_id(); + unsigned long startticks; + unsigned long spinticks; + int i; + + spinticks = (SECONDS_TO_SPIN * (cpu+1)) * tb_ticks_per_sec; + + if (fwnmi_active) { + struct rtas_error_log *errhdr = FWNMI_get_errinfo(regs); + if (errhdr) { + /* XXX Should look at FWNMI information */ + } + FWNMI_release_errinfo(); + } + + /* + * Make sure the segment that maps the serial port is loaded. + * We assume it is bolted into the hashed pagetable + */ + if (udbg_comport) + insert_kernel_segment((unsigned long)udbg_comport); + +#ifdef CONFIG_SMP + /* + * Wait for other cpus to dump state, but timeout in case they lock up + */ + startticks = get_tb(); + while ((get_tb() - startticks) < spinticks) { + if (!test_and_set_bit(0, &system_reset_serialise)) + break; + } + + printf("cpu %d: ", cpu); +#endif + + printf("System Reset\n"); + printf("pc = %.16lx lr = %.16lx sp = %.16lx\n", regs->nip, + regs->link, regs->gpr[1]); + printf("msr = %.16lx dar = %.16lx dsisr = %.16lx\n", regs->msr, + regs->dar, regs->dsisr); + printf("cr = %.16lx ctr = %.16lx xer = %.16lx\n", regs->ccr, + regs->ctr, regs->xer); + printf("sprg0 = %.16lx sprg1 = %.16lx sprg2 = %.16lx\n", get_sprg0(), + get_sprg1(), get_sprg2()); + printf("sprg3 = %.16lx curr = %.16lx dec = %.16lx\n", get_sprg3(), + current, get_dec()); + printf("exsp = %.16lx ksp = %.16lx\n", get_paca()->exception_sp, + get_paca()->xKsave); + + for (i = 0; i < 10; i++) { + printf("R%.2ld = %.16lx R%.2ld = %.16lx " + "R%.2ld = %.16lx\n", i, regs->gpr[i], + i+10, regs->gpr[i+10], i+20, regs->gpr[i+20]); + } + printf("R31 = %.16lx R32 = %.16lx\n", regs->gpr[31], + regs->gpr[32]); + + print_exception_stack(); + print_backtrace(regs->gpr[1]); + +#if 0 + if (!cpu_has_slb()) { + printf("asr = %.16lx\n", mfasr()); + for (i = 0; i < 8; ++i) + printf("sr%.2ld = %.16lx sr%.2ld = %.16lx\n", i, + get_sr(i), i+8, get_sr(i+8)); + } + + printf("pid = %ld, comm = %s\n", current->pid, current->comm); +#endif + + /* Warn if we took an exception */ + if ((get_srr0() != regs->nip) || (get_srr1() != regs->msr)) { + printf("warning srr0/srr1 is now\n"); + printf("srr0 = %.16lx srr1 = %.16lx\n", get_srr0(), + get_srr1()); + } + + clear_bit(0, &system_reset_serialise); + + while(1) + ; /* loop forever */ +} +#endif diff -ru ppc64-2.5-old/include/asm-ppc64/paca.h ppc64-2.5/include/asm-ppc64/paca.h --- ppc64-2.5-old/include/asm-ppc64/paca.h 2003-02-12 07:02:43.000000000 -0600 +++ ppc64-2.5/include/asm-ppc64/paca.h 2003-03-10 15:27:41.000000000 -0600 @@ -160,6 +160,8 @@ *===================================================================================== */ u8 guard[0x1000]; /* ... and then hang 'em */ + + u8 system_reset_stack[0x1000]; }; #endif /* _PPC64_PACA_H */ diff -ru ppc64-2.5-old/include/asm-ppc64/rtas.h ppc64-2.5/include/asm-ppc64/rtas.h --- ppc64-2.5-old/include/asm-ppc64/rtas.h 2003-02-13 05:15:03.000000000 -0600 +++ ppc64-2.5/include/asm-ppc64/rtas.h 2003-03-10 18:10:25.000000000 -0600 @@ -17,7 +17,7 @@ */ #define RTAS_UNKNOWN_SERVICE (-1) -#define RTAS_INSTANTIATE_MAX (1UL<<30) /* Don't instantiate rtas at/above this value */ +#define RTAS_INSTANTIATE_MAX (1UL<<28) /* Don't instantiate rtas at/above this value */ /* * In general to call RTAS use rtas_token("string") to lookup ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From braby1 at llnl.gov Tue Mar 18 08:57:48 2003 From: braby1 at llnl.gov (Ryan Braby) Date: Mon, 17 Mar 2003 13:57:48 -0800 Subject: Problems getting cross compile environment working. Message-ID: <7DCD6660-58C3-11D7-99F4-0003939BD81A@llnl.gov> Hello, I've been trashing around for a few days now trying to get a cross compile environment working to build a powerpc64 linux kernel under Mac OS X. I've been following this script as instructions: http://www.samba.org/~anton/ppc64_crosscompiler/buildit Doing this I've been able to build a 64 bit cross compiler, but I haven't managed to build the 32 bit cross compiler. I keep getting errors like the following: ../../gcc-3.2.2/gcc/config/rs6000/linux.h:81:20: signal.h: No such file or directory ../../gcc-3.2.2/gcc/config/rs6000/linux.h:82:26: sys/ucontext.h: No such file or directory make[2]: *** [libgcc/./_muldi3.o] Error 1 make[1]: *** [stmp-multilib] Error 2 make: *** [all-gcc] Error 2 I've done a lot of searching on mailing lists and on the web for the solution, but haven't found a satisfactory answer yet. It appears that perhaps the issue is a requirement for some glibc headers for the target platform (powerpc-linux). However, as I understand it, cross compiling glibc requires that you have a working cross compiler. How would one go about getting the required headers? Is there a simpler solution that I'm missing? Thanks, Ryan Braby P.S. Anton thanks for making your patches and the buildit script available. ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From braby1 at llnl.gov Wed Mar 19 03:51:58 2003 From: braby1 at llnl.gov (Ryan Braby) Date: Tue, 18 Mar 2003 08:51:58 -0800 Subject: Fwd: Problems getting cross compile environment working. Message-ID: Hi, Please disregard the below. I was able to pull the headers out of a mandrake ppc rpm and complete the build of the cross compiler. Thanks, Ryan Begin forwarded message: > From: Ryan Braby > Date: Mon Mar 17, 2003 1:57:48 PM US/Pacific > To: linuxppc64-dev at lists.linuxppc.org > Subject: Problems getting cross compile environment working. > > Hello, > > I've been trashing around for a few days now trying to get a cross > compile > environment working to build a powerpc64 linux kernel under Mac OS X. > > I've been following this script as instructions: > http://www.samba.org/~anton/ppc64_crosscompiler/buildit > > Doing this I've been able to build a 64 bit cross compiler, but I > haven't > managed to build the 32 bit cross compiler. I keep getting errors > like the > following: > > ../../gcc-3.2.2/gcc/config/rs6000/linux.h:81:20: signal.h: No such > file or directory > ../../gcc-3.2.2/gcc/config/rs6000/linux.h:82:26: sys/ucontext.h: No > such file or directory > make[2]: *** [libgcc/./_muldi3.o] Error 1 > make[1]: *** [stmp-multilib] Error 2 > make: *** [all-gcc] Error 2 > > I've done a lot of searching on mailing lists and on the web for the > solution, > but haven't found a satisfactory answer yet. > > It appears that perhaps the issue is a requirement for some glibc > headers for > the target platform (powerpc-linux). However, as I understand it, > cross compiling > glibc requires that you have a working cross compiler. How would one > go about > getting the required headers? Is there a simpler solution that I'm > missing? > > Thanks, > Ryan Braby > > P.S. Anton thanks for making your patches and the buildit script > available. > ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From tinglett at vnet.ibm.com Wed Mar 19 06:48:55 2003 From: tinglett at vnet.ibm.com (Todd Inglett) Date: 18 Mar 2003 13:48:55 -0600 Subject: Problems getting cross compile environment working. In-Reply-To: <7DCD6660-58C3-11D7-99F4-0003939BD81A@llnl.gov> References: <7DCD6660-58C3-11D7-99F4-0003939BD81A@llnl.gov> Message-ID: <1048016936.7929.6.camel@q.rchland.ibm.com> On Mon, 2003-03-17 at 15:57, Ryan Braby wrote: > Doing this I've been able to build a 64 bit cross compiler, but I > haven't > managed to build the 32 bit cross compiler. I keep getting errors like > the > following: > > .../../gcc-3.2.2/gcc/config/rs6000/linux.h:81:20: signal.h: No such file > or directory > .../../gcc-3.2.2/gcc/config/rs6000/linux.h:82:26: sys/ucontext.h: No > such file or directory > make[2]: *** [libgcc/./_muldi3.o] Error 1 > make[1]: *** [stmp-multilib] Error 2 > make: *** [all-gcc] Error 2 Last time I built a ppc32 cross compiler on x86 I had to tar up these header files from a real ppc32 system. Try using --with-headers=/path/to/these/headers when you ./configure. Hope that does it. -todd ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From foerster at 8hertz.com Sat Mar 22 01:35:02 2003 From: foerster at 8hertz.com (Christian Foerster) Date: Fri, 21 Mar 2003 15:35:02 +0100 Subject: problem installing redhat on pSeries 610 Message-ID: <4CE01BDB-5BAA-11D7-A921-00039366AD62@8hertz.com> Hi, we've got the redhat 7.1 ppc64 distro here and aren't able to install it on our pSeries 610. Trying to boot from CD gives a "init-label failed" error. Into Open Firmware we typed the following to start from CD: boot cd:,/ppc/bootinfo.txt Any Idea? Thanks, Chris ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From kaena at us.ibm.com Sat Mar 22 01:45:45 2003 From: kaena at us.ibm.com (Kaena Freitas) Date: Fri, 21 Mar 2003 08:45:45 -0600 Subject: problem installing redhat on pSeries 610 Message-ID: Hello Christian - The only systems which are supported by Red Hat 7.1 are the p620, p640, and p660. The problem with the p610 is probably due to the fact that the CD-ROM is an IDE CD-ROM and there isn't any IDE support in RH 7.1. All the pSeries models will be supported by later this year in Red Hat Advanced Server 3.0. Aloha, Kaena D. Kaena Freitas Linux on pSeries Release Architect kaena at us.ibm.com Office: (512)838-2676 cell: (512)762-3884 Christian Foerster To: jan at smith.pp.se Sent by: cc: linuxppc64-dev at lists.linuxppc.org owner-linuxppc64-dev at lists.l Subject: problem installing redhat on pSeries 610 inuxppc.org 03/21/2003 08:35 AM Hi, we've got the redhat 7.1 ppc64 distro here and aren't able to install it on our pSeries 610. Trying to boot from CD gives a "init-label failed" error. Into Open Firmware we typed the following to start from CD: boot cd:,/ppc/bootinfo.txt Any Idea? Thanks, Chris ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From bissell at us.ibm.com Sat Mar 22 01:53:40 2003 From: bissell at us.ibm.com (John Bissell) Date: Fri, 21 Mar 2003 08:53:40 -0600 Subject: problem installing redhat on pSeries 610 Message-ID: Christian, For future reference, all supported pSeries hardware and IBM software for Linux can be found at http://www.ibm.com/eserver/pseries/linux/ in the Facts & Features PDF under References. As Kaena notes, RH 7.1 (64 bit) was never enabled or tested on the p610. John ----------------------------------------------------------------------------------------------------------------- John M. Bissell Program Director, Linux for pSeries (512) 838-3906 IBM Corporation MS 905-8H06 Tie-line: 678-3906 11501 Burnet Rd. Austin, TX 78758 Internet: bissell at us.ibm.com Lotus: John Bissell/Austin/IBM http://www.ibm.com/eserver/pseries/linux/ Kaena Freitas To: Christian Foerster , John 03/21/2003 08:45 Bissell/Austin/IBM at IBMUS, Robert Acosta/Austin/IBM at IBMUS AM cc: jan at smith.pp.se, linuxppc64-dev at lists.linuxppc.org, owner-linuxppc64-dev at lists.linuxppc.org From: Kaena Freitas/Austin/IBM at IBMUS Subject: Re: problem installing redhat on pSeries 610(Document link: John Bissell) Hello Christian - The only systems which are supported by Red Hat 7.1 are the p620, p640, and p660. The problem with the p610 is probably due to the fact that the CD-ROM is an IDE CD-ROM and there isn't any IDE support in RH 7.1. All the pSeries models will be supported by later this year in Red Hat Advanced Server 3.0. Aloha, Kaena D. Kaena Freitas Linux on pSeries Release Architect kaena at us.ibm.com Office: (512)838-2676 cell: (512)762-3884 Christian Foerster To: jan at smith.pp.se Sent by: cc: linuxppc64-dev at lists.linuxppc.org owner-linuxppc64-dev at lists.l Subject: problem installing redhat on pSeries 610 inuxppc.org 03/21/2003 08:35 AM Hi, we've got the redhat 7.1 ppc64 distro here and aren't able to install it on our pSeries 610. Trying to boot from CD gives a "init-label failed" error. Into Open Firmware we typed the following to start from CD: boot cd:,/ppc/bootinfo.txt Any Idea? Thanks, Chris ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From geert at linux-m68k.org Sun Mar 23 21:43:55 2003 From: geert at linux-m68k.org (Geert Uytterhoeven) Date: Sun, 23 Mar 2003 11:43:55 +0100 (MET) Subject: PPC64 prom logo Message-ID: Sorry, it seems I missed a RELOC in the PPC64 prom logo code. Is this (patch against current BK) OK? --- linux-2.5.x/arch/ppc64/kernel/prom.c.orig Sun Mar 23 11:37:52 2003 +++ linux-2.5.x/arch/ppc64/kernel/prom.c Sun Mar 23 11:39:35 2003 @@ -1271,7 +1271,8 @@ #ifdef CONFIG_FB_LOGO_LINUX_CLUT224 clut = RELOC(RELOC(&logo_linux_clut224)->clut); - for (i = 0; i < logo_linux_clut224.clutsize; i++, clut += 3) + for (i = 0; i < RELOC(&logo_linux_clut224)->clutsize; + i++, clut += 3) if (prom_set_color(ih, i + 32, clut[0], clut[1], clut[2]) != 0) break; Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From paulus at samba.org Sun Mar 23 22:33:31 2003 From: paulus at samba.org (Paul Mackerras) Date: Sun, 23 Mar 2003 22:33:31 +1100 (EST) Subject: PPC64 prom logo In-Reply-To: References: Message-ID: <15997.39819.528276.259757@nanango.paulus.ozlabs.org> Geert Uytterhoeven writes: > Sorry, it seems I missed a RELOC in the PPC64 prom logo code. Is this (patch > against current BK) OK? You missed a PTRRELOC in the ppc32 code too: diff -urN linux-2.5/arch/ppc/syslib/prom_init.c linuxppc-2.5/arch/ppc/syslib/prom_init.c --- linux-2.5/arch/ppc/syslib/prom_init.c 2003-03-23 16:29:31.000000000 +1100 +++ linuxppc-2.5/arch/ppc/syslib/prom_init.c 2003-03-23 21:38:46.000000000 +1100 @@ -369,7 +369,7 @@ break; #ifdef CONFIG_LOGO_LINUX_CLUT224 - clut = logo_linux_clut224.clut; + clut = PTRRELOC(logo_linux_clut224.clut); for (i = 0; i < logo_linux_clut224.clutsize; i++, clut += 3) if (prom_set_color(ih, i + 32, clut[0], Regards, Paul. ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From jsimmons at infradead.org Tue Mar 25 05:57:28 2003 From: jsimmons at infradead.org (James Simmons) Date: Mon, 24 Mar 2003 18:57:28 +0000 (GMT) Subject: PPC64 prom logo In-Reply-To: Message-ID: > --- linux-2.5.x/arch/ppc64/kernel/prom.c.orig Sun Mar 23 11:37:52 2003 > +++ linux-2.5.x/arch/ppc64/kernel/prom.c Sun Mar 23 11:39:35 2003 > @@ -1271,7 +1271,8 @@ > > #ifdef CONFIG_FB_LOGO_LINUX_CLUT224 > clut = RELOC(RELOC(&logo_linux_clut224)->clut); > - for (i = 0; i < logo_linux_clut224.clutsize; i++, clut += 3) > + for (i = 0; i < RELOC(&logo_linux_clut224)->clutsize; > + i++, clut += 3) > if (prom_set_color(ih, i + 32, clut[0], clut[1], > clut[2]) != 0) > break; > Shoudln't that be clut = RELOC(&logo_linux_clut2 instead? ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From geert at linux-m68k.org Tue Mar 25 06:21:29 2003 From: geert at linux-m68k.org (Geert Uytterhoeven) Date: Mon, 24 Mar 2003 20:21:29 +0100 (MET) Subject: PPC64 prom logo In-Reply-To: Message-ID: On Mon, 24 Mar 2003, James Simmons wrote: > > --- linux-2.5.x/arch/ppc64/kernel/prom.c.orig Sun Mar 23 11:37:52 2003 > > +++ linux-2.5.x/arch/ppc64/kernel/prom.c Sun Mar 23 11:39:35 2003 > > @@ -1271,7 +1271,8 @@ > > > > #ifdef CONFIG_FB_LOGO_LINUX_CLUT224 > > clut = RELOC(RELOC(&logo_linux_clut224)->clut); > > - for (i = 0; i < logo_linux_clut224.clutsize; i++, clut += 3) > > + for (i = 0; i < RELOC(&logo_linux_clut224)->clutsize; > > + i++, clut += 3) > > if (prom_set_color(ih, i + 32, clut[0], clut[1], > > clut[2]) != 0) > > break; > > > > Shoudln't that be clut = RELOC(&logo_linux_clut2 instead? I don't think so. First the logo_linux_clut224 symbol has to be relocated, followed by the pointer to the CLUT. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From jsimmons at infradead.org Tue Mar 25 06:42:24 2003 From: jsimmons at infradead.org (James Simmons) Date: Mon, 24 Mar 2003 11:42:24 -0800 (PST) Subject: PPC64 prom logo In-Reply-To: Message-ID: Applied. MS: (n) 1. A debilitating and surprisingly widespread affliction that renders the sufferer barely able to perform the simplest task. 2. A disease. James Simmons [jsimmons at users.sf.net] ____/| fbdev/console/gfx developer \ o.O| http://www.linux-fbdev.org =(_)= http://linuxgfx.sourceforge.net U http://linuxconsole.sourceforge.net On Sun, 23 Mar 2003, Geert Uytterhoeven wrote: > > Sorry, it seems I missed a RELOC in the PPC64 prom logo code. Is this (patch > against current BK) OK? > > --- linux-2.5.x/arch/ppc64/kernel/prom.c.orig Sun Mar 23 11:37:52 2003 > +++ linux-2.5.x/arch/ppc64/kernel/prom.c Sun Mar 23 11:39:35 2003 > @@ -1271,7 +1271,8 @@ > > #ifdef CONFIG_FB_LOGO_LINUX_CLUT224 > clut = RELOC(RELOC(&logo_linux_clut224)->clut); > - for (i = 0; i < logo_linux_clut224.clutsize; i++, clut += 3) > + for (i = 0; i < RELOC(&logo_linux_clut224)->clutsize; > + i++, clut += 3) > if (prom_set_color(ih, i + 32, clut[0], clut[1], > clut[2]) != 0) > break; > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds > > ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From jsimmons at infradead.org Tue Mar 25 06:43:30 2003 From: jsimmons at infradead.org (James Simmons) Date: Mon, 24 Mar 2003 11:43:30 -0800 (PST) Subject: PPC64 prom logo In-Reply-To: <15997.39819.528276.259757@nanango.paulus.ozlabs.org> Message-ID: Applied. MS: (n) 1. A debilitating and surprisingly widespread affliction that renders the sufferer barely able to perform the simplest task. 2. A disease. James Simmons [jsimmons at users.sf.net] ____/| fbdev/console/gfx developer \ o.O| http://www.linux-fbdev.org =(_)= http://linuxgfx.sourceforge.net U http://linuxconsole.sourceforge.net ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From paulus at samba.org Tue Mar 25 07:28:26 2003 From: paulus at samba.org (Paul Mackerras) Date: Tue, 25 Mar 2003 07:28:26 +1100 (EST) Subject: PPC64 prom logo In-Reply-To: References: Message-ID: <15999.27242.738276.356568@nanango.paulus.ozlabs.org> Geert Uytterhoeven writes: > On Mon, 24 Mar 2003, James Simmons wrote: > > > --- linux-2.5.x/arch/ppc64/kernel/prom.c.orig Sun Mar 23 11:37:52 2003 > > > +++ linux-2.5.x/arch/ppc64/kernel/prom.c Sun Mar 23 11:39:35 2003 > > > @@ -1271,7 +1271,8 @@ > > > > > > #ifdef CONFIG_FB_LOGO_LINUX_CLUT224 > > > clut = RELOC(RELOC(&logo_linux_clut224)->clut); > > > - for (i = 0; i < logo_linux_clut224.clutsize; i++, clut += 3) > > > + for (i = 0; i < RELOC(&logo_linux_clut224)->clutsize; > > > + i++, clut += 3) > > > if (prom_set_color(ih, i + 32, clut[0], clut[1], > > > clut[2]) != 0) > > > break; > > > > > > > Shoudln't that be clut = RELOC(&logo_linux_clut2 instead? > > I don't think so. First the logo_linux_clut224 symbol has to be relocated, > followed by the pointer to the CLUT. Actually, you should use RELOC on a variable (an L-value) or PTRRELOC on a value (an R-value), so it should look like this: clut = PTRRELOC(RELOC(logo_linux_clut224.clut)); for (i = 0; i < RELOC(logo_linux_clut224.clutsize); i++, clut += 3) etc. I'll test on an actual ppc64 box and send a tested patch. Paul. ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From jsimmons at infradead.org Wed Mar 26 05:17:13 2003 From: jsimmons at infradead.org (James Simmons) Date: Tue, 25 Mar 2003 18:17:13 +0000 (GMT) Subject: PPC64 prom logo In-Reply-To: <15999.27242.738276.356568@nanango.paulus.ozlabs.org> Message-ID: > Actually, you should use RELOC on a variable (an L-value) or PTRRELOC > on a value (an R-value), so it should look like this: > > clut = PTRRELOC(RELOC(logo_linux_clut224.clut)); > for (i = 0; i < RELOC(logo_linux_clut224.clutsize); i++, clut += 3) > > etc. I'll test on an actual ppc64 box and send a tested patch. Do you have a functional and tested patch? ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From peter at bergner.org Thu Mar 27 02:39:27 2003 From: peter at bergner.org (Peter Bergner) Date: Wed, 26 Mar 2003 09:39:27 -0600 Subject: New Kernel on a RS6000 44p 170 In-Reply-To: References: Message-ID: <3E81C9AF.9060008@bergner.org> B?rgin Daniel (KTSS 1) wrote: > I installed Debian Woody on my 44p Box with the How-to's > from Rolf Brudeseth mailto:rolfb at us.ibm.com > That works fine, but with a old Kernel 2.4.16 from Suse. > > Now i would like to compile my own Kernel with some > differnt Network Settings. > > I've tried the last stable Kernel from Bitkeeper 2.4.21-pre5 > with Architecture set to "Power3". Compiling is ok, i used > the arch/ppc/boot/images/zImage.chrp and zImage.chrp-rs6k, > but when i boot the > Kernel i get the following Output on Console: > . > Please wait, loading kernel... > Elf32 kernel loaded... > > That's it ! After that, the System hangs. > > Can Anybody give me a hint witch Kernel Sources i should take > and witch config Settings i should use ? I'm not sure how good the POWER3 support is in the 32-bit ppc kernel, so... However, the 64-bit ppc64 kernel runs just fine on my 44p-170. More info can be found at www.penguinppc64.org. Short answer is that Marcelo's 2.4.21-pre6 code should work straight out of the box. Peter ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From daniel.buergin at csfs.com Thu Mar 27 03:18:58 2003 From: daniel.buergin at csfs.com (=?ISO-8859-1?Q?B=FCrgin_Daniel_=28KTSS_1=29?=) Date: Wed, 26 Mar 2003 17:18:58 +0100 Subject: New Kernel on a RS6000 44p 170 Message-ID: > I'm not sure how good the POWER3 support is in the 32-bit ppc > kernel, so... However, the 64-bit ppc64 kernel runs just fine > on my 44p-170. More info can be found at www.penguinppc64.org. > Short answer is that Marcelo's 2.4.21-pre6 code should work > straight out of the box. When i understand you right, i have to install and compile the Toolchain on my System and after that i can compile the patched Kernel from penguinppc64 ? Sorry, i'am not yet an Insider but where can i find the 2.4.21-pre6 Code under Marcelo's Directory on kernel.org ? ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From foerster at 8hertz.com Thu Mar 27 06:06:07 2003 From: foerster at 8hertz.com (Christian Foerster) Date: Wed, 26 Mar 2003 20:06:07 +0100 Subject: problem installing redhat on pSeries 610 In-Reply-To: Message-ID: Hello all, thanks for the info. Wouldn't it be possible to load the install kernel from the scsi harddisk or over ethernet? What would the syntax be like in open firmware for booting over the ethernet? Which filesystems does open firmware support? I've got two scsi harddisk in the p610. One of them contains a AIX 5.1 Installation. The other one is empty. Can I just copy the redhat install files to the scsi harddisk with AIX installed and boot from that? How would the OF syntax look like in this case? Any help is appreciated, since we don't have a scsi cd-rom drive here to boot from. Also we really would like to install redhat on this machine, since we are all familiar with it. Open firmware is still a bit tricky for us. Thanks, Christian On Friday, March 21, 2003, at 03:45 PM, Kaena Freitas wrote: > > > > > Hello Christian - > > The only systems which are supported by Red Hat 7.1 are the p620, > p640, and > p660. > > The problem with the p610 is probably due to the fact that the CD-ROM > is an > IDE CD-ROM and there isn't any IDE support in RH 7.1. All the pSeries > models will be supported by later this year in Red Hat Advanced Server > 3.0. > > Aloha, > > Kaena > > D. Kaena Freitas > Linux on pSeries Release Architect > kaena at us.ibm.com Office: (512)838-2676 > cell: (512)762-3884 > > > > > Christian Foerster > To: > jan at smith.pp.se > Sent by: cc: > linuxppc64-dev at lists.linuxppc.org > owner-linuxppc64-dev at lists.l Subject: > problem installing redhat on pSeries 610 > inuxppc.org > > > 03/21/2003 08:35 AM > > > > > > > > Hi, > > we've got the redhat 7.1 ppc64 distro here and aren't able to install > it on our pSeries 610. Trying to boot from CD gives a "init-label > failed" error. > > Into Open Firmware we typed the following to start from CD: > > boot cd:,/ppc/bootinfo.txt > > Any Idea? > > Thanks, Chris > > > > ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From peter at bergner.org Thu Mar 27 06:46:14 2003 From: peter at bergner.org (Peter Bergner) Date: Wed, 26 Mar 2003 13:46:14 -0600 Subject: New Kernel on a RS6000 44p 170 In-Reply-To: References: Message-ID: <3E820386.9040906@bergner.org> B?rgin Daniel (KTSS 1) wrote: > When i understand you right, i have to install and compile the > Toolchain on my System and after that i can compile the > patched Kernel from penguinppc64 ? > Sorry, i'am not yet an Insider but where can > i find the 2.4.21-pre6 Code under Marcelo's Directory on kernel.org ? You can get Marcelo's 2.4.21-pre6 code with: bk clone kb://linux.bkbits.net/linux-2.4 linux-2.4 However, the most stable and "full featured" ppc64 kernel will be 2.4.21-pre4 as found on www.penguinppc64.org (ie, take 2.4.20 release tarball, apply 2.4.21-pre4 patch from kernel.org and then apply our ppc64 specific patche(s)). Yes, you will need to build a powerpc64-linux toolchain to compile the kernel. Directions also at www.penguinppc64.org. Peter ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From anton at samba.org Thu Mar 27 08:02:34 2003 From: anton at samba.org (Anton Blanchard) Date: Thu, 27 Mar 2003 08:02:34 +1100 Subject: New Kernel on a RS6000 44p 170 In-Reply-To: References: Message-ID: <20030326210234.GA20376@krispykreme> > When i understand you right, i have to install and compile the > Toolchain on my System and after that i can compile the > patched Kernel from penguinppc64 ? > Sorry, i'am not yet an Insider but where can > i find the 2.4.21-pre6 Code under Marcelo's Directory on kernel.org ? If it becomes all too hard you should be able to compile and run the 32bit kernel. We have a 270 and 170 that run it, if current 2.4 doesnt work then we should let Paul know :) Anton ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From paulus at samba.org Thu Mar 27 11:01:00 2003 From: paulus at samba.org (Paul Mackerras) Date: Thu, 27 Mar 2003 11:01:00 +1100 Subject: New Kernel on a RS6000 44p 170 In-Reply-To: <3E81C9AF.9060008@bergner.org> References: <3E81C9AF.9060008@bergner.org> Message-ID: <16002.16188.220740.384900@argo.ozlabs.ibm.com> I'm replying to Peter's reply because I didn't see Daniel's original message. Peter Bergner writes: > > B?rgin Daniel (KTSS 1) wrote: > > I installed Debian Woody on my 44p Box with the How-to's > > from Rolf Brudeseth mailto:rolfb at us.ibm.com > > That works fine, but with a old Kernel 2.4.16 from Suse. > > > > Now i would like to compile my own Kernel with some > > differnt Network Settings. > > > > I've tried the last stable Kernel from Bitkeeper 2.4.21-pre5 Marcelo's BK tree (bk://linux.bkbits.net/linux-2.4), the linuxppc stable tree (bk://ppc.bkbits.net/linuxppc_2_4), or some other tree? Both Marcelo's tree and the linuxppc tree *should* be OK on a 170, if they aren't then I have some work to do. > > Please wait, loading kernel... > > Elf32 kernel loaded... > > > > That's it ! After that, the System hangs. So, you're booting with yaboot? Could you do objdump -ph on your old working kernel and the on the new kernel which doesn't work and send me the output? > > Can Anybody give me a hint witch Kernel Sources i should take > > and witch config Settings i should use ? CONFIG_POWER3 is right; as to other things you don't need the mac-specific drivers or IDE. You probably do want CONFIG_VT and CONFIG_FB and (I would guess) CONFIG_FB_MATROX (depending on what video card you have). I can send you the .config I use for ppc32 kernels on RS/6000 170 and 270 machines if you like. > I'm not sure how good the POWER3 support is in the 32-bit ppc > kernel, so... Should be just fine for a machine with <= 3GB of RAM. Regards, Paul. ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From tom_gall at vnet.ibm.com Thu Mar 27 13:33:42 2003 From: tom_gall at vnet.ibm.com (Tom Gall) Date: Wed, 26 Mar 2003 20:33:42 -0600 Subject: problem installing redhat on pSeries 610 In-Reply-To: Message-ID: <8664F481-5FFC-11D7-8F53-0003930AF960@vnet.ibm.com> Hi Christian, If you're feeling desperate and a bit adventurous it can be done. On Wednesday, March 26, 2003, at 01:06 PM, Christian Foerster wrote: > Hello all, > > thanks for the info. Wouldn't it be possible to load the install > kernel from the scsi harddisk or over ethernet? Exactly. Or via a SCSI CDROM, they aren't that hard to find. > What would the syntax be like in open firmware for booting over the > ethernet? Yes that would work too. > Which filesystems does open firmware support? Not much. Essentially MSDOS (for grabbing off of floppy) and ISO9660. Yaboot on the other hand has the brain to read ext2, ext3, Reiser and so on. > I've got two scsi harddisk in the p610. One of them contains a AIX > 5.1 Installation. The other one is empty. Can I just copy the redhat > install files to the scsi harddisk with AIX installed and boot from > that? How would the OF syntax look like in this case? Hmmm well you'd need to cross build some utilities on AIX, like fdisk, the e2fsprogs ... but probably not toooo hard in the grand scheme of things. You might consider looking at the linux from scratch web site. > > Any help is appreciated, since we don't have a scsi cd-rom drive here > to boot from. Also we really would like to install redhat on this > machine, since we are all familiar with it. Open firmware is still a > bit tricky for us. There's alot of ways to do this. Funny you should hit this as I'm just in the midst of constructing a HOWTO on building bootable CDROMs ... once you get past the tricky bits it's not too hard and also using that route it wouldn't be hard to build your own install route using your own kernel and raving the other bits off the RedHat CD. here's the whirl wind tour. Notice the ppc directory, note the bootinfo.txt that tells your box what fire up first via that script. You can invoke that script the following way from OF boot cdrom:,\ppc\bootinfo.txt This is also the script that automatically runs when boot off of the CD from say the multiboot menu. or you can actually run yaboot directly off of CD. (make sure your yaboot you have built has had addnote run on it) so boot cdrom:,yaboot for instance would fire off yaboot from the top dir and/or you could build a kernel and put it on CD boot cdrom:,\vmlinux would boot that and of course if you're using yaboot then you can easily specify an initrd etc etc etc and you're into install-o-rama, or of course do that via passing things as kernel parameters. Anyway to build an iso that will work do the following: (assemble parts into a directory) mkisofs -v -v -r -T -U -l -o output.iso Record to 650 Meg media. NOT 700! Apologies if this is a little fast for you. Anyway ... plan to write and publish a real PPC ISO HOWTO in the next week or so. have fun! Tom > Thanks, Christian > Tom Gall - [Embedded] [PPC64 | PPC32] Linux Peace, Love & Linux "Where's the kaboom? There was Technology Center supposed to be an earth shattering (w) tom_gall at vnet.ibm.com kaboom! " -- Marvin Martian (h) tgall at rochcivictheatre.org ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From gb at clozure.com Thu Mar 27 19:29:02 2003 From: gb at clozure.com (Gary Byers) Date: Thu, 27 Mar 2003 01:29:02 -0700 (MST) Subject: compiling 2.5 kernel for ppc64 Message-ID: Hi. Earlier today, I: - built and installed binutils for ppc64, from current RedHat CVS sources - built and installed gcc for pppc64, from current GCC 3.3 CVS sources + the latest (20030326) 3.3 patch from penguinppc64.org - tried to build kernel 2.5.66 from ftp.kernel.org I'd gone through (then current) versions of the first two steps a month or so ago, and was able to build a 64-bit 2.4.21-pre4 kernel. This attempt failed; many files in the 2.5.66 source tree generated spurious-looking errors to the effect that "`asm' operand requires spurious reload". (They seem spurious because - in the cases I checked - there didn't seem to be any asm constructs anywhere near/involved in the reported error. I confess that I may not have looked hard enough.) I configured the kernel by doing "make menuconfig" and accepting the default config that was generated; it seemed sane (CONFIG_PSERIES, CONFIG_SMP, etc.) for this system (a dual-processor 43P-260 POWER3.). I -assume- that people have compiled recent versions of the 2.5 kernel with recent gcc/binutils on ppc64, and that there's something suspect about the way that the compiler (most likely) was built in my case. I'll certainly look into that, but wanted to ask: are there known problems with this kernel/compiler combination ? (e.g., kernel 2.5 sources from kernel.org known to triger ppc64 compiler bugs, but sources from some other source patched to work around them ? or something like that ...) I admit that it seems most likely that I botched something in the build process, but it seems worth asking ... Thanks. Gary Byers gb at clozure.com ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From daniel.buergin at credit-suisse.com Thu Mar 27 21:33:27 2003 From: daniel.buergin at credit-suisse.com (=?ISO-8859-1?Q?B=FCrgin_Daniel_=28KTSS_1=29?=) Date: Thu, 27 Mar 2003 11:33:27 +0100 Subject: New Kernel on a RS6000 44p 170 Message-ID: > So, you're booting with yaboot? > > Could you do objdump -ph on your old working kernel and the on the new > kernel which doesn't work and send me the output? > > > > Can Anybody give me a hint witch Kernel Sources i should take > > > and witch config Settings i should use ? > > CONFIG_POWER3 is right; as to other things you don't need the > mac-specific drivers or IDE. You probably do want CONFIG_VT and > CONFIG_FB and (I would guess) CONFIG_FB_MATROX (depending on what > video card you have). I can send you the .config I use for ppc32 > kernels on RS/6000 170 and 270 machines if you like. > > > I'm not sure how good the POWER3 support is in the 32-bit ppc > > kernel, so... > > Should be just fine for a machine with <= 3GB of RAM. Yes, i'am booting with yaboot, works fine. ----> objdump from my working Kernel vmlinux.chrp-2.4.16-POWER3-SMP: file format elf32-powerpc Program Header: LOAD off 0x00010000 vaddr 0x00400000 paddr 0x00400000 align 2**16 filesz 0x00006470 memsz 0x00006470 flags r-x LOAD off 0x00016470 vaddr 0x00416470 paddr 0x00416470 align 2**16 filesz 0x0014ce9c memsz 0x0016e47c flags rw- NOTE off 0x00000094 vaddr 0x00000000 paddr 0x00000000 align 2**0 filesz 0x0000002c memsz 0x00000000 flags --- Sections: Idx Name Size VMA LMA File off Algn 0 .text 00005c88 00400000 00400000 00010000 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .rodata 000007e0 00405c90 00405c90 00015c90 2**4 CONTENTS, ALLOC, LOAD, READONLY, DATA 2 .sdata2 00000000 00406470 00406470 00016470 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .data 0014ce88 00416470 00416470 00016470 2**2 CONTENTS, ALLOC, LOAD, DATA 4 .sdata 00000014 005632f8 005632f8 001632f8 2**2 CONTENTS, ALLOC, LOAD, DATA 5 .sbss 00000050 0056330c 0056330c 0016330c 2**2 ALLOC 6 .bss 00021590 0056335c 0056330c 0016330c 2**2 ALLOC 7 .comment 00000230 00000000 00000000 0016330c 2**0 CONTENTS, READONLY ----> objdump from my new Kernel vmlinux.chrp-2.4.21: file format elf32-powerpc Program Header: LOAD off 0x00010000 vaddr 0x00400000 paddr 0x00400000 align 2**16 filesz 0x00106000 memsz 0x001275dc flags rwx Sections: Idx Name Size VMA LMA File off Algn 0 .text 00005d30 00400000 00400000 00010000 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .data 001002d0 00405d30 00405d30 00015d30 2**4 CONTENTS, ALLOC, LOAD, DATA 2 .bss 000215dc 00506000 00506000 00116000 2**2 ALLOC As far as i understand now, the 32bit Kernel is ok for me (512MB Ram) and no need in the moment for the 64bit Stuff. Yes, it would be nice if you could send me your .config File ! Do i understand right ? - bk clone kb://linux.bkbits.net/linux-2.4 linux-2.4 - Copy your .config to linux-2.4 - make dep zImage modules modules_install - Copy arch/ppc/boot/images/zImage.chrp /boot/vmlinx - reboot this kernel By the way, is this the right way to communicate with such a Mailing-List, or am'i doing something wrong ? Regards, Daniel ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From amodra at bigpond.net.au Thu Mar 27 21:37:55 2003 From: amodra at bigpond.net.au (Alan Modra) Date: Thu, 27 Mar 2003 21:07:55 +1030 Subject: compiling 2.5 kernel for ppc64 In-Reply-To: References: Message-ID: <20030327103754.GF931@bubble.sa.bigpond.net.au> On Thu, Mar 27, 2003 at 01:29:02AM -0700, Gary Byers wrote: > This attempt failed; many files in the 2.5.66 source tree generated > spurious-looking errors to the effect that "`asm' operand requires > spurious reload". (They seem spurious because - in the cases I > checked - there didn't seem to be any asm constructs anywhere > near/involved in the reported error. I confess that I may not have > looked hard enough.) Look using gcc -E. The following will fix your problem. diff -urp linux-2.5.66/include/linux/compiler.h linux-2.5.66-ppc/include/linux/compiler.h --- linux-2.5.66/include/linux/compiler.h 2003-03-20 16:47:28.000000000 +1030 +++ linux-2.5.66-ppc/include/linux/compiler.h 2003-03-27 21:03:35.000000000 +1030 @@ -52,6 +52,6 @@ shouldn't recognize the original var, and make assumptions about it */ #define RELOC_HIDE(ptr, off) \ ({ unsigned long __ptr; \ - __asm__ ("" : "=g"(__ptr) : "0"(ptr)); \ + __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \ (typeof(ptr)) (__ptr + (off)); }) #endif /* __LINUX_COMPILER_H */ -- Alan Modra IBM OzLabs - Linux Technology Centre ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From amodra at bigpond.net.au Thu Mar 27 22:50:23 2003 From: amodra at bigpond.net.au (Alan Modra) Date: Thu, 27 Mar 2003 22:20:23 +1030 Subject: compiling 2.5 kernel for ppc64 In-Reply-To: <20030327103754.GF931@bubble.sa.bigpond.net.au> References: <20030327103754.GF931@bubble.sa.bigpond.net.au> Message-ID: <20030327115023.GG931@bubble.sa.bigpond.net.au> On Thu, Mar 27, 2003 at 09:07:55PM +1030, Alan Modra wrote: > > On Thu, Mar 27, 2003 at 01:29:02AM -0700, Gary Byers wrote: > > This attempt failed; many files in the 2.5.66 source tree generated > > spurious-looking errors to the effect that "`asm' operand requires > > spurious reload". (They seem spurious because - in the cases I > > checked - there didn't seem to be any asm constructs anywhere > > near/involved in the reported error. I confess that I may not have > > looked hard enough.) > > Look using gcc -E. The following will fix your problem. [snip] Anton found this work-around a long time ago, and Linus refused Anton's work-around, claiming it was a compiler bug. At the time I didn't bother delving into gcc to find out what was going on, but your email piqued my curiousity. Guess what? Linus is right.. --- gcc-ppc64-33.orig/gcc/reload1.c 2003-03-27 22:11:53.000000000 +1030 +++ gcc-ppc64-33/gcc/reload1.c 2003-03-27 22:12:14.000000000 +1030 @@ -3930,6 +3930,7 @@ reload_as_needed (live_known) if (asm_noperands (PATTERN (insn)) >= 0) for (p = NEXT_INSN (prev); p != next; p = NEXT_INSN (p)) if (p != insn && INSN_P (p) + && GET_CODE (PATTERN (p)) != USE && (recog_memoized (p) < 0 || (extract_insn (p), ! constrain_operands (1)))) { -- Alan Modra IBM OzLabs - Linux Technology Centre ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From akpm at digeo.com Sat Mar 29 16:41:55 2003 From: akpm at digeo.com (Andrew Morton) Date: Fri, 28 Mar 2003 21:41:55 -0800 Subject: compiling 2.5 kernel for ppc64 In-Reply-To: References: Message-ID: <20030328214155.220f942e.akpm@digeo.com> Gary Byers wrote: > > > Hi. > > Earlier today, I: > > - built and installed binutils for ppc64, from current RedHat CVS sources > - built and installed gcc for pppc64, from current GCC 3.3 CVS sources + > the latest (20030326) 3.3 patch from penguinppc64.org > - tried to build kernel 2.5.66 from ftp.kernel.org All the necessary patches to build a ppc64 2.5 kernel are in the -mm tree. ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.5/2.5.66/2.5.66-mm1/broken-out There are four in there at present. I am testing that kernel on ppc64 a couple of times a week. ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/ From anton at samba.org Mon Mar 31 04:18:54 2003 From: anton at samba.org (Anton Blanchard) Date: Mon, 31 Mar 2003 04:18:54 +1000 Subject: compiling 2.5 kernel for ppc64 In-Reply-To: <20030327115023.GG931@bubble.sa.bigpond.net.au> References: <20030327103754.GF931@bubble.sa.bigpond.net.au> <20030327115023.GG931@bubble.sa.bigpond.net.au> Message-ID: <20030330181854.GA21643@krispykreme> Hi, > Anton found this work-around a long time ago, and Linus refused > Anton's work-around, claiming it was a compiler bug. At the time > I didn't bother delving into gcc to find out what was going on, but > your email piqued my curiousity. Guess what? Linus is right.. Nice work Alan, it has indeed fixed the problem :) Anton ** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/