Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: Ping all: DEC 3000 support question
@ 1999-08-20 15:10 Calvin Coghlan
  0 siblings, 0 replies; 3+ messages in thread
From: Calvin Coghlan @ 1999-08-20 15:10 UTC (permalink / raw)
  To: axp-list

I can also offer my services as a guinea subject for basic testing on either a DEC 3000 M800 with PMAGB-B video, PMAZC-AA scsi and PMAZB-A scsi or a DEC 3000 M900 with PMAGB-B video and 2 PMAZC-AA scsi.  One of these, probably the 900 will be going back into production mode in about 4+ months but the other will still be a test/R&D machine and could test linux.  

I might be able to contribute more to this effort in 5+ months.

Calvin.



^ permalink raw reply	[flat|nested] 3+ messages in thread
* tbia() on DEC 3000 question
@ 1999-08-16  7:24 Craig P Prescott
  1999-08-20  2:10 ` Ping all: DEC 3000 support question Ken Shiring
  0 siblings, 1 reply; 3+ messages in thread
From: Craig P Prescott @ 1999-08-16  7:24 UTC (permalink / raw)
  To: axp-list


Plodding forward trying to get linux to netboot on the on the DEC 3000...

In paging_init (arch/alpha/mm/init.c), the call to tbia() results in a
machine check on the model 500 and model 600 DEC 3000 machines I am
using for development.  I am not sure why (I am a *complete* newbie to
assembly.).

Anyhow, changing tbia() in include/asm-alpha/system.h from

<snip>

#define __tbi(nr,arg,arg1...)					\
({								\
	register unsigned long __r16 __asm__("$16") = (nr);	\
	register unsigned long __r17 __asm__("$17"); arg;	\
	__asm__ __volatile__(					\
		"call_pal %3 #__tbi"				\
		:"=r" (__r16),"=r" (__r17)			\
		:"0" (__r16),"i" (PAL_tbi) ,##arg1		\
		:"$0", "$1", "$22", "$23", "$24", "$25");	\
})
....
#define tbia()		__tbi(-2, /* no second argument */)

</snip> 

to 

#define tbia()							\
({								\
	register unsigned long __r16 __asm__("$16") = -2;	\
        __asm__ __volatile__(                                   \
                "call_pal 0x0033"                               \
                :                                               \
                :                                               \
		:"$1", "$16", "$17", "$22", "$23", "$24", "$25");	\
})

*seems* to work - I no longer crap out (in tbia()) when netbooting.
(PAL_tbi is 0x0033).

So, my main two questions are:

1) is what I did actually "correct"?  (apart from the unused __r16)

2) why would the original tbia() fail on a DEC 3000 but work on
everything else?  __tbi is generalized beyond the immediate needs of
tbia() and tbiap(); could this be causing some problem?

Also, I am sure there is a "better" way to do this (if what I did was
even right in the first place).  But my knowledge level is a bit too
low to make full use of the examples I could find...  It sounds simple 
enough - all I have to do is stick a "-2" into $a0 ($r16) and
"call_pal 0x0033"? 

This is using linux-2.2.9, BTW, and the firmware on the DEC 3000
machines is the latest.

Thanks in advance,
Craig

P.S. This is a bit off-topic, but if someone could spell out in full detail
__tbi above, I'd be grateful, as I could learn more from this
example. I.e. what do the #__tbi and ##arg1 do?  And I learned from a
gcc doc what the "=r" and "0" mean, but what about "i"?

If anyone knows where an "Alpha Assembly for Dummies" style tutorial
is, or any other useful references, I'd appreciate it if they could
point me at them.  If one wanted to learn a bit of Alpha Assembly -
with no prior knowledge of any assembly language - what would one do?
I have the Alpha Architecture Reference Manual and other reference
materials, but I am looking for more of a tutorial with lots of
examples.


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

end of thread, other threads:[~1999-08-20 15:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-08-20 15:10 Ping all: DEC 3000 support question Calvin Coghlan
  -- strict thread matches above, loose matches on Subject: below --
1999-08-16  7:24 tbia() on DEC 3000 question Craig P Prescott
1999-08-20  2:10 ` Ping all: DEC 3000 support question Ken Shiring
1999-08-20  7:11   ` Craig P Prescott

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