From: "Wes Bauske" <wsb@paralleldata.com>
To: "axp-list@redhat.com" <axp-list@redhat.com>
Subject: Re: aboot expert help wanted ...
Date: Tue, 28 Jul 1998 08:46:36 +0000 [thread overview]
Message-ID: <35BD8FEC.68BB8F61@paralleldata.com> (raw)
In-Reply-To: 19980727232504.I19963@dot.cygnus.com
Richard Henderson wrote:
>
> On Mon, Jul 27, 1998 at 11:21:55PM +0200, Michael Engel wrote:
> > The first thing I tried was compiling aboot. The most recent version
> > I found was 0.5 - could someone please confirm that this is the latest
> > version? After some tweaking aboot compiled fine on my AXPpci33 (the
> > definition of memset in include/asm-alpha/string.h used __constant_c_memset
> > which wasn't defined anywhere. Btw., I'm using kernel 2.0.34 at the moment).
>
> __constant_c_memset is defined in arch/alpha/lib/memset.S.
>
> > It seems that $30 (ksp), which is used to save registers in the dispatch
> > subroutine, is neither initialized by the firmware nor the aboot code and
> > that causes the crash. As I'm new to Alpha assembler, I'm not quite sure how
> > to initialize the stack pointer correctly. I tried
> >
> > stack: .quad 0,0,0,0,0,0,0,0,0,0,0 .....
> > /* define a couple of empty quads, actually about 128 quads */
> >
> > and then
> > lda $30, stack
>
> Well, if you'd loaded up the top of the stack rather than the
> bottom you might had faired better. Depending on whether the
> GP register is loaded at that point.
>
> Another point is that the stack pointer should be 16-byte
> aligned at all times, so you'd want an `.align 4' in front
> of that stack symbol.
>
Isn't there a convention that has stacks starting
at the top of your address space and the heap at the
bottom or is it the opposite? So, you can stick a wad
of zero's out there and start the stack pointer at the
high address which is what I assume you mean by the 'top'
of the stack. Just make sure the amount of space out
there is big enough for the program you're running or
the stack could overwrite other stuff. I remember seeing
a drawing of it somewhere in either the DEC ASM manual
or the 21164 architecture manual. Also, instead of putting
in zeros, couldn't you just use and immediate address in
hex, or, define a quad word with the location you want the
stack top at and just load it. Zeroing things shouldn't
be necessary.
Wes
next prev parent reply other threads:[~1998-07-28 8:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-07-27 21:21 aboot expert help wanted Michael Engel
1998-07-28 6:25 ` Richard Henderson
1998-07-28 8:46 ` Wes Bauske [this message]
1998-07-28 8:45 ` Martin Ostermann
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox