5月18日,,终于把linux0.11安到一台真正的pc上了

导读:
  靠,这个任务可真长,拖拖拉拉的快几个月了,,中间停下来学别的去了就把linux的事放下了,,直到见到了RAlf Brown' Interrupt List,,,不过这次装的结果怎样,自己的目的始终就是学习linux,,下一步就是要更多更努力的学习,,还有网络部分,争取把linux1.0的网络部分安到0.11上 :>
  我感谢下午的自己没像往常那么懒,,拆机箱把硬盘由slAve换到mAster,其实linux0.11的内核并不需要怎么修改就可以用了,,当然是从结果上看 :>
  这两天郁闷主要是因为硬盘是slAve,mAster的是块坏的,导致像port 0x1f1发reset返回是7f,总是不对,,换过来后就好多了
  其实就是改了if (drive>1 || heAd>15)
  panic("Trying to write bAd sector");
  因为硬盘大了heAd肯定会大于15,,而且硬盘要用NORMAL mode,,可我不明白,NORMAL的不是只能访问520(还是512)mb的硬盘范围吗,,而我的minix分区明显已经超过了,,,,要继续学习!!
  linux0.11的execve()只能执行那种最老的A.out的文件,开始的时候/bin/sh拷的是rh9里的bAsh,,是ELF格式的,导致无法用
  再学习东西的时候一定要笔记,,要不过不了多久就会郁闷第2遍.
  前几天查的RAlf Brown' Interrupt List中和IDE相关的部分:
  -----------------------------------------------------------------------------
  zmba,您好!
  是我错了,原来看linux0.11并不明白其目的在于通过0.11而了解内核,了解现在的内核,,当时就这样过去了,,又是一次机会,被放过去了....
  RAlf Brown' Interrupt List:
  ----------R12--------------------------------
  CMOS 12h - IBM - HARD DISK DATA
  Notes: A PC with a single type 2 (20 Mb ST-225) hard disk will have 20h in
  byte 12h
  some PCs utilizing external disk controller ROMs will use type 0 to
  disable ROM BIOS (e.g. Zenith 248 with Plus HardCard).
  Bitfields for IBM hard disk data:
  Bit(s) Description (Table C0014)
  7-4 First Hard Disk Drive
  00 No drive
  01-0Eh Hard drive Type 1-14
  0Fh Hard Disk Type 16-255
  (actual Hard Drive Type is in CMOS RAM 19h)
  3-0 Second Hard Disk Drive Type
  (same as first except extrnded type will be found in 1Ah).
  ----------R12--------------------------------
  CMOS 12h - IBM PS/2 - SECOND FIXED DISK DRIVE TYPE (00-FFh)
  SeeAlso: CMOS 11h"IBM PS/2"
  Copied from Ralf Brown's Interrupt List
  heAd sect cyl wpcom lzone ctl
  磁头数 每磁道扇区数 柱面数 写前预补偿柱面号 磁头着陆区柱面号 控制字节
  
  03F6 rW FIXED disk controller data register (see #P0871)
  Copied from Ralf Brown's Interrupt List
  Bitfields for fixed disk controller data register:
  Bit(s) Description (Table P0871)
  7-4 reserved
  3 =0 reduce write current
  =1 head select 3 enable
  2 disk reset enable
  1 disk initialization disable
  0 reserved
  SeeAlso: #P0862,#P0872
  Bitfields for hard disk controller:
  Bit(s) Description (Table P0872)
  6 FIXED DISK write gate
  5 FIXED DISK head select 3 / reduced write current
  4 FIXED DISK head select 2
  3 FIXED DISK head select 1
  2 FIXED DISK head select 0
  1 FIXED DISK drive 1 select
  0 FIXED DISK drive 0 select
  SeeAlso: #P0871
  Copied from Ralf Brown's Interrupt List
  Bitfields for diskette controller main status register:
  Bit(s) Description (Table P0865)
  7 =1 RQM data register is ready
  =0 no access is permitted
  6 =1 transfer is from controller to system
  =0 transfer is from system to controller
  5 non-DMA mode
  4 diskette controller is busy
  3 drive 3 busy (reserved on PS/2)
  2 drive 2 busy (reserved on PS/2)
  1 drive 1 busy (= drive is in seek mode)
  0 drive 0 busy (= drive is in seek mode)
  SeeAlso: #P0862
  Copied from Ralf Brown's Interrupt List
  Bitfields for Hard Disk Controller error register:
  Bit(s) Description (Table P0512)
  ---diagnostic mode errors---
  7 which drive failed (0 = master, 1 = slave)
  6-3 reserved
  2-0 error code
  001 no error detected
  010 formatter device error
  011 sector buffer error
  100 ECC circuitry error
  101 controlling microprocessor error
  ---operation mode---
  7 bad block detected
  6 uncorrectable ECC error
  5 reserved
  4 ID found
  3 reserved
  2 command aborted prematurely
  1 track 000 not found
  0 DAM not found (always 0 for CP-3022)
  SeeAlso: #P0513,#P0514
  Bitfields for hard disk controller drive/head specifier:
  Bit(s) Description (Table P0513)
  7 =1
  6 LBA mode enabled, rather than default CHS mode
  5 =1
  4 drive select (0 = drive 0, 1 = drive 1)
  3-0 head select bits (CHS mode)
  logical block address, bits 27-24 (LBA mode)
  SeeAlso: #P0512,#P0514
  Bitfields for hard disk controller status register:
  Bit(s) Description (Table P0514)
  7 controller is executing a command
  6 drive is ready
  5 write fault
  4 seek complete
  3 sector buffer requires servicing
  2 disk data read successfully corrected
  1 index - set to 1 each disk revolution
  0 previous command ended in an error
  SeeAlso: #P0512,#P0515
  (Table P0515)
  Values for hard disk controller command codes:
  Command Spec Type Proto Description class:
  00h opt nondata NOP
  08h device reset
  1xh opt nondata recalibrate 1
  20h req PIOin read sectors with retry 1
  21h req PIOin read sectors without retry 1
  22h req PIOin read long with retry 1
  23h req PIOin read long without retry 1
  30h req PIOout write sectors with retry 2
  31h req PIOout write sectors without retry 2
  32h req PIOout write long with retry 2
  33h req PIOout write long without retry 2
  3Ch IDE opt PIOout write verify 3
  40h req nondata read verify sectors with retry 1
  41h req nondata read verify sectors without retry 1
  50h req vend format track 2
  7xh req nondata seek 1
  8xh IDE vendor vend vendor unique 3
  90h req nondata execute drive diagnostics 1
  91h req nondata initialize drive parameters 1
  92h opt PIOout download microcode
  94h E0h IDE opt nondata standby immediate 1
  95h E1h IDE opt nondata idle immediate 1
  96h E2h IDE opt nondata standby 1
  97h E3h IDE opt nondata idle 1
  98h E5h IDE opt nondata check power mode 1
  99h E6h IDE opt nondata set sleep mode 1
  9Ah IDE vendor vend vendor unique 1
  A0h ATAPI packet command
  A1h ATAPI opt PIOin ATAPI Identify (see #P0524)
  B0h SMART opt Self Mon., Analysis, Rept. Tech. (see #P0527)
  C0h-C3h IDE vendor vend vendor unique 2
  C4h IDE opt PIOin read multiple 1
  C5h IDE opt PIOout write multiple 3
  C6h IDE opt nondata set multiple mode 1
  C7h ATA-4 Read DMA O/Q
  C8h IDE opt DMA read DMA with retry 1
  C9h IDE opt DMA read DMA without retry 1
  CAh IDE opt DMA write DMA with retry 3
  CBh IDE opt DMA write DMA w/out retry 3
  CCh ATA-4 Write DMA O/Q
  DAh get media status
  DBh ATA-2 opt vend acknowledge media chng [Removable]
  DCh ATA-2 opt vend Boot / Post-Boot [Removable]
  DDh ATA-2 opt vend Boot / Pre-Boot (ATA-2) [Removable]
  DEh ATA-2 opt vend door lock [Removable]
  DFh ATA-2 opt vend door unlock [Removable]
  E0h-E3h (second half of commands 94h-96h)
  E4h IDE opt PIOin read buffer 1
  E5h-E6h (second half of commands 98h-99h)
  E8h IDE opt PIOout write buffer 2
  E9h IDE opt PIOout write same 3
  EAh ATA-3 opt Secure Disable [Security Mode]
  EAh ATA-3 opt Secure Lock [Security Mode]
  EAh ATA-3 opt Secure State [Security Mode]
  EAh ATA-3 opt Secure Enable WriteProt [Security Mode]
  EBh ATA-3 opt Secure Enable [Security Mode]
  EBh ATA-3 opt Secure Unlock [Security Mode]
  ECh IDE req PIOin identify drive 1 (see #P0516)
  EDh ATA-2 opt nondata media eject [Removable]
  EEh ATA-3 opt identify device DMA (see #P0516)
  EFh IDE opt nondata set features 1 (see #P0535)
  F0h-F4h IDE vend EATA standard
  F1h Security Set Password
  F2h Security Unlock
  F3h Security Erase Prepare
  F4h Security Erase Unit
  F5h-FFh IDE vendor vend vendor unique 4
  F5h Security Freeze Lock
  F6h Security Disable Password
  SeeAlso: #P0512,#P0514
  Copied from Ralf Brown's Interrupt List
  致
  礼!
  
  uty
  zmba@tom.com
  2005-05-12
  ------------------------------------------------------------------------------------------

本文转自
http://blog.csdn.net/uuty/archive/2005/05/20/377143.aspx
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值