• <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 ,
            測試一個(gè)EFI程序的時(shí)候總是出問題,
            后來查了一下,發(fā)現(xiàn)在使用EFI_BLOCK_IO 取得外接USB閃存大小的時(shí)候
            也就是 BlkIo->Media->LastBlock 取得的大小會比實(shí)際的多出來一個(gè)
            估計(jì)是寫固件的人理解出了問題。
            這里是定義
            /**
              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是這樣說明的
              /// The last logical block address on the device.
            所以應(yīng)該是總的block 數(shù)-1.
            不知道微軟的工程師為什么會有這樣的錯(cuò)誤
            Posted on 2016-06-14 09:28 snowman1101 閱讀(530) 評論(0)  編輯 收藏 引用

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


            久久精品国产色蜜蜜麻豆| 久久精品国产亚洲麻豆| 无码8090精品久久一区| 久久久久久精品免费看SSS| 久久久久亚洲精品日久生情 | 少妇被又大又粗又爽毛片久久黑人| 国产精品免费看久久久香蕉| 无码国内精品久久人妻麻豆按摩| 中文字幕亚洲综合久久菠萝蜜| 无码伊人66久久大杳蕉网站谷歌| 国产一久久香蕉国产线看观看| 日韩影院久久| 99久久国产综合精品五月天喷水| 久久久久久一区国产精品| 久久精品国产久精国产思思| 久久99精品久久久久久野外| 亚洲精品无码久久久久| 亚洲国产成人精品久久久国产成人一区二区三区综 | 国产成人久久激情91| 久久亚洲AV无码西西人体| 99国产精品久久| 亚洲AV日韩精品久久久久久| 久久人人爽人人澡人人高潮AV| 中文精品久久久久人妻不卡| 久久国产精品视频| 久久精品黄AA片一区二区三区| 亚洲国产日韩欧美综合久久| 久久久久久无码Av成人影院| 人妻无码精品久久亚瑟影视| 伊人丁香狠狠色综合久久| 无码精品久久久天天影视| 久久久久久久免费视频| 久久久久国产精品麻豆AR影院| 久久精品国产网红主播| AV无码久久久久不卡蜜桃 | 久久97精品久久久久久久不卡| 午夜视频久久久久一区| 要久久爱在线免费观看| 亚洲精品无码久久毛片| 久久久久久久91精品免费观看| 亚洲国产成人久久综合一区77|