Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Aug 2001 03:23:58 -0700
From:      Peter Wemm <peter@wemm.org>
To:        tlambert2@mindspring.com
Cc:        John Baldwin <jhb@FreeBSD.org>, current@FreeBSD.org, Julian Elischer <julian@elischer.org>
Subject:   Re: Ia64 and ALPHA (+arm, sparc?) kernel developers: 
Message-ID:  <20010828102358.39BA8380C@overcee.netplex.com.au>
In-Reply-To: <3B8B4D3E.6109D96A@mindspring.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert wrote:
> John Baldwin wrote:
> > > halted CPU 0
> > >
> > > halt code = 2
> > > kernel stack not valid halt
> > > PC = fffffc0000553020
> > 
> > You overflowed your kernel stack.  You can use srm to dump the
> > memory at that address (I can't remember the stupid SRM syntax
> > for the life of me though) and wade through it looking for
> > kernel-text addresses to figure out the stack trace.
> 
> >From my reading of the x86 source, one of the things Julian did
> was seperate out the allocation of stack pages, using a defined
> value.
> 
> This may be as simple as putting a larger number in your config
> file... I don't know what the Alpha default was before the change,
> but I do know that it runs 8K pages, which if KPAGES is in 4K
> chunks, might have reduced your stack size on you...
> 
> Not brilliant, but something to try...
> 
> -- Terry

Actually, this was the result of not correctly setting up the
new argument to the fork trampoline code.

We now have a fully viable Alpha + KSE kernel as of about
5 minutes ago:

[3:19am]~/ffp4-102> p4 describe -du 1155
Change 1155 by peter@peter_up2000 on 2001/08/28 03:12:57

        Really solve the alpha KSE problem.  This was submitted from
        an alpha running the KSE kernel in multiuser mode!

Affected files ...

... //depot/projects/kse/sys/alpha/alpha/vm_machdep.c#5 edit

Differences ...

==== //depot/projects/kse/sys/alpha/alpha/vm_machdep.c#5 (text+ko) ====

@@ -210,7 +210,7 @@
                    (u_int64_t)fork_return;                     /* s0: a0 */
                td2->td_pcb->pcb_context[1] =
                    (u_int64_t)exception_return;                /* s1: ra */
-               td2->td_pcb->pcb_context[2] = (u_long) p2;      /* s2: a1 */
+               td2->td_pcb->pcb_context[2] = (u_long)td2;      /* s2: a1 */
                td2->td_pcb->pcb_context[7] =
                    (u_int64_t)fork_trampoline; /* ra: assembly magic */
 #ifdef SMP

fork_trampoline() changed from a 'struct proc *p' to 'struct thread *td'
argument and got missed here.

The box is now running quite happily..  All that remains is to get the rest
of the alpha kernel to compile, not just the subset that I actually use. :)

And then comes tidying up the loose ends. :-]

Cheers,
-Peter
--
Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
"All of this is for nothing if we don't go to the stars" - JMS/B5

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010828102358.39BA8380C>