nb_log.h revision 5de8e333fea6455895155795aae363a0737b8e8e
/*
* 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.
*/
#ifndef _NB_LOG_H
#define _NB_LOG_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/cpu_module.h>
#include "nb5000.h"
#define NB_MAX_ERRORS 4
/* North Bridge front side bus error registers */
typedef struct nb_fsb_regs {
/* PCI express ESI (South Bridge) error registers */
typedef struct nb_pex_regs {
/* North Bridge memory controller hub internal error registers */
typedef struct nb_int {
} nb_int_t;
/* memory errors */
typedef struct nb_fat_fbd {
} nb_fat_fbd_t;
typedef struct nb_nf_fbd {
} nb_nf_fbd_t;
typedef struct nb_dma {
} nb_dma_t;
typedef struct nb_regs {
int flag;
union {
} nb;
} nb_regs_t;
#define NB_REG_LOG_FREE 0
#define NB_REG_LOG_FSB 1
#define NB_REG_LOG_PEX 2
#define NB_REG_LOG_INT 3
#define NB_REG_LOG_FAT_FBD 4
#define NB_REG_LOG_NF_FBD 5
#define NB_REG_LOG_DMA 6
typedef struct nb_logout {
char *type;
} nb_logout_t;
typedef struct nb_mem_scatchpad {
int intel_error_list; /* error number in Chipset Error List */
int branch;
int channel;
int rank;
int dimm;
int bank;
int cas;
int ras;
typedef union nb_scatchpad {
int intel_error_list; /* error number in Chipset Error List */
typedef struct nb_dimm {
char part_number[16];
char revision[2];
char label[64];
} nb_dimm_t;
typedef struct bank_select {
typedef struct rank_select {
extern int nb_5000_memory_controller;
extern int nb_number_memory_controllers;
extern int nb_dimms_per_channel;
extern uint32_t nb_chipset;
extern int nb_init(void);
extern int nb_dev_init(void);
extern void nb_dev_reinit(void);
extern void nb_unload(void);
extern void nb_dev_unload(void);
extern uint32_t top_of_low_memory;
extern enum nb_memory_mode nb_mode;
extern int inb_mc_register(cmi_hdl_t, void *, void *, void *);
extern void nb_scrubber_enable(void);
extern void nb_pci_cfg_setup(dev_info_t *);
extern void nb_pci_cfg_free(void);
extern void *ras_regs;
extern uint8_t nb_pci_getb(int, int, int, int, int *);
extern uint16_t nb_pci_getw(int, int, int, int, int *);
extern uint32_t nb_pci_getl(int, int, int, int, int *);
extern void nb_pci_putb(int, int, int, int, uint8_t);
extern void nb_pci_putw(int, int, int, int, uint16_t);
extern void nb_pci_putl(int, int, int, int, uint32_t);
extern void nb_fsb_mask_mc(int, uint16_t);
extern void nb_fbd_mask_mc(uint32_t);
extern void nb_int_mask_mc(uint8_t);
extern void nb_mask_mc_reset(void);
extern int nb_mask_mc_set;
extern void nb_drain(void *, const void *, const errorq_elem_t *);
extern void nb_used_spare_rank(int, int);
extern uint_t nb_config_gen;
#ifdef __cplusplus
}
#endif
#endif /* _NB_LOG_H */