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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? dospartlibata.c

?? vxworks demo all 完整板本
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* dosPartLibAta.c - show & mount ATA HDD MSDOS partitions *//*modification history--------------------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 check for LBA support in dosPartRdLbaAta().                  fixed stdlib.h filename case for Unix.                  fixed args to ataDevCreate in example comments.                  fixed cosmetics in sector and show routines.  01a,01sep97,jkf   written.*//*DESCRIPTION:This library is provided by Wind River Systems CustomerSupport strictly as an educational example.This code supports both mounting and displaying partition tables written by MSDOS FDISK.exe or by 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 hereshould anyone need to implement it:LBA = (((cylinder * heads_per_cylinder + heads )         * sectors_per_track ) + sector - 1)Both of these can also be used with either LCHS or PCHS.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99精品视频一区二区三区| 一区二区三区丝袜| 91丝袜美女网| 久久丁香综合五月国产三级网站| 久久婷婷综合激情| 欧美性受xxxx黑人xyx| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 91精品中文字幕一区二区三区| 日韩影院在线观看| 亚洲日本成人在线观看| 国产亚洲短视频| 91.com视频| 欧美在线免费视屏| av不卡一区二区三区| 国产精品资源在线看| 日韩一区欧美二区| 亚洲妇熟xx妇色黄| 亚洲欧美日韩国产另类专区| 国产人妖乱国产精品人妖| 日韩一区二区精品葵司在线| 狠狠色狠狠色综合| 国产免费久久精品| 亚洲精品在线免费观看视频| 欧美三级韩国三级日本三斤| 色综合中文字幕| www.亚洲激情.com| 高清国产午夜精品久久久久久| 免费在线观看一区| 偷拍与自拍一区| 亚洲一区二区高清| 亚洲国产aⅴ成人精品无吗| 亚洲三级小视频| 亚洲丝袜另类动漫二区| 中文字幕一区二区在线观看 | 日韩一区在线免费观看| 国产日韩欧美激情| 国产人成一区二区三区影院| 久久综合九色综合欧美98| 欧美成人a∨高清免费观看| 7777精品伊人久久久大香线蕉的| 欧美美女网站色| 777午夜精品免费视频| 欧美一区二区播放| 日韩视频在线一区二区| 日韩一区二区电影在线| 亚洲国产欧美日韩另类综合| 欧美极品xxx| 26uuu精品一区二区在线观看| 日韩一区二区中文字幕| 欧美成人vr18sexvr| 欧美精品一区二区三区在线播放 | 日韩免费视频一区| 日韩欧美视频在线| 久久综合五月天婷婷伊人| 精品99999| 国产日产欧美精品一区二区三区| 国产精品久久久久久久久晋中| 中文字幕欧美一| 亚洲精品va在线观看| 亚洲国产一区视频| 青青国产91久久久久久| 国产在线一区二区综合免费视频| 亚洲h在线观看| 日韩主播视频在线| 国产麻豆午夜三级精品| 成人爱爱电影网址| 欧美色国产精品| 欧美v日韩v国产v| 国产蜜臀97一区二区三区| 亚洲精品乱码久久久久久日本蜜臀| 五月婷婷久久丁香| 国产最新精品精品你懂的| 91首页免费视频| 欧美另类变人与禽xxxxx| 久久久国产精品麻豆| 亚洲综合清纯丝袜自拍| 韩国理伦片一区二区三区在线播放| 成人91在线观看| 制服丝袜一区二区三区| 中文字幕av一区二区三区高| 亚洲成人动漫一区| 国产91精品一区二区麻豆网站| 色老汉av一区二区三区| 欧美成人精品1314www| 亚洲天堂免费看| 精油按摩中文字幕久久| 色哟哟国产精品| 2欧美一区二区三区在线观看视频| 中文字幕在线免费不卡| 日韩1区2区3区| 91一区在线观看| 精品国产乱码久久久久久久| 亚洲黄一区二区三区| 国产乱码精品一区二区三区av| 在线精品视频小说1| 国产欧美精品区一区二区三区 | 国产麻豆精品在线| 欧美乱熟臀69xxxxxx| 自拍偷在线精品自拍偷无码专区 | 亚洲欧洲日本在线| 狠狠久久亚洲欧美| 欧美精品日韩精品| 中文字幕一区二区三区在线不卡| 美女免费视频一区二区| 欧美在线色视频| 中文字幕在线观看不卡视频| 韩日欧美一区二区三区| 欧美肥胖老妇做爰| 亚洲午夜一二三区视频| 99热99精品| 久久新电视剧免费观看| 免费在线观看视频一区| 欧美中文字幕亚洲一区二区va在线 | 国产一区二区美女诱惑| 91精品国产免费| 亚洲自拍偷拍网站| 91蝌蚪porny成人天涯| 欧美激情综合五月色丁香| 久久99精品久久久久| 91精品啪在线观看国产60岁| 亚洲gay无套男同| 欧美天堂一区二区三区| 一区二区三区欧美激情| 91在线视频在线| 亚洲欧美视频在线观看| 99re热这里只有精品免费视频| 中文字幕第一区二区| 国产不卡视频在线播放| 国产欧美日韩卡一| 国产成a人无v码亚洲福利| 国产女同互慰高潮91漫画| 国产成人精品aa毛片| 欧美韩日一区二区三区| 成人性生交大片免费看中文| 国产日韩欧美精品综合| 成人午夜av在线| 中文字幕一区二区日韩精品绯色| 成人av电影免费在线播放| 亚洲欧洲日韩女同| 在线精品视频免费播放| 亚洲成人精品在线观看| 91精品国产色综合久久ai换脸 | 另类成人小视频在线| 欧美大片在线观看| 国产一区欧美日韩| 亚洲国产经典视频| 91免费国产在线| 亚洲国产综合人成综合网站| 欧美日韩一卡二卡| 美国三级日本三级久久99| 精品国产一区二区在线观看| 国产成a人无v码亚洲福利| 亚洲视频每日更新| 欧美日韩不卡视频| 韩国成人精品a∨在线观看| 日本一区二区三区免费乱视频| 91在线观看成人| 天天综合日日夜夜精品| 久久亚洲二区三区| 不卡一区二区三区四区| 亚洲线精品一区二区三区八戒| 日韩一区二区免费电影| 国产91对白在线观看九色| 亚洲欧美一区二区三区极速播放 | 99久久综合国产精品| 一区二区三区四区蜜桃| 欧美丰满高潮xxxx喷水动漫| 国产一区二区伦理| 一区二区三区免费看视频| 91精品国产入口| caoporn国产精品| 日韩电影一区二区三区四区| 久久免费国产精品| 在线亚洲+欧美+日本专区| 日韩av电影天堂| 国产精品伦理一区二区| 在线播放国产精品二区一二区四区| 国产乱淫av一区二区三区| 一个色综合网站| 亚洲精品一线二线三线无人区| 色婷婷激情一区二区三区| 久久99国产精品久久99| 亚洲你懂的在线视频| www国产精品av| 欧美日韩美女一区二区| 粉嫩嫩av羞羞动漫久久久| 亚洲国产aⅴ天堂久久| 欧美国产激情二区三区| 欧美一区二区三区色| 99在线热播精品免费| 激情国产一区二区| 婷婷国产v国产偷v亚洲高清| 国产精品久久久久久久久晋中 | 欧美日韩成人激情| 91在线观看美女| 国产精品一区二区男女羞羞无遮挡| 一区二区三区日韩欧美| 中文一区在线播放 | 丝瓜av网站精品一区二区| 成人欧美一区二区三区白人|