jupiter.c revision 25cf1a301a396c38e8adf52c15f537b80d2483f7
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <fcdriver/fcdriver.h>
/* VA for HardWare Descriptor */
static hwd_cmu_chan_t hwd_va_cmu;
static hwd_leaf_t hwd_va_pci;
/* Macro to get I/O portid */
do_get_io_portid(env); \
{
char *service = "map-in";
int error;
int offset = 0;
/*
* The calculation of the offset, lo and len are left here
* due to historical precedence.
*/
if (error)
"jupiter:%s: mapping_to_mcookie failed\n", service);
return (mcookie);
}
static void
{
char *service = "map-out";
int error;
int offset;
/*
* The calculation of the offset, lo and len are left here
* due to historical precedence.
*/
if (!is_mcookie(mcookie)) {
} else {
}
if (error)
}
static void
{
}
static void
{
}
static void
{
}
static void
{
char enc_buf[64];
long long off;
/* Convert physical address to portid */
if (off) {
} else {
}
}
static void
{
long long lo;
char *buf;
buf);
}
lo = 0;
}
}
static void
{
long long lo;
portid = 0;
/*
* Get portid number from unit_address
* Because of no leaf information in physical address
*/
"jupiter:do_device_id: invalid %s", buf);
}
}
} else {
/*
* Non existence unit_address case.
* Convert physical address to portid.
*/
"jupiter:do_device_id: failed unit address");
}
/* Pick up each ID from portid */
if (ch == OPL_CMU_CHANNEL) {
/*
* CMU-CH: PCICMU CHANNEL
*/
"jupiter:do_device_id:cmu-ch\n");
/*
* PCI-CH: Oberon Leaves CHANNEL
*/
if (leaf) {
/* Leaf B */
"jupiter:do_device_id:jup-oberon-pci1\n");
} else {
/* Leaf A */
"jupiter:do_device_id:jup-oberon-pci0\n");
}
} else {
/* Not matched to any channels */
"jupiter:do_device_id: invalid portid %x", portid);
}
/* Free the duplicated buf */
}
static void
{
char *service = "get-hwd-va";
char *buf;
int ch;
int error;
void *hwd_va;
/* Get a portid with string format */
/* Convert to the integer from the string */
service);
}
if (!OPL_VALID_CHANNEL(ch)) {
service);
hwd_va = 0;
goto out;
}
if (ch == OPL_CMU_CHANNEL) {
hwd_va = (void *)&hwd_va_cmu;
} else {
hwd_va = (void *)&hwd_va_pci;
}
/*
* Get the virtual address of hwd specified with portid.
*/
out:
}
static void
{
/*
* Just pass the "eFCode" string.
*/
"jupiter: do_get_intrp_name: eFCode\n");
}
static void
{
int portid;
"jupiter:master-interrupt ( %x %x ) -> %x\n",
}
static void
{
"jupiter:register-vector-entry ( %x %x %x ) -> %x\n",
}
static void
{
int mid = -1;
"jupiter:get-interrupt-target ( ) -> %x\n", mid);
}
static void
_init(void)
{
}