kctl_isadep.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <kmdb/kmdb_auxv.h>
#include <sys/bootconf.h>
#include <sys/kobj_impl.h>
#include <sys/kdi_impl.h>
#include <sys/x86_archext.h>
#include <sys/controlregs.h>
#include <sys/archsystm.h>
#if defined(__i386)
#endif
static int
{
char *val;
pname);
return (0);
}
return (NULL);
pname);
return (0);
}
return (1);
}
/*ARGSUSED*/
static int
cons_type(void)
{
static int cons_type = -1;
char cons_str[10];
int len;
if (cons_type != -1)
return (cons_type);
cons_type = 0; /* default to screen */
cons_type = 1;
cons_type = 2;
}
return (cons_type);
}
/*
* fake prom properties, assuming the properties being read are
* input-device, output-device, ttya-mode, ttyb-mode.
*/
/*ARGSUSED*/
static int
{
return (0);
}
return (0);
switch (cons_type()) {
case 0:
else
break;
case 1:
break;
case 2:
break;
}
return (1);
}
static int
void *arg)
{
#ifdef __amd64
/*
* The current implementation of the amd64 shim layer doesn't support
* the use of the BOP_* calls with stack-allocated buffers.
*/
static
#endif
char modepname[25];
return (0);
return (1);
}
/*
* We don't have any property-walking routines, so we have to specifically
* query and thus have guilty knowledge of the properties that the
* debugger wants to see.
*/
#define KCTL_PROPNV_NENT 4
static kmdb_auxv_nv_t *
kctl_pcache_create(int *nprops)
{
int (*preader)(kmdb_auxv_nv_t *, char *, void *);
void *arg;
int np = 0;
if (kctl.kctl_boot_loaded) {
} else {
}
arg);
arg);
return (pnv);
}
static void
{
}
/*ARGSUSED*/
static void
kctl_cpu_init(void)
{
}
void
{
}
void
{
}
int
kctl_preactivate_isadep(void)
{
return (0);
}
/*ARGSUSED*/
int
{
if (!kctl.kctl_boot_loaded)
hat_kdi_init();
return (0);
}
void
{
}
void
kctl_deactivate_isadep(void)
{
hat_kdi_fini();
}
#if defined(__amd64)
void *
kctl_boot_tmpinit(void)
{
/*
* Many common kernel functions assume that GSBASE has been initialized,
* and fail horribly if it hasn't. We'll install a pointer to a dummy
* cpu_t for use during our initialization.
*/
return (old);
}
void
kctl_boot_tmpfini(void *old)
{
}
#else
void *
kctl_boot_tmpinit(void)
{
/*
* Many common kernel functions assume that %gs has been initialized,
* and fail horribly if it hasn't. Boot has reserved a descriptor for
* us (GS_GDT) in its GDT, a descriptor which we'll use to describe our
* dummy cpu_t. We then set %gs to refer to this descriptor.
*/
return ((void *)old);
}
void
kctl_boot_tmpfini(void *old)
{
}
#endif