dr_mbx.h 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 2000-2002 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_DR_MBX_H
#define _SYS_DR_MBX_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _KERNEL
#endif /* _KERNEL */
#include <post/scat_const.h>
/* this version of the DR - SC mailbox interface */
#define DRMBX_VERSION 0x0016
#define DR_KEY(a, b, c, d) \
#define DRSC_TIMEOUT 30
#define BD_TYPELEN 16
/* Commands */
#define DRMSG_ASSIGN 0x3
#define DRMSG_UNASSIGN 0x4
#define DRMSG_CLAIM 0x5
#define DRMSG_UNCLAIM 0x6
#define DRMSG_POWERON 0x7
#define DRMSG_POWEROFF 0x8
#define DRMSG_TESTBOARD 0x9
#define DRMSG_ABORT_TEST 0xa
#define DRMSG_SHOWBOARD 0xb
#define DRMSG_UNCONFIG 0xc
/* Test status definitions */
#define DR_TEST_STATUS_UNKNOWN 0x1
#define DR_TEST_STATUS_IPOST 0x2
#define DR_TEST_STATUS_PASSED 0x3
#define DR_TEST_STATUS_FAILED 0x4
#define DR_TEST_STATUS_ABORTED 0x5
/* Message reply status definitions */
#define DRMSG_REPLY_OK 0x0
#define DRMSG_REPLY_FAIL 0x1
/* Error Code definitions */
/*
* Protocol Header and message structure definitions
*/
/* DR-SC Protocol Header */
typedef struct {
/* Showboard reply structure (from SC) */
typedef struct {
power_on :1,
bd_assigned :1,
bd_active :1,
test_status :4;
char board_type[BD_TYPELEN];
/* CPU Memory Controller constants and macros */
typedef struct {
unused :2,
slice :5;
/*
* Since uint64_t can't be used in DR mailbox messages due to alignment and
* backwards compatibility issues, the 64 bit MADR and MACR register values must
* be broken into high and low uint32_t values.
*/
typedef struct {
} dr_mcreg_t;
/*
* Each expander can contain S0_LPORT_COUNT memory controllers (each CPU has one
* memory controller, and slot 1 doesn't support memory), and each controller
* contains PMBANKS_PER_PORT * LMBANKS_PER_PMBANK (the total number of memory
* banks supported by each controller) MADR registers
*/
typedef struct {
} dr_memregs_t;
typedef struct {
} dr_unclaim_t;
typedef struct {
} dr_claim_t;
typedef struct {
/* CPU Portid macros */
#define DRMBX_PORTID2EXP(cpu_portid) \
#define DRMBX_PORTID2SLOT(cpu_portid) \
/* Test board request structure */
typedef struct {
immediate :1,
reserved :6;
char hpost_opts[DR_HPOPTLEN];
/* Test board reply structure (from SC) */
typedef struct {
test_status :4,
reserved :3;
/* Test Abort structure (bi-directional) */
typedef struct {
/* Board event structure (from SC) */
typedef struct {
board_insertion :1,
board_removal :1,
slot_assign :1,
slot_unassign :1,
slot_avail :1,
slot_unavail :1,
power_on :1,
power_off :1,
reserved :7;
/*
* NOTE: The structures in this union all require 4 byte alignment or less. It
* is forbidden to add any structure that requires 8 byte alignment, as doing so
* will alter the dr_mbox_msg_t structure, thereby breaking compatibility with
* older software. (Since the dr_proto_hdr_t structure is 12 bytes long, it
* can't be followed immediately by an 8 byte aligned structure, and the
* compiler will implicitly insert 4 padding bytes.)
*/
typedef union {
} dr_msg_t;
typedef struct {
#ifdef __cplusplus
}
#endif
#endif /* _SYS_DR_MBX_H */