What mips flavor is the 6.5.22m /unix kernel on R5K Indy's?

IRIX/Nekoware development, porting and related topics.
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
User avatar
dexter1
Moderator
Moderator
Posts: 2577
Joined: Thu Feb 20, 2003 6:57 am
Location: Zoetermeer, The Netherlands

What mips flavor is the 6.5.22m /unix kernel on R5K Indy's?

Unread postby dexter1 » Thu Jan 19, 2017 3:06 am

I was wondering that when you install a R5K Indy with 6.5.22m, which mips version would the /unix kernel be?

I need this to autoguess mips3/mips4 support in the openssl config script because the old script has been disabled, probably due to some complexity reason, thus defaulting always to -mips3. A safe choice, but not if you want to use with other applications which require mips4 support.

The old script was:

Code: Select all

CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
and i want it to replace it with

Code: Select all

MIPS=`file /unix |awk '{print $5}'`
and subsequently checking for mips-3 or mips-4.

For some reason, there isn't an 'easy' way to determine the maximum mips version support for an IRIX system. There is hinv -t cpu which gives the MIPS CPU model string and uname -m which gives the hardware platform, but both need work and the IP24 hardware platform is inconclusive, because of R5k support.

Any pointers for a super easy one (or two) command syntax printing this would be appreciated.
:Crimson: :PI: :Indigo: :O2: :Indy: :Indigo2: :Indigo2IMP: :O200: :O2000: :Onyx2:

User avatar
japes
Donor
Donor
Posts: 924
Joined: Thu Nov 08, 2007 4:35 pm
Location: Lynnwood, WA

Re: What mips flavor is the 6.5.22m /unix kernel on R5K Indy's?

Unread postby japes » Fri Jan 20, 2017 2:45 am

Does this help you at all? I see it's 6.5.22f, but I doubt that matters.

Code: Select all

freon 4# hinv -t cpu
CPU: MIPS R5000 Processor Chip Revision: 1.0
freon 5# file /unix
/unix:          ELF N32 MSB mips-3 executable (not stripped) MIPS - version 1
freon 6# uname -aR
IRIX freon 6.5 6.5.22f 10070055 IP22


EDIT: So I was wondering about an O2, I happen to have one I've been playing with on and grabbed the same:

Code: Select all

# hinv -t cpu
CPU: MIPS R10000 Processor Chip Revision: 2.7
# file /unix
/unix:          ELF N32 MSB mips-3 executable (not stripped) MIPS - version 1
# uname -aR
IRIX oxide 6.5 6.5.30m 07202013 IP32
:O3000: :Fuel: :Tezro: :Octane2: :Octane: :Octane: :Octane: :Indigo: :Indigo: :Indigo: :O2: :O2: :1600SW: :Indigo2: :Indigo2: :Indigo2: :Indigo2IMP: :Indy: :Indy: :Indy: :Indy: :O3x02L: :O3x02L:

User avatar
dexter1
Moderator
Moderator
Posts: 2577
Joined: Thu Feb 20, 2003 6:57 am
Location: Zoetermeer, The Netherlands

Re: What mips flavor is the 6.5.22m /unix kernel on R5K Indy's?

Unread postby dexter1 » Fri Jan 20, 2017 3:06 am

japes wrote:Does this help you at all? I see it's 6.5.22f, but I doubt that matters.

Yes it does. Stunning. This means that even if the R5K in the Indy is capable of mips4, its Indy kernel is mips3 (and i assume most if not all other subsystems).

This makes sense if you look at compatibility between the available processors in the Indy and Indigo2. Since they share a common base, the MC Rev3 controller ASIC, all installations must support the lowest common denominator which is mips3 for the R4000/4400 in the Indigo2 and the R4000/4600/4400/5000 in the Indy.

But this also implies that the level of mips instruction set support of the kernel cannot be used for the mips support of the processor. Drat :(
I'll stick with the bulky script in openssl for now.

[EDIT] The O2 result is interesting in that it looks like SGI has decided that all IRIX platforms get the mips3 version and IRIX64 are mips4. Since the O2 only supports IRIX, the kernel is mips3, even for a R10k processor. I think that the kernel should not benefit much from moving to mips4, so they refrained form making separate kernel support for those systems.

Oh i forgot. Somewhere, sometime, the O2 could support a R4600 CPU, maybe this is the reason why it stayed mips3 as well.

Thanks
:Crimson: :PI: :Indigo: :O2: :Indy: :Indigo2: :Indigo2IMP: :O200: :O2000: :Onyx2:

robespierre
Posts: 1400
Joined: Mon Sep 12, 2011 2:28 pm
Location: Boston

Re: What mips flavor is the 6.5.22m /unix kernel on R5K Indy's?

Unread postby robespierre » Fri Jan 20, 2017 3:19 am

The "file" command doesn't analyze the binary for what CPU it was compiled for, it simply decodes some bits in the header.
Those bits are used by the loader to prevent you from running binaries that wouldn't support your machine. But the kernel is never loaded like this. It is read into memory by the PROM and jumped into using a totally separate mechanism. So the architecture flags are pretty meaningless and don't tell you anything.
:PI: :O2: :Indigo2IMP: :Indigo2IMP:

User avatar
dexter1
Moderator
Moderator
Posts: 2577
Joined: Thu Feb 20, 2003 6:57 am
Location: Zoetermeer, The Netherlands

Re: What mips flavor is the 6.5.22m /unix kernel on R5K Indy's?

Unread postby dexter1 » Fri Jan 20, 2017 3:26 am

Thanks robespierre. I guess it was naive of me to assume that it would be that simple to determine.
:Crimson: :PI: :Indigo: :O2: :Indy: :Indigo2: :Indigo2IMP: :O200: :O2000: :Onyx2:

SAQ
Posts: 5868
Joined: Wed Jul 19, 2006 8:37 am
Location: Renton, WA

Re: What mips flavor is the 6.5.22m /unix kernel on R5K Indy's?

Unread postby SAQ » Fri Jan 20, 2017 2:34 pm

I think SGI tended to build things lower down unless there was a significant performance gain. I remember being surprised that IRIX 6.2 came back as MIPS-2 (can't remember if this was an IP22, IP28 or IP25).
Couldn't you do a check for hinv -t cpu output for "R5000" to verify Indy R5k rather than the more convoluted bit of the initial script?
"Brakes??? What Brakes???"

"I am O SH-- the Great and Powerful"

:Indigo: :Octane: :Indigo2: :Indigo2IMP: :Indy: :PI: :O3x0: :ChallengeL: :O2000R: (single-CM)

User avatar
Dodoid
Posts: 379
Joined: Mon Jul 04, 2016 1:36 pm
Location: Ottawa, Canada
Contact:

Re: What mips flavor is the 6.5.22m /unix kernel on R5K Indy's?

Unread postby Dodoid » Sat Jan 21, 2017 7:15 am

dexter1 wrote:Somewhere, sometime, the O2 could support a R4600 CPU


I googled around, can't find information on this. How do we know this is the case? Does it include support for one in the PROM or something?
:Fuel: :Octane: :Octane: :Octane: :O2: :Indigo2: :Indy: :Indy:

User avatar
dexter1
Moderator
Moderator
Posts: 2577
Joined: Thu Feb 20, 2003 6:57 am
Location: Zoetermeer, The Netherlands

Re: What mips flavor is the 6.5.22m /unix kernel on R5K Indy's?

Unread postby dexter1 » Sat Jan 21, 2017 9:32 am

Dodoid wrote:
dexter1 wrote:Somewhere, sometime, the O2 could support a R4600 CPU

I googled around, can't find information on this. How do we know this is the case? Does it include support for one in the PROM or something?

There is mention of R4600 support in the old PROM images, see viewtopic.php?f=5&t=16729049&p=7373504&hilit=PROM+R4600#p7373504
:Crimson: :PI: :Indigo: :O2: :Indy: :Indigo2: :Indigo2IMP: :O200: :O2000: :Onyx2:


Return to “SGI: Development”

Who is online

Users browsing this forum: No registered users and 2 guests