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

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

?? sysmotvpdutil.c

?? VxWorks下 Cpv3060的BSP源代碼
?? C
字號:
/* sysMotVpdUtil.c - Vital Product Data Routines. *//* Copyright 1984-2000 Wind River Systems, Inc. *//* Copyright 1998-2000 Motorola, Inc., All Rights Reserved *//*modification history--------------------01c,18oct01,mil  Fixed sysVpdPktParse() for vpdShow() error (SPR 35714)                 and cleaned up compiler warnings.01b,05dec00,rhk  WRS code standards cleanup.01a,10aug99,rhk  ported to the cpv3060 BSP (from mv2100 BSP).*//*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 "sysMotVpdCpv3060.h"/* defines */#define ENET_INSTANCE_SIZE  7   /* size of an extended ethernet packet *//******************************************************************************** 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).** RETURNS: A pointer to the desired packet and OK if the packet was found,*          otherwise it returns ERROR.** SEE ALSO: sysVpdPktParse()*/STATUS sysVpdPktGet    (    UCHAR         vpdType,     /* target packet type */    UINT32        vpdInstance, /* instance number of desired packet (0-based) */    VPD_PACKET ** pVpdPtr,     /* address of the array of packet pointers */    VPD_PACKET ** pVpdPacket   /* address of the return variable */    )    {    UCHAR        type;         /* current packet type */    VPD_PACKET * p;            /* pointer to current packet */    /* if the first pointer in the array is NULL, return an error indication. */    if (*pVpdPtr == NULL)        return (ERROR);    do        {        /* get the current packet pointer */        p = *pVpdPtr;        /* if the packet type matches the caller's requested type */        if ( (type = p->type) == vpdType )            {            /*             * see if the type is an ethernet address and has a trailing             * instance value. if it does, see of the instance number matches             * the caller's requested instance.             */            if ( (vpdType == VPD_PID_EA) &&                 (p->size == ENET_INSTANCE_SIZE) &&                 (vpdInstance == p->data[ENET_INSTANCE_SIZE-1]) )                {                *pVpdPacket = p;                return (OK);                }            else                {                /*                 * see if this is the instance the caller requested, if not                 * decrement the instance count and go around again.                 */                if (vpdInstance-- == 0)                    {                    *pVpdPacket = p;                    return (OK);                    }                }            }        /* advance to the next packet. */        pVpdPtr++;        /* terminate on reaching the term packet. */        } while ( type != VPD_PID_TERM);    return (ERROR);    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品亚洲精品国产欧美| 精品国产青草久久久久福利| 国产九色精品成人porny| 亚洲高清免费一级二级三级| 亚洲一区二区三区自拍| 国产一区二区看久久| 国产精品国产三级国产有无不卡| 久久久久一区二区三区四区| 精品国产乱码久久久久久免费| 精品福利av导航| 久久久青草青青国产亚洲免观| 久久久久免费观看| 国产精品久久久久久久久动漫| 中文字幕不卡在线| 尤物视频一区二区| 天天影视涩香欲综合网| 美女视频一区二区| 国产大陆精品国产| 色狠狠一区二区| 91麻豆精品国产自产在线观看一区| 欧美一区二区网站| 久久久国产综合精品女国产盗摄| 中文字幕一区二区三区蜜月| 亚洲精品日韩综合观看成人91| 图片区小说区区亚洲影院| 九九国产精品视频| gogo大胆日本视频一区| 欧美日韩精品一二三区| 337p粉嫩大胆噜噜噜噜噜91av| 国产精品美女久久久久久| 亚洲成人免费av| 国内精品第一页| 91蜜桃视频在线| 日韩精品中文字幕在线不卡尤物| 国产精品午夜在线观看| 日韩影院精彩在线| 99久久er热在这里只有精品66| 欧美日韩国产在线观看| 欧美国产一区在线| 日本不卡中文字幕| 色天使久久综合网天天| 日韩三级.com| 亚洲狠狠爱一区二区三区| 国产一区亚洲一区| 欧美久久久久免费| 亚洲视频一区在线| 国产精品影音先锋| 欧美一区二区在线不卡| 亚洲综合色区另类av| 国产精品18久久久久久久久 | 老司机精品视频线观看86| 成人h版在线观看| 精品国产一区二区三区四区四| 一区二区三区在线视频观看| 国产精品18久久久久久久久久久久| 在线电影欧美成精品| 亚洲欧美另类久久久精品2019| 国产高清久久久久| 日韩美女主播在线视频一区二区三区| 亚洲女爱视频在线| 成人黄色av电影| 国产精品萝li| 丰满少妇久久久久久久 | 成人性生交大片免费看中文网站| 欧美日韩国产a| 亚洲伊人色欲综合网| 91亚洲精华国产精华精华液| 欧美激情一区二区三区| 国产精品一二三| 国产日本一区二区| 国产精品99久久久久久有的能看| 精品粉嫩超白一线天av| 久久精品免费看| 精品日韩99亚洲| 精品亚洲国内自在自线福利| 日韩精品一区二区三区在线| 毛片不卡一区二区| 精品国产乱码久久久久久老虎 | 波多野结衣在线aⅴ中文字幕不卡 波多野结衣在线一区 | 久久久综合九色合综国产精品| 日本成人在线不卡视频| 精品欧美一区二区久久| 美女视频黄 久久| 精品国产凹凸成av人导航| 狠狠色狠狠色综合日日91app| 精品少妇一区二区三区 | 国产精品免费看片| 成人精品视频一区二区三区 | 亚洲欧美日韩中文字幕一区二区三区| 99精品国产91久久久久久| 日韩毛片在线免费观看| 91精品福利视频| 丝袜美腿亚洲综合| 久久一区二区三区四区| 成人中文字幕合集| 一区二区三区中文免费| 欧美亚洲高清一区二区三区不卡| 午夜久久久久久久久| 欧美tk丨vk视频| 不卡的av电影| 青娱乐精品视频在线| 国产日韩在线不卡| 在线中文字幕不卡| 国产综合久久久久久鬼色 | 国产精品沙发午睡系列990531| 色哟哟在线观看一区二区三区| 视频一区二区国产| 国产清纯在线一区二区www| 91一区二区在线| 蜜臀久久久久久久| √…a在线天堂一区| 欧美高清激情brazzers| 成人免费视频免费观看| 午夜精品久久久久| 中文字幕一区二区三区蜜月| 91精品久久久久久久99蜜桃| 成人激情免费网站| 美脚の诱脚舐め脚责91 | 五月婷婷久久丁香| 国产校园另类小说区| 欧美色图第一页| 成人高清视频免费观看| 日本不卡一二三区黄网| 日韩美女视频一区二区 | 一区二区在线观看av| 精品久久久久av影院| 欧美视频在线一区二区三区 | 欧美在线视频你懂得| 国产高清在线精品| 久久99国产精品尤物| 午夜精品福利一区二区三区蜜桃| 中文字幕亚洲一区二区av在线 | 亚洲国产精品久久久久婷婷884 | 91小视频免费观看| 国产成人精品亚洲日本在线桃色| 午夜精品在线看| 樱桃国产成人精品视频| 国产精品九色蝌蚪自拍| 久久久久久电影| 精品成a人在线观看| 欧美一级二级三级蜜桃| 欧美午夜精品一区二区蜜桃| 色欧美日韩亚洲| 91亚洲男人天堂| 色婷婷亚洲一区二区三区| 懂色av一区二区三区免费看| 国产美女av一区二区三区| 久久狠狠亚洲综合| 另类小说一区二区三区| 麻豆久久一区二区| 另类小说图片综合网| 免费高清视频精品| 激情成人综合网| 蜜桃视频在线观看一区二区| 人妖欧美一区二区| 国精品**一区二区三区在线蜜桃| 激情偷乱视频一区二区三区| 国产伦理精品不卡| 成人久久久精品乱码一区二区三区| 精品无码三级在线观看视频| 国产一区二区电影| 99麻豆久久久国产精品免费优播| 成人av网站免费| 91国偷自产一区二区三区观看 | 91浏览器入口在线观看| 99re这里只有精品首页| 一本色道久久综合亚洲aⅴ蜜桃| 色av成人天堂桃色av| 欧美日本一区二区| 欧美tickle裸体挠脚心vk| 久久久亚洲午夜电影| 中文字幕av资源一区| 亚洲精品中文在线观看| 天天色综合天天| 国产精一品亚洲二区在线视频| 成人妖精视频yjsp地址| 在线观看亚洲成人| 欧美电影免费观看高清完整版在| 久久色成人在线| 亚洲精品国久久99热| 日本va欧美va精品| 成人黄色免费短视频| 在线不卡中文字幕| 久久久国际精品| 亚洲一区二区精品久久av| 极品销魂美女一区二区三区| eeuss影院一区二区三区| 欧美肥胖老妇做爰| 国产精品久久毛片av大全日韩| 亚洲成av人片在线观看无码| 国产精品1024| 欧美日韩国产不卡| 中文字幕五月欧美| 日本午夜精品视频在线观看| 成人爱爱电影网址| 日韩美女在线视频| 亚洲大尺度视频在线观看| 春色校园综合激情亚洲| 日韩一区二区三区免费看| 亚洲图片激情小说|