Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jan 2002 11:02:35 -0800
From:      "Server Admin" <dump@sherline.com>
To:        "Andrew Gallatin" <gallatin@cs.duke.edu>, <freebsd-ppc@freebsd.org>
Subject:   Re: compiler problems?
Message-ID:  <001401c1a5d2$d96bcb40$03e2cbd8@server>
References:  <15441.43775.191953.219307@grasshopper.cs.duke.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Is CRITICAL_FORK defined in the scope of that function ?  I'm not familiar
with the code, but I figured that might be a possibility.

___________________________________________
Jeremiah Gowdy

IT Manager - Senior Network Administrator

Sherline Products Inc
3235 Executive Ridge
Vista CA 92083-8527

IT Dept: 760-727-9492
Sales: 1-800-541-0735
International: (760) 727-5857
Fax: (760) 727-7857
___________________________________________


----- Original Message -----
From: "Andrew Gallatin" <gallatin@cs.duke.edu>
To: <freebsd-ppc@freebsd.org>
Sent: Friday, January 25, 2002 10:59 AM
Subject: compiler problems?


>
> 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
>
>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ppc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001401c1a5d2$d96bcb40$03e2cbd8>