Operating System - OpenVMS
1827894 Members
1615 Online
109969 Solutions
New Discussion

System services in IA64 (too many args??)

 
SOLVED
Go to solution
Brian Reiter
Valued Contributor

System services in IA64 (too many args??)

Hi Folks,

Just finished the initial recompilation of our system on a IA64 unit. System was originally running on OpenVMS 7-3-2 quite happily.

I have hit problems with the system service $CRMPSC_GFILE_64. Our existing code passes it 11 arguments, the definition in STARLET.PAS supports this (as well as the documentation). However the service fails with:

$ exit 10060
%SYSTEM-F-TOO_MANY_ARGS, routine called with too many arguments

I can't strip out any arguments, the Pascal compiler then moans bitterly. The prototypes for other languages match the Pascal version.

Any help would be appreciated.


Best regards

Brian

12 REPLIES 12
Craig A Berry
Honored Contributor

Re: System services in IA64 (too many args??)

If there are any arguments passed by value, check the default width for their data types and see if it's changed on IA64. Or maybe it's confused about whether it's got 32-bit or 64-bit addresses; it's supposed to accept either. Whichever one you're using, try the other and see what happens. These are rather wild guesses, but that's all I can offer at the moment.
Volker Halle
Honored Contributor

Re: System services in IA64 (too many args??)

Brian,

if the PASCAL compiler allows a machine code listing to be generated ( other compilers do this with /LIS/MACH ), you could check the I64 machine code generated for the call to SYS$CRMPSC_GFILE_64

There might be some line like:

mov ai = ?? // r25 = ?? // line-no.

immediately preceeding the call. This instruction provides the argument count to the called routine.

Volker.
Brian Reiter
Valued Contributor

Re: System services in IA64 (too many args??)

Hi folks,

Volker - there is a MOV AI = 15 prior to the service call. If this is the argument count then its out by 4 (the last 3 arguments to the service are optional, even using all of them the call would be out by 1). This might bear out what Craig suggested so at least I have an avenue to investigate.

The interesting thing is that the section file is still created even though the call to create it has failed (and returns zero for the address) has - seems odd behaviour.

I've compared the prototypes for the service in STARLET.PAS on the OpenVMS 7-3-2 Alpha and the IA64 target. They appear to match I don't have VMS 8-2 on Alpha just yet.

I even thought about rebuilding the STARLET environment into a local directory - just to verify it was the right version. STARLET.PAS failed to compile.

cheers

Brian

Volker Halle
Honored Contributor

Re: System services in IA64 (too many args??)

Brain,

15 parameters seem o.k.

After (optional) map_length_64 there is an (apparently undocumented and also optional) 15th parameter: page_prot

I've checked this in STARLET.REQ (the BLISS definition variant) on E8.2 on Alpha and I64 - it's the same definition.

If you say that 'part of the system service' has succeeded (region being created), then it looks like one of the other (internally called ?) routines may have incurred the TOO_MANY_ARGS error...

Volker.
Brian Reiter
Valued Contributor

Re: System services in IA64 (too many args??)

Volker,

Looks like a mistake in the prototype. I had checked the first 11 parameters against those in 7-3-2/ I had however missed an additional protection flag added to the definition in 8-2 (parameter 15).

I've removed this, moved the contents of STARLET.PAS into the demonstrator, recompiled and run (removing those portions of STARLET which caused the compilation to file). And yes now get a return of 1561 (success!).

I'm going to create a modifed version of starlet and then recompile the complete system and see where that gets me.

Many thanks for your help


Brian
Brian Reiter
Valued Contributor

Re: System services in IA64 (too many args??)

Volker,

Missed your comment about the 'undocumented' protection flag. I've removed this from the Pascal prototype.

cheers

Brian
Willem Grooters
Honored Contributor

Re: System services in IA64 (too many args??)

Shouldn't this be taken up by HP? Looks some compiler - or definition error to me.
Willem Grooters
OpenVMS Developer & System Manager
Brian Reiter
Valued Contributor

Re: System services in IA64 (too many args??)

Hopefully someone from HP will spot this. We only use a couple of these routines so it should be easy enough to check - much prefer HP to correct it though. :)

cheers

Brian
Volker Halle
Honored Contributor

Re: System services in IA64 (too many args??)

Brian,

let me get this straight:

- you've removed the PAGE_PROT parameter from your STARLET.PAS definition file and now your call works - otherwise it failed with SS$_TOO_MANY_ARGS - right ?!

- if so, this would indicate an error not only in STARLET.PAS but in the original definition in STARLET, i.e. the system service SYS$CRMPSC_GFILE_64 does NOT work with the 15 parameters present in the call definition.

NOTE: the PAGE_PROT argument did NOT exist in V7.3-1, so this may be a generic V8.2 problem, not specific to I64 !!!

If you have a contract with HP, please log a call. Don't expect HP to scan this forums looking for new problems. Anyway, the problem is at least documented and visible here...

Volker.
Brian Reiter
Valued Contributor

Re: System services in IA64 (too many args??)

Volker,

Your summary is correct :). Hopefully its the only instance of the problem.

Currently we don't have any form of support contract with HP (don't know why - decision was made higher up the chain). The Itanium box is on loan from HP for a few months - to give me time to port and test our VMS based systems. We're making enquiries as to how to formally report this problem.

cheers

Brian

John Reagan
Respected Contributor
Solution

Re: System services in IA64 (too many args??)

While this new PAGE_PROT argument is optional, the Pascal definitions represent it as a required argument with a default of %IMMED 0. However, the code only allowed upto 14 arguments to be passed. The engineer who added the argument didn't totally understand how the Pascal version is constructed.

We'll take care of this in a future release of OpenVMS. Note that STARLET.PAS is actually built here in ZKO and buried inside of the OpenVMS kit. The Pascal installation just finishes unpacking it and compiling it to create the .PEN file.

Your solution of editing STARLET.PAS is the only good solution I can think of. Pascal has lots of extensions to let you specify MORE arguments than a formal definition but it doesn't have an extension to let to specify FEWER.

On I64, you rebuild STARLET.PAS with:

$ pascal/align=vax/float=g_float/envir=sys$common:[syslib] sys$library:starlet.pas

Let me know if you have any future Pascal questions.

John Reagan
Pascal Project Leader
Brian Reiter
Valued Contributor

Re: System services in IA64 (too many args??)

Hi John

Thanks for that. The change to STARLET has allowed me to start the complete system up with only minor niggles (mainly due to very old X windows code) and it seems to behave itself.

Thanks to you all for your help and suggestions.

cheers

Brian