diff options
Diffstat (limited to 'usr/src/lib/libprtdiag/inc/pdevinfo_sun4u.h')
-rw-r--r-- | usr/src/lib/libprtdiag/inc/pdevinfo_sun4u.h | 113 |
1 files changed, 18 insertions, 95 deletions
diff --git a/usr/src/lib/libprtdiag/inc/pdevinfo_sun4u.h b/usr/src/lib/libprtdiag/inc/pdevinfo_sun4u.h index 7273d62b8d..c4038e4535 100644 --- a/usr/src/lib/libprtdiag/inc/pdevinfo_sun4u.h +++ b/usr/src/lib/libprtdiag/inc/pdevinfo_sun4u.h @@ -22,68 +22,45 @@ /* * Copyright (c) 1999 by Sun Microsystems, Inc. * All rights reserved. + * Copyright (c) 2020 Peter Tribble. */ #ifndef _PDEVINFO_SUN4U_H #define _PDEVINFO_SUN4U_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/obpdefs.h> -#include <sys/fhc.h> -#include <sys/sysctrl.h> -#include <sys/environ.h> #include <sys/envctrl_gen.h> #include <sys/envctrl_ue250.h> #include <sys/envctrl_ue450.h> -#include <sys/simmstat.h> -#include <sys/ac.h> -#include <sys/sram.h> -#include <reset_info.h> #ifdef __cplusplus extern "C" { #endif -#define UNIX "unix" +/* + * These were formerly defined in sys/ac.h, which was specific to sunfire, + * but usage has leaked into generic code. + */ +#ifndef TRUE +#define TRUE (1) +#endif +#ifndef FALSE +#define FALSE (0) +#endif + +/* + * These were formerly defined as part of the board_type enum in sys/fhc.h, + * which was specific to sunfire, but usage has leaked into generic code. + */ +#define UNKNOWN_BOARD 1 +#define CPU_BOARD 2 /* Define names of nodes to search for */ -#define CPU_NAME "SUNW,UltraSPARC" #define SBUS_NAME "sbus" #define PCI_NAME "pci" #define FFB_NAME "SUNW,ffb" #define AFB_NAME "SUNW,afb" -struct mem_stat_data { - enum ac_bank_status status; /* bank status values */ - enum ac_bank_condition condition; /* bank conditions */ -}; - -struct bd_kstat_data { - u_longlong_t ac_memctl; /* Memctl register contents */ - u_longlong_t ac_memdecode[2]; /* memory decode registers . */ - int ac_kstats_ok; /* successful kstat read occurred */ - uint_t fhc_bsr; /* FHC Board Status Register */ - uint_t fhc_csr; /* FHC Control Status Register */ - int fhc_kstats_ok; /* successful kstat read occurred */ - uchar_t simm_status[SIMM_COUNT]; /* SIMM status */ - int simmstat_kstats_ok; /* successful read occurred */ - struct temp_stats tempstat; - int temp_kstat_ok; - struct mem_stat_data mem_stat[2]; /* raw kstat bank information */ - int ac_memstat_ok; /* successful read of memory status */ -}; - -/* - * Hot plug info structure. If a hotplug kstat is found, the bd_info - * structure from the kstat is filled in the the hp_info structure - * is marked OK. - */ -struct hp_info { - struct bd_info bd_info; - int kstat_ok; -}; - /* Environmental info for Tazmo */ struct envctrl_kstat_data { envctrl_ps_t ps_kstats[MAX_DEVS]; /* kstats for powersupplies */ @@ -106,69 +83,15 @@ struct envctrltwo_kstat_data { }; struct system_kstat_data { - uchar_t sysctrl; /* sysctrl register contents */ - uchar_t sysstat1; /* system status1 register contents. */ - uchar_t sysstat2; /* system status2 register contents. */ - uchar_t ps_shadow[SYS_PS_COUNT]; /* power supply shadow */ - int psstat_kstat_ok; - uchar_t clk_freq2; /* clock frequency register 2 contents */ - uchar_t fan_status; /* shadow fan status */ - uchar_t keysw_status; /* status of the key switch */ - enum power_state power_state; /* redundant power state */ - uchar_t clk_ver; /* clock version register */ int sys_kstats_ok; /* successful kstat read occurred */ - struct temp_stats tempstat; - int temp_kstat_ok; - struct reset_info reset_info; - int reset_kstats_ok; /* kstat read OK */ - struct bd_kstat_data bd_ksp_list[MAX_BOARDS]; - struct hp_info hp_info[MAX_BOARDS]; - struct ft_list *ft_array; /* fault array */ - int nfaults; /* number of faults in fault array */ - int ft_kstat_ok; /* Fault kstats OK */ struct envctrl_kstat_data env_data; /* environment data for Tazmo */ int envctrl_kstat_ok; struct envctrltwo_kstat_data envc_data; /* environ data for Javelin */ int envctrltwo_kstat_ok; }; -/* Description of a single memory group */ -struct grp { - int valid; /* active memory group present */ - u_longlong_t base; /* Phyiscal base of group */ - uint_t size; /* size in bytes */ - uint_t curr_size; /* current size in bytes */ - int board; /* board number */ - enum board_type type; /* board type */ - int group; /* group # on board (0 or 1) */ - int factor; /* interleave factor (0,2,4,8,16) */ - int speed; /* Memory speed (in ns) */ - char groupid; /* Alpha tag for group ID */ - enum ac_bank_status status; /* bank status values */ - enum ac_bank_condition condition; /* bank conditions */ -}; - -#define MAX_GROUPS 32 #define MAXSTRLEN 256 -/* Array of all possible groups in the system. */ -struct grp_info { - struct grp grp[MAX_GROUPS]; -}; - -/* A memory interleave structure */ -struct inter_grp { - u_longlong_t base; /* Physical base of group */ - int valid; - int count; - char groupid; -}; - -/* Array of all possible memory interleave structures */ -struct mem_inter { - struct inter_grp i_grp[MAX_GROUPS]; -}; - /* FFB info structure */ struct ffbinfo { int board; |