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

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

?? ide-geometry.c

?? ep9315平臺下硬盤驅(qū)動的源碼
?? C
字號:
/* * linux/drivers/ide/ide-geometry.c */#include <linux/config.h>#include <linux/ide.h>#include <linux/mc146818rtc.h>#include <asm/io.h>/* * We query CMOS about hard disks : it could be that we have a SCSI/ESDI/etc * controller that is BIOS compatible with ST-506, and thus showing up in our * BIOS table, but not register compatible, and therefore not present in CMOS. * * Furthermore, we will assume that our ST-506 drives <if any> are the primary * drives in the system -- the ones reflected as drive 1 or 2.  The first * drive is stored in the high nibble of CMOS byte 0x12, the second in the low * nibble.  This will be either a 4 bit drive type or 0xf indicating use byte * 0x19 for an 8 bit type, drive 1, 0x1a for drive 2 in CMOS.  A non-zero value * means we have an AT controller hard disk for that drive. * * Of course, there is no guarantee that either drive is actually on the * "primary" IDE interface, but we don't bother trying to sort that out here. * If a drive is not actually on the primary interface, then these parameters * will be ignored.  This results in the user having to supply the logical * drive geometry as a boot parameter for each drive not on the primary i/f. * * The only "perfect" way to handle this would be to modify the setup.[cS] code * to do BIOS calls Int13h/Fn08h and Int13h/Fn48h to get all of the drive info * for us during initialization.  I have the necessary docs -- any takers?  -ml * * I did this, but it doesn't work - there is no reasonable way to find the * correspondence between the BIOS numbering of the disks and the Linux * numbering. -aeb * * The code below is bad. One of the problems is that drives 1 and 2 * may be SCSI disks (even when IDE disks are present), so that * the geometry we read here from BIOS is attributed to the wrong disks. * Consequently, also the former "drive->present = 1" below was a mistake. * * Eventually the entire routine below should be removed. * * 17-OCT-2000 rjohnson@analogic.com Added spin-locks for reading CMOS * chip. */void probe_cmos_for_drives (ide_hwif_t *hwif){#ifdef __i386__	extern struct drive_info_struct drive_info;	u8 cmos_disks, *BIOS = (u8 *) &drive_info;	int unit;	unsigned long flags;	if (hwif->chipset == ide_pdc4030 && hwif->channel != 0)		return;	spin_lock_irqsave(&rtc_lock, flags);	cmos_disks = CMOS_READ(0x12);	spin_unlock_irqrestore(&rtc_lock, flags);	/* Extract drive geometry from CMOS+BIOS if not already setup */	for (unit = 0; unit < MAX_DRIVES; ++unit) {		ide_drive_t *drive = &hwif->drives[unit];		if ((cmos_disks & (0xf0 >> (unit*4)))		   && !drive->present && !drive->nobios) {			u16 cyl = *(u16 *)BIOS;			unsigned char head = *(BIOS+2);			unsigned char sect = *(BIOS+14);			if (cyl > 0 && head > 0 && sect > 0 && sect < 64) {				drive->cyl   = drive->bios_cyl  = cyl;				drive->head  = drive->bios_head = head;				drive->sect  = drive->bios_sect = sect;				drive->ctl   = *(BIOS+8);			} else {				printk("hd%c: C/H/S=%d/%d/%d from BIOS ignored\n",				       unit+'a', cyl, head, sect);			}		}		BIOS += 16;	}#endif}extern ide_drive_t * get_info_ptr(kdev_t);extern unsigned long current_capacity (ide_drive_t *);/* * If heads is nonzero: find a translation with this many heads and S=63. * Otherwise: find out how OnTrack Disk Manager would translate the disk. */static void ontrack(ide_drive_t *drive, int heads, unsigned int *c, int *h, int *s) {	static const u8 dm_head_vals[] = {4, 8, 16, 32, 64, 128, 255, 0};	const u8 *headp = dm_head_vals;	unsigned long total;	/*	 * The specs say: take geometry as obtained from Identify,	 * compute total capacity C*H*S from that, and truncate to	 * 1024*255*63. Now take S=63, H the first in the sequence	 * 4, 8, 16, 32, 64, 128, 255 such that 63*H*1024 >= total.	 * [Please tell aeb@cwi.nl in case this computes a	 * geometry different from what OnTrack uses.]	 */	total = DRIVER(drive)->capacity(drive);	*s = 63;	if (heads) {		*h = heads;		*c = total / (63 * heads);		return;	}	while (63 * headp[0] * 1024 < total && headp[1] != 0)		 headp++;	*h = headp[0];	*c = total / (63 * headp[0]);}/* * This routine is called from the partition-table code in pt/msdos.c. * It has two tasks: * (i) to handle Ontrack DiskManager by offsetting everything by 63 sectors, *  or to handle EZdrive by remapping sector 0 to sector 1. * (ii) to invent a translated geometry. * Part (i) is suppressed if the user specifies the "noremap" option * on the command line. * Part (ii) is suppressed if the user specifies an explicit geometry. * * The ptheads parameter is either 0 or tells about the number of * heads shown by the end of the first nonempty partition. * If this is either 16, 32, 64, 128, 240 or 255 we'll believe it. * * The xparm parameter has the following meaning: *	 0 = convert to CHS with fewer than 1024 cyls *	     using the same method as Ontrack DiskManager. *	 1 = same as "0", plus offset everything by 63 sectors. *	-1 = similar to "0", plus redirect sector 0 to sector 1. *	 2 = convert to a CHS geometry with "ptheads" heads. * * Returns 0 if the translation was not possible, if the device was not  * an IDE disk drive, or if a geometry was "forced" on the commandline. * Returns 1 if the geometry translation was successful. */int ide_xlate_1024 (kdev_t i_rdev, int xparm, int ptheads, const char *msg){	ide_drive_t *drive;	const char *msg1 = "";	int heads = 0;	int c, h, s;	int transl = 1;		/* try translation */	int ret = 0;	drive = get_info_ptr(i_rdev);	if (!drive)		return 0;	/* remap? */	if (drive->remap_0_to_1 != 2) {		if (xparm == 1) {		/* DM */			drive->sect0 = 63;			msg1 = " [remap +63]";			ret = 1;		} else if (xparm == -1) {	/* EZ-Drive */			if (drive->remap_0_to_1 == 0) {				drive->remap_0_to_1 = 1;				msg1 = " [remap 0->1]";				ret = 1;			}		}	}	/* There used to be code here that assigned drive->id->CHS	   to drive->CHS and that to drive->bios_CHS. However,	   some disks have id->C/H/S = 4092/16/63 but are larger than 2.1 GB.	   In such cases that code was wrong.  Moreover,	   there seems to be no reason to do any of these things. */	/* translate? */	if (drive->forced_geom)		transl = 0;	/* does ptheads look reasonable? */	if (ptheads == 32 || ptheads == 64 || ptheads == 128 ||	    ptheads == 240 || ptheads == 255)		heads = ptheads;	if (xparm == 2) {		if (!heads ||		   (drive->bios_head >= heads && drive->bios_sect == 63))			transl = 0;	}	if (xparm == -1) {		if (drive->bios_head > 16)			transl = 0;     /* we already have a translation */	}	if (transl) {		ontrack(drive, heads, &c, &h, &s);		drive->bios_cyl = c;		drive->bios_head = h;		drive->bios_sect = s;		ret = 1;	}	drive->part[0].nr_sects = current_capacity(drive);	if (ret)		printk("%s%s [%d/%d/%d]", msg, msg1,		       drive->bios_cyl, drive->bios_head, drive->bios_sect);	return ret;}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产黑丝在线一区二区三区| 蜜臀av一区二区在线观看| 欧美日韩aaaaaa| 99精品国产视频| 蜜乳av一区二区| av高清久久久| 99re热这里只有精品视频| 欧美日韩小视频| 欧美肥妇bbw| 91精品国产入口| 欧美精品一二三四| 综合精品久久久| 亚洲激情校园春色| 伊人性伊人情综合网| 国产酒店精品激情| 成人高清免费观看| 99v久久综合狠狠综合久久| 精品第一国产综合精品aⅴ| 精品成人一区二区三区| 国产在线精品一区二区不卡了 | 欧美三级电影一区| 国产精品久久毛片a| 亚洲精品美腿丝袜| 成人免费观看av| 欧美视频三区在线播放| 欧美一级日韩免费不卡| 亚洲国产精品久久久久婷婷884 | 亚洲一区二区三区爽爽爽爽爽| 亚洲一区在线电影| 91免费视频网址| 欧美午夜一区二区三区 | 国产经典欧美精品| 精品国产1区2区3区| 美国欧美日韩国产在线播放| 欧美日本国产视频| 婷婷久久综合九色综合绿巨人 | 欧美日韩一区中文字幕| 中文字幕日本不卡| 日本人妖一区二区| 波多野结衣在线一区| 国产欧美日韩三级| 亚洲国产精品精华液网站| 91网址在线看| 一区二区三区精品| 成人涩涩免费视频| 中文字幕欧美一区| 97精品国产97久久久久久久久久久久| 欧美韩国日本不卡| 蜜乳av一区二区三区| 久久综合九色综合欧美98| 亚洲精品免费在线| 欧美区视频在线观看| 蜜臀精品久久久久久蜜臀 | 欧美午夜精品久久久久久孕妇 | 91亚洲精品久久久蜜桃| 一区二区三区丝袜| 日韩一区二区在线观看视频播放| 久久精品日韩一区二区三区| 日韩精品91亚洲二区在线观看| 99视频一区二区三区| 一区二区三区在线视频观看| 91精品国产综合久久久久久| 一区二区视频在线看| 7777精品伊人久久久大香线蕉完整版 | 国产精品福利av| 91福利国产精品| 国产精品久久影院| 欧美乱熟臀69xxxxxx| 精品无码三级在线观看视频| 欧美日韩电影在线| 国产麻豆精品一区二区| 亚洲男同性视频| 色丁香久综合在线久综合在线观看| 亚洲妇女屁股眼交7| 久久蜜臀精品av| 韩国精品主播一区二区在线观看| 欧美一区二区精美| eeuss鲁一区二区三区| 青娱乐精品视频在线| 欧美一区二区三区人| 成人美女在线观看| 久久精品国产亚洲aⅴ| 欧美一区午夜视频在线观看| 国产成人午夜精品影院观看视频| 一级特黄大欧美久久久| 国产人久久人人人人爽| 欧美老年两性高潮| 95精品视频在线| 精彩视频一区二区三区| 亚洲一区二区三区三| 国产精品国产自产拍高清av王其| 日韩丝袜美女视频| 精品视频资源站| 99久久99久久精品免费观看| 国产尤物一区二区| 蜜桃一区二区三区四区| 亚洲成人免费视| 日韩亚洲欧美在线| 欧美丝袜自拍制服另类| 本田岬高潮一区二区三区| 九九九久久久精品| 免费在线欧美视频| 亚洲线精品一区二区三区八戒| 中文字幕免费一区| 久久久久久麻豆| 精品精品国产高清一毛片一天堂| 欧美日韩国产小视频在线观看| 北岛玲一区二区三区四区| 国产精品亚洲午夜一区二区三区| 免费观看日韩电影| 欧美96一区二区免费视频| 亚洲地区一二三色| 婷婷综合五月天| 日韩专区中文字幕一区二区| 亚洲成av人影院| 亚洲国产成人porn| 舔着乳尖日韩一区| 日本不卡一区二区三区| 奇米影视一区二区三区小说| 午夜精品久久久久久不卡8050| 午夜精品免费在线| 日韩高清不卡一区二区| 五月婷婷综合激情| 免费看精品久久片| 国内成人精品2018免费看| 国产精品中文字幕欧美| 高清不卡在线观看av| 日一区二区三区| 久久99国产精品久久99果冻传媒| 久久99国产乱子伦精品免费| 激情综合网最新| 成人白浆超碰人人人人| 91麻豆国产精品久久| 欧美日韩国产影片| 日韩欧美视频在线| 亚洲国产高清在线观看视频| 久久久久久综合| 成人欧美一区二区三区白人| 一区二区三区欧美激情| 亚洲r级在线视频| 老汉av免费一区二区三区| 国产精品911| 一本久久a久久免费精品不卡| 青青草成人在线观看| 国模娜娜一区二区三区| kk眼镜猥琐国模调教系列一区二区 | 在线视频欧美区| 成人黄色av网站在线| 91久久精品一区二区三| 欧美一区二区三区日韩视频| 国产欧美一区二区三区鸳鸯浴| 亚洲视频免费观看| 蜜桃精品视频在线| av成人老司机| 4hu四虎永久在线影院成人| 2022国产精品视频| 亚洲一区二区三区三| 国产激情视频一区二区在线观看 | 久久99最新地址| 99久久久久免费精品国产| 制服丝袜激情欧洲亚洲| 欧美高清在线视频| 免费观看30秒视频久久| 97久久精品人人做人人爽50路| 欧美精品 日韩| 国产精品免费网站在线观看| 国产精品久久久久永久免费观看| 午夜亚洲国产au精品一区二区| 国产乱码精品一区二区三区av| 在线视频综合导航| 国产精品午夜免费| 看片网站欧美日韩| 欧美日韩国产美女| 国产精品国产三级国产普通话三级| 日本中文字幕一区二区视频| 成人av在线一区二区| 精品国产免费人成电影在线观看四季 | 国产成人免费网站| 日韩午夜三级在线| 亚洲va国产va欧美va观看| aaa亚洲精品| 国产日韩欧美综合在线| 日本aⅴ精品一区二区三区 | 综合久久综合久久| 国产精品一级二级三级| 欧美美女喷水视频| 亚洲综合色自拍一区| av一区二区久久| 国产精品乱子久久久久| 国产成人午夜99999| 久久精品无码一区二区三区| 久久激五月天综合精品| 欧美一卡2卡3卡4卡| 日韩激情一二三区| 欧美精品在欧美一区二区少妇| 亚洲男同性恋视频| 色爱区综合激月婷婷| 亚洲精品菠萝久久久久久久| 99精品视频一区二区三区| 国产精品家庭影院|