/*
* 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.
*/
#ifndef _SYS_AC_H
#define _SYS_AC_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/* useful debugging stuff */
/*
* OBP supplies us with two register sets for the AC nodes. They are:
*
* 0 miscellaneous regs
* 1 Cache tags
*
* We do not use the cache tags for anything in the kernel, so we
* do not map them in.
*/
/* Macros for physical acccess, fhc.h has to be present */
/* Register set 0 Offsets */
/* Use predefined strings to name the kstats from this driver. */
/* used for the picN kstats */
/* used for programming the pic */
/* defines for AC Board Configuration and Status Register */
#define NO_CACHE 0
/* defines for Memory decode registers */
/* size of a memory SIMM group */
/*
* Interleave factor of a memory SIMM group.
* Possible values are 1, 2, 4, 8, and 16. 1 means not interleaved.
* Larger groups can be interleaved with smaller groups. Groups
* on the same board can be interleaved as well.
*/
/*
* Physical base mask of a memory SIMM group. Note that this is
* not the real physical base, and is just used to match up the
* interleaving of groups. The mask bits (UK) are used to mask
* out the match (UM) field so that the bases can be compared.
*/
/*
* memory states and conditions for sunfire memory system
*/
/*
* AC memory bank ioctl interface.
*/
/* 'G' (for gigabytes!) does not appear to be used elsewhere in the kernel */
/*
* For all AC_MEM_ ioctls the arg pointer points to a sysc_cfga_cmd_t
* except for AC_MEM_ADMIN_VER. The private pointer then points to a
* structure of the appropriate type, if required.
*/
typedef enum {
} ac_err_t;
/*
* Config admin command structure for AC_MEM ioctls.
*/
typedef struct ac_cfga_cmd {
void *private; /* command private data */
typedef struct ac_cfga_cmd32 {
typedef struct {
/*
* page_size gives the requires size for the read or write buffer.
* A read can be restricted to one or more line_size units starting
* at a multiple of line_size units from the start of the page.
* afar_base is the physical base of the bank being tested so
* that the afar value can be translated to an offset into the bank.
*/
typedef struct {
typedef struct {
/*
*/
typedef struct {
/*
* (page_buf + (line_offset*line_size))
*/
typedef struct {
void *page_buf;
typedef struct {
void *page_buf;
#ifdef _SYSCALL32
/* Kernel's view of ILP32 structure version. */
typedef struct {
typedef struct {
#endif /* _SYSCALL32 */
/* structure returned from AC_MEM_STAT ioctl */
typedef struct {
/* to supply address, group, info */
} ac_stat_t;
#ifdef _SYSCALL32
/* Kernel's view of ILP32 structure version. */
typedef struct {
/* to supply address, group, info */
} ac_stat32_t;
#endif /* _SYSCALL32 */
/* Command values in cmd_cfga.arg for the AC_MEM_EXERCISE ioctl. */
#define AC_MEMX_RELOCATE_ALL 0
/* Stats structure for AC_MEMX_RELOCATE_ALL (cmd_cfga.private != NULL). */
struct ac_memx_relocate_stats {
};
/* End of ioctl interface. */
#if defined(_KERNEL)
typedef struct {
#ifndef TRUE
#endif
#ifndef FALSE
#define FALSE (0)
#endif
/*
* Test for a valid size setting. The size must be set as
* a contiguous number of bits starting at the least significant bit.
* Adding one to such a number causes a carry to be propagated to
* the first zero bit, eg 00111 -> 01000. Thus for a correctly
* formed value, the AND of the two numbers is 0.
*/
/* set the decode register bits according to the desired bank layout */
/*
* Driver minor number macros.
*/
/*
* Attachment point names.
*/
/*
* Memory Database
* This information is generally accessed through the bd_list so we will
* just protect it by that for now.
*/
struct ac_mem_info {
};
/* Structures used in the driver to manage the hardware */
struct ac_soft_state {
/* fields protected by bd_list lock */
/* Mapped addresses of registers */
};
/* kstat structure used by ac to pass data to user programs. */
struct ac_kstat {
};
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_AC_H */