amkern.h 2.82 KB
/*
 * amkern.h
 *
 * Copyright 1994, Silicon Graphics, Inc.
 * All Rights Reserved.
 *
 * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
 * the contents of this file may not be disclosed to third parties, copied or
 * duplicated in any form, in whole or in part, without the prior written
 * permission of Silicon Graphics, Inc.
 *
 * RESTRICTED RIGHTS LEGEND:
 * Use, duplication or disclosure by the Government is subject to restrictions
 * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
 * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
 * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
 * rights reserved under the Copyright Laws of the United States.
 */

#ifndef __TV_appmgr_kern_h_
#define __TV_appmgr_kern_h_

#include <rkfsn.h>

/* Messages between the kernel and the application mgr (0x00b0 to 0x00ff) */
#define TV_MSG_RUN_CONFIRM		0x00b2
#define TV_MSG_START_APPLICATION	0x00b3
#define TV_MSG_START_CONFIRM		0x00b4
#define TV_MSG_AM_COMMAND		0x00b5
/* last message				0x00ff */

#define TV_SHARED_ADDR 0x10000000

typedef unsigned long TVIPAddr;

/*
 * XXX Copies of structs in bootpkt.h
 */
typedef struct {
    unsigned char           certificate[18];
} TVAppCertificate;

typedef struct {
    unsigned short          id;
} TVPrincipalId;

typedef struct {
    unsigned char           key[8];
} TVPrivateKey;

typedef struct {
	TVIPAddr	myInetAddr;
	TVIPAddr	nameServer;
	unsigned long	hctID;
	TVid		kernelID;
	TVid		nmTrapID;	/* Network Management queue ID */
	TVid		libctID;
	TVid		libcdID;
	void *		libcdVaddr;
	TVid		kernelRegion;	/* for debugger run of apps */
	int		remote;	        /* type of the remote */
	int		libVersion;	/* library version */
	char		navigator[4];   /* navigator name */
	unsigned long	revAppChannel;	/* freq of Reverse Appl Channel */
	TVPrincipalId   subscriberID;	/* subscriber principal id */
	TVPrivateKey    privateKey;     /* subscriber private key
					/* appmgr copy not zeroed */
} TVAppMgrArgs;

typedef struct {
	TVid		appMgrID;	/* 0 if starting appmgr */
	int		client;		/* request origin; 0 => kernel */
	TVid		region;		/* for sending to appmgr */
	void*		heap;		/* vaddr of the shared region */
	TVIPAddr	nameServer;	/* inet addr of name server */
	TVIPAddr	myInetAddr;	/* my inet addr */
	TVSessionID	sessionID;	/* HCT id and boot time */
	TVid		nmTrapID;	/* Network Management queue ID */
	TVPrincipalId   subscriberID;   /* subscriber principal id */
	TVAppCertificate appCert; 	/* app certificate */
	TVPrincipalId   appID;		/* app principal id */
} TVAppInitArgs;

typedef union {
    TVAppInitArgs appinit;
    double  unused[10]; /* 8 byte boundary; 8 byte multiple for size */
} TVAppInitWrapper;

typedef struct {
    TVAppInitWrapper common;
    TVAppMgrArgs appmgr;
}TVAppMgrInitArgs;

#endif /* __TV_appmgr_kern_h_ */