Entwickeln Sie sich und Download Open Source Software

Ticket #28386

Open Date: 2012-05-14 23:35

Letztes Update: 2012-06-03 23:36

QEMU上でTinyVisorを動かすと、GRUBが error: hd0,msdos1 cannot get C/H/S value.というエラーを出力し、OSを起動できない

Reporter:yuichi_xyEigentümer:yuichi_xy
Priority:5 - MediumMileStone:(None)
Type:BugsSeverity:5 - Medium
Component:(None)Status:Closed
ResolutionNone

Details

QEMU上でTinyVisorを動かすと、GRUBが error: hd0,msdos1 cannot get C/H/S value.というエラーを出力し、OSを起動できません。

障害発生リビジョン: trunkのr31

Attach File

File List
qemu_grub_rescure.png (15KB)
submitted by yuichi_xy at 2012-05-14 23:35 [File ID: 4745]
File Description: 画面のキャプチャ
Add New attachment
Add attachment filesPlease login to add new attachment

Ticket History - 3/10 Histories [Show all old Histories]

2012-05-14 23:35 Update by: yuichi_xy

  • New Ticket "QEMU上でTinyVisorを動かすと、GRUBが error: hd0,msdos1 cannot get C/H/S value.というエラーを出力" created

2012-05-14 23:35 Update by: yuichi_xy

  • File qemu_grub_rescure.png (File ID: 4745) is attached.

2012-05-20 11:42 Update by: yuichi_xy

  • Eigentümer Update from (None) to yuichi_xy.

Kommentar

GRUB2のソースコードを取得して、エラーメッセージを出力している個所を調査しました。

disk/i386/pc/biosdiskc:grub_biosdisk_openから呼ばれるkern/i386/pc/startup.S:grub_biosdisk_get_diskinfo_standardがInt 13/AH=08h BIOS CALLを呼び出した際に、エラーになってしまったことが直接の原因であるようです。

Int 13/AH=08h BIOS CALLの機能については、次のWEBページに記述がありますが、シリンダ数などドライブのパラメータを取得するようです。

http://www.ctyme.com/intr/rb-0621.htm

2012-05-20 11:48 Update by: yuichi_xy

Kommentar

yuichi_xy への返信

disk/i386/pc/biosdiskc:grub_biosdisk_openから呼ばれるkern/i386/pc/startup.S:grub_biosdisk_get_diskinfo_standardがInt 13/AH=08h BIOS CALLを呼び出した際に、エラーになってしまったことが直接の原因であるようです。

QemuのBIOSのデバッグメッセージを有効にして、BIOS CALLがエラーになる原因を調査する必要がありそうです。

2012-05-20 21:41 Update by: yuichi_xy

Kommentar

yuichi_xy への返信

QemuのBIOSのデバッグメッセージを有効にして、BIOS CALLがエラーになる原因を調査する必要がありそうです。

QemuのBIOSのデバッグメッセージを有効にしてみましたが、「Int 13/AH=08h BIOS CALL」に関連するエラーメッセージは出力されませんでした。

Starting a virtual machine.
enter handle_13:
   a=00004b01  b=00000000  c=00000080  d=00000080 ds=0000 es=0000 ss=0000
  si=00007c00 di=00000000 bp=00000000 sp=000007fe cs=0000 ip=0834  f=0246
unimplemented disk_13XX:714:
   a=00004b01  b=00000000  c=00000080  d=00000080 ds=0000 es=0000 ss=0000
  si=00007c00 di=00000000 bp=00000000 sp=000007fe cs=0000 ip=0834  f=0246
enter handle_13:
   a=00000000  b=00000007  c=00000080  d=00000080 ds=0000 es=0000 ss=0000
  si=0000091d di=00000000 bp=00000000 sp=000007fe cs=0000 ip=0921  f=0246
disk_op d=0x00007d18 lba=0 buf=0x000007fe count=2337 cmd=0
enter handle_13:
   a=00000201  b=00007c00  c=00000001  d=00000080 ds=0000 es=0000 ss=0000
  si=0000091d di=00000000 bp=00000000 sp=000007fe cs=0000 ip=094a  f=0246
disk_op d=0x00007d18 lba=0 buf=0x00007c00 count=1 cmd=2
enter handle_13:
   a=00004100  b=000055aa  c=00000001  d=00000080 ds=0000 es=0000 ss=0000
  si=00007c05 di=00000000 bp=00000000 sp=00001ffe cs=0000 ip=7c9d  f=0282
enter handle_13:
   a=00004201  b=00000000  c=00000001  d=00000080 ds=0000 es=0000 ss=0000
  si=00007c05 di=00000000 bp=00000000 sp=00001ffe cs=0000 ip=7cd7  f=0202
disk_op d=0x00007d18 lba=1 buf=0x00070000 count=1 cmd=2
enter handle_13:
   a=0000422e  b=00000002  c=00000000  d=00000080 ds=0000 es=0000 ss=0000
  si=00007c05 di=000081f4 bp=00000002 sp=00001ffa cs=0000 ip=805a  f=0246
disk_op d=0x00007d18 lba=2 buf=0x00070000 count=46 cmd=2
enter handle_13:
   a=00000000  b=00000001  c=00000000  d=00000080 ds=0000 es=0000 ss=0000
  si=00008127 di=000081e8 bp=00001ff0 sp=00001ff0 cs=0000 ip=82eb  f=0246
disk_op d=0x00007d18 lba=33256 buf=0x00001ff0 count=33515 cmd=0
enter handle_12:
   a=00000000  b=0010a480  c=00000000  d=00000000 ds=0000 es=0000 ss=0000
  si=001069f0 di=000168c0 bp=00001ff0 sp=00001ff4 cs=0000 ip=8a9b  f=0246
unimplemented handle_15XX:333:
   a=534d4150  b=00000001  c=00000014  d=534d4150 ds=0000 es=6800 ss=0000
  si=00006800 di=00000004 bp=00001ff0 sp=00001ff4 cs=0000 ip=8afd  f=0246
enter handle_13:
   a=00004b01  b=00006800  c=00004b01  d=00006880 ds=6800 es=0000 ss=0000
  si=00000000 di=00107684 bp=00001ff0 sp=00001ff4 cs=0000 ip=8a03  f=0246
unimplemented disk_13XX:714:
   a=00004b01  b=00006800  c=00004b01  d=00006880 ds=6800 es=0000 ss=0000
  si=00000000 di=00107684 bp=00001ff0 sp=00001ff4 cs=0000 ip=8a03  f=0246
enter handle_13:
   a=00000101  b=00006800  c=00004b01  d=00006880 ds=6800 es=0000 ss=0000
  si=00000000 di=00107684 bp=00001ff0 sp=00001ff4 cs=0000 ip=8a05  f=0247
enter handle_13:
   a=00004100  b=022755aa  c=00000000  d=00000080 ds=0000 es=0000 ss=0000
  si=00000080 di=0227c4e0 bp=00001ff0 sp=00001ff4 cs=0000 ip=89c3  f=0246
enter handle_13:
   a=00003000  b=0227aa55  c=00000007  d=00000080 ds=0000 es=0000 ss=0000
  si=00000080 di=0227c4e0 bp=00001ff0 sp=00001ff4 cs=0000 ip=89c5  f=0246
unimplemented disk_13XX:714:
   a=00003000  b=0227aa55  c=00000007  d=00000080 ds=0000 es=0000 ss=0000
  si=00000080 di=0227c4e0 bp=00001ff0 sp=00001ff4 cs=0000 ip=89c5  f=0246
enter handle_13:
   a=00000101  b=00006800  c=00004b01  d=00006880 ds=6800 es=0000 ss=0000
  si=00000000 di=00107684 bp=00001ff0 sp=00001ff4 cs=0000 ip=8a05  f=0247
enter handle_13:
   a=00004100  b=022755aa  c=00000000  d=00000080 ds=0000 es=0000 ss=0000
  si=00000080 di=0227c4e0 bp=00001ff0 sp=00001ff4 cs=0000 ip=89c3  f=0246
enter handle_13:
   a=00003000  b=0227aa55  c=00000007  d=00000080 ds=0000 es=0000 ss=0000
  si=00000080 di=0227c4e0 bp=00001ff0 sp=00001ff4 cs=0000 ip=89c5  f=0246
unimplemented disk_13XX:714:
   a=00003000  b=0227aa55  c=00000007  d=00000080 ds=0000 es=0000 ss=0000
  si=00000080 di=0227c4e0 bp=00001ff0 sp=00001ff4 cs=0000 ip=89c5  f=0246
enter handle_13:
   a=00000800  b=0227c470  c=0227c478  d=0227c480 ds=0000 es=0000 ss=0000 <-- 「Int 13/AH=08h BIOS CALL」
  si=00000080 di=0227c4e0 bp=00001ff0 sp=00001ff4 cs=0000 ip=8a25  f=0246
enter handle_13:
   a=00000000  b=0227c470  c=022708bf  d=0227fe01 ds=0000 es=0000 ss=0000
  si=00000080 di=0227c4e0 bp=00001ff0 sp=00001ff4 cs=0000 ip=8a27  f=0246
invalid handle_legacy_disk:809:
   a=00000000  b=0227c470  c=022708bf  d=0227fe01 ds=0000 es=0000 ss=0000
  si=00000080 di=0227c4e0 bp=00001ff0 sp=00001ff4 cs=0000 ip=8a27  f=0246

2012-05-20 22:05 Update by: yuichi_xy

Kommentar

「Int 13/AH=08h BIOS CALL」の返り値を表示してみましたが、シリンダ番号などのパラメータを正しく返しているように見えます。

stub disk_1308:278:
   a=00000000  b=0227c470  c=022708bf  d=0227fe01 ds=0000 es=0000 ss=0000
  si=00000080 di=0227c4e0 bp=00001ff0 sp=00001ff4 cs=0000 ip=8a25  f=0246
CF(FLAGSのビット0): 0 -> 成功
CH: 08 -> low eight bits of maximum cylinder number
CL: bf -> maximum sector number (bits 5-0) -> セクタ番号の最大値 63
       -> high two bits of maximum cylinder number (bits 7-6) -> シリンダ番号の最大値 208
DH: fe -> maximum head number -> ヘッド番号の最大値 254
DL: 01 -> number of drives

2012-05-20 22:13 Update by: yuichi_xy

  • Summary Updated
  • Details Updated

2012-06-03 22:26 Update by: yuichi_xy

Kommentar

QemuのBIOSのデバッグメッセージをもっとたくさん表示するようにしたところ、 Int 13/AH=41h/BX=55AAh BIOS CALLが終了した直後に、INT13を実行しているように見えます。

enter handle_13:
   a=00004b01  b=00000000  c=00000080  d=00000080 ds=0000 es=0000 ss=0000
  si=00007c00 di=00000000 bp=00000000 sp=000007fe cs=0000 ip=0834  f=0246
unimplemented disk_13XX:714:
   a=00004b01  b=00000000  c=00000080  d=00000080 ds=0000 es=0000 ss=0000
  si=00007c00 di=00000000 bp=00000000 sp=000007fe cs=0000 ip=0834  f=0246
stub disk_13:753:
   a=00000101  b=00000000  c=00000080  d=00000080 ds=0000 es=0000 ss=0000
  si=00007c00 di=00000000 bp=00000000 sp=000007fe cs=0000 ip=0834  f=0247
enter handle_13:
   a=00000000  b=00000007  c=00000080  d=00000080 ds=0000 es=0000 ss=0000
  si=0000091d di=00000000 bp=00000000 sp=000007fe cs=0000 ip=0921  f=0246
disk_op d=0x00007d28 lba=1677721600 buf=0x00008d1d count=3 cmd=0
stub disk_13:753:
   a=00000000  b=00000007  c=00000080  d=00000080 ds=0000 es=0000 ss=0000
  si=0000091d di=00000000 bp=00000000 sp=000007fe cs=0000 ip=0921  f=0246
enter handle_13:
   a=00000201  b=00007c00  c=00000001  d=00000080 ds=0000 es=0000 ss=0000
  si=0000091d di=00000000 bp=00000000 sp=000007fe cs=0000 ip=094a  f=0246
disk_op d=0x00007d28 lba=0 buf=0x00007c00 count=1 cmd=2
stub disk_13:753:
   a=00000001  b=00007c00  c=00000001  d=00000080 ds=0000 es=0000 ss=0000
  si=0000091d di=00000000 bp=00000000 sp=000007fe cs=0000 ip=094a  f=0246
enter handle_13:
   a=00004100  b=000055aa  c=00000001  d=00000080 ds=0000 es=0000 ss=0000
  si=00007c05 di=00000000 bp=00000000 sp=00001ffe cs=0000 ip=7c9d  f=0282
stub disk_13:753:
   a=00003000  b=0000aa55  c=00000007  d=00000080 ds=0000 es=0000 ss=0000
  si=00007c05 di=00000000 bp=00000000 sp=00001ffe cs=0000 ip=7c9d  f=0282
enter handle_13:
   a=00004201  b=00000000  c=00000001  d=00000080 ds=0000 es=0000 ss=0000
  si=00007c05 di=00000000 bp=00000000 sp=00001ffe cs=0000 ip=7cd7  f=0202
disk_op d=0x00007d28 lba=1 buf=0x00070000 count=1 cmd=2
stub disk_13:753:
   a=00000001  b=00000000  c=00000001  d=00000080 ds=0000 es=0000 ss=0000
  si=00007c05 di=00000000 bp=00000000 sp=00001ffe cs=0000 ip=7cd7  f=0202
enter handle_13:
   a=0000422e  b=00000002  c=00000000  d=00000080 ds=0000 es=0000 ss=0000
  si=00007c05 di=000081f4 bp=00000002 sp=00001ffa cs=0000 ip=805a  f=0246
disk_op d=0x00007d28 lba=2 buf=0x00070000 count=46 cmd=2
stub disk_13:753:
   a=0000002e  b=00000002  c=00000000  d=00000080 ds=0000 es=0000 ss=0000
  si=00007c05 di=000081f4 bp=00000002 sp=00001ffa cs=0000 ip=805a  f=0246
enter handle_13:
   a=00000000  b=00000001  c=00000000  d=00000080 ds=0000 es=0000 ss=0000
  si=00008127 di=000081e8 bp=00001ff0 sp=00001ff0 cs=0000 ip=82eb  f=0246
disk_op d=0x00007d28 lba=-1860239309 buf=0x00008d1d count=0 cmd=0
stub disk_13:753:
   a=00000000  b=00000001  c=00000000  d=00000080 ds=0000 es=0000 ss=0000
  si=00008127 di=000081e8 bp=00001ff0 sp=00001ff0 cs=0000 ip=82eb  f=0246
enter handle_12:
   a=00000000  b=0010a480  c=00000000  d=00000000 ds=0000 es=0000 ss=0000
  si=001069f0 di=000168c0 bp=00001ff0 sp=00001ff4 cs=0000 ip=8a9b  f=0246
unimplemented handle_15XX:333:
   a=534d4150  b=00000001  c=00000014  d=534d4150 ds=0000 es=6800 ss=0000
  si=00006800 di=00000004 bp=00001ff0 sp=00001ff4 cs=0000 ip=8afd  f=0246
enter handle_13:
   a=00004b01  b=00006800  c=00004b01  d=00006880 ds=6800 es=0000 ss=0000
  si=00000000 di=00107684 bp=00001ff0 sp=00001ff4 cs=0000 ip=8a03  f=0246
unimplemented disk_13XX:714:
   a=00004b01  b=00006800  c=00004b01  d=00006880 ds=6800 es=0000 ss=0000
  si=00000000 di=00107684 bp=00001ff0 sp=00001ff4 cs=0000 ip=8a03  f=0246
stub disk_13:753:
   a=00000101  b=00006800  c=00004b01  d=00006880 ds=6800 es=0000 ss=0000
  si=00000000 di=00107684 bp=00001ff0 sp=00001ff4 cs=0000 ip=8a03  f=0247
enter handle_13:
   a=00000101  b=00006800  c=00004b01  d=00006880 ds=6800 es=0000 ss=0000
  si=00000000 di=00107684 bp=00001ff0 sp=00001ff4 cs=0000 ip=8a05  f=0247
stub disk_13:753:
   a=00000101  b=00006800  c=00004b01  d=00006880 ds=6800 es=0000 ss=0000
  si=00000000 di=00107684 bp=00001ff0 sp=00001ff4 cs=0000 ip=8a05  f=0247
enter handle_13:
   a=00004100  b=022755aa  c=00000000  d=00000080 ds=0000 es=0000 ss=0000 <- Int 13/AH=41h/BX=55AAh BIOS CALL
  si=00000080 di=0227c4e0 bp=00001ff0 sp=00001ff4 cs=0000 ip=89c3  f=0246
stub disk_13:753:
   a=00003000  b=0227aa55  c=00000007  d=00000080 ds=0000 es=0000 ss=0000 <- EDD-3.0, extended disk access unctions (AH=42h-44h,47h,48h) supported

  si=00000080 di=0227c4e0 bp=00001ff0 sp=00001ff4 cs=0000 ip=89c3  f=0246
enter handle_13:
   a=00003000  b=0227aa55  c=00000007  d=00000080 ds=0000 es=0000 ss=0000 <- 謎の INT 13。ひとつ前の BIOS CALL が終了した直後に INT 13 されたように見える。
  si=00000080 di=0227c4e0 bp=00001ff0 sp=00001ff4 cs=0000 ip=89c5  f=0246
unimplemented disk_13XX:714:
   a=00003000  b=0227aa55  c=00000007  d=00000080 ds=0000 es=0000 ss=0000
  si=00000080 di=0227c4e0 bp=00001ff0 sp=00001ff4 cs=0000 ip=89c5  f=0246
stub disk_13:753:
   a=00000100  b=0227aa55  c=00000007  d=00000080 ds=0000 es=0000 ss=0000
  si=00000080 di=0227c4e0 bp=00001ff0 sp=00001ff4 cs=0000 ip=89c5  f=0247
enter handle_13:
   a=00000800  b=0227c470  c=0227c478  d=0227c480 ds=0000 es=0000 ss=0000 <- Int 13/AH=08h BIOS CALL
  si=00000080 di=0227c4e0 bp=00001ff0 sp=00001ff4 cs=0000 ip=8a25  f=0246
stub disk_13:753:
   a=00000000  b=0227c470  c=022708bf  d=0227fe01 ds=0000 es=0000 ss=0000
  si=00000080 di=0227c4e0 bp=00001ff0 sp=00001ff4 cs=0000 ip=8a25  f=0246
enter handle_13:
   a=00000000  b=0227c470  c=022708bf  d=0227fe01 ds=0000 es=0000 ss=0000
  si=00000080 di=0227c4e0 bp=00001ff0 sp=00001ff4 cs=0000 ip=8a27  f=0246
invalid handle_legacy_disk:810:
   a=00000000  b=0227c470  c=022708bf  d=0227fe01 ds=0000 es=0000 ss=0000
  si=00000080 di=0227c4e0 bp=00001ff0 sp=00001ff4 cs=0000 ip=8a27  f=0246

QEMUのコンソールで0x89c3と0x89c5を逆アセンブルしたところ、0x89c3のみINT 13でした。

(qemu) xp/2i 0x89c3
0x00000000000089c3:  int    $0x13
0x00000000000089c5:  jb     0x86d4

2012-06-03 23:30 Update by: yuichi_xy

Kommentar

yuichi_xy への返信

QemuのBIOSのデバッグメッセージをもっとたくさん表示するようにしたところ、 Int 13/AH=41h/BX=55AAh BIOS CALLが終了した直後に、INT13を実行しているように見えます。

Int 13/AH=41h/BX=55AAh BIOS CALLを呼び出すためにINT 13を実行した時、IPがインクリメントされないことがおかしいです。 Qemuのバグの可能性があります。

回避策として、 ゲストソフトウェアが Real Mode で INTx 命令を実行した時に VMEXIT を発生させて、VMM が INTx 命令をエミュレートするようにしました。(r37)

GRUBの画面は現れるようになりました。

2012-06-03 23:36 Update by: yuichi_xy

  • Ticket Close date set to 2012-06-03 23:36
  • Status Update from Open to Closed.

Kommentar

yuichi_xy への返信

GRUBの画面は現れるようになりました。

残念ながら、Guest Linux の起動途中でパニックしましたので、#28637 を発行しました。 本チケットは close します。


Add Comment/Update #28386 (QEMU上でTinyVisorを動かすと、GRUBが error: hd0,msdos1 cannot get C/H/S value.というエラーを出力し、OSを起動できない)

You are not logged in. If you do not want to anonymous write, please login. » Login


SourceForge.JP is a Japanese version of SourceForge.net. For developments that are not related to Japan, we recommend you to use SourceForge.net.