Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: {rd,wr}unique palcode insns
@ 1996-09-10 23:18 David Mosberger
  1996-10-04 12:22 ` Fixed ELF Linux/alpha Quake binary Linus Torvalds
  0 siblings, 1 reply; 3+ messages in thread
From: David Mosberger @ 1996-09-10 23:18 UTC (permalink / raw)


> Does anyone know what the rdunique/wrunique unprivileged PALcode
 > traps are for?  Do they, as they appear, allow one value to be stored
 > per-thread?

Yes, the value is per (kernel-) thread.  If you look at pseudo-code
for the swpctx PALcall, you'll see that the unique value gets stored
in the "process" control block.  In Linux, the corresponding variable
is the "unique" member in processor.h:struct thread_struct.

 > How are they used in DEC Unix?

Don't know.  I don't think the architecture manual says so explicitly,
but the intent seems to be that the kernel does not interpret the
unique value in any manner.  I.e., you're free to use it in any way
you like.

 > What kind of performance hit do I take trapping to PALcode?

Switching to PALmode is "fast".  I don't have any numbers that measure
this overhead alone, but on a 175MHz Alpha (DEC 3000/600) machine the
overhead for rdps or rdunique (I forgot which) was 13 cycles (assuming
a warm cache).  Note that the Alpha CPUs have shadow registers in
PALmode, so in many cases the PALcode itself doesn't have to access
memory at all.  I don't know the implementation details, but AFAIK,
entering PALmode is not much more than flipping a bit in the CPU.  The
biggest performance hit seems to come from the various scheduling and
synchronization restrictions inside PALmode.  See the hardware
reference for all the gory details (and I mean _gory_... ;-)

 > I ask because I was thinking of changing the LinuxThreads code to use
 > this for its thread id, rather than doing some screwy stack pointer
 > lookup nonsense as is necessary for other platforms.

 > Anyone see a problem with this?

I think that is exactly what it is designed for.

	--david

--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null

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

* Fixed ELF Linux/alpha Quake binary..
  1996-09-10 23:18 {rd,wr}unique palcode insns David Mosberger
@ 1996-10-04 12:22 ` Linus Torvalds
  0 siblings, 0 replies; 3+ messages in thread
From: Linus Torvalds @ 1996-10-04 12:22 UTC (permalink / raw)


In my relentless pursuit of making alpha a better Linux platform, I have now
instead of fixing the kernel been fixing "Quake". As you probably know, the
alpha version of quake was (a) ECOFF and (b) had broken sprite support(*) and
you couldn't save and load games reliably with it (well, you could save/load,
but quake would crash soon afterwards). 

Anyway, thanks to Dave Taylor and the people at ID, I was able to get a
"quake source license" and try to fix the alpha bugs. And there it is: 

	ftp://ftp.fs.helsinki.fi/pub/Software/Linux/Kernel/testing
		alpha-ELF-xquake.gz

(size 244942, md5sum 79c8b4545d77d6e5f34432aa0fe85c8b)

It's just a binary, and you do need a ELF install to actually make it work
(along with the quake world files etc, of course), because I couldn't be
bothered to make a statically linked ECOFF version (don't even ask for it:
consider this just another reason to upgrade to RedHat 4.0). 

I suspect it might be a good idea to mirror the binary somewhere, after
having checked that it actually works. The ftp.cs.helsinki.fi site is just a
few PC's on an ethernet, so don't expect it to be incredibly fast. 

I cannot give out sources, don't ask. I can't make ports to other things,
don't ask. But I _can_ fix problems, so if you notice that something doesn't
work, please to try tell me exactly where the problem is, and I can try to
reproduce it and make a fixed binary available. 

Oh, and I haven't actually tested this exhaustively, so there might be silly
bugs galore, including new ones introduced by me. It WorksForMe(tm).

		Linus

(*) Whatever "sprites" are. I don't have time to actually check what it all
does, I just fixed the bugs, and I never actually checked what the sprites
are _used_ for in the game. 

--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null

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

* Re: Fixed ELF Linux/alpha Quake binary..
@ 1996-10-04 15:38 David Mosberger-Tang
  0 siblings, 0 replies; 3+ messages in thread
From: David Mosberger-Tang @ 1996-10-04 15:38 UTC (permalink / raw)


>>>>> On Fri, 4 Oct 1996 15:22:51 +0300 (EET DST), Linus Torvalds <torvalds@cs.Helsinki.FI> said:

  Linus> I suspect it might be a good idea to mirror the binary
  Linus> somewhere, after having checked that it actually works. The
  Linus> ftp.cs.helsinki.fi site is just a few PC's on an ethernet, so
  Linus> don't expect it to be incredibly fast.

Can't pass on this one.  It's now also at:

	ftp://ftp.azstarnet.com/pub/linux/axp/alpha-ELF-xquake.gz

Enjoy,
	--david

--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null

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

end of thread, other threads:[~1996-10-04 15:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-09-10 23:18 {rd,wr}unique palcode insns David Mosberger
1996-10-04 12:22 ` Fixed ELF Linux/alpha Quake binary Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
1996-10-04 15:38 David Mosberger-Tang

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