Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* aboot expert help wanted ...
@ 1998-07-27 21:21 Michael Engel
  1998-07-28  6:25 ` Richard Henderson
  1998-07-28  8:45 ` Martin Ostermann
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Engel @ 1998-07-27 21:21 UTC (permalink / raw)
  To: axp-list


Hi,

[sorry if you already saw a similar posting on the alpha-kernel-list with a
 title of "TurboChannel Alpha". As I got no messages on that list over
 the last few days, I decided to try it here with a different subject.]

I'd like to start a port of Linux to the TurboChannel DEC3000 Alpha systems.
This will be based on (of course) the existing Alpha sources and code 
and experience from the DECstation port (if you're interested in that,
please take a look at http://decstation.unix-ag.org) - the DECstation
systems 5000/2x (codenamed "Maxine") are very similar to the TurboChannel
Alpha systems, they use the same ASIC as well as NCR53C94 SCSI 
controllers, Z8530 SCCs, Lance ethernet etc .... I bought a used
DEC 3000/300X some days ago (48 MB RAM, RZ26 hard disk, PMAGD-AA
3D accelerated graphics adapter) and started experimenting.

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). 
When booting aboot from a SCSI floppy drive, I get the following output:

aboot: Linux/Alpha SRM bootloader version 0.5

?02 KSP INVAL
  PC= 00000000.00000000 PSL= 00000000.00001F00

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

which immediately caused the machine to crash :(. I'm almost sure this is _not_
the correct way to initialise the stack, but I'm not sure how to do it right,
maybe it's only an alignment issue or perhaps s.th. completely different ...
Opinions from Alpha assembler experts, please ? ;)

Btw., what literature would you suggest for learning Alpha assembler ? I have
digital's Alpha Architecture Manual and OSF/1 Assembly Programming Guide here,
is there something else ?

Any help is greatly appreciated,
best regards,
	Michael Engel	(engel@numerik.math.uni-siegen.de)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: aboot expert help wanted ...
  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
  1998-07-28  8:45 ` Martin Ostermann
  1 sibling, 1 reply; 4+ messages in thread
From: Richard Henderson @ 1998-07-28  6:25 UTC (permalink / raw)
  To: Michael Engel, axp-list

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.

A third is that you can use `.space bytes' instead of oodles
of 0's.  ;-)

> Btw., what literature would you suggest for learning Alpha assembler ? I have
> digital's Alpha Architecture Manual and OSF/1 Assembly Programming Guide here,
> is there something else ?

*shrug*  I have in the past learned new processors looking at
compiler output for small functions.


r~


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: aboot expert help wanted ...
  1998-07-27 21:21 aboot expert help wanted Michael Engel
  1998-07-28  6:25 ` Richard Henderson
@ 1998-07-28  8:45 ` Martin Ostermann
  1 sibling, 0 replies; 4+ messages in thread
From: Martin Ostermann @ 1998-07-28  8:45 UTC (permalink / raw)
  To: Michael Engel; +Cc: axp-list

Michael Engel <engel@numerik.math.uni-siegen.de> writes:
> 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? 

Yes it is. I believe there is a version labeld 5.1, but the binaries
actually differ.

>           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). 
> When booting aboot from a SCSI floppy drive, I get the following output:
> 
> aboot: Linux/Alpha SRM bootloader version 0.5
> 
> ?02 KSP INVAL
>   PC= 00000000.00000000 PSL= 00000000.00001F00
> 
> >>>   

If I recall correctly, this is the same error I got on my Jensen when
combining aboot with firmware version more recent than version
1.7. You can search the axp-list archive, I posted about it a long
time ago. I also believe that this didn't happen with aboot-0.3, so
you might want to compare what changed between these versions.

In case you have an old firmware version (v1.7 or lower) available,
you could also try it immediatly.

HTH, Martin

PS.: I never bothered to look into this myself, because my video card
also hat problems with newer firmware versions.
-- 
Martin Ostermann                | mailto:ost+sig0@comnets.rwth-aachen.de
Communication Networks          | http://www.comnets.rwth-aachen.de/~ost
Aachen University of Technology | phone: ++49/241/807917
Germany                         | fax: ++49/241/8888242


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: aboot expert help wanted ...
  1998-07-28  6:25 ` Richard Henderson
@ 1998-07-28  8:46   ` Wes Bauske
  0 siblings, 0 replies; 4+ messages in thread
From: Wes Bauske @ 1998-07-28  8:46 UTC (permalink / raw)
  To: axp-list@redhat.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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-07-28  8:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
1998-07-28  8:45 ` Martin Ostermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox