⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 voyager.h

📁 linux 内核源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
#	define PSI_CURRENT		0x10#	define PSI_DVM			0x20#	define PSI_PSCFAULT		0x40#	define PSI_STAT_CHG		0x80#define VOYAGER_PSI_SUPPLY_REG		0x8000	/* read */#	define PSI_FAIL_DC		0x01#	define PSI_FAIL_AC		0x02#	define PSI_MON_INT		0x04#	define PSI_SWITCH_OFF		0x08#	define PSI_HX_OFF		0x10#	define PSI_SECURITY		0x20#	define PSI_CMOS_BATT_LOW	0x40#	define PSI_CMOS_BATT_FAIL	0x80	/* write */#	define PSI_CLR_SWITCH_OFF	0x13#	define PSI_CLR_HX_OFF		0x14#	define PSI_CLR_CMOS_BATT_FAIL	0x17#define VOYAGER_PSI_MASK		0x8001#	define PSI_MASK_MASK		0x10#define VOYAGER_PSI_AC_FAIL_REG		0x8004#define	AC_FAIL_STAT_CHANGE		0x80#define VOYAGER_PSI_GENERAL_REG		0x8007	/* read */#	define PSI_SWITCH_ON		0x01#	define PSI_SWITCH_ENABLED	0x02#	define PSI_ALARM_ENABLED	0x08#	define PSI_SECURE_ENABLED	0x10#	define PSI_COLD_RESET		0x20#	define PSI_COLD_START		0x80	/* write */#	define PSI_POWER_DOWN		0x10#	define PSI_SWITCH_DISABLE	0x01#	define PSI_SWITCH_ENABLE	0x11#	define PSI_CLEAR		0x12#	define PSI_ALARM_DISABLE	0x03#	define PSI_ALARM_ENABLE		0x13#	define PSI_CLEAR_COLD_RESET	0x05#	define PSI_SET_COLD_RESET	0x15#	define PSI_CLEAR_COLD_START	0x07#	define PSI_SET_COLD_START	0x17struct voyager_bios_info {	__u8	len;	__u8	major;	__u8	minor;	__u8	debug;	__u8	num_classes;	__u8	class_1;	__u8	class_2;};/* The following structures and definitions are for the Kernel/SUS * interface these are needed to find out how SUS initialised any Quad * boards in the system */#define	NUMBER_OF_MC_BUSSES	2#define SLOTS_PER_MC_BUS	8#define MAX_CPUS                16      /* 16 way CPU system */#define MAX_PROCESSOR_BOARDS	4	/* 4 processor slot system */#define MAX_CACHE_LEVELS	4	/* # of cache levels supported */#define MAX_SHARED_CPUS		4	/* # of CPUs that can share a LARC */#define NUMBER_OF_POS_REGS	8typedef struct {	__u8	MC_Slot;	__u8	POS_Values[NUMBER_OF_POS_REGS];} __attribute__((packed)) MC_SlotInformation_t;struct QuadDescription {	__u8  Type;	/* for type 0 (DYADIC or MONADIC) all fields                         * will be zero except for slot */	__u8 StructureVersion;	__u32 CPI_BaseAddress;	__u32  LARC_BankSize;	__u32 LocalMemoryStateBits;	__u8  Slot; /* Processor slots 1 - 4 */} __attribute__((packed));struct ProcBoardInfo { 	__u8 Type;	__u8 StructureVersion;	__u8 NumberOfBoards;	struct QuadDescription QuadData[MAX_PROCESSOR_BOARDS];} __attribute__((packed));struct CacheDescription {	__u8 Level;	__u32 TotalSize;	__u16 LineSize;	__u8  Associativity;	__u8  CacheType;	__u8  WriteType;	__u8  Number_CPUs_SharedBy;	__u8  Shared_CPUs_Hardware_IDs[MAX_SHARED_CPUS];} __attribute__((packed));struct CPU_Description {	__u8 CPU_HardwareId;	char *FRU_String;	__u8 NumberOfCacheLevels;	struct CacheDescription CacheLevelData[MAX_CACHE_LEVELS];} __attribute__((packed));struct CPU_Info {	__u8 Type;	__u8 StructureVersion;	__u8 NumberOf_CPUs;	struct CPU_Description CPU_Data[MAX_CPUS];} __attribute__((packed));/* * This structure will be used by SUS and the OS. * The assumption about this structure is that no blank space is * packed in it by our friend the compiler. */typedef struct {	__u8	Mailbox_SUS;		/* Written to by SUS to give commands/response to the OS */	__u8	Mailbox_OS;		/* Written to by the OS to give commands/response to SUS */	__u8	SUS_MailboxVersion;	/* Tells the OS which iteration of the interface SUS supports */	__u8	OS_MailboxVersion;	/* Tells SUS which iteration of the interface the OS supports */	__u32	OS_Flags;		/* Flags set by the OS as info for SUS */	__u32	SUS_Flags;		/* Flags set by SUS as info for the OS */	__u32	WatchDogPeriod;		/* Watchdog period (in seconds) which the DP uses to see if the OS is dead */	__u32	WatchDogCount;		/* Updated by the OS on every tic. */	__u32	MemoryFor_SUS_ErrorLog;	/* Flat 32 bit address which tells SUS where to stuff the SUS error log on a dump */	MC_SlotInformation_t  MC_SlotInfo[NUMBER_OF_MC_BUSSES*SLOTS_PER_MC_BUS];	/* Storage for MCA POS data */	/* All new SECOND_PASS_INTERFACE fields added from this point */        struct ProcBoardInfo    *BoardData;        struct CPU_Info         *CPU_Data;	/* All new fields must be added from this point */} Voyager_KernelSUS_Mbox_t;/* structure for finding the right memory address to send a QIC CPI to */struct voyager_qic_cpi {	/* Each cache line (32 bytes) can trigger a cpi.  The cpi	 * read/write may occur anywhere in the cache line---pick the	 * middle to be safe */	struct  {		__u32 pad1[3];		__u32 cpi;		__u32 pad2[4];	} qic_cpi[8];};struct voyager_status {	__u32	power_fail:1;	__u32	switch_off:1;	__u32	request_from_kernel:1;};struct voyager_psi_regs {	__u8 cat_id;	__u8 cat_dev;	__u8 cat_control;	__u8 subaddr;	__u8 dummy4;	__u8 checkbit;	__u8 subaddr_low;	__u8 subaddr_high;	__u8 intstatus;	__u8 stat1;	__u8 stat3;	__u8 fault;	__u8 tms;	__u8 gen;	__u8 sysconf;	__u8 dummy15;};struct voyager_psi_subregs {	__u8 supply;	__u8 mask;	__u8 present;	__u8 DCfail;	__u8 ACfail;	__u8 fail;	__u8 UPSfail;	__u8 genstatus;};struct voyager_psi {	struct voyager_psi_regs regs;	struct voyager_psi_subregs subregs;};struct voyager_SUS {#define	VOYAGER_DUMP_BUTTON_NMI		0x1#define VOYAGER_SUS_VALID		0x2#define VOYAGER_SYSINT_COMPLETE		0x3	__u8	SUS_mbox;#define VOYAGER_NO_COMMAND		0x0#define VOYAGER_IGNORE_DUMP		0x1#define VOYAGER_DO_DUMP			0x2#define VOYAGER_SYSINT_HANDSHAKE	0x3#define VOYAGER_DO_MEM_DUMP		0x4#define VOYAGER_SYSINT_WAS_RECOVERED	0x5	__u8	kernel_mbox;#define	VOYAGER_MAILBOX_VERSION		0x10	__u8	SUS_version;	__u8	kernel_version;#define VOYAGER_OS_HAS_SYSINT		0x1#define VOYAGER_OS_IN_PROGRESS		0x2#define VOYAGER_UPDATING_WDPERIOD	0x4	__u32	kernel_flags;#define VOYAGER_SUS_BOOTING		0x1#define VOYAGER_SUS_IN_PROGRESS		0x2	__u32	SUS_flags;	__u32	watchdog_period;	__u32	watchdog_count;	__u32	SUS_errorlog;	/* lots of system configuration stuff under here */};	/* Variables exported by voyager_smp */extern __u32 voyager_extended_vic_processors;extern __u32 voyager_allowed_boot_processors;extern __u32 voyager_quad_processors;extern struct voyager_qic_cpi *voyager_quad_cpi_addr[NR_CPUS];extern struct voyager_SUS *voyager_SUS;/* variables exported always */extern struct task_struct *voyager_thread;extern int voyager_level;extern struct voyager_status voyager_status;/* functions exported by the voyager and voyager_smp modules */extern int voyager_cat_readb(__u8 module, __u8 asic, int reg);extern void voyager_cat_init(void);extern void voyager_detect(struct voyager_bios_info *);extern void voyager_trap_init(void);extern void voyager_setup_irqs(void);extern int voyager_memory_detect(int region, __u32 *addr, __u32 *length);extern void voyager_smp_intr_init(void);extern __u8 voyager_extended_cmos_read(__u16 cmos_address);extern void voyager_smp_dump(void);extern void voyager_timer_interrupt(void);extern void smp_local_timer_interrupt(void);extern void voyager_power_off(void);extern void smp_voyager_power_off(void *dummy);extern void voyager_restart(void);extern void voyager_cat_power_off(void);extern void voyager_cat_do_common_interrupt(void);extern void voyager_handle_nmi(void);/* Commands for the following are */#define	VOYAGER_PSI_READ	0#define VOYAGER_PSI_WRITE	1#define VOYAGER_PSI_SUBREAD	2#define VOYAGER_PSI_SUBWRITE	3extern void voyager_cat_psi(__u8, __u16, __u8 *);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -