arch/mips/include/asm/sn/klconfig.h

Source file repositories/reference/linux-study-clean/arch/mips/include/asm/sn/klconfig.h

File Facts

System
Linux kernel
Corpus path
arch/mips/include/asm/sn/klconfig.h
Extension
.h
Size
30637 bytes
Lines
895
Domain
Architecture Layer
Bucket
arch/mips
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef _ASM_SN_KLCONFIG_H
#define _ASM_SN_KLCONFIG_H

/*
 * The KLCONFIG structures store info about the various BOARDs found
 * during Hardware Discovery. In addition, it stores info about the
 * components found on the BOARDs.
 */

/*
 * WARNING:
 *	Certain assembly language routines (notably xxxxx.s) in the IP27PROM
 *	will depend on the format of the data structures in this file.	In
 *	most cases, rearranging the fields can seriously break things.
 *	Adding fields in the beginning or middle can also break things.
 *	Add fields if necessary, to the end of a struct in such a way
 *	that offsets of existing fields do not change.
 */

#include <linux/types.h>
#include <asm/sn/types.h>

#if defined(CONFIG_SGI_IP27)

#include <asm/sn/sn0/addrs.h>
//#include <sys/SN/router.h>
// XXX Stolen from <sys/SN/router.h>:
#define MAX_ROUTER_PORTS (6)	/* Max. number of ports on a router */
#include <asm/sn/fru.h>
//#include <sys/graph.h>
//#include <sys/xtalk/xbow.h>

#elif defined(CONFIG_SGI_IP35)

#include <asm/sn/sn1/addrs.h>
#include <sys/sn/router.h>
#include <sys/graph.h>
#include <asm/xtalk/xbow.h>

#endif /* !CONFIG_SGI_IP27 && !CONFIG_SGI_IP35 */

#if defined(CONFIG_SGI_IP27) || defined(CONFIG_SGI_IP35)
#include <asm/sn/agent.h>
#include <asm/fw/arc/types.h>
#include <asm/fw/arc/hinv.h>
#if defined(CONFIG_SGI_IP35)
// The hack file has to be before vector and after sn0_fru....
#include <asm/hack.h>
#include <asm/sn/vector.h>
#include <asm/xtalk/xtalk.h>
#endif /* CONFIG_SGI_IP35 */
#endif /* CONFIG_SGI_IP27 || CONFIG_SGI_IP35 */

typedef u64  nic_t;

#define KLCFGINFO_MAGIC 0xbeedbabe

typedef s32 klconf_off_t;

/*
 * Some IMPORTANT OFFSETS. These are the offsets on all NODES.
 */
#define MAX_MODULE_ID		255
#define SIZE_PAD		4096 /* 4k padding for structures */
/*
 * 1 NODE brd, 2 Router brd (1 8p, 1 meta), 6 Widgets,
 * 2 Midplanes assuming no pci card cages
 */
#define MAX_SLOTS_PER_NODE	(1 + 2 + 6 + 2)

/* XXX if each node is guaranteed to have some memory */

#define MAX_PCI_DEVS		8

/* lboard_t->brd_flags fields */
/* All bits in this field are currently used. Try the pad fields if
   you need more flag bits */

#define ENABLE_BOARD		0x01
#define FAILED_BOARD		0x02
#define DUPLICATE_BOARD		0x04	/* Boards like midplanes/routers which
					   are discovered twice. Use one of them */
#define VISITED_BOARD		0x08	/* Used for compact hub numbering. */
#define LOCAL_MASTER_IO6	0x10	/* master io6 for that node */
#define GLOBAL_MASTER_IO6	0x20
#define THIRD_NIC_PRESENT	0x40	/* for future use */
#define SECOND_NIC_PRESENT	0x80	/* addons like MIO are present */

/* klinfo->flags fields */

Annotation

Implementation Notes