• <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 ,
            測試一個EFI程序的時候總是出問題,
            后來查了一下,發現在使用EFI_BLOCK_IO 取得外接USB閃存大小的時候
            也就是 BlkIo->Media->LastBlock 取得的大小會比實際的多出來一個
            估計是寫固件的人理解出了問題。
            這里是定義
            /**
              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;
            其中那個LastBlock是這樣說明的
              /// The last logical block address on the device.
            所以應該是總的block 數-1.
            不知道微軟的工程師為什么會有這樣的錯誤
            Posted on 2016-06-14 09:28 snowman1101 閱讀(544) 評論(0)  編輯 收藏 引用
            亚洲欧洲日产国码无码久久99| 亚洲精品视频久久久| 亚洲国产精品久久久天堂| 97香蕉久久夜色精品国产| 国内精品综合久久久40p| 精品国产乱码久久久久久郑州公司| 国产亚洲精品美女久久久| 精品无码久久久久久国产| 2021国内久久精品| 久久精品国产一区| 香蕉99久久国产综合精品宅男自| 伊人久久大香线蕉精品不卡| AV无码久久久久不卡网站下载 | 99久久久精品免费观看国产| 老司机国内精品久久久久| 亚洲精品tv久久久久| 麻豆精品久久精品色综合| 欧美日韩精品久久免费| 国产成人AV综合久久| 久久亚洲AV成人无码电影| 久久精品亚洲欧美日韩久久| 久久超碰97人人做人人爱| 欧美日韩成人精品久久久免费看 | 7国产欧美日韩综合天堂中文久久久久 | 伊人久久一区二区三区无码| 久久精品aⅴ无码中文字字幕重口 久久精品a亚洲国产v高清不卡 | 一本久久a久久精品vr综合| 精品人妻伦一二三区久久| 亚洲va久久久噜噜噜久久| 思思久久99热免费精品6| 伊人色综合久久天天| 成人综合伊人五月婷久久| 久久精品蜜芽亚洲国产AV| 狠狠色噜噜色狠狠狠综合久久| 亚洲AⅤ优女AV综合久久久| 国产亚洲色婷婷久久99精品91 | 久久亚洲精精品中文字幕| 无码国内精品久久人妻| 国产A三级久久精品| 伊人久久大香线蕉av不变影院| 日韩精品无码久久一区二区三|