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

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

?? ixosaliomem.c

?? 友善mini2440嵌入式
?? C
字號:
/** * @file IxOsalIoMem.c  * * @brief OS-independent IO/Mem implementation  *  *  * @par * IXP400 SW Release version 2.0 *  * -- Copyright Notice -- *  * @par * Copyright 2001-2005, Intel Corporation. * All rights reserved. *  * @par * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. Neither the name of the Intel Corporation nor the names of its contributors *    may be used to endorse or promote products derived from this software *    without specific prior written permission. *  * @par * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. *  * @par * -- End of Copyright Notice -- *//* Access to the global mem map is only allowed in this file */#define IxOsalIoMem_C#include "IxOsal.h"#define SEARCH_PHYSICAL_ADDRESS (1)#define SEARCH_VIRTUAL_ADDRESS  (2)/* * Searches for map using one of the following criteria: *  * - enough room to include a zone starting with the physical "requestedAddress" of size "size" (for mapping) * - includes the virtual "requestedAddress" in its virtual address space (already mapped, for unmapping) * - correct coherency * * Returns a pointer to the map or NULL if a suitable map is not found. */PRIVATE IxOsalMemoryMap *ixOsalMemMapFind (UINT32 requestedAddress,    UINT32 size, UINT32 searchCriteria, UINT32 requestedEndianType){    UINT32 mapIndex;    UINT32 numMapElements =        sizeof (ixOsalGlobalMemoryMap) / sizeof (IxOsalMemoryMap);    for (mapIndex = 0; mapIndex < numMapElements; mapIndex++)    {        IxOsalMemoryMap *map = &ixOsalGlobalMemoryMap[mapIndex];        if (searchCriteria == SEARCH_PHYSICAL_ADDRESS            && requestedAddress >= map->physicalAddress            && (requestedAddress + size) <= (map->physicalAddress + map->size)            && (map->mapEndianType & requestedEndianType) != 0)        {            return map;        }        else if (searchCriteria == SEARCH_VIRTUAL_ADDRESS            && requestedAddress >= map->virtualAddress            && requestedAddress <= (map->virtualAddress + map->size)            && (map->mapEndianType & requestedEndianType) != 0)        {            return map;        }        else if (searchCriteria == SEARCH_PHYSICAL_ADDRESS)        {            ixOsalLog (IX_OSAL_LOG_LVL_DEBUG3,                IX_OSAL_LOG_DEV_STDOUT,                "Osal: Checking [phys addr 0x%x:size 0x%x:endianType %d]\n",                map->physicalAddress, map->size, map->mapEndianType, 0, 0, 0);        }    }    /*     * not found      */    return NULL;}/* * This function maps an I/O mapped physical memory zone of the given size * into a virtual memory zone accessible by the caller and returns a cookie -  * the start address of the virtual memory zone.  * IX_OSAL_MMAP_PHYS_TO_VIRT should NOT therefore be used on the returned  * virtual address. * The memory zone is to be unmapped using ixOsalMemUnmap once the caller has * finished using this zone (e.g. on driver unload) using the cookie as  * parameter. * The IX_OSAL_READ/WRITE_LONG/SHORT macros should be used to read and write  * the mapped memory, adding the necessary offsets to the address cookie. * * Note: this function is not to be used directly. Use IX_OSAL_MEM_MAP  * instead. */PUBLIC void *ixOsalIoMemMap (UINT32 requestedAddress,    UINT32 size, IxOsalMapEndianessType requestedEndianType){    IxOsalMemoryMap *map;    ixOsalLog (IX_OSAL_LOG_LVL_DEBUG3,        IX_OSAL_LOG_DEV_STDOUT,        "OSAL: Mapping [addr 0x%x:size 0x%x:endianType %d]\n",        requestedAddress, size, requestedEndianType, 0, 0, 0);    if (requestedEndianType == IX_OSAL_LE)    {        ixOsalLog (IX_OSAL_LOG_LVL_ERROR,            IX_OSAL_LOG_DEV_STDOUT,            "ixOsalIoMemMap: Please specify component coherency mode to use MEM functions \n",            0, 0, 0, 0, 0, 0);        return (NULL);    }    map = ixOsalMemMapFind (requestedAddress,        size, SEARCH_PHYSICAL_ADDRESS, requestedEndianType);    if (map != NULL)    {        UINT32 offset = requestedAddress - map->physicalAddress;        ixOsalLog (IX_OSAL_LOG_LVL_DEBUG3,            IX_OSAL_LOG_DEV_STDOUT, "OSAL: Found map [", 0, 0, 0, 0, 0, 0);        ixOsalLog (IX_OSAL_LOG_LVL_DEBUG3,            IX_OSAL_LOG_DEV_STDOUT, map->name, 0, 0, 0, 0, 0, 0);        ixOsalLog (IX_OSAL_LOG_LVL_DEBUG3,            IX_OSAL_LOG_DEV_STDOUT,            ":addr 0x%x: virt 0x%x:size 0x%x:ref %d:endianType %d]\n",            map->physicalAddress, map->virtualAddress,            map->size, map->refCount, map->mapEndianType, 0);        if (map->type == IX_OSAL_DYNAMIC_MAP && map->virtualAddress == 0)        {            if (map->mapFunction != NULL)            {                map->mapFunction (map);                if (map->virtualAddress == 0)                {                    /*                     * failed                      */                    ixOsalLog (IX_OSAL_LOG_LVL_FATAL,                        IX_OSAL_LOG_DEV_STDERR,                        "OSAL: Remap failed - [addr 0x%x:size 0x%x:endianType %d]\n",                        requestedAddress, size, requestedEndianType, 0, 0, 0);                    return NULL;                }            }            else            {                /*                 * error, no map function for a dynamic map                  */                ixOsalLog (IX_OSAL_LOG_LVL_FATAL,                    IX_OSAL_LOG_DEV_STDERR,                    "OSAL: No map function for a dynamic map - "                    "[addr 0x%x:size 0x%x:endianType %d]\n",                    requestedAddress, size, requestedEndianType, 0, 0, 0);                return NULL;            }        }        /*         * increment reference count          */        map->refCount++;        return (void *) (map->virtualAddress + offset);    }    /*     * requested address is not described in the global memory map      */    ixOsalLog (IX_OSAL_LOG_LVL_FATAL,        IX_OSAL_LOG_DEV_STDERR,        "OSAL: No mapping found - [addr 0x%x:size 0x%x:endianType %d]\n",        requestedAddress, size, requestedEndianType, 0, 0, 0);    return NULL;}/* * This function unmaps a previously mapped I/O memory zone using * the cookie obtained in the mapping operation. The memory zone in question * becomes unavailable to the caller once unmapped and the cookie should be * discarded. * * This function cannot fail if the given parameter is correct and does not * return a value. * * Note: this function is not to be used directly. Use IX_OSAL_MEM_UNMAP * instead. */PUBLIC voidixOsalIoMemUnmap (UINT32 requestedAddress, UINT32 endianType){    IxOsalMemoryMap *map;    if (endianType == IX_OSAL_LE)    {        ixOsalLog (IX_OSAL_LOG_LVL_ERROR,            IX_OSAL_LOG_DEV_STDOUT,            "ixOsalIoMemUnmap: Please specify component coherency mode to use MEM functions \n",            0, 0, 0, 0, 0, 0);        return;    }    if (requestedAddress == 0)    {        /*         * invalid virtual address          */        return;    }    map =        ixOsalMemMapFind (requestedAddress, 0, SEARCH_VIRTUAL_ADDRESS,        endianType);    if (map != NULL)    {        if (map->refCount > 0)        {            /*             * decrement reference count              */            map->refCount--;            if (map->refCount == 0)            {                /*                 * no longer used, deallocate                  */                if (map->type == IX_OSAL_DYNAMIC_MAP                    && map->unmapFunction != NULL)                {                    map->unmapFunction (map);                }            }        }    }    else    {        ixOsalLog (IX_OSAL_LOG_LVL_WARNING,            IX_OSAL_LOG_DEV_STDERR,            "OSAL: ixOsServMemUnmap didn't find the requested map "            "[virt addr 0x%x: endianType %d], ignoring call\n",            requestedAddress, endianType, 0, 0, 0, 0);    }}/*  * This function Converts a virtual address into a physical  * address, including the dynamically mapped memory. *  * Parameters	virtAddr - virtual address to convert * Return value: corresponding physical address, or NULL  *               if there is no physical address addressable  *               by the given virtual address * OS: 	VxWorks, Linux, WinCE, QNX, eCos * Reentrant: Yes * IRQ safe: Yes */PUBLIC UINT32ixOsalIoMemVirtToPhys (UINT32 virtualAddress, UINT32 requestedCoherency){    IxOsalMemoryMap *map =        ixOsalMemMapFind (virtualAddress, 0, SEARCH_VIRTUAL_ADDRESS,        requestedCoherency);    if (map != NULL)    {        return map->physicalAddress + virtualAddress - map->virtualAddress;    }    else    {        return (UINT32) IX_OSAL_MMU_VIRT_TO_PHYS (virtualAddress);    }}/*  * This function Converts a virtual address into a physical  * address, including the dynamically mapped memory. *  * Parameters	virtAddr - virtual address to convert * Return value: corresponding physical address, or NULL  *               if there is no physical address addressable  *               by the given virtual address * OS: 	VxWorks, Linux, WinCE, QNX, eCos * Reentrant: Yes * IRQ safe: Yes */PUBLIC UINT32ixOsalIoMemPhysToVirt (UINT32 physicalAddress, UINT32 requestedCoherency){    IxOsalMemoryMap *map =        ixOsalMemMapFind (physicalAddress, 0, SEARCH_PHYSICAL_ADDRESS,        requestedCoherency);    if (map != NULL)    {        return map->virtualAddress + physicalAddress - map->physicalAddress;    }    else    {        return (UINT32) IX_OSAL_MMU_PHYS_TO_VIRT (physicalAddress);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99免费精品在线观看| 欧美福利视频一区| 欧美日韩国产经典色站一区二区三区| 日韩一区二区三区在线观看| 国产精品久久久久久久久久免费看| 亚洲一区av在线| 国产精品资源在线| 5566中文字幕一区二区电影| 欧美高清在线精品一区| 日本免费在线视频不卡一不卡二 | 国产盗摄一区二区三区| 欧美午夜精品一区二区蜜桃| 中文字幕不卡一区| 国产乱子伦视频一区二区三区| 欧美精品第一页| 一区二区三区在线影院| 成人动漫在线一区| 欧美成人a∨高清免费观看| 亚洲一区影音先锋| 91浏览器在线视频| 国产精品久久精品日日| 国产乱码精品一区二区三 | 图片区日韩欧美亚洲| 91免费国产在线| 国产精品网站在线观看| 国产一区在线视频| 精品国产伦一区二区三区观看体验 | 欧美福利视频一区| 亚洲成人午夜电影| 欧美日韩一区二区三区免费看 | 亚洲二区在线观看| 色噜噜狠狠成人网p站| 自拍偷在线精品自拍偷无码专区| 国产美女精品一区二区三区| 精品国产一区二区在线观看| 美女被吸乳得到大胸91| 欧美成人一区二区| 国产在线精品一区在线观看麻豆| 日韩亚洲电影在线| 热久久久久久久| 亚洲欧洲三级电影| 色综合久久中文综合久久97| 亚洲欧美日韩中文播放| 欧美性猛交xxxx乱大交退制版| 专区另类欧美日韩| 色8久久精品久久久久久蜜| 一区二区三区视频在线看| 在线观看91视频| 日韩av中文在线观看| 日韩免费一区二区三区在线播放| 免费成人结看片| 久久综合丝袜日本网| av一区二区三区在线| 亚洲欧美偷拍三级| 欧美高清dvd| 国产很黄免费观看久久| 国产精品成人免费| 欧美日韩一区 二区 三区 久久精品| 亚洲成人精品一区| 日韩免费观看2025年上映的电影 | 亚洲香肠在线观看| 日韩亚洲欧美综合| 成人午夜免费视频| 亚洲影视资源网| 欧美电影免费观看高清完整版在线| 激情另类小说区图片区视频区| 中文字幕第一区综合| 欧美日韩亚洲综合一区| 国产在线精品免费av| 亚洲欧美日韩国产综合在线| 日韩一区二区三区电影| 成人丝袜高跟foot| 视频一区在线视频| 国产日产亚洲精品系列| 在线亚洲免费视频| 国产精品自拍三区| 五月激情丁香一区二区三区| 国产精品网友自拍| 日韩天堂在线观看| 色偷偷久久一区二区三区| 精品一区二区综合| 亚洲免费观看高清完整版在线 | 久久久久久久久久看片| 欧美日韩专区在线| 国产一区二区三区在线观看精品 | 蜜臀av一级做a爰片久久| 国产精品色一区二区三区| 欧美日韩久久一区| 风间由美一区二区三区在线观看 | 国产大陆精品国产| 视频一区在线播放| 亚洲老司机在线| 精品美女被调教视频大全网站| 色婷婷综合五月| 豆国产96在线|亚洲| 久久丁香综合五月国产三级网站| 亚洲乱码国产乱码精品精的特点 | 中文字幕一区二区三| 久久色.com| 日韩一级片在线播放| 在线欧美日韩精品| 97超碰欧美中文字幕| 国产精品一区二区不卡| 久久电影网站中文字幕 | 成人综合婷婷国产精品久久免费| 蜜臀久久99精品久久久久宅男| 亚洲小说欧美激情另类| 亚洲一区二区在线免费看| 亚洲视频在线一区二区| 国产精品第一页第二页第三页| 久久免费国产精品| 久久久亚洲欧洲日产国码αv| 91精品国产欧美日韩| 欧美日本一区二区| 欧美一区日韩一区| 欧美一级高清片| 精品少妇一区二区三区视频免付费 | 99在线精品免费| www.色精品| 精品国产乱码久久久久久久| 欧美一区二区福利视频| 欧美色欧美亚洲另类二区| 国产91丝袜在线播放九色| 粉嫩av一区二区三区在线播放| 蜜臀精品一区二区三区在线观看| 亚洲精品国产a| 亚洲欧洲色图综合| 亚洲一区二区三区小说| 一二三四社区欧美黄| 国产精品国产三级国产普通话三级 | 8x8x8国产精品| 欧美另类一区二区三区| 色婷婷av一区| 在线亚洲免费视频| 欧美亚洲动漫精品| 欧洲亚洲国产日韩| 日本韩国欧美三级| 色丁香久综合在线久综合在线观看| 成人性生交大片免费看视频在线| 国产一区91精品张津瑜| 久久精品久久99精品久久| 国产剧情一区二区| 成人高清视频在线观看| 粉嫩一区二区三区性色av| 国产成人无遮挡在线视频| 国内精品视频一区二区三区八戒| 国产福利一区在线| 成人av在线网站| 色香蕉成人二区免费| 欧美日韩情趣电影| 欧美一区二区精品在线| 欧美国产一区视频在线观看| 亚洲日本va午夜在线影院| 亚洲欧美偷拍卡通变态| 一区二区三区高清在线| 午夜久久久影院| 极品少妇xxxx精品少妇偷拍| 欧美精品久久久久久久多人混战| 欧美日韩高清一区| 久久色视频免费观看| 久久久久国产成人精品亚洲午夜| 亚洲精品第1页| 日产国产欧美视频一区精品| 日日夜夜精品视频天天综合网| 久久爱www久久做| 在线视频亚洲一区| 欧美r级电影在线观看| 国产精品久久免费看| 婷婷成人综合网| 粉嫩高潮美女一区二区三区| 337p亚洲精品色噜噜噜| 亚洲国产成人午夜在线一区| 亚洲一区视频在线观看视频| 国产资源精品在线观看| 日本精品视频一区二区| 欧美电影精品一区二区| 自拍偷在线精品自拍偷无码专区 | 亚洲欧洲三级电影| 国产真实乱子伦精品视频| 色综合久久久久网| 精品久久久久久无| 一区二区三区四区不卡在线| 国产一区视频导航| 欧美日韩一级片网站| 国产三区在线成人av| 午夜精品久久久久久久蜜桃app| 免费成人av在线| 日韩一区二区三区电影在线观看 | 亚洲成a人片在线观看中文| 国产一区二区主播在线| 91久久久免费一区二区| 欧美变态口味重另类| 日韩电影一区二区三区| 色综合欧美在线视频区| 国产亚洲污的网站| 奇米综合一区二区三区精品视频| 欧美日韩午夜影院| 日韩毛片在线免费观看| 成人夜色视频网站在线观看| 精品国产三级电影在线观看|