• <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>
            今天拿到了 Microsoft Surface 3 ,
            測(cè)試一個(gè)EFI程序的時(shí)候總是出問(wèn)題,
            后來(lái)查了一下,發(fā)現(xiàn)在使用EFI_BLOCK_IO 取得外接USB閃存大小的時(shí)候
            也就是 BlkIo->Media->LastBlock 取得的大小會(huì)比實(shí)際的多出來(lái)一個(gè)
            估計(jì)是寫(xiě)固件的人理解出了問(wèn)題。
            這里是定義
            /**
              Block IO read only mode data and updated only via members of BlockIO
            *
            */
            typedef struct {
              ///
              
            /// The curent media Id. If the media changes, this value is changed.
              
            ///
              UINT32  MediaId;         
               ///
              
            /// TRUE if the media is removable; otherwise, FALSE.
              
            ///    
              BOOLEAN RemovableMedia;
               ///
              
            /// TRUE if there is a media currently present in the device;
              
            /// othersise, FALSE. THis field shows the media present status
              
            /// as of the most recent ReadBlocks() or WriteBlocks() call.  
              
            ///
              BOOLEAN MediaPresent;
              ///
              
            /// TRUE if LBA 0 is the first block of a partition; otherwise
              
            /// FALSE. For media with only one partition this would be TRUE.
              
            ///
              BOOLEAN LogicalPartition;
               ///
              
            /// TRUE if the media is marked read-only otherwise, FALSE.
              
            /// This field shows the read-only status as of the most recent WriteBlocks () call.
              
            ///
              BOOLEAN ReadOnly;
               ///
              
            /// TRUE if the WriteBlock () function caches write data.
              
            ///
              BOOLEAN WriteCaching; 
               ///
              
            /// The intrinsic block size of the device. If the media changes, then
              
            /// this field is updated.  
              
            ///
              UINT32  BlockSize; 
               ///
              
            /// Supplies the alignment requirement for any buffer to read or write block(s).
              
            ///
              UINT32  IoAlign; 
               ///
              
            /// The last logical block address on the device.
              
            /// If the media changes, then this field is updated. 
              
            ///
              EFI_LBA LastBlock; 
              ///
              
            /// Only present if EFI_BLOCK_IO_PROTOCOL.Revision is greater than or equal to
              
            /// EFI_BLOCK_IO_PROTOCOL_REVISION2. Returns the first LBA is aligned to 
              
            /// a physical block boundary. 
              
            ///
              EFI_LBA LowestAlignedLba;
              ///
              
            /// Only present if EFI_BLOCK_IO_PROTOCOL.Revision is greater than or equal to
              
            /// EFI_BLOCK_IO_PROTOCOL_REVISION2. Returns the number of logical blocks 
              
            /// per physical block.
              
            ///
              UINT32 LogicalBlocksPerPhysicalBlock;
              ///
              
            /// Only present if EFI_BLOCK_IO_PROTOCOL.Revision is greater than or equal to
              
            /// EFI_BLOCK_IO_PROTOCOL_REVISION3. Returns the optimal transfer length
              
            /// granularity as a number of logical blocks.
              
            ///
              UINT32 OptimalTransferLengthGranularity;
            } EFI_BLOCK_IO_MEDIA;
            其中那個(gè)LastBlock是這樣說(shuō)明的
              /// The last logical block address on the device.
            所以應(yīng)該是總的block 數(shù)-1.
            不知道微軟的工程師為什么會(huì)有這樣的錯(cuò)誤
            Posted on 2016-06-14 09:28 snowman1101 閱讀(543) 評(píng)論(0)  編輯 收藏 引用

            只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問(wèn)   Chat2DB   管理


            久久精品www人人爽人人| 久久e热在这里只有国产中文精品99| 香蕉久久夜色精品国产2020| 久久只这里是精品66| 久久精品成人免费网站| 欧美精品丝袜久久久中文字幕 | 亚洲精品美女久久777777| www.久久热.com| 99蜜桃臀久久久欧美精品网站 | 久久夜色精品国产噜噜麻豆| 91麻精品国产91久久久久| 久久综合九色综合欧美就去吻| 中文字幕日本人妻久久久免费 | 韩国三级大全久久网站| 久久毛片一区二区| 久久久久这里只有精品 | 成人午夜精品久久久久久久小说| 久久久久免费精品国产| 久久综合给合综合久久| 久久99国产精品久久99果冻传媒| 亚洲AV日韩精品久久久久久| 无码任你躁久久久久久老妇| 久久久久国色AV免费观看| 亚洲成色999久久网站| 久久99精品国产一区二区三区| 无码国产69精品久久久久网站| 久久乐国产综合亚洲精品| 人妻无码久久精品| 久久中文字幕人妻丝袜| 亚洲精品乱码久久久久久蜜桃| 99久久精品无码一区二区毛片| 久久久久久综合一区中文字幕 | 青青久久精品国产免费看| 久久播电影网| 久久久受www免费人成| 开心久久婷婷综合中文字幕| 日本久久久久久久久久| 2020久久精品亚洲热综合一本| 免费精品国产日韩热久久| 久久AV高潮AV无码AV| 俺来也俺去啦久久综合网|