From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,8c572c8554a309a9 X-Google-Attributes: gidf7344,public X-Google-Thread: 10f8a1,185c16fbb8340ca3 X-Google-Attributes: gid10f8a1,public X-Google-Thread: 1164f8,185c16fbb8340ca3 X-Google-Attributes: gid1164f8,public From: cfchiesa@cyber1.servtech.com (christopher f. chiesa) Subject: Re: GALAXIES - I've seen it Date: 1998/03/25 Message-ID: <6fb3r2$k8j@cyber1.servtech.com>#1/1 X-Deja-AN: 337537160 References: <3.0.3.32.19980320182347.0054d100@mail.progis.de> <351329C2.6D6B@world.std.com> <1998Mar21.074816.1@eisner> <6f5u6m$lne@post.gsfc.nasa.gov> Organization: ServiceTech, Inc. Newsgroups: comp.os.vms,comp.sys.dec,vmsnet.alpha In article <6f5u6m$lne@post.gsfc.nasa.gov>, Bob Koehler wrote: > >According to the architecture reference, one must choose big-endian or >little-endian from console mode before booting the OS on an Alpha. Interesting! So... what, exactly, does this choice do to the Alpha CPU at the hardware level? The only thing I can think of which distinguishes big-endian from little-endian behavior "at the hardware level," is the specific sequence of behind-the-scenes, internal shifting-and-masking the CPU must perform in order to implement such things as "load a from a non--aligned memory address." Ergo the "choice" made at the console must somehow instruct the Alpha CPU to select a DIFFERENT set of implicit shift-and-mask operations in its operation. >You could >run both big-endian and little-endian OS on the same machine at different >times. The implications here are interesting. Presumably the console-ROM code is designed to run with a particular endianness. But that same ROM must at some point "hand off" execution to an OS which, at least some of the time, wants to run with a DIFFERENT endianness. The inescapable conclusion is that at the crucial moment the CPU _must_ "hot-swap" endiannesses in mid- (instruction)-stream. >But that's a bit more than in "the compilers". The compiler needs >to match the target mode, but you can't "hot-swap" to a different mode while >the CPU is running. More importantly, you'ld have some difficulty coordinating >access to the I/O subsystem and such between two CPU's running different OS in >different modes. Not that it couldn't be done. The difficulty in hot-swapping, IMHO, isn't that the CPU "can't" do it, nor even that compilers could not be built to support it. It's simply that AT THE PRESENT TIME, the systems in which these CPUs are installed, and the compilers which run on these systems, are not designed to support it. It ought not take much ingenuity (compared to what Digital hardware engineers have exhibited for, lo, these many years) to redesign a few things here and there so that hot-swapping WERE supported. Perhaps a future generation of Alpha CPU could be modified to make such support easier. Either the distinction between modes could be done away with altogether, so that all the formerly-implicit shifting-and-masking I previously spoke of, disappeared from the hardware and had to be implemented explicitly in software (generated behind-the-scenes by compilers). That would work, but would be a giant step backward with respect to the original design goals of the entire Alpha/RISC philosophy. Better might be to ADD a mode to Alpha: a "don't-care-endian" mode in which the CPU would TEMPORARILY not perform those implicit shifting-and- masking operations. The handoff between console-ROM and an OS, or from one OS to another, of differing endianness could then be accomplished in two "relatively painless" or "smaller" steps, rather than in one, abrupt, possibly-disruptive one: go from e.g. little-endianness, to don't-care- endianness, and then from don't-care endianness to big-endianness. Such things as "servicing an interrupt of ONE endianness, while running code in the OTHER," might similarly be simplified by coding at least the rudiments of the interrupt-handling mechanism in "don't-care endianness" mode. It's completely possible that this theory of mine is riddled with inconsistencies or infeasibilities. If I could state for certain that it were not, _I_ would be one of Digital's ivory-tower hardware types. I'm not, and so I leave it for greater minds than my own to sift through the details and assess the true technical issues. Chris Chiesa cfchiesa@servtech.com