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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sysmotvpdutil.c

?? This file contains board-specific information for the Motorola LoPEC in support of the lopec BSP. S
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* sysMotVpdUtil.c - Vital Product Data Routines. *//* Copyright 1984-2002 Wind River Systems, Inc. *//* Copyright 1998-2002 Motorola, Inc., All Rights Reserved *//*modification history--------------------01e,22oct01,cak  Modified as per Wind River code review.01d,30mar01,scb  removed #ifdef DEBUG_VPD .. debugVpdProgram() .. #endif01c,04jan01,scb  sysCalcBusSpd() handles 0 baud-out when debug mode turned on.01b,08dec00,djs  changes for VPD and i2c support01a,02nov00,djs  created based on 01f,28may99,dmw mv2100*//*DESCRIPTIONThis file contains the Vital Product Data utility routines. These routines areused to read the contents of the VPD serial EEPROM and provide access to thevarious VPD data packets. These routines operate using caller-supplied buffers.This permits their use in environments where multiple VPD EEPROMS are supported(as in the Sitka).CAVEATSThis code executes very early in the startup sequence (called from romInit.s),before the image has been copied to RAM (assuming a non-ROM image). As such,this file must be added to the BOOT_EXTRA list in the Makefile to prevent itfrom being compressed during keernel generation. Additionally, extreme cautionmust be exercised when modifying these routines to prevent the use of absolutememory addresses which reference locations in the RAM-relocated image. Theselocations are invalid and references to them will cause unpredictable behavior.Absolute memory addresses are generated by the compiler when referencing tables,static data structures and global variables. All of these must be avoided. Insome places in the code, nested if-else constructs are used to avoid the jumptable created when a simple switch contruct is used. The jump table address wasloaded using an absolute address and the code broke because the execution imagehad not been copied to the RAM address produced by the compiler.*/#include "vxWorks.h"#include "config.h"#include "lopec.h"#include "sysMotVpd.h"#include "drv/sio/i8250Sio.h"/* defines */#define ENET_INSTANCE_SIZE  7   /* size of an extended ethernet packet */#ifndef I2C_BYTE_READIMPORT int i2cRead(UINT32, unsigned int , unsigned int , char *);#define I2C_BYTE_READ(devAddr, startBlk, pBuf) \    i2cRead(devAddr, startBlk, 1, pBuf)#endif#ifndef I2C_BYTE_WRITEIMPORT int i2cWrite (UINT32, unsigned int, unsigned int, char *);#define I2C_BYTE_WRITE(devAddr, startBlk, bfr) \    i2cWrite(devAddr, startBlk, 1, bfr)#endif#ifndef I2C_BYTE_RANGE_READ#define I2C_BYTE_RANGE_READ(devAddr, startBlk, count, pBuf) \    i2cRead(devAddr, startBlk, count, pBuf)#endif#ifndef I2C_BYTE_RANGE_WRITE#define I2C_BYTE_RANGE_WRITE(devAddr, startBlk, count, pBuf) \    i2cWrite(devAddr, startBlk, count, pBuf)#endif#define FAIL_LED_BAUDOUT    0x1     /* Failure code for no BAUD out  */IMPORT UINT32 sysTimeEdges (UINT32);IMPORT void   flashFailLed (BOOL, UINT32, int);UINT32 sysCalcBusSpd (void);/******************************************************************************** sysI2cSromRangeRead - reads a range of bytes from an I2C serial eeprom (SROM)** This routine simply calls the I2C byte read routine for each requested byte.* The I2C byte read call is written using a macro to accommodate alternate* read routines.** RETURNS: OK, or ERROR if the I2C byte read fails.** SEE ALSO: sysI2cSromRangeWrite**/STATUS sysI2cSromRangeRead     (    UCHAR    devAdrs,    /* i2c address of the serial eeprom */    UCHAR    devOffset,  /* starting offset within the serial eeprom to read */    UINT16   byteCount,  /* number of bytes to read (one-based) */    UCHAR *  pBfr        /* destination buffer */    )    {    for ( ; byteCount != 0; ++devOffset, ++pBfr, --byteCount)        {        if (I2C_BYTE_READ(devAdrs, devOffset, pBfr) != OK)            return (ERROR);        }    return (OK);    }/******************************************************************************** sysI2cSromRangeWrite - writes a range of bytes to an I2C serial eeprom (SROM)** This routine simply calls the I2C byte write routine for each requested byte.* The I2C byte write call is written using a macro to accommodate alternate* I2C byte write routines.** RETURNS: OK, or ERROR if the I2C byte write fails.** SEE ALSO: sysI2cSromRangeRead**/STATUS sysI2cSromRangeWrite     (    UCHAR    devAdrs,    /* i2c address of the serial eeprom */    UCHAR    devOffset,  /* starting offset within the serial eeprom to write */    UINT16   byteCount,  /* number of bytes to write (one-based) */    UCHAR *  pBfr        /* source buffer */    )    {    for ( ; byteCount != 0; ++devOffset, ++pBfr, --byteCount)        {        if (I2C_BYTE_WRITE(devAdrs, devOffset, pBfr) != OK)            return (ERROR);        }    return (OK);    }/******************************************************************************** sysVpdHdrVld - validate a vital product data header** This routine validates the header of a vital product data structure. The* validation is performed by checking the contents of the "eyecatcher" and size* fields.** RETURNS: OK, or ERROR if vpd header contents are invalid.**/STATUS sysVpdHdrVld     (    VPD * pVpd   /* pointer to vpd structure */    )    {    UINT32 * pEyecatcher;    /*     * verify that the contents of the eyecatcher are correct. this must be     * done numerically because the string addresses generated by the     * compiler reference the program data area which is not valid until after     * the code has been copied to ram.     */    pEyecatcher = (UINT32 *)&pVpd->header.eyeCatcher[0];    if ((*pEyecatcher != 0x4d4f544f) ||     /* MOTO */        (*(pEyecatcher+1) != 0x524f4c41))   /* ROLA */        {            return (ERROR);        }    /*     * make sure the eeprom contents will fit into our vpd structure     * and that the eeprom size is at least large enough to hold the header and     * a termination packet.     */    if ( (pVpd->header.size > sizeof(VPD)) ||         (pVpd->header.size < (sizeof(VPD_HEADER) + 1)) )        return (ERROR);    return (OK);    }/******************************************************************************** sysVpdPktParse - parse the vital product data packets** This routine parses a raw VPD data array into an array of VPD packet pointers.* The parser walks through the data area of the vital product data structure and* saves the starting address of each packet it finds into an array of packet* pointers. When a desired packet is needed at a later time, the packet pointer* array can be scanned without having to re-parse the packets for each search.** RETURNS: OK, or ERROR and NULLs the first pointer in the array if an error*          is encountered while parsing or the size of the pointer array is*          exceeded. ** SEE ALSO: sysVpdPktGet()*/STATUS sysVpdPktParse    (    VPD *         pVpd,        /* pointer to vpd structure */    VPD_PACKET ** pVpdPtr,     /* packet ptr array */    UINT32        vpdPktLimit  /* number of pointers in the array */    )    {    VPD_PACKET ** p;           /* address of first array element */    UCHAR type;                /* type of current packet */    UINT32 limit;              /* end of valid packet data */    UINT32 index = 0;          /* current position in packet data */    UINT32 pkt = 0;            /* number of packets found */    /* verify that the header is correct */    if (sysVpdHdrVld (pVpd) != OK)        {        *pVpdPtr = NULL;        return (ERROR);        }    /* save the address of the first element in the pointer array */    p = pVpdPtr;    /* calculate the size of the data array */    limit = (UINT32)pVpd->header.size - sizeof(VPD_HEADER);    /* walk through the vpd data area parsing each packet */    do        {        /* save the packet type */        type =  pVpd->packets[index];        /*         * save the address of the current packet in the packet pointer array         * and advance the packet pointer to the next array entry.         */        *pVpdPtr++ = (VPD_PACKET *)&pVpd->packets[index++];        /* increment the packet count and advance to the next packet */        ++pkt;        index += pVpd->packets[index];        index++;        /*         * check the packet type and bail out of the loop if: 1) the termination         * packet has been found, 2) the packet type is illegal, or 3) if we've         * reached or exceeded the end of the data array or the packet pointer         * array.         */        if ( (type == VPD_PID_TERM) ||             (type == VPD_PID_GI)   ||             (index >= limit)       ||             (pkt >= vpdPktLimit) )            break;        /* continue until termination packet is found */        } while (type != VPD_PID_TERM);     /*     * if we didn't stop due to finding a termination packet, invalidate the     * first entry in the pointer array and return an error indication.     */    if (type != VPD_PID_TERM)        {        *p = NULL;        return (ERROR);        }    else        return (OK);    }/******************************************************************************** sysVpdPktGet - search the vital product data for a specific packet** This routine searches the a caller-supplied array of vpd packet pointers* looking for the specified instance of a specific packet type. Instances are* numbered starting at 0.** NOTE: There are two types of ethernet address packets defined: The base type* has 6 data bytes and no trailing instance number. The alternate type contains* 6 bytes of ethernet address plus a trailing instance byte. Instances are* numbered starting at zero. This routine will handle both packet types. It will* also handle multiple instances of the other packet types (except only one* termination packet is allowed).

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
9i看片成人免费高清| 久久99热国产| 亚洲美女电影在线| 国产精品久久久久久久久免费相片| 精品国产电影一区二区| 欧美成人三级电影在线| 日韩一区二区三区观看| 欧美一区二区精品在线| 日韩一级黄色片| 欧美大片在线观看| 久久久亚洲精品一区二区三区| 欧美电影精品一区二区| 欧美精品一区二区三区一线天视频 | 亚洲最大的成人av| 亚洲美女一区二区三区| 一区二区三区四区蜜桃| 亚洲二区在线观看| 蜜桃免费网站一区二区三区| 久久精品噜噜噜成人av农村| 国产一区二区三区最好精华液| 国产成人丝袜美腿| 99在线精品观看| 欧美三级中文字| 欧美tk丨vk视频| 中文字幕精品在线不卡| 亚洲视频一二三区| 亚洲成人先锋电影| 精品一区二区三区不卡| 粉嫩av一区二区三区粉嫩| 97se亚洲国产综合在线| 欧美日韩另类一区| 欧美r级电影在线观看| 国产日韩欧美综合在线| 亚洲少妇30p| 免费成人在线观看| 成人综合在线观看| 欧美在线免费播放| 精品女同一区二区| 亚洲人成网站色在线观看| 日韩电影免费一区| 不卡一区二区中文字幕| 欧美日韩成人在线| 国产亚洲欧美在线| 亚洲午夜国产一区99re久久| 久久国产日韩欧美精品| 成人精品国产免费网站| 欧美精品一二三四| 国产精品剧情在线亚洲| 亚洲成a人片在线不卡一二三区| 国产综合色在线| 色94色欧美sute亚洲线路二| 欧美大片国产精品| 亚洲蜜臀av乱码久久精品| 久久66热re国产| 亚洲欧美日韩一区二区| 美女尤物国产一区| 94色蜜桃网一区二区三区| 91精品国产91综合久久蜜臀| 国产精品免费av| 全国精品久久少妇| 色综合久久中文字幕| 精品裸体舞一区二区三区| 日韩理论片在线| 国产精品一区2区| 欧美日韩精品福利| 国产精品女上位| 麻豆成人av在线| 欧美亚洲免费在线一区| 国产亚洲欧美一级| 美女性感视频久久| 欧美三级资源在线| 亚洲天堂福利av| 国产成人免费高清| 精品国产一二三区| 天天综合网天天综合色| 色婷婷精品久久二区二区蜜臀av| 国产人久久人人人人爽| 美女国产一区二区三区| 欧美系列一区二区| 亚洲视频在线一区观看| 国产精品一区一区三区| 日韩一区二区三区在线视频| 亚洲国产精品久久久久婷婷884| 成人av网站大全| 久久久亚洲综合| 国产在线精品不卡| 精品国产一区二区三区av性色| 日韩精品亚洲一区| 欧美日韩国产高清一区| 伊人婷婷欧美激情| 99久久综合国产精品| 国产精品网站在线播放| 激情文学综合插| 日韩欧美国产一二三区| 免费欧美日韩国产三级电影| 欧美嫩在线观看| 香蕉av福利精品导航| 欧美性一二三区| 有码一区二区三区| 91国偷自产一区二区开放时间| 亚洲桃色在线一区| 91香蕉视频mp4| 日韩理论片在线| 亚洲视频1区2区| 99久久99久久精品免费观看| 国产精品美女久久久久av爽李琼| 国产精品99精品久久免费| 久久久久久久久97黄色工厂| 国产一二三精品| ww久久中文字幕| 国产成人午夜视频| 国产精品乱码一区二区三区软件 | 国产69精品久久久久777| 精品久久久三级丝袜| 国产一区二区三区高清播放| 国产日产欧美一区| 99久久精品国产导航| 亚洲蜜臀av乱码久久精品| 欧美性大战久久久久久久| 亚洲3atv精品一区二区三区| 91精品在线观看入口| 美腿丝袜在线亚洲一区 | 精品一区二区三区久久| 久久久99久久精品欧美| 成人性生交大片免费看中文 | 成人免费在线视频| 欧美在线观看禁18| 亚洲aⅴ怡春院| 2021国产精品久久精品| 高清成人免费视频| 亚洲一区二区三区四区五区中文| 欧美日韩精品久久久| 极品瑜伽女神91| 国产精品毛片久久久久久| 欧美亚洲自拍偷拍| 美女尤物国产一区| 国产精品美女视频| 欧美日韩成人综合天天影院| 黑人巨大精品欧美一区| 国产精品污www在线观看| 91麻豆精品秘密| 日本欧美大码aⅴ在线播放| 久久久久久久免费视频了| 一本色道久久综合狠狠躁的推荐| 日韩av电影免费观看高清完整版| 久久免费美女视频| 色噜噜偷拍精品综合在线| 五月天一区二区三区| 国产午夜精品在线观看| 色8久久人人97超碰香蕉987| 日本伊人色综合网| 亚洲天堂精品在线观看| 日韩亚洲欧美在线观看| 99久久精品免费观看| 免费在线看成人av| 自拍偷拍欧美精品| 欧美成人女星排名| 色偷偷成人一区二区三区91| 国内成人自拍视频| 一区二区三国产精华液| 久久久国产午夜精品| 欧美三级中文字| 成人免费av网站| 免费在线观看一区二区三区| 亚洲精品第一国产综合野| 精品国产乱码久久久久久久久| 国产精品剧情在线亚洲| 欧美xxx久久| 欧美日韩小视频| 91丝袜国产在线播放| 久久爱www久久做| 亚洲成人免费在线观看| 中文字幕免费一区| 欧美成人精品福利| 欧美日韩一区在线| 91小视频在线观看| 国产精品综合一区二区三区| 亚洲成人av一区二区| 亚洲丝袜制服诱惑| 欧美激情在线观看视频免费| 精品日产卡一卡二卡麻豆| 欧美日韩国产另类不卡| 色综合婷婷久久| 成人高清视频在线| 国产不卡视频一区| 国产一区视频网站| 免费精品视频最新在线| 日韩精品午夜视频| 五月天丁香久久| 亚洲777理论| 性做久久久久久| 亚洲成人精品一区| 亚洲午夜视频在线| 一区二区三区四区视频精品免费 | 亚洲一区二区精品3399| 亚洲精品中文在线| 亚洲欧洲色图综合| 国产精品久久久久久久久久久免费看| 久久网站最新地址| 久久综合一区二区|