sc_gptwocfg.c revision f500b19684bd0346ac05bec02a50af07f369da1a
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Starcat Specific Glue for Safari Configurator
*/
#include <sys/isa_defs.h>
#include <sys/autoconf.h>
#include <sys/ddi_impldefs.h>
#include <sys/ndi_impldefs.h>
#include <sys/safari_pcd.h>
#include <sys/gptwo_cpu.h>
#include <sys/gptwo_pci.h>
#include <sys/sc_gptwocfg.h>
#include <post/scat_dcd.h>
#include <sys/machsystm.h>
int sc_gptwocfg_debug = 0;
typedef struct sc_gptwocfg_config {
int board;
struct gptwocfg_config *port_cookie;
struct sc_gptwocfg_config *link;
struct sc_gptwocfg_config *next;
static kmutex_t sc_gptwo_config_list_lock;
static sc_gptwocfg_config_t *sc_gptwo_config_list;
static void sc_free_common_pcd(spcd_t *);
static void dump_config(sc_gptwocfg_config_t *);
static char *rsv_string(prdrsv_t);
extern gptwo_new_nodes_t *gptwocfg_allocate_node_list(int);
extern void gptwocfg_free_node_list(gptwo_new_nodes_t *);
#ifdef NO_IOSRAM
#else
#endif
extern void gptwocfg_devi_attach_to_parent(dev_info_t *);
/*
* Module control operations
*/
extern struct mod_ops mod_miscops;
&mod_miscops, /* Type of module */
"Sun Fire 15000 gptwocfg"
};
static struct modlinkage modlinkage = {
};
int
_init()
{
int err = 0;
/*
* so all we need to do now is install.
*/
err));
} else {
}
return (err);
}
int
_fini(void)
{
return (mod_remove(&modlinkage));
}
int
{
}
static spcd_t *
{
int portid;
int i, j, slot;
int dimm;
/*
* Get the Starcat Specific Global DCD Structure from the golden
* IOSRAM.
*/
"From IOSRAM\n");
return (NULL);
}
return (NULL);
}
"GDCD Version 0x%x Expecting 0x%x\n",
return (NULL);
}
/*
* Copy various information from the platform specific Port
* Resource Descriptor (PRD) To the platform independent
* Port Configuration Descriptor.
*/
/*
* This will calculate the cpu speed based on the
* the actual frequency ratio * interconnect frequency
* converted to Mhz.
*/
} else {
/*
* For non-cpu devices, just pass through the frequency
* unchanged.
*/
pcd->spcd_afreq =
}
/*
* Fill in the entire port status.
*/
} else {
}
/*
* Fill in the per agent status.
*/
} else {
for (i = 0; i < AGENTS_PER_PORT; i++) {
if (RSV_GOOD(
else
}
}
/*
* If this is a CPU device calculate the cpuid for it. For Starcat
* the cpuid is in the following format.
*
* EEEEEPPAPP
*
* where: EEEEE is the expander
* PP_PP is the portid
* __A__ is the sub-agent identifier.
*/
for (i = 0; i < AGENTS_PER_PORT; i++) {
switch (prd_slot) {
case 0:
case 1:
case 2:
case 3:
break;
case 4: /* Maxcat */
break;
case 5: /* Maxcat */
break;
default:
"prd_slot=%d\n", prd_slot);
}
}
}
/*
* Starcat does not have ports with UPA devices so
* spcd_upadev structure will not be filled in.
*/
/*
* Fill in IO Bus Status
*/
for (i = 0; i < IOBUS_PER_PORT; i++) {
"bus=%d status=0x%x\n", i,
if (RSV_GOOD(
} else {
}
for (j = 0; j < IOCARD_PER_BUS; j++)
/*
* Fill in IO Card Status
*/
for (j = 0; j < IOCARD_PER_BUS; j++) {
"slot=%d status=0x%x\n", i, j,
prd_iocard_rsv[i][j]));
if (j == 1)
continue;
if (j == 0)
slot = 1;
else
slot = j;
/*
* If POST marked the card as GOOD or if the slot
* is empty, we want to probe for the device.
*/
prd_iocard_rsv[i][j]) ||
prd_iocard_rsv[i][j] == RSV_MISS) ||
prd_iocard_rsv[i][j] == RSV_EMPTY_CASSETTE))
else
}
}
/*
* Fill in WIC Link Status
*/
for (i = 0; i < LINKS_PER_PORT; i++) {
if (RSV_GOOD(
} else {
}
}
/*
* Get data for the "bank-status" property.
*/
pcd->sprd_bank_rsv[0] =
dimm = 0;
for (i = 0; i < PMBANKS_PER_PORT; i++) {
for (j = 0; j < DIMMS_PER_PMBANK; j++) {
if (dimm < MAX_DIMMS_PER_PORT) {
prd_dimm[i][j]);
dimm++;
}
}
}
/*
* Get data for the "ecache-dimm-label" property.
*
* Right now it is hardcoded, but we should eventually get this
* from the SC.
*/
switch (prd_slot) {
case 0:
label1 = "4400";
label2 = "4300";
break;
case 1:
label1 = "5400";
label2 = "5300";
break;
case 2:
label1 = "6400";
label2 = "6300";
break;
case 3:
label1 = "7400";
label2 = "7300";
break;
/*
* Maxcat labels.
*/
case 4:
label1 = "6400";
label2 = "6300";
break;
case 5:
label1 = "7400";
label2 = "7300";
break;
}
i = 0;
if (label1) {
pcd->sprd_ecache_dimm_label[i] =
i++;
}
if (label2) {
pcd->sprd_ecache_dimm_label[i] =
i++;
}
#ifdef DEBUG
#endif
return (pcd);
}
void
{
int i;
}
for (i = 0; i < MAX_BANKS_PER_PORT; i++) {
if (pcd->sprd_bank_rsv[i]) {
}
}
for (i = 0; i < MAX_DIMMS_PER_PORT; i++) {
}
if (pcd->sprd_ecache_dimm_label[i]) {
}
}
}
{
}
static sc_gptwocfg_cookie_t
{
int created_node = 0;
board, create_nodes));
if (board > 35) {
"invalid board 0x%x\n", board));
return (NULL);
}
/*
* Get the Attachment Point. For Starcat the parent of all
* Safari children is root node.
*/
ap = ddi_root_node();
/*
* Get the agent id of the AXQ.
*/
/*
* Look to see if the board is already configured by searching for
* its AXQ.
*/
board);
return (NULL);
}
/*
* Probe AXQ first
*/
/*
* The generic gptwocfg does not support the AXQ, so we need
* to configure it. The AXQ branch is returned held.
*/
return (NULL);
}
/*
* Build a cookie for the AXQ.
*/
last = board_config;
/*
* Determine the starting ending slots of the PRD array.
*/
switch (slot) {
case 0: /* Full Bandwidth Slot */
prd_slot_start = 0;
prd_slot_end = 3;
break;
case 1: /* Half Bandwidth Slot */
prd_slot_start = 4;
prd_slot_end = 5;
break;
default:
"Can not probe\n"));
return (board_config);
}
/*
* For each valid PRD entry, determine the agent id which is based
* on what type of device is described by the slot, and then
* call the safari configurator.
*/
/*
* We can not get a PCD for this port so skip it.
*/
"expander 0x%x prd slot 0x%x\n",
return (board_config);
}
/*
* Only configure good devices.
*/
/*
* Determine the agent id.
*/
/*
* Call Platform Independent gptwo configurator to
* create node and properties.
*/
if (create_nodes) {
if (port_cookie)
created_node++;
}
(sizeof (sc_gptwocfg_config_t), KM_SLEEP);
/*
* XXX Shouldn't port_cookie be NULL if
* !create_nodes ?
*/
} else {
"Exp=0x%x PRD Slot=0x%x prsv Status=0x%x\n",
}
} /* for loop */
if (create_nodes && !created_node) {
"to configure - unprobing board %d\n", board));
}
board_config));
return (board_config);
}
{
if (board > 35) {
"invalid board 0x%x\n", board));
return (NULL);
}
while (board_config != NULL) {
break;
}
}
if (board_config == NULL) {
"config structure board=0x%x\n", board));
/*
* Configure the board without creating nodes.
*/
if (board_config == NULL) {
"Unable to unconfigure board %d - board is not "
"configured\n", board);
return (NULL);
}
}
/*
* Walk the link of ports on this board and unconfigure them.
* Save the AXQ for last.
*/
"calling gptwocfg_unconfigure(ap=0x%p portid=0x%x)\n",
"gptwocfg_unconfigure returned cookie=0x%p\n",
port_cookie));
if (port_cookie == NULL) {
/*
* Can be removed from list.
*/
} else {
}
}
/*
* If all the other Safari devices have been successfully
* unconfigured, then the AXQ can be unconfigured.
*/
/*
* If the AXQ was successfully unconfigured, then
* the board is removed from the configured list.
*/
if (sc_gptwo_config_list == axq_config) {
} else {
}
}
axq_config = NULL;
}
}
return (axq_config);
}
int
{
cookie = (sc_gptwocfg_config_t *)c;
"Invalid Cookie\n");
return (0);
}
/*
* Start with the AXQ node.
*/
return (1);
} else {
return (0);
}
}
return (1);
}
return (1);
}
/* dip == NULL */
}
}
return (0);
}
static dev_info_t *
{
char *name;
int size;
int circ;
/*
* Hold root node busy to walk its child list
*/
dip));
!= DDI_PROP_SUCCESS) {
/*
* This node does not have a name property.
*/
"'name' property\n", dip));
continue;
}
/*
* This node is not a AXQ node.
*/
"node\n", dip));
continue;
}
!= DDI_PROP_SUCCESS) {
/*
* This AXQ node does not have a reg property.
*/
"have a 'reg' property\n", dip));
continue;
}
/*
* This is the wrong AXQ node.
*/
continue;
}
/*
* The correct AXQ node was found.
*/
break;
}
return (dip);
}
struct axq_arg {
};
/*ARGSUSED*/
static int
{
"to create name property\n"));
return (DDI_WALK_ERROR);
}
"to create device_type property\n"));
return (DDI_WALK_ERROR);
}
"to create compatible property\n"));
return (DDI_WALK_ERROR);
}
"to create portid property\n"));
return (DDI_WALK_ERROR);
}
reg[0].gptwo_size_hi = 0;
"to create reg property\n"));
return (DDI_WALK_ERROR);
}
return (DDI_WALK_TERMINATE);
}
/*ARGSUSED*/
static void
{
}
static gptwo_new_nodes_t *
{
devi_branch_t b = {0};
int rv;
if (!create_nodes) {
if (axq_dip) {
/*
* Release hold from sc_find_axq_node()
*/
}
"Returning 0x%p\n", new_nodes));
return (new_nodes);
}
b.type = DEVI_BRANCH_SID;
if (rv != 0) {
/*
* If non-NULL, fdip is held and must be released.
*/
} else {
}
return (NULL);
}
return (new_nodes);
}
static gptwocfg_config_t *
{
int i;
int failure = 0;
"Invalid AXQ\n");
return (NULL);
}
int rv;
if (rv != 0) {
/*
* If non-NULL, fdip is held and must be released.
*/
} else {
}
"path=%s, dip=%p, rv=%d\n", path,
failure = 1;
} else {
}
}
if (!failure) {
}
return (config);
}
static uint_t
{
switch (pcd->spcd_ptype) {
case SAFPTYPE_CPU:
if (slot == 0) {
} else {
if (prd_slot == 4) {
agent_id = 8;
} else {
agent_id = 9;
}
}
break;
case SAFPTYPE_sPCI:
case SAFPTYPE_cPCI:
case SAFPTYPE_PCIX:
if (prd_slot == 4) {
agent_id = 0x1c;
} else {
agent_id = 0x1d;
}
break;
case SAFPTYPE_WCI:
agent_id = 0x1d;
break;
default:
"Type 0x%x Slot 0x%x\n",
} /* switch */
return (agent_id);
}
static void
{
while (board_config != NULL) {
board_config));
if (port) {
port->gptwo_portid));
}
board_config->portid));
board_config->board));
board_config->link));
board_config->next));
}
}
static void
{
int i;
switch (pcd->spcd_ptype) {
case SAFPTYPE_CPU:
break;
case SAFPTYPE_sPCI:
break;
case SAFPTYPE_cPCI:
break;
case SAFPTYPE_PCIX:
break;
case SAFPTYPE_WCI:
break;
default:
pcd->spcd_ptype));
break;
}
} else {
}
for (i = 0; i < AGENTS_PER_PORT; i++) {
"- SPCD_RSV_PASS\n", i));
} else {
}
}
for (i = 0; i < AGENTS_PER_PORT; i++) {
i, pcd->spcd_cpuid[i]));
}
}
for (i = 0; i < MAX_BANKS_PER_PORT; i++) {
if (pcd->sprd_bank_rsv[i]) {
pcd->sprd_bank_rsv[i]));
}
}
for (i = 0; i < MAX_DIMMS_PER_PORT; i++) {
}
}
for (i = 0; i < MAX_DIMMS_PER_PORT; i++) {
if (pcd->sprd_ecache_dimm_label[i]) {
pcd->sprd_ecache_dimm_label[i]));
}
}
}
typedef struct {
}m_layout;
/*
* Use 2 bits to represent each bit at a cache line. The table
* is in big endian order, i.e.
* dimmtable[0], ... , dimmtable[143]
* Q0:data-bits[127 126 125 124], ... , MtagEcc[3 2 1 0]
* .
* .
* Q3:data-bits[127 126 125 124], ... , MtagEcc[3 2 1 0]
*/
uint8_t J_dimm_pinTable[] = {
/* Jnumber */
/* 0 */ 0x4a, 0x31, 0x33, 0x33, 0x30, 0x30, 0x00, 0x00,
/* 1 */ 0x4a, 0x31, 0x33, 0x34, 0x30, 0x30, 0x00, 0x00,
/* 2 */ 0x4a, 0x31, 0x33, 0x35, 0x30, 0x30, 0x00, 0x00,
/* 3 */ 0x4a, 0x31, 0x33, 0x36, 0x30, 0x30, 0x00, 0x00,
/* 4 */ 0x4a, 0x31, 0x33, 0x33, 0x30, 0x31, 0x00, 0x00,
/* 5 */ 0x4a, 0x31, 0x33, 0x34, 0x30, 0x31, 0x00, 0x00,
/* 6 */ 0x4a, 0x31, 0x33, 0x35, 0x30, 0x31, 0x00, 0x00,
/* 7 */ 0x4a, 0x31, 0x33, 0x36, 0x30, 0x31, 0x00, 0x00,
/* flag */ 0x01,
/* -- Q0 -- */
/* 0 */ 0x00, 0x55, 0xaa, 0xff, 0x00, 0x55, 0xaa, 0xff,
/* 1 */ 0x00, 0xaa, 0xff, 0x00, 0x56, 0xaf, 0x00, 0x55,
/* 2 */ 0xaa, 0x55, 0xaf, 0xc0, 0x55, 0xaa, 0xff, 0x00,
/* 3 */ 0x55, 0xff, 0x00, 0x55, 0xaa, 0xff, 0x6d, 0x80,
/* 4 */ 0xe7, 0xe3, 0x9b, 0x1b,
/* -- Q1 -- */
/* 0 */ 0x00, 0x55, 0xaa, 0xff, 0x00, 0x55, 0xaa, 0xff,
/* 1 */ 0x00, 0xaa, 0xff, 0x00, 0x56, 0xaf, 0x00, 0x55,
/* 2 */ 0xaa, 0x55, 0xaf, 0xc0, 0x55, 0xaa, 0xff, 0x00,
/* 3 */ 0x55, 0xff, 0x00, 0x55, 0xaa, 0xff, 0x6d, 0x80,
/* 4 */ 0xe7, 0xe3, 0x9b, 0x1b,
/* -- Q2 -- */
/* 0 */ 0x00, 0x55, 0xaa, 0xff, 0x00, 0x55, 0xaa, 0xff,
/* 1 */ 0x00, 0xaa, 0xff, 0x00, 0x56, 0xaf, 0x00, 0x55,
/* 2 */ 0xaa, 0x55, 0xaf, 0xc0, 0x55, 0xaa, 0xff, 0x00,
/* 3 */ 0x55, 0xff, 0x00, 0x55, 0xaa, 0xff, 0x6d, 0x80,
/* 4 */ 0xe7, 0xe3, 0x9b, 0x1b,
/* -- Q3 -- */
/* 0 */ 0x00, 0x55, 0xaa, 0xff, 0x00, 0x55, 0xaa, 0xff,
/* 1 */ 0x00, 0xaa, 0xff, 0x00, 0x56, 0xaf, 0x00, 0x55,
/* 2 */ 0xaa, 0x55, 0xaf, 0xc0, 0x55, 0xaa, 0xff, 0x00,
/* 3 */ 0x55, 0xff, 0x00, 0x55, 0xaa, 0xff, 0x6d, 0x80,
/* 4 */ 0xe7, 0xe3, 0x9b, 0x1b,
/*
* In the following order
* pintable[0], ..., pintable[575]
* Quadword3, Quadword2, Quadword1, Quadword0
* MtagEcc, Mtag, Ecc, Data
*/
/* -- Q3 -- */
/* 0 */ 227, 227, 227, 227, 111, 111, 111, 22,
/* 1 */ 22, 32, 138, 222, 81, 117, 117, 117,
/* 2 */ 111, 222, 106, 222, 222, 106, 106, 106,
/* 3 */ 217, 101, 212, 96, 217, 101, 212, 96,
/* 4 */ 217, 101, 212, 96, 217, 101, 212, 96,
/* 5 */ 207, 91, 202, 86, 187, 71, 158, 42,
/* 6 */ 187, 71, 158, 42, 153, 37, 148, 32,
/* 7 */ 153, 37, 148, 32, 153, 37, 148, 32,
/* 8 */ 153, 37, 148, 143, 27, 138, 143, 27,
/* 9 */ 143, 27, 138, 22, 207, 91, 202, 86,
/* 10 */ 207, 91, 202, 86, 207, 91, 202, 86,
/* 11 */ 192, 76, 81, 192, 76, 81, 192, 76,
/* 12 */ 197, 81, 192, 76, 187, 71, 158, 42,
/* 13 */ 187, 71, 158, 42, 143, 27, 138, 22,
/* 14 */ 133, 17, 128, 12, 133, 17, 128, 12,
/* 15 */ 133, 17, 128, 12, 133, 17, 128, 12,
/* 16 */ 123, 07, 118, 2, 123, 07, 118, 2,
/* 17 */ 123, 07, 118, 2, 123, 07, 118, 2,
/* -- Q2 -- */
/* 0 */ 228, 228, 228, 228, 112, 112, 112, 23,
/* 1 */ 23, 33, 139, 223, 82, 118, 118, 118,
/* 2 */ 112, 223, 107, 223, 223, 107, 107, 107,
/* 3 */ 218, 102, 213, 97, 218, 102, 213, 97,
/* 4 */ 218, 102, 213, 97, 218, 102, 213, 97,
/* 5 */ 208, 92, 203, 87, 188, 72, 159, 43,
/* 6 */ 188, 72, 159, 43, 154, 38, 149, 33,
/* 7 */ 154, 38, 149, 33, 154, 38, 149, 33,
/* 8 */ 154, 38, 149, 144, 28, 139, 144, 28,
/* 9 */ 144, 28, 139, 23, 208, 92, 203, 87,
/* 10 */ 208, 92, 203, 87, 208, 92, 203, 87,
/* 11 */ 193, 77, 82, 193, 77, 82, 193, 77,
/* 12 */ 198, 82, 193, 77, 188, 72, 159, 43,
/* 13 */ 188, 72, 159, 43, 144, 28, 139, 23,
/* 14 */ 134, 18, 129, 13, 134, 18, 129, 13,
/* 15 */ 134, 18, 129, 13, 134, 18, 129, 13,
/* 16 */ 124, 8, 119, 3, 124, 8, 119, 3,
/* 17 */ 124, 8, 119, 3, 124, 8, 119, 3,
/* -- Q1 -- */
/* 0 */ 229, 229, 229, 229, 113, 113, 113, 24,
/* 1 */ 24, 34, 140, 224, 83, 119, 119, 119,
/* 2 */ 113, 224, 108, 224, 224, 108, 108, 108,
/* 3 */ 219, 103, 214, 98, 219, 103, 214, 98,
/* 4 */ 219, 103, 214, 98, 219, 103, 214, 98,
/* 5 */ 209, 93, 204, 88, 189, 73, 160, 44,
/* 6 */ 189, 73, 160, 44, 155, 39, 150, 34,
/* 7 */ 155, 39, 150, 34, 155, 39, 150, 34,
/* 8 */ 155, 39, 150, 145, 29, 140, 145, 29,
/* 9 */ 145, 29, 140, 24, 209, 93, 204, 88,
/* 10 */ 209, 93, 204, 88, 209, 93, 204, 88,
/* 11 */ 194, 78, 83, 194, 78, 83, 194, 78,
/* 12 */ 199, 83, 194, 78, 189, 73, 160, 44,
/* 13 */ 189, 73, 160, 44, 145, 29, 140, 24,
/* 14 */ 135, 19, 130, 14, 135, 19, 130, 14,
/* 15 */ 135, 19, 130, 14, 135, 19, 130, 14,
/* 16 */ 125, 9, 120, 4, 125, 9, 120, 4,
/* 17 */ 125, 9, 120, 4, 125, 9, 120, 4,
/* -- Q0 -- */
/* 0 */ 230, 230, 230, 230, 114, 114, 114, 25,
/* 1 */ 25, 35, 141, 225, 84, 200, 200, 200,
/* 2 */ 114, 225, 109, 225, 225, 109, 109, 109,
/* 3 */ 220, 104, 215, 99, 220, 104, 215, 99,
/* 4 */ 220, 104, 215, 99, 220, 104, 215, 99,
/* 5 */ 210, 94, 205, 89, 190, 74, 161, 45,
/* 6 */ 190, 74, 161, 45, 156, 40, 151, 35,
/* 7 */ 156, 40, 151, 35, 156, 40, 151, 35,
/* 8 */ 156, 40, 151, 146, 30, 141, 146, 30,
/* 9 */ 146, 30, 141, 25, 210, 94, 205, 89,
/* 10 */ 210, 94, 205, 89, 210, 94, 205, 89,
/* 11 */ 195, 79, 84, 195, 79, 84, 195, 79,
/* 12 */ 200, 84, 195, 79, 190, 74, 161, 45,
/* 13 */ 190, 74, 161, 45, 146, 30, 141, 25,
/* 14 */ 136, 20, 131, 15, 136, 20, 131, 15,
/* 15 */ 136, 20, 131, 15, 136, 20, 131, 15,
/* 16 */ 126, 10, 121, 5, 126, 10, 121, 5,
/* 17 */ 126, 10, 121, 5, 126, 10, 121, 5
};
/*
* This table is for internal reference
*
* pintable_internal[]= {
* -- Q0 --
* 0 143,143,143,143,139,139,139,35
* 1 35,51,39,135,91,95,95,95
* 2 139,135,131,135,135,131,131,131
* 3 127,123,119,115,127,123,119,115
* 4 127,123,119,115,127,123,119,115
* 5 111,107,103,99,79,75,71,67
* 6 79,75,71,67,63,59,55,51
* 7 63,59,55,51,63,59,55,51
* 8 63,59,55,47,43,39,47,43
* 9 47,43,39,35,111,107,103,99
* 10 111,107,103,99,111,107,103,99
* 11 87,83,91,87,83,91,87,83
* 12 95,91,87,83,79,75,71,67
* 13 79,75,71,67,47,43,39,35
* 14 31,27,23,19,31,27,23,19
* 15 31,27,23,19,31,27,23,19
* 16 15,11,7,3,15,11,7,3
* 17 15,11,7,3,15,11,7,3
* }
*/
char *dimm_Jno[] = {
/* P0 */ "J13300", "J13400", "J13500", "J13600",
"J13301", "J13401", "J13501", "J13601",
/* P1 */ "J14300", "J14400", "J14500", "J14600",
"J14301", "J14401", "J14501", "J14601",
/* P2 */ "J15300", "J15400", "J15500", "J15600",
"J15301", "J15401", "J15501", "J15601",
/* P3 */ "J16300", "J16400", "J16500", "J16600",
"J16301", "J16401", "J16501", "J16601",
};
static uint8_t *
{
*len = 0;
return (NULL);
}
}
static char *
{
char *buffer;
char *status;
switch (rsv) {
case RSV_UNKNOWN:
buffer = "unknown";
break;
case RSV_PRESENT:
buffer = "okay";
break;
case RSV_CRUNCH:
buffer = "disabled";
break;
case RSV_UNDEFINED:
buffer = "undefined";
break;
case RSV_MISS:
buffer = "missing";
break;
case RSV_EMPTY_CASSETTE:
buffer = "disabled";
break;
case RSV_MISCONFIG:
buffer = "misconfigured";
break;
case RSV_FAIL_OBP:
buffer = "fail-obp";
break;
case RSV_BLACK:
buffer = "blacklisted";
break;
case RSV_RED:
buffer = "redlisted";
break;
case RSV_EXCLUDED:
buffer = "disabled";
break;
case RSV_UNCONFIG:
buffer = "disabled";
break;
case RSV_PASS:
buffer = "okay";
break;
case RSV_FAIL:
default:
buffer = "fail";
break;
}
return (status);
}