亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dospartlibscsi.c

?? vxworks demo all 完整板本
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* dosPartLibScsi.c - show & mount SCSI HDD MSDOS partitions *//*modification history--------------------01d,24feb99,jkf   Fixed bug in scsiCmdBuild failing for large disks.01c,15sep97,jkf   removed LCHS support.  Only useful for MSDOS versions                  before 3.3, not likely anyone needs LCHS support.                    Added support for big endian arches and arches without                  dynamic bus sizing, which involved byte swapping macro                  and reading sector data with macro offsets. Now supports                  80x86, 68k, SPARC, MIPS, PPC, i960, etc.)  Revised docs.01b,01sep97,jkf   fixed stdlib.h filename case for Unix.                  fixed cosmetics in sector and show routines.  01a,01sep97,jkf   adapted from dosPartLibAta.c.*//*DESCRIPTION:This library is provided by Wind River Systems CustomerSupport strictly as an educational example.This code supports both mounting MSDOS file systems anddisplaying partition tables written by MSDOS FDISK.exe orby any other MSDOS FDISK.exe compatible partitioning software.  The first partition table is contained within a hard drivesMaster Boot Record (MBR) sector, which is defined as sectorone, cylinder zero, head zero or logical block address zero.The mounting and displaying routines within this code will first parse the MBR partition tables entries (defined below)and also recursively parse any "extended" partition tables,which may reside within another Cylinder, Head, and Sector (CHS) combination further into the hard disk.   (Also knownas extended partition tables chained from the MBR's partitiontable.  MSDOS file systems within extended partitions are knownto those familiar with the MSDOS FDISK.exe utility as "Logical drives within the extended partition".Since MSDOS file systems have a fixed number of clusters, 64Kb,and clusters are the minimum allocation unit at the file systemlevel, using partitions can help optimize cluster size for a givenhard disk,  improving performance and resource usage.  For example, a 1-gigabyte hard disk with a single MSDOS file system has the following minimum allocation unit at the dosFsLib open/read/writelevel interface:    1GB/64KB = Minimum allocation unit.This may produce a minimum allocation unit that is larger thanwhat the developer desires (for cluster boundary buffer alignment,or other buffering, ect).One solution is to sub-divide the disk into smaller partitionsor "logical disks" on the single physical disk and format file systems over each of the partitions.  (Then using this code youmay mount them.)   If you used four equal sized partitions, thenthis method produces:    256MB/64KB = Minimum allocation unit.	    256MB/64KB = Minimum allocation unit.    256MB/64KB = Minimum allocation unit.    256MB/64KB = Minimum allocation unit.This produces a smaller minimum allocation unit and may be better suited for optimal application file system performance.Each partition contains its own unique file system.  As faras the file system level is concerned it is on a unique disk.Here is a picture showing the layout of a single disk containingmultiple MSDOS file systems:(Note, all ASCII pictures herein are best viewed with an 'equally sized characters' or 'fixed width' style font)  +---------------------------------------------------------+  |<---------------------The entire disk------------------->|  |M                                                        |  |B<---C:--->                                              |  |R           /---- First extended partition--------------\|  |           E<---D:---><-Rest of the ext part------------>|  |P          x                                             |  |A          t          E<---E:--->E<Rest of the ext part->|  |R                     x          x                       |  |T                     t          t<---------F:---------->|  +---------------------------------------------------------+  (Ext == extended partition sector)A MS-DOS partition table resides within one sector on a harddisk.  There is always one in the first sector of a hard diskpartitioned with FDISK.exe.  There first partition table maycontain references to "extended" partition tables residing onother sectors if there are multiple partitions.  The first sector of the disk is the starting point.  Partition tablesare of the format:Offset from     the beginning of the sector          Description-------------          -------------------------   0x1be               Partition 1 table entry  (16 bytes)   0x1ce               Partition 2 table entry  (16 bytes)   0x1de               Partition 3 table entry  (16 bytes)   0x1ee               Partition 4 table entry  (16 bytes)   0x1fe               Signature  (0x55aa, 2 bytes)Individual MSDOS partition table entries are of the format:Offset   Size      Description------   ----      ------------------------------ 0x0     8 bits    boot type 0x1     8 bits    beginning sector head value 0x2     8 bits    beginning sector (2 high bits of cylinder#) 0x3     8 bits    beginning cylinder# (low order bits of cylinder#) 0x4     8 bits    system indicator 0x5     8 bits    ending sector head value 0x6     8 bits    ending sector (2 high bits of cylinder#) 0x7     8 bits    ending cylinder# (low order bits of cylinder#) 0x8    32 bits    number of sectors preceding the partition 0xc    32 bits    number of sectors in the partition  In the partition table entry, the Sector/Cylinder (16bits)(offset 0x2 & 0x3) fields data are stored in the format: |7|6|5|4|3|2|1|0|  The first 8 bits of offset 0x2.  | | `------------ 6 least significant bit's contain the sector   | |               offset within cylinder.  sector == 6 bits.  | |  `-`-------------- Two most significant (high order) bits of the                     cylinder value. |7|6|5|4|3|2|1|0|  2nd 8 bits  (cylinder 0x3)  `---------------- Eight least significant (low order) bits of the                    cylinder value.This format restricts partition entries to 10 cylinder bits & 6 sectorbits and 8 head bits.  This is also the format used by the PC-AT BIOSInt13h functions, which is used by FDISK.exe dosPartLibAta/Scsi.c uses the following method of parsing the CHS valuesstored in the 0x2 & 0x3 partition table offsets into distinct values:Cyl = ((((dospt_startSec) & 0x00c0) << 2) |       (((dospt_startSec) & 0xff00) >> 8));Hd  = pPartTbl->dospt_startHead;Sec = (pPartTbl->dospt_startSec & 0x003f); (see DOS_PART_TBL struct typedef in dosFsLib.h)This produces individual CHS value from the values thatare contained within the MSDOS partition table entry.  Definitions of CHS terms:CHS - Cylinder/Head/Sector. L-CHS - Logical - CHS (used by INT 13 AxH/FDISK.exe)         256 heads, 1024 cylinders, 63 sectors. max.        LCHS allow ~8.4 GB addressable space.P-CHS - Physical CHS (used by physical ATA device)         16 heads, 65535 cylinders, 63 sectors.        PCHS allow ~137GB addressable space.        (VxWorks ataRawio() uses PCHS)LBA - Logical Block Address. ATA/SCSI absolute sector      numbering scheme.  LBA sector 0 == addresses the      first sector on a device by definition.  ATA devices      may also support LBA at the device interface. ATA      standard says that cylinder 0, head 0, sector 1 == LBA 0.      LBA allows (~137GB) on an ATA device. The  MSDOS "logical CHS" (LCHS) format combined with the Physical IDE/ATA CHS interface (PCHS) gives MSDOS the following addressing limitation:                  +------------+----------+----------------+                     | BIOS INT13 | IDE/ATA  | Combined Limit |+-----------------+------------+----------+----------------+   |Max Sectors/Track|  63        |    255   |     63         |+-----------------+------------+----------+----------------+|Max Heads        |  256       |     16   |     16         |+-----------------+------------+----------+----------------+|Max Cylinders    |  1024      |  65536   |    1024        |+-----------------+------------+----------+----------------+|Capacity         |  8.4GB     |  136.9GB |   528 MB       |+-----------------+------------+----------+----------------+1024 x 16 x 63 X 512 bytes/sector = 528.48 MB limit.Cylinder bits : 10 = 1024Head bits     :  4 = 16Sector bits   :  6 (-1) = 63 (by convention, CHS sector numbering begins at #1, not #0; LBA begins at zero, which is CHS#1) To overcome the limitation. PC BIOS/OS vendors perform what is oftenreferred to as geometric or "drive" CHS translation to address more than 528MB, and to "address" cylinders above 1024.BIOS vendors offer CHS translation extensions that are basedaround the format of the PC-AT BIOS call "INT 0x13 function 0x8"aka "Get Current Drive Parameters"  There are also two parametertables EDPT and FDPT set by the BIOS interfaces.  EDPT is sometimesnot supported depending on the system BIOS.  The FDPT is always supported on PC-AT compatible BIOS.  Code is available for the x86VxWorks BSP to call INT13h F8h romInit.s BIOS call, which returnsthe FDPT.  This is not needed when using LBA on newer systems.It is possible in the pc486/pc386 VxWorks BSP's to make anBIOS (INT13h F8H) call in romInit.s before the switch to protected mode.  Sample romInit.s code demonstrating this will be provided upon request, contact johnx@wrs.com.requesting "Int13h romInit.s x86 code".There exists also some 3rd party software based disk overlayprograms (Such as OnTrack's Disk Manager,TM.) which uses asemi-proprietary strategy to support drives over 528MB.  In most cases, the translated LCHS geometry is applied such thatall sectors are addressed at the same physical location as whenthe drive is used within an untranslated environment.  However,not in all cases, and then there is a breakdown.  Alas, there is not any standard for defining the altered geometry translationscheme, so compatibility issues will arise when moving drives fromone BIOS, Operating System, driver, and/or controller to another.VxWorks SCSI and ATA drivers communicate directly with thecontroller and do not use the BIOS.  The VxWorks ATA drivermay address the full 136.9GB offered by ATA, and the full rangeoffered by SCSI.  So this is not an issue for VxWorks.  It shouldbe noted however, since all the partition table data will be stored in LCHS format.Here is an example of a typical PCHS to LCHS translation.(Note, all ASCII pictures herein are best viewed with an 'equally sized characters'/'fixed width' style font)+----------------+------------+----------------+-------------+--------+|Actual Cylinders|Actual Heads|Altered Cylinder|Altered Heads|Max Size|+----------------+------------+----------------+-------------+--------+|  1<C<=1024     | 1<H<=16    |     C=C        |    H=H      |528 MB  |+----------------+------------+----------------+-------------+--------+| 1024<C<=2048   | 1<H<=16    |     C=C/2      |    H=H*2    |  1GB   |+----------------+------------+----------------+-------------+--------+| 2048<C<=4096   | 1<H<=16    |     C=C/4      |    H=H*4    | 2.1GB  |+----------------+------------+----------------+-------------+--------+| 4096<C<=8192   | 1<H<=16    |     C=C/8      |    H=H*8    | 4.2GB  |+----------------+------------+----------------+-------------+--------+| 8192<C<=16384  | 1<H<=16    |     C=C/16     |    H=H*16   | 8.4GB  |+----------------+------------+----------------+-------------+--------+| 16384<C<=32768 | 1<H<=8     |     C=C/32     |    H=H*32   | 8.4GB  |+----------------+------------+----------------+-------------+--------+| 32768<C<=65536 | 1<H<=4     |     C=C/64     |    H=H*64   | 8.4GB  |+----------------+------------+----------------+-------------+--------+Another type of translation always sets the sectors to 63, this produces different geometry than the above.+----------------+----------+---------+--------------+|Range           | Sectors  | Heads   | Cylinders    |+----------------+----------+---------+--------------+|  1<X<=528MB    |   63     |  16     | X/(63*16*512)|+----------------+----------+---------+--------------+| 528MB<X<=1GB   |   63     |  32     | X/(63*32*512)|+----------------+----------+---------+--------------+| 1GB<X<=2.1GB   |   63     |  64     | X/(63*64*512)|+----------------+----------+---------+--------------+| 2.1GB<X<=4.2GB |   63     |  128    |X/(63*128*512)|+----------------+----------+---------+--------------+| 4.2GB<X<=8.4GB |   63     |  256    |X/(63*255*512)|+----------------+----------+---------+--------------+There are several MSDOS utilities (from Phoenix, and Western Digital, and more, such as wdtblchk.exe, and chkbios.exe) whichcan be used on PC's to check translations.  These utilitiesuse BIOS calls to read the EPDT and FPDT to determine the PCHSand LCHS and LBA values for a given system.  TRANSLATION ALGORITHMS:----------------------The algorithm used in this code for LBA to PCHS translation (in dosPartRdLba[Ata/Scsi]) is:        PCHS_cylinder = LBA / (heads_per_cylinder * sectors_per_track)         temp = LBA % (heads_per_cylinder * sectors_per_track)PCHS_head     = temp / sectors_per_trackPCHS_sector   = temp % sectors_per_track + 1The reverse, PCHS to LBA, is not implement but shown here

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区欧美精品| 日韩一区在线看| 欧美精品aⅴ在线视频| 一本大道久久a久久精品综合| 懂色av一区二区在线播放| 日日摸夜夜添夜夜添国产精品 | 日韩欧美一级二级三级| 欧美精品1区2区3区| 91麻豆精品国产综合久久久久久 | 91黄色免费网站| 日本精品一区二区三区高清| 在线看国产一区二区| 91福利精品第一导航| 欧美精品一二三| 精品国偷自产国产一区| 国产亚洲va综合人人澡精品| 久久久噜噜噜久久人人看 | 一本久道中文字幕精品亚洲嫩| 一本到不卡精品视频在线观看| 91在线porny国产在线看| 色综合久久中文综合久久牛| 欧美吻胸吃奶大尺度电影| 日韩欧美在线123| 国产精品久久久一本精品| 亚洲成va人在线观看| 老司机免费视频一区二区| av不卡在线播放| 日韩一区二区三区高清免费看看| 国产精品国产自产拍高清av王其 | 国产成人午夜电影网| 欧洲精品视频在线观看| 91精品久久久久久久久99蜜臂| 久久综合九色综合97_久久久| 亚洲欧洲日产国码二区| 免费成人美女在线观看.| av福利精品导航| 日韩精品最新网址| 婷婷开心激情综合| 99久久国产综合精品色伊| www日韩大片| 蜜臀va亚洲va欧美va天堂| 欧美在线一二三| 国产精品欧美综合在线| 国产精品123| 国产拍揄自揄精品视频麻豆| 日韩国产在线观看| 中文字幕中文乱码欧美一区二区| 成人免费视频一区| 久久久精品中文字幕麻豆发布| 欧美激情中文不卡| 蜜桃视频第一区免费观看| 91精品黄色片免费大全| 亚洲电影视频在线| 色香色香欲天天天影视综合网 | 亚洲444eee在线观看| 欧美一区日本一区韩国一区| 久久超碰97中文字幕| 精品播放一区二区| 国产精品白丝av| 亚洲欧美激情视频在线观看一区二区三区| 成人av资源站| 亚洲一卡二卡三卡四卡五卡| 色视频成人在线观看免| 日日欢夜夜爽一区| 日韩欧美电影在线| 成人黄色免费短视频| 日韩美女视频一区二区| 91超碰这里只有精品国产| 久久99国产精品免费网站| 中文一区二区完整视频在线观看 | 国产亚洲精品中文字幕| 久久综合久色欧美综合狠狠| 92国产精品观看| 国产老肥熟一区二区三区| 亚洲精品国产成人久久av盗摄| 精品久久99ma| 色综合一区二区三区| 国内成人免费视频| 亚洲在线视频网站| 日韩一区二区免费高清| 成人黄动漫网站免费app| 免费成人小视频| 亚洲午夜免费福利视频| 国产精品网站导航| 欧美一区二区三区系列电影| 99久久综合精品| 精品午夜久久福利影院| 亚洲人成电影网站色mp4| 久久综合色播五月| 91麻豆精品91久久久久久清纯 | 中文字幕在线不卡一区| 亚洲精品在线一区二区| 亚洲色图欧美激情| 久久综合久久久久88| 国产精品三级电影| 亚洲精品国产一区二区三区四区在线| 综合色中文字幕| 亚洲日本青草视频在线怡红院| 久久久久久久性| 久久亚洲影视婷婷| 精品动漫一区二区三区在线观看| 91精品婷婷国产综合久久| 欧美日韩免费高清一区色橹橹 | 大白屁股一区二区视频| 国产麻豆精品在线| 91精品福利视频| 国产成人精品www牛牛影视| 国产69精品久久777的优势| 日韩福利电影在线| 一区二区在线观看av| 亚洲电影一级黄| 九色综合狠狠综合久久| 成人午夜激情在线| 在线亚洲精品福利网址导航| 日韩精品中午字幕| 国产精品三级电影| 蜜臀av在线播放一区二区三区| 午夜精品123| 久久精工是国产品牌吗| 亚洲一级电影视频| 日韩免费视频一区| 色综合色综合色综合色综合色综合| 奇米精品一区二区三区在线观看 | 欧美三级韩国三级日本三斤| 国产精品一区二区久久精品爱涩| 麻豆视频观看网址久久| 亚洲成人一区二区在线观看| 亚洲天天做日日做天天谢日日欢| 日韩精品一区二| 日韩一级免费一区| 91精品国产综合久久久蜜臀粉嫩| 色婷婷av久久久久久久| www.av精品| 欧美在线视频不卡| 日韩视频免费观看高清完整版在线观看 | 在线观看中文字幕不卡| 成人一区二区三区中文字幕| 久久精品国产精品亚洲综合| 亚洲高清视频中文字幕| 亚洲欧美怡红院| 亚洲视频一区二区在线| 一区二区三区四区乱视频| 波多野结衣中文字幕一区二区三区| 中文字幕欧美三区| 色婷婷av一区二区三区之一色屋| 欧美激情在线观看视频免费| 成人免费毛片app| 欧美aⅴ一区二区三区视频| 中文字幕精品一区二区精品绿巨人 | 日本美女一区二区三区视频| 国产亚洲精品7777| 欧美少妇性性性| 一区二区三区在线免费播放| 免费日本视频一区| 不卡视频一二三四| 91精品国产91热久久久做人人| 欧美在线制服丝袜| 欧美一级搡bbbb搡bbbb| 国产精品免费视频一区| 一区二区三区欧美亚洲| 亚洲综合色婷婷| 国产在线精品视频| 欧美亚日韩国产aⅴ精品中极品| 国产精品二三区| 欧美一a一片一级一片| 亚洲精品伦理在线| 欧美伊人久久久久久久久影院| 国产99精品国产| 日韩av不卡在线观看| 亚洲欧美另类综合偷拍| 亚洲精品一区在线观看| 欧美日高清视频| 欧美日韩一区久久| 91免费观看视频在线| 美女视频网站久久| 蜜桃精品视频在线观看| 亚洲成人一二三| 国产亚洲精品aa| 2022国产精品视频| 日韩欧美你懂的| 日韩欧美区一区二| 欧美精品丝袜久久久中文字幕| 色妞www精品视频| 91麻豆免费观看| 懂色av一区二区夜夜嗨| 美女一区二区三区| 精品写真视频在线观看| 奇米一区二区三区av| 国产精品久线观看视频| 久久免费看少妇高潮| 精品成人佐山爱一区二区| 精品国产一区二区三区久久久蜜月| 91精品婷婷国产综合久久性色 | 国产电影一区在线| 肉肉av福利一精品导航| 麻豆国产欧美日韩综合精品二区| 亚洲成年人影院| 亚洲成人精品在线观看| 奇米影视一区二区三区小说| 美女视频一区在线观看|