亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? l1_command.c

?? 根據(jù)添加了fs2410平臺(tái)的arch目錄
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
/* $Id$ * * This file is subject to the terms and conditions of the GNU General Public * License.  See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 1992 - 1997, 2000 Silicon Graphics, Inc. * Copyright (C) 2000 by Colin Ngam */ #include <linux/types.h>#include <linux/slab.h>#include <asm/sn/sgi.h>#include <asm/sn/iograph.h>#include <asm/sn/invent.h>#include <asm/sn/hcl.h>#include <asm/sn/hcl_util.h>#include <asm/sn/labelcl.h>#include <asm/sn/eeprom.h>#include <asm/sn/ksys/i2c.h>#include <asm/sn/router.h>#include <asm/sn/module.h>#include <asm/sn/ksys/l1.h>#include <asm/sn/nodepda.h>#include <asm/sn/clksupport.h>#define ELSC_TIMEOUT	1000000		/* ELSC response timeout (usec) */#define LOCK_TIMEOUT	5000000		/* Hub lock timeout (usec) */#define LOCAL_HUB	LOCAL_HUB_ADDR#define LD(x)		(*(volatile uint64_t *)(x))#define SD(x, v)	(LD(x) = (uint64_t) (v))#define hub_cpu_get()	0#define LBYTE(caddr)	(*(char *) caddr)extern char *bcopy(const char * src, char * dest, int count);#define LDEBUG		0/* * ELSC data is in NVRAM page 7 at the following offsets. */#define NVRAM_MAGIC_AD	0x700		/* magic number used for init */#define NVRAM_PASS_WD	0x701		/* password (4 bytes in length) */#define NVRAM_DBG1	0x705		/* virtual XOR debug switches */#define NVRAM_DBG2	0x706		/* physical XOR debug switches */#define NVRAM_CFG	0x707		/* ELSC Configuration info */#define NVRAM_MODULE	0x708		/* system module number */#define NVRAM_BIST_FLG	0x709		/* BIST flags (2 bits per nodeboard) */#define NVRAM_PARTITION 0x70a		/* module's partition id */#define	NVRAM_DOMAIN	0x70b		/* module's domain id */#define	NVRAM_CLUSTER	0x70c		/* module's cluster id */#define	NVRAM_CELL	0x70d		/* module's cellid */#define NVRAM_MAGIC_NO	0x37		/* value of magic number */#define NVRAM_SIZE	16		/* 16 bytes in nvram *//* * Declare a static ELSC NVRAM buffer to hold all data read from * and written to NVRAM.  This nvram "cache" will be used only during the * IP27prom execution. */static char elsc_nvram_buffer[NVRAM_SIZE];#define SC_COMMAND sc_command/* * elsc_init * *   Initialize ELSC structure */void elsc_init(elsc_t *e, nasid_t nasid){    sc_init((l1sc_t *)e, nasid, BRL1_LOCALUART);}/* * elsc_errmsg * *   Given a negative error code, *   returns a corresponding static error string. */char *elsc_errmsg(int code){    switch (code) {    case ELSC_ERROR_CMD_SEND:	return "Command send error";    case ELSC_ERROR_CMD_CHECKSUM:	return "Command packet checksum error";    case ELSC_ERROR_CMD_UNKNOWN:	return "Unknown command";    case ELSC_ERROR_CMD_ARGS:	return "Invalid command argument(s)";    case ELSC_ERROR_CMD_PERM:	return "Permission denied";    case ELSC_ERROR_RESP_TIMEOUT:	return "System controller response timeout";    case ELSC_ERROR_RESP_CHECKSUM:	return "Response packet checksum error";    case ELSC_ERROR_RESP_FORMAT:	return "Response format error";    case ELSC_ERROR_RESP_DIR:	return "Response direction error";    case ELSC_ERROR_MSG_LOST:	return "Message lost because queue is full";    case ELSC_ERROR_LOCK_TIMEOUT:	return "Timed out getting ELSC lock";    case ELSC_ERROR_DATA_SEND:	return "Error sending data";    case ELSC_ERROR_NIC:	return "NIC protocol error";    case ELSC_ERROR_NVMAGIC:	return "Bad magic number in NVRAM";    case ELSC_ERROR_MODULE:	return "Module location protocol error";    default:	return "Unknown error";    }}/* * elsc_nvram_init * *   Initializes reads and writes to NVRAM.  This will perform a single *   read to NVRAM, getting all data at once.  When the PROM tries to *   read NVRAM, it returns the data from the buffer being read.  If the *   PROM tries to write out to NVRAM, the write is done, and the internal *   buffer is updated. */void elsc_nvram_init(nasid_t nasid, uchar_t *elsc_nvram_data){    /* This might require implementation of multiple-packet request/responses     * if it's to provide the same behavior that was available in SN0.     */    nasid = nasid;    elsc_nvram_data = elsc_nvram_data;}/* * elsc_nvram_copy * *   Copies the content of a buffer into the static buffer in this library. */void elsc_nvram_copy(uchar_t *elsc_nvram_data){    memcpy(elsc_nvram_buffer, elsc_nvram_data, NVRAM_SIZE);}/* * elsc_nvram_write * *   Copies bytes from 'buf' into NVRAM, starting at NVRAM address *   'addr' which must be between 0 and 2047. * *   If 'len' is non-negative, the routine copies 'len' bytes. * *   If 'len' is negative, the routine treats the data as a string and *   copies bytes up to and including a NUL-terminating zero, but not *   to exceed '-len' bytes. */int elsc_nvram_write(elsc_t *e, int addr, char *buf, int len){    /* Here again, we might need to work out the details of a     * multiple-packet protocol.     */    /* For now, pretend it worked. */    e = e;    addr = addr;    buf = buf;    return (len < 0 ? -len : len);}/* * elsc_nvram_read * *   Copies bytes from NVRAM into 'buf', starting at NVRAM address *   'addr' which must be between 0 and 2047. * *   If 'len' is non-negative, the routine copies 'len' bytes. * *   If 'len' is negative, the routine treats the data as a string and *   copies bytes up to and including a NUL-terminating zero, but not *   to exceed '-len' bytes.  NOTE:  This method is no longer supported. *   It was never used in the first place. */int elsc_nvram_read(elsc_t *e, int addr, char *buf, int len){    /* multiple packets? */    e = e;    addr = addr;    buf = buf;    len = len;    return -1;}/* * Command Set */int elsc_version(elsc_t *e, char *result){    char	msg[BRL1_QSIZE];    int		len;    /* length of message being sent */    int		subch;  /* system controller subchannel used */    int		major,  /* major rev number */	        minor,  /* minor rev number */                bugfix; /* bugfix rev number */    /* fill in msg with the opcode & params */    bzero( msg, BRL1_QSIZE );    subch = sc_open( (l1sc_t *)e, L1_ADDR_LOCAL );    if( (len = sc_construct_msg( (l1sc_t *)e, subch, msg, BRL1_QSIZE,				 L1_ADDR_TASK_GENERAL,				 L1_REQ_FW_REV, 0 )) < 0 )    {	sc_close( e, subch );	return( ELSC_ERROR_CMD_ARGS );    }    /* send the request to the L1 */    if( SC_COMMAND( (l1sc_t *)e, subch, msg, msg, &len ) < 0 )    {	sc_close( e, subch );	return( ELSC_ERROR_CMD_SEND );    }    /* free up subchannel */    sc_close( (l1sc_t *)e, subch );    /* check response */    if( sc_interpret_resp( msg, 6, L1_ARG_INT, &major,			   L1_ARG_INT, &minor, L1_ARG_INT, &bugfix )	< 0 )    {	return( ELSC_ERROR_RESP_FORMAT );    }    sprintf( result, "%d.%d.%d", major, minor, bugfix );    return 0;}int elsc_debug_set(elsc_t *e, u_char byte1, u_char byte2){    /* shush compiler */    e = e;    byte1 = byte1;    byte2 = byte2;    /* fill in a buffer with the opcode & params; call sc_command */    return 0;}int elsc_debug_get(elsc_t *e, u_char *byte1, u_char *byte2){    char	msg[BRL1_QSIZE];    int		subch;  /* system controller subchannel used */    int		dbg_sw; /* holds debug switch settings */    int		len;	/* number of msg buffer bytes used */    /* fill in msg with the opcode & params */    bzero( msg, BRL1_QSIZE );    if( (subch = sc_open( (l1sc_t *)e, L1_ADDR_LOCAL )) < 0 ) {	return( ELSC_ERROR_CMD_SEND );    }    if( (len = sc_construct_msg( (l1sc_t *)e, subch, msg, BRL1_QSIZE,				 L1_ADDR_TASK_GENERAL,				 L1_REQ_RDBG, 0 ) ) < 0 )    {	sc_close( e, subch );	return( ELSC_ERROR_CMD_ARGS );    }    /* send the request to the L1 */    if( sc_command( (l1sc_t *)e, subch, msg, msg, &len ) < 0 )    {	sc_close( e, subch );	return( ELSC_ERROR_CMD_SEND );    }    /* free up subchannel */    sc_close( (l1sc_t *)e, subch );    /* check response */    if( sc_interpret_resp( msg, 2, L1_ARG_INT, &dbg_sw ) < 0 )    {	return( ELSC_ERROR_RESP_FORMAT );    }    /* copy out debug switch settings (last two bytes of the     * integer response)     */    *byte1 = ((dbg_sw >> 8) & 0xFF);    *byte2 = (dbg_sw & 0xFF);    return 0;}/* * elsc_rack_bay_get fills in the two int * arguments with the * rack number and bay number of the L1 being addressed */int elsc_rack_bay_get(elsc_t *e, uint *rack, uint *bay){    char msg[BRL1_QSIZE];	/* L1 request/response info */    int subch;			/* system controller subchannel used */    int len;			/* length of message */    uint32_t	buf32;		/* used to copy 32-bit rack/bay out of msg */    /* fill in msg with the opcode & params */    bzero( msg, BRL1_QSIZE );    if( (subch = sc_open( (l1sc_t *)e, L1_ADDR_LOCAL )) < 0 ) {	return( ELSC_ERROR_CMD_SEND );    }    if( (len = sc_construct_msg( (l1sc_t *)e, subch, msg, BRL1_QSIZE,				 L1_ADDR_TASK_GENERAL,				 L1_REQ_RRACK, 0 )) < 0 )     {	sc_close( e, subch );	return( ELSC_ERROR_CMD_ARGS );    }    /* send the request to the L1 */    if( sc_command( (l1sc_t *)e, subch, msg, msg, &len ) ) {	sc_close( e, subch );	return( ELSC_ERROR_CMD_SEND );    }    /* free up subchannel */    sc_close(e, subch);    /* check response */    if( sc_interpret_resp( msg, 2, L1_ARG_INT, &buf32 ) < 0 )    {	return( ELSC_ERROR_RESP_FORMAT );    }    /* extract rack/bay info     *     * note that the 32-bit value returned by the L1 actually     * only uses the low-order sixteen bits for rack and bay     * information.  A "normal" L1 address puts rack and bay     * information in bit positions 12 through 28.  So if     * we initially shift the value returned 12 bits to the left,     * we can use the L1 addressing #define's to extract the     * values we need (see ksys/l1.h for a complete list of the     * various fields of an L1 address).     */    buf32 <<= L1_ADDR_BAY_SHFT;    *rack = (buf32 & L1_ADDR_RACK_MASK) >> L1_ADDR_RACK_SHFT;    *bay = (buf32 & L1_ADDR_BAY_MASK) >> L1_ADDR_BAY_SHFT;    return 0;}/* elsc_rack_bay_type_get fills in the three int * arguments with the * rack number, bay number and brick type of the L1 being addressed.  Note * that if the L1 operation fails and this function returns an error value,  * garbage may be written to brick_type. */int elsc_rack_bay_type_get( l1sc_t *sc, uint *rack, 			       uint *bay, uint *brick_type ){    char msg[BRL1_QSIZE];       /* L1 request/response info */    int subch;                  /* system controller subchannel used */    int len;                    /* length of message */    uint32_t buf32;	        /* used to copy 32-bit rack & bay out of msg */    /* fill in msg with the opcode & params */    bzero( msg, BRL1_QSIZE );    if( (subch = sc_open( sc, L1_ADDR_LOCAL )) < 0 ) {	return ELSC_ERROR_CMD_SEND;    }    if( (len = sc_construct_msg( sc, subch, msg, BRL1_QSIZE,				 L1_ADDR_TASK_GENERAL,				 L1_REQ_RRBT, 0 )) < 0 )    {	sc_close( sc, subch );	return( ELSC_ERROR_CMD_ARGS );    }    /* send the request to the L1 */    if( SC_COMMAND( sc, subch, msg, msg, &len ) ) {	sc_close( sc, subch );	return( ELSC_ERROR_CMD_SEND );    }    /* free up subchannel */    sc_close( sc, subch );    /* check response */    if( sc_interpret_resp( msg, 4, L1_ARG_INT, &buf32, 			           L1_ARG_INT, brick_type ) < 0 )    {	return( ELSC_ERROR_RESP_FORMAT );    }    /* extract rack/bay info     *     * note that the 32-bit value returned by the L1 actually     * only uses the low-order sixteen bits for rack and bay     * information.  A "normal" L1 address puts rack and bay     * information in bit positions 12 through 28.  So if     * we initially shift the value returned 12 bits to the left,     * we can use the L1 addressing #define's to extract the     * values we need (see ksys/l1.h for a complete list of the     * various fields of an L1 address).     */    buf32 <<= L1_ADDR_BAY_SHFT;    *rack = (buf32 & L1_ADDR_RACK_MASK) >> L1_ADDR_RACK_SHFT;    *bay = (buf32 & L1_ADDR_BAY_MASK) >> L1_ADDR_BAY_SHFT;    /* convert brick_type to lower case */    *brick_type = *brick_type - 'A' + 'a';    return 0;}int elsc_module_get(elsc_t *e){    extern char brick_types[];    uint rnum, rack, bay, bricktype, t;    int ret;    /* construct module ID from rack and slot info */    if ((ret = elsc_rack_bay_type_get(e, &rnum, &bay, &bricktype)) < 0) {	return ret;    }    /* report unset location info. with a special, otherwise invalid modid */    if (rnum == 0 && bay == 0)	return MODULE_NOT_SET;    if (bay > MODULE_BPOS_MASK >> MODULE_BPOS_SHFT)	return ELSC_ERROR_MODULE;    /* Build a moduleid_t-compatible rack number */    rack = 0;		    t = rnum / 100;		/* rack class (CPU/IO) */    if (t > RACK_CLASS_MASK(rack) >> RACK_CLASS_SHFT(rack))	return ELSC_ERROR_MODULE;    RACK_ADD_CLASS(rack, t);    rnum %= 100;    t = rnum / 10;		/* rack group */    if (t > RACK_GROUP_MASK(rack) >> RACK_GROUP_SHFT(rack))	return ELSC_ERROR_MODULE;    RACK_ADD_GROUP(rack, t);    t = rnum % 10;		/* rack number (one-based) */    if (t-1 > RACK_NUM_MASK(rack) >> RACK_NUM_SHFT(rack))	return ELSC_ERROR_MODULE;    RACK_ADD_NUM(rack, t);    for( t = 0; t < MAX_BRICK_TYPES; t++ ) {	if( brick_types[t] == bricktype )	    return RBT_TO_MODULE(rack, bay, t);    }        return ELSC_ERROR_MODULE;}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
不卡一区在线观看| 在线影院国内精品| 中文字幕一区二区三区av| 欧美亚洲综合久久| 国产一区二区精品久久| 亚洲国产视频一区二区| 国产欧美精品一区二区三区四区| 日韩欧美成人一区| eeuss鲁片一区二区三区在线观看| 日韩欧美久久久| av成人老司机| 久久99精品久久只有精品| 亚洲国产日韩综合久久精品| 国产精品污污网站在线观看 | 亚洲欧美区自拍先锋| 日韩一区国产二区欧美三区| 一本一道波多野结衣一区二区| 日韩美女啊v在线免费观看| 欧美精品一区二区三区高清aⅴ| 麻豆精品精品国产自在97香蕉| 337p日本欧洲亚洲大胆色噜噜| 另类中文字幕网| 亚洲小说欧美激情另类| 成人免费在线视频| 日本一区免费视频| 国产亚洲精品7777| 久久亚洲综合色| 欧美r级电影在线观看| 51久久夜色精品国产麻豆| 欧美日韩国产一级二级| 欧美亚洲高清一区| 欧美亚洲国产一区二区三区va| 全部av―极品视觉盛宴亚洲| 亚洲国产日韩av| 性做久久久久久免费观看欧美| 日韩一区二区在线播放| 欧美猛男男办公室激情| 51久久夜色精品国产麻豆| 欧美区在线观看| 91精品国产乱码| 日韩一区二区视频| 日韩免费看的电影| 日韩美女视频在线| 久久网站热最新地址| 国产欧美日韩综合精品一区二区| 日本久久电影网| 色欧美片视频在线观看| 欧美三级乱人伦电影| 欧美日本一道本| 欧美一区二区三区精品| 51精品国自产在线| 日韩一级成人av| 日韩一二在线观看| 久久精品男人的天堂| 国产欧美精品在线观看| 亚洲色图视频免费播放| 亚洲香蕉伊在人在线观| 香蕉影视欧美成人| 久久成人羞羞网站| 成人高清在线视频| 欧美视频一二三区| 日韩欧美一区二区久久婷婷| 久久久噜噜噜久久中文字幕色伊伊| 91一区一区三区| 欧美性猛交xxxxxxxx| 欧美一区二区三区视频在线 | 午夜成人免费视频| 午夜av区久久| 精品亚洲成a人| 成人18视频在线播放| 在线观看日产精品| 欧美成人性战久久| 国产精品不卡在线| 亚洲第一电影网| 国精产品一区一区三区mba桃花| 一区二区三区成人在线视频| 免费国产亚洲视频| 成人综合激情网| 欧美高清dvd| 久久久久久久久伊人| 一区二区三区免费观看| 久久99精品国产91久久来源| 91麻豆视频网站| 精品成人一区二区| 亚洲精品国产第一综合99久久| 久久综合色之久久综合| 国产精品不卡视频| 日本sm残虐另类| 岛国av在线一区| 欧美群妇大交群的观看方式| 国产精品每日更新| 蜜臀va亚洲va欧美va天堂| 95精品视频在线| 欧美电影免费观看高清完整版在| 欧美精品三级在线观看| 久久精品这里都是精品| 亚洲成人久久影院| 国产成人午夜99999| 欧美日韩一区二区三区四区五区| 91成人在线精品| 久久九九久久九九| 亚洲成人午夜电影| 91片在线免费观看| 2021中文字幕一区亚洲| 视频一区在线播放| 色综合色狠狠天天综合色| 久久亚洲捆绑美女| 免费一级欧美片在线观看| 色婷婷久久一区二区三区麻豆| 色婷婷国产精品| 国产日产欧美一区| 激情久久久久久久久久久久久久久久 | 欧美精品日韩综合在线| 最新国产精品久久精品| 国产精品一二三区在线| 日韩欧美亚洲一区二区| 亚洲成人精品在线观看| 色老头久久综合| 综合网在线视频| 成人的网站免费观看| 久久日韩粉嫩一区二区三区| 蜜臀av一级做a爰片久久| 欧美人与z0zoxxxx视频| 亚洲成a人片在线不卡一二三区| 天天射综合影视| 欧美日韩国产综合草草| 亚洲自拍偷拍麻豆| 在线中文字幕一区二区| 玉足女爽爽91| 色哦色哦哦色天天综合| 亚洲精品高清在线| 色综合久久中文字幕综合网| 成人欧美一区二区三区在线播放| 亚洲电影中文字幕在线观看| 欧美午夜精品电影| 亚洲午夜视频在线| 欧美人与性动xxxx| 日韩国产一二三区| 欧美一级片免费看| 美美哒免费高清在线观看视频一区二区 | 日本成人在线看| 91精品欧美综合在线观看最新| 精品欧美一区二区久久| 免费观看成人av| 亚洲精品在线观| 国产一区二区导航在线播放| 久久综合精品国产一区二区三区| ...中文天堂在线一区| av网站免费线看精品| 中文字幕在线观看一区| 在线观看91精品国产入口| 一区二区三区日韩精品视频| 欧美在线色视频| 麻豆精品一区二区三区| 久久精品在线免费观看| 99精品视频中文字幕| 亚洲午夜在线电影| 欧美大白屁股肥臀xxxxxx| 国内精品免费**视频| 久久精品欧美日韩精品| 91日韩一区二区三区| 日韩精品电影在线| 久久精品综合网| 91福利在线观看| 理论片日本一区| 国产精品国产三级国产有无不卡 | 91看片淫黄大片一级| 一二三区精品福利视频| 91精品国产综合久久久久久久久久| 中文字幕国产一区| 欧美视频在线不卡| 捆绑变态av一区二区三区| 国产日韩精品一区二区浪潮av| 亚洲不卡在线观看| 欧美精品一区二区高清在线观看| 亚洲乱码国产乱码精品精可以看| 黑人精品欧美一区二区蜜桃| 久久久久久久久免费| 色天天综合色天天久久| 美女网站视频久久| 一区精品在线播放| 日韩一区二区三区在线观看| 成人精品电影在线观看| 日日夜夜免费精品视频| 国产精品美女久久久久久久| 欧美日本乱大交xxxxx| 成人黄页毛片网站| 日韩国产欧美三级| 一色屋精品亚洲香蕉网站| 日韩一区二区在线免费观看| 97aⅴ精品视频一二三区| 激情综合色丁香一区二区| 亚洲色欲色欲www| 欧美精品一区二区三区在线| 在线观看国产91| 国产成人精品aa毛片| 开心九九激情九九欧美日韩精美视频电影| 欧美性大战久久久| 国产乱人伦偷精品视频免下载| 欧美变态口味重另类|