From owner-freebsd-ppc Fri Jan 25 10:59:46 2002 Delivered-To: freebsd-ppc@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id E41C637B402 for ; Fri, 25 Jan 2002 10:59:41 -0800 (PST) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id NAA01652 for ; Fri, 25 Jan 2002 13:59:41 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id g0PIxBV78658; Fri, 25 Jan 2002 13:59:11 -0500 (EST) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15441.43775.191953.219307@grasshopper.cs.duke.edu> Date: Fri, 25 Jan 2002 13:59:11 -0500 (EST) To: freebsd-ppc@freebsd.org Subject: compiler problems? X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Sender: owner-freebsd-ppc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I'm getting interested in powerpc, so I was trying to follow Mark's instructions (from Oct 18th) to build a ppc kernel. I ran into the following problems: - compile error: ../../../kern/kern_fork.c: In function `fork_exit': ../../../kern/kern_fork.c:771: invalid lvalue in assignment % cat -n kern_fork.c: <..> 769 sched_lock.mtx_recurse = 0; 770 td->td_critnest = 1; 771 td->td_savecrit = CRITICAL_FORK; <..> td->td_savecrit is a register_t, which works out to be an int. How is that an invalid lvalue? Is this a problem with the cross compiler? Is Mark's cross compiler port out of date? I was feeling lucky, so I commented out that line and linked a kernel When doing so, I got the second problem: - multiply defined symbols for ddb_regs & bootverbose. Trivial to fix, patch appended. I'd have committed it, but I don't want to cause any mergework for people who might be working on something.. The resulting kernel traps in cpu_switch. It looks like its deref'ing a null pointer at line 97.. I guess this is as far as we are? Cheers, Drew Index: include/db_machdep.h =================================================================== RCS file: /home/ncvs/src/sys/powerpc/include/db_machdep.h,v retrieving revision 1.1 diff -u -r1.1 db_machdep.h --- include/db_machdep.h 10 Jun 2001 02:39:28 -0000 1.1 +++ include/db_machdep.h 25 Jan 2002 18:08:30 -0000 @@ -47,7 +47,7 @@ u_int32_t msr; }; typedef struct powerpc_saved_state db_regs_t; -db_regs_t ddb_regs; /* register state */ +extern db_regs_t ddb_regs; /* register state */ #define DDB_REGS (&ddb_regs) #define PC_REGS(regs) ((db_addr_t)(regs)->iar) Index: powerpc/machdep.c =================================================================== RCS file: /home/ncvs/src/sys/powerpc/powerpc/machdep.c,v retrieving revision 1.17 diff -u -r1.17 machdep.c --- powerpc/machdep.c 11 Dec 2001 23:33:43 -0000 1.17 +++ powerpc/machdep.c 25 Jan 2002 18:10:11 -0000 @@ -158,7 +158,7 @@ struct msgbuf *msgbufp = 0; -int bootverbose = 0, Maxmem = 0; +int Maxmem = 0; long dumplo; vm_offset_t phys_avail[10]; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ppc" in the body of the message