cmd_state.c revision 6dfee4834394825da35b977ca71cdc965bc7b6a4
/*
* 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"
/*
* Case management and saved state restoration
*/
#include <cmd_state.h>
#include <cmd_cpu.h>
#include <cmd_mem.h>
#include <cmd_page.h>
#include <cmd_dimm.h>
#include <cmd_bank.h>
#include <cmd.h>
#include <string.h>
/* Must be in sync with cmd_ptrsubtype_t */
static cmd_case_closer_f *const cmd_case_closers[] = {
NULL,
cmd_cpuerr_close, /* CMD_PTR_CPU_ICACHE */
cmd_cpuerr_close, /* CMD_PTR_CPU_DCACHE */
cmd_cpuerr_close, /* CMD_PTR_CPU_PCACHE */
cmd_cpuerr_close, /* CMD_PTR_CPU_ITLB */
cmd_cpuerr_close, /* CMD_PTR_CPU_DTLB */
cmd_cpuerr_close, /* CMD_PTR_CPU_L2DATA */
cmd_cpuerr_close, /* CMD_PTR_CPU_L2DATA_UERETRY */
cmd_cpuerr_close, /* CMD_PTR_CPU_L2TAG */
cmd_cpuerr_close, /* CMD_PTR_CPU_L3DATA */
cmd_cpuerr_close, /* CMD_PTR_CPU_L3DATA_UERETRY */
cmd_cpuerr_close, /* CMD_PTR_CPU_L3TAG */
cmd_dimm_close, /* CMD_PTR_DIMM_CASE */
cmd_bank_close, /* CMD_PTR_BANK_CASE */
cmd_page_close, /* CMD_PTR_PAGE_CASE */
cmd_cpuerr_close, /* CMD_PTR_CPU_FPU */
NULL, /* CMD_PTR_CPU_XR_RETRY */
cmd_cpuerr_close, /* CMD_PTR_CPU_IREG */
cmd_cpuerr_close, /* CMD_PTR_CPU_FREG */
cmd_cpuerr_close, /* CMD_PTR_CPU_MAU */
cmd_cpuerr_close /* CMD_PTR_CPU_L2CTL */
};
const char **uuidp)
{
fmd_case_t *cp;
return (cp);
}
void
{
}
void
{
if (close) {
}
}
/* Must be in sync with cmd_nodetype_t */
static cmd_case_restorer_f *const cmd_case_restorers[] = {
NULL,
cmd_cpu_restore, /* CMD_NT_CPU */
cmd_dimm_restore, /* CMD_NT_DIMM */
cmd_bank_restore, /* CMD_NT_BANK */
cmd_page_restore /* CMD_NT_PAGE */
};
int
{
void *thing;
continue;
else if (sz != sizeof (cmd_case_ptr_t))
return (cmd_set_errno(EINVAL));
sizeof (cmd_case_ptr_t));
sizeof (cmd_case_restorers) /
sizeof (cmd_case_restorer_f *))
return (cmd_set_errno(EINVAL));
return (-1); /* errno is set for us */
}
return (0);
}
void
{
}
}