[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

9072.0. "Access PALCODE from C device driver?" by GRIFUN::BENVI () Fri Mar 07 1997 11:27

HI all,
	I've been contacted by a customer that must have access to palcode
from a device driver written in C.
Customer must acces the register ABOX_CTL.
How can this be accomplished? I know that there is a CALL_PAL instruction
available in assembler, can I use it within a C program wia asm macro?

If yes, how? If no, how can I access PALCODE?

Thanks in advance
Angelo
T.RTitleUserPersonal
Name
DateLines
9072.1QUARRY::nethCraig NethFri Mar 07 1997 12:5711
I don't know anything about getting at that register, but the
following code shows how to do a pal call using an asm:



#include <c_asm.h>

pal_imb()
{
          asm ("call_pal 134", 1);  /* pal_imb */
}
9072.2SMURF::DENHAMDigital UNIX KernelFri Mar 07 1997 13:193
    The pal "registers" are only available to the pal code itself.
    Maybe telling more about what the customer is really trying
    to do and why would help here?
9072.3Working on itWASTED::mapMark Parenti, Unix Engineering GroupFri Mar 07 1997 16:1118
I forwarded this note to our CPU Technical Leader and he is in contact with
the original noter. There are several issues here:

	1) Chip registers are only accessible to the PAL, not to the
		OS directly

	2) There are OS routines to call to the PAL (without using ASM)

	3) The register in question is only available on EV4 - so any
		code that accesses it is NOT portable


Mail has been sent to ask what Jeff has asked - What is the customer trying 
to do?


Mark Parenti
UEG