• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            milkyway的窩

            最初想法的誕生地

             

            Windows CE內存管理機制

                  Windows CE引入了虛擬內存機制管理多達4G的虛擬內存,最大支持512MB的物理內存.不同的CPU內存管理方法不同。對于MIPS和SHX系列CPU來說,地址映射是由CPU完成的,CE內核可以直接訪問512MB的物理內存。對于x86系列和ARM系列的CPU來說,在內核啟動過程中它會將現有物理內存地址全部映射到0x8000 0000以上的虛擬地址空間中供內核以后使用,這個虛實映射機制軟件上通過OEMAddressTable實現,硬件上要求具備MMU.
                  參考microsun的文章:  
                   "WINCE的內存(包括SDRAM及FLASH)的配置包含兩個方面:源代碼(包括C和匯編)中的定義,及系統配置文件CONFIG.BIB中的定義。源代碼中需要定義內存的物理及虛擬地址,大小,并初始化名為OEMAddressTable的結構數組,以告知系統物理地址與虛擬地址的對應關系,系統根據其設置生成MMU頁表。而CONFIG.BIB中一般會將內存定義成不同的段,各段用作不同的用途。"
                     我的理解是在*.h文件中聲明各虛擬地址,比如用到的寄存器結構體.在虛實地址映射文件(如ARM下的map.a)的OEMAddressTable中建立虛實地址的靜態映射關系,包括RAM,FLASH各部分存儲空間. (OS啟動后所能夠識別的物理內存). 接著在config.bib的MEMORY段(參考HELP里的Memory Section)把RAM映射后的虛擬地址進行分段,比如NK的大小,各種外設緩沖區的保留等.(注意這里是虛擬地址的劃分,必須建立在映射基礎上)  這種靜態的虛擬地址只能夠由內核層訪問,如果在APP中訪問,還必須建立動態映射.

                   

            posted on 2007-04-15 23:07 milkyway 閱讀(4587) 評論(4)  編輯 收藏 引用 所屬分類: Wince學習小結

            評論

            # re: Windows CE內存管理機制 2007-04-17 13:41 相思酸中有甜

            OEMAddressTable is a static (unchanging, available at startup without doing any work or setup) table of virtual -> physical mappings. The kernel is the only thing that has default access to the resources mapped by this table. If you are operating outside the OAL (i.e. in any kind of driver or application), you must use VirtualCopy() to copy or create memory page mappings. As mentioned above, you can copy any existing mapping as long as you have access to it. This includes a static mapping done by the OEMAddressTable. Some people will map all resources in the OEMAddressTable (so the kernel has access to everything), then just copy those mappings in drivers when they need to. This is not a best practice because it makes driver code less portable -- it is better to read the physical address of a component from the registry, then use the value found there to map to it. If you do this your driver code does not have to change if it is moved to a different platform or extended to use multiple components in different physical locations.

            A mapping does not have to exist in OEMAddressTable in order for you to access the physical resources mapped. You can create a new mapping unknown to the OEMAddressTable by using VirtualCopy with the PAGE_PHYSICAL flag.

            Config.bib reserves regions of memory that romimage knows about, but does not specify kernel memory regions.

            by Kurt,
              回復  更多評論   

            # re: Windows CE內存管理機制 2007-04-17 13:42 相思酸中有甜

            OEMAddressTable mentioned in this blog applies only to h/w based TLB designs like x86 and ARM. For SHx and MIPS, there is a architecture pre-defined mapping (512Mb cached and uncached regions) at bootup.

            -- On ARM v6/v7 there is a bit (eXecute Never XN) which can be used to mark individual page entries. Once this is set, then any attempt to execute code from that page will fault. This most likely will be supported in future releases of CE.

            -- There seemed to be lot of confusion (party our fault since there are so many ways you can map physical or virtual memory) on these APIs. In general remember that VirtualCopy can be used to create a virtual address mapped to either a physical address or another virtual address range. Also all the flags are well documented in MSDN so you should take a look at that.

            by thx.

            -Upender

              回復  更多評論   

            # re: Windows CE內存管理機制 2007-04-18 09:09 milkyway

            In Windows CE 5.0 and earlier, virtual allocations below 2MB *in size* will be allocated inside of the address space of the process calling it, while allocations above 2MB *in size* will be allocated out of the shared address space. I was not talking about the address of the allocation, I was talking about the size.

            by Sue

              回復  更多評論   

            # re: Windows CE內存管理機制 2008-07-29 15:55 wogo

            hao!  回復  更多評論   

            導航

            統計

            公告

            隨筆皆原創,文章乃轉載. 歡迎留言!

            常用鏈接

            留言簿(37)

            隨筆分類(104)

            隨筆檔案(101)

            文章分類(51)

            文章檔案(53)

            wince牛人

            搜索

            積分與排名

            最新評論

            閱讀排行榜

            評論排行榜

            麻豆亚洲AV永久无码精品久久| 久久免费99精品国产自在现线 | 日产精品久久久久久久| 亚洲欧美伊人久久综合一区二区| 欧美亚洲另类久久综合| 亚洲色婷婷综合久久| 久久精品国产精品亚洲人人| 国产精品一久久香蕉产线看| 久久精品中文无码资源站| 97精品伊人久久大香线蕉| 久久99国产精品一区二区| 国产精品久久永久免费| 久久国产综合精品五月天| 人妻久久久一区二区三区| 久久久久国产日韩精品网站| 久久综合给合久久狠狠狠97色 | 久久亚洲春色中文字幕久久久| 热99re久久国超精品首页| 亚洲愉拍99热成人精品热久久 | 97久久精品午夜一区二区| 国产精品美女久久福利网站| 国产高清美女一级a毛片久久w| 久久亚洲国产午夜精品理论片| 久久久久亚洲精品日久生情| 婷婷五月深深久久精品| 无码人妻久久一区二区三区蜜桃| 日韩十八禁一区二区久久| 中文字幕久久欲求不满| A级毛片无码久久精品免费| 国产精品久久久福利| 欧洲人妻丰满av无码久久不卡| 久久婷婷人人澡人人爽人人爱| 久久99国产精品成人欧美| 精品熟女少妇AV免费久久| 久久福利资源国产精品999| 亚洲精品成人网久久久久久| 久久人与动人物a级毛片| 欧美久久久久久| AV色综合久久天堂AV色综合在| 93精91精品国产综合久久香蕉| 国产99久久精品一区二区|