/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/platnames.h>
/*
* This source is (and should be ;-) shared between the boot blocks
* and the boot programs. So if you change it, be sure to test them all!
*/
/*
* Supplied by modpath.c
*
* Making these externs here allows all sparc machines to share
* get_impl_arch_name().
*/
extern char *default_name;
extern char *default_path;
enum ia_state_mach {
};
/*
* Return the implementation architecture name (uname -i) for this platform.
*
* Use the named rootnode property to determine the iarch.
*/
static char *
{
static int len;
static char *ia;
pnode_t n;
char *cp;
char *namename;
switch (*state) {
case STATE_NAME:
n = (pnode_t)prom_rootnode();
goto newstate;
break;
case STATE_COMPAT_INIT:
*state = STATE_COMPAT;
n = (pnode_t)prom_rootnode();
*state = STATE_DEFAULT;
goto newstate;
}
break;
case STATE_COMPAT:
/*
* Advance 'ia' to point to next string in
* compatible property array (if any).
*/
while (*ia++)
;
*state = STATE_DEFAULT;
goto newstate;
}
break;
case STATE_DEFAULT:
*state = STATE_FINI;
goto newstate;
break;
case STATE_FINI:
return (NULL);
}
/*
* Crush filesystem-awkward characters. See PSARC/1992/170.
* (Convert the property to a sane directory name in UFS)
*/
*cp = '_';
return (ia);
}
static void
{
}
}
/*
* Generate impl_arch_name by searching the /platform hierarchy
* for a matching directory. We are not looking for any particular
* file here, but for a directory hierarchy for the module path.
*/
int
{
char *ia;
/*
* Hunt the filesystem looking for a directory hierarchy.
*/
return (1);
}
}
return (0);
}
/*
* Search the /platform hierarchy looking for a particular file.
*
* impl_arch_name is given as an optional hint as to where the
* file might be found.
*/
int
char *filename,
int (*openfn)(char *, void *),
void *arg,
char *fullpath)
{
char *ia;
int fd;
/*
* Hunt the filesystem for one that works ..
*/
return (fd);
}
return (-1);
}