/*
* 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 (c) 2000 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void
{
}
void
{
}
void
{
}
static int
addr_cmp(void *a, void *b)
{
}
static void *
{
}
static void
{
}
/*
* Golden Rule:
* DO NOT cache the value of the head of the property list *before*
* looking up a property.
* This routine is also responsible for purging dead properties
* and that *can* affect the head pointer.
* you have been warned!
*/
prop_t *
{
while (p && !found) {
if (p->name) {
found = p;
}
prev = p;
p = p->next;
} else {
if (prev)
else {
/* last prop in chain */
d->properties = p->next;
}
dead = p;
p = p->next;
}
}
return (found);
}
static prop_t *
{
char *propname;
return (find_property(d, propname));
}
void
{
int datalen;
prop_t *p;
device_t *d;
if (MYSELF) {
} else {
d = env->current_device;
if (!d) {
void *buffer;
return;
}
}
p = find_property(d, propname);
if (p == NULL) {
p->next = d->properties;
d->properties = p;
} else if (p->data)
if (srcptr)
}
prop_t *
{
prop_t *p;
p = find_property(d, propname);
if (p) {
return (p);
}
if (d->vectors.get_package_prop) {
/* recreate the FORTH environment for the remote call */
REVERT_PHANDLE(env, n, d);
if (fail)
return (NULL);
return (&sp);
}
return (NULL);
}
void
{
prop_t *p;
device_t *d;
char *propname;
if (p) {
} else
}
void
{
char *pname;
int plen;
/*
* First, we look thru the in-memory device tree for the property.
* If we don't find it, we call get_inherited_prop, which "knows" it's
* not going to find the property below the attachment point.
*/
if (ih) {
if (prop) {
return;
}
}
return;
}
}
}
void
{
if (MYSELF) {
prop_t *p;
if (p) {
/*
* write the name as NULL; the space will be free'd
* the next time a property lookup passes this node
*/
}
} else {
}
}
void
{
}
void
{
char *str;
char *prop;
int len;
}
void
{
uint32_t p;
}
void
{
while (--ncells) {
}
}
static fstack_t
{
uint32_t d;
return (d);
}
int
{
prop_t *p;
if (!d) /* Kludge for testing */
return (def);
if (p == NULL)
return (def);
return (get_decoded_int(p->data));
}
int
{
}
int
{
}
void
{
char *ptr;
int len;
int adr_cells;
int offset;
while (adr_cells--) {
fstack_t d;
}
}
/*
* 'reg' Fcode 0x116
*/
void
{
}
void
{
char *str;
char *prop;
int len;
}
void
{
char *dp;
fstack_t d;
int len;
}
void
{
char *dp;
}
void
{
if (src2) {
}
if (src1) {
}
}
static void
{
}
void
{
}
void
{
}
void
{
}
/*
* 'next-property' Fcode implementation.
*/
void
{
char *previous;
prop_t *p;
p = phandle->properties;
p = phandle->properties;
p = p->next;
;
if (p)
else
}
void
{
if (MYSELF)
else if (env->current_device) {
fstack_t d;
} else {
}
}
#ifdef DEBUG
static void
{
}
static void
{
while (len > 0) {
if (len > 0)
print_indented("");
}
}
static void
{
uint32_t d;
while (len--) {
d = get_decoded_int(data);
}
if (crlf)
}
static void
{
}
static void
{
while (len--) {
}
}
static void
{
int nbytes;
for (; ; ) {
if (len == 0)
break;
print_indented("");
}
}
static void
{
while (len > 0) {
if (len > 0)
print_indented("");
}
} else
}
static void
{
int n, icells;
return;
}
while (len) {
int offset;
offset = 0;
if (len)
print_indented("");
}
}
static void
{
while (len > 0) {
if (len > 0)
print_indented("");
}
} else
}
typedef struct MAGIC_PROP {
char *name;
} magic_prop_t;
{ "name", print_string },
{ "device_type", print_string },
{ "model", print_string },
{ "reg", print_reg },
{ "assigned-addresses", print_reg },
{ "interrupt-map", print_imap },
{ "#interrupt-cells", print_integer },
{ "interrupt-map-mask", print_integer },
{ "#size-cells", print_integer },
{ "#address-cells", print_integer },
{ "ranges", print_ranges },
{ "device-id", print_integer },
{ "vendor-id", print_integer },
{ "class-code", print_integer },
{ "compatible", print_string },
{ "version", print_string },
{ "manufacturer", print_string },
};
static void
{
magic_prop_t *p;
for (p = magic_props; p->name; p++)
return;
}
}
void
{
if (prepend) {
}
if (p->name)
else
}
void
{
prop_t *p;
if (env->current_device) {
} else {
}
}
#endif
static void
_init(void)
{
}