• <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   管理


            无码任你躁久久久久久久| 久久精品一区二区三区中文字幕| 精品久久久久成人码免费动漫| 国产日韩久久免费影院| 久久久久久久亚洲精品| 久久久久久伊人高潮影院| 无码人妻久久一区二区三区免费| 99久久人妻无码精品系列| 久久久久九九精品影院| 久久综合狠狠综合久久| 久久精品一区二区三区不卡| 久久精品国产99国产精品| 久久久久久曰本AV免费免费| 国产精品无码久久四虎| 中文字幕热久久久久久久| 国产精品伊人久久伊人电影| 久久亚洲私人国产精品vA | 精品综合久久久久久97| 99久久免费只有精品国产| 久久婷婷五月综合成人D啪| 国产激情久久久久影院| 久久婷婷五月综合色奶水99啪| 久久精品国产亚洲5555| 久久亚洲精品视频| 一本久久知道综合久久| 亚洲天堂久久久| 国产—久久香蕉国产线看观看| 久久精品中文字幕无码绿巨人| 一本久久综合亚洲鲁鲁五月天亚洲欧美一区二区 | 国产精品99久久精品爆乳| 久久精品无码一区二区无码 | 精品国产乱码久久久久久郑州公司 | 久久99热只有频精品8| 区亚洲欧美一级久久精品亚洲精品成人网久久久久 | 久久99久国产麻精品66| 亚洲午夜久久久| 久久这里的只有是精品23| 久久亚洲国产成人精品无码区| 久久精品亚洲欧美日韩久久| 久久婷婷五月综合成人D啪 | 日韩欧美亚洲综合久久影院Ds |