Skip to contentSkip to conversation

amd64 progress

Qemu-devel Anand Kumria 4 participants 6 messages Feb 3, 2005 – Feb 9, 2005

lore
Share & tools
lore
#0 lore raw

So, I cvs update'd today and there is a fair bit of progress with amd64 userspace. Unfortunately the kernel crashes fairly quickly.

I haven't had time to look into this, just thought I'd put this up in case anyone else is looking at things.

<URL: http://www.progsoc.org/~wildfire/qemu/problemo.ppm>

Anand

#1 lore raw
Quoted 8 lines · Anand Kumria

So, I cvs update'd today and there is a fair bit of progress with amd64 userspace. Unfortunately the kernel crashes fairly quickly.

I haven't had time to look into this, just thought I'd put this up in case anyone else is looking at things.

<URL: http://www.progsoc.org/~wildfire/qemu/problemo.ppm>

I decided to share my experience as well...

I've tried installing the WinXP 64-bit preview under QEMU/x64 on Win32. At first I had to add a little hack - hardcoded ACPI table - to enable the setup loader to recognize the local APIC. After this the setup starts loading the kernel and device drivers, everything works well until it tries to jump to the loaded kernel. It crashes fairly quicky and ends-up in endless exception loop, because the in-memory kernel image is corrupted. The setup loader itself decompressed the image from CAB/LZX file stored on a CD-ROM so it's pretty hard to find where's the error and I've had no success at debugging it yet. ;-(

(See an example of the image corruption below.)

I would appreciate any suggestions on how to debug it/where the problem can be.

Regards,
Filip

Image as present in QEMU memory at the time the loader jmp on the kernel:

4D 5A 90 00 03 00 00 00 │ 04 00 00 00 FF FF 00 00 MZÉ ♥ ♦
B8 00 00 00 00 00 00 00 │ 40 00 00 00 00 00 00 00 ? @
00 00 00 00 00 00 00 00 │ 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 │ 00 00 00 00 E8 00 00 00 Ŕ
0E 1F BA 0E 00 B4 09 CD │ 21 B8 01 4C CD 21 54 68 ♫▼║♫ ┤○═!?☺L═!Th
69 73 20 70 72 6F 67 72 │ 61 6D 20 63 61 6E 6E 6F is program canno
74 20 62 65 20 72 75 6E │ 20 69 6E 20 44 4F 53 20 t be run in DOS
6D 6F 64 65 2E 0D 0D 0D │ 0A 24 00 00 00 00 00 00 mode.♪♪♪◙$
00 31 87 44 B4 75 E6 2A │ E7 75 E6 2A E7 75 E6 2A 1çD┤uŠ*šuŠ*šuŠ*
E7 03 7B 51 E7 72 E6 2A │ E7 75 E6 2B E7 45 E6 2A š♥{QšrŠ*šuŠ+šEŠ*
E7 03 7B 57 E7 59 E6 2A │ E7 03 7B 47 E7 27 E6 2A š♥{WšYŠ*š♥{Gš'Š*
E7 03 7B 5B E7 5A E4 2A │ E7 03 7B 50 E7 74 E6 2A š♥{[šZń*š♥{PštŠ*
E7 B6 E9 74 E7 74 E6 2A │ E7 03 7B 52 E7 74 E6 2A š?ÚtštŠ*š♥{RštŠ*
E7 52 69 63 68 75 E6 2A │ E7 00 00 00 00 00 00 00 šRichuŠ*š
00 00 00 00 00 00 00 00 │ 00 50 45 00 00 64 86 15 PE dć§
00 DE 94 05 41 00 00 00 │ 00 00 00 00 00 F0 00 22 Ůö♣A ­ "
00 0B 02 08 00 00 EC 38 │ 00 00 58 08 00 00 0C 00 ♂☻◘ ý8 X◘ ♀
00 00 20 3B 00 00 10 00 │ 00 00 00 40 00 00 00 00 ; ► @
00 00 10 00 00 00 02 00 │ 00 05 00 02 00 05 00 02 ► ☻ ♣ ☻ ♣ ☻
00 05 00 02 00 00 00 00 │ 00 00 F0 41 00 00 06 00 ♣ ☻ ­A ♠
00 F4 0D 3F 00 01 00 00 │ 00 00 00 08 00 00 00 00 ˘♪? ☺ ◘
00 00 20 00 00 00 00 00 │ 00 00 00 10 00 00 00 00 ►
00 00 10 00 00 00 00 00 │ 00 00 00 00 00 10 00 00 ► ►

The real file contents decompressed with standard tools on Win32 host:

4D 5A 90 00 03 00 00 00 │ 04 00 00 00 FF FF 00 00 MZÉ ♥ ♦
B8 00 00 00 00 00 00 00 │ 40 00 00 00 00 00 00 00 ? @
00 00 00 00 00 00 00 00 │ 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 │ 00 00 00 00 F0 00 00 00 ­
0E 1F BA 0E 00 B4 09 CD │ 21 B8 01 4C CD 21 54 68 ♫▼║♫ ┤○═!?☺L═!Th
69 73 20 70 72 6F 67 72 │ 61 6D 20 63 61 6E 6E 6F is program canno
74 20 62 65 20 72 75 6E │ 20 69 6E 20 44 4F 53 20 t be run in DOS
6D 6F 64 65 2E 0D 0D 0A │ 24 00 00 00 00 00 00 00 mode.♪♪◙$
0E C7 70 0F 4A A6 1E 5C │ 4A A6 1E 5C 4A A6 1E 5C ♫?p☼JŽ▲\JŽ▲\JŽ▲\
3C 3B 65 5C 4D A6 1E 5C │ 4A A6 1F 5C 66 A6 1E 5C <;e\MŽ▲\JŽ▼\fŽ▲\
3C 3B 63 5C 66 A6 1E 5C │ 3C 3B 73 5C 18 A6 1E 5C <;c\fŽ▲\<;s\↑Ž▲\
3C 3B 6F 5C 67 A4 1E 5C │ 3C 3B 64 5C 4B A6 1E 5C <;o\gĄ▲\<;d\KŽ▲\
89 A9 40 5C 4B A6 1E 5C │ 3C 3B 66 5C 4B A6 1E 5C ëę@\KŽ▲\<;f\KŽ▲\
52 69 63 68 4A A6 1E 5C │ 00 00 00 00 00 00 00 00 RichJŽ▲\
00 00 00 00 00 00 00 00 │ 00 00 00 00 00 00 00 00
50 45 00 00 64 86 14 00 │ 17 8A 05 41 00 00 00 00 PE dć¶ ↨Ő♣A
00 00 00 00 F0 00 22 00 │ 0B 02 08 00 00 2A 34 00 ­ " ♂☻◘ *4
00 A8 07 00 00 00 00 00 │ C0 37 3A 00 00 10 00 00 Ę• └7: ►
00 00 40 00 00 00 00 00 │ 00 10 00 00 00 02 00 00 @ ► ☻
05 00 02 00 05 00 02 00 │ 05 00 02 00 00 00 00 00 ♣ ☻ ♣ ☻ ♣ ☻
00 50 3C 00 00 06 00 00 │ 37 53 39 00 01 00 00 00 P< ♠ 7S9 ☺
00 00 08 00 00 00 00 00 │ 00 20 00 00 00 00 00 00 ◘
00 00 10 00 00 00 00 00 │ 00 10 00 00 00 00 00 00 ► ►
#2 lore raw
Quoted 10 lines · Filip Navara

I've tried installing the WinXP 64-bit preview under QEMU/x64 on Win32. At first I had to add a little hack - hardcoded ACPI table - to enable the setup loader to recognize the local APIC. After this the setup starts loading the kernel and device drivers, everything works well until it tries to jump to the loaded kernel. It crashes fairly quicky and ends-up in endless exception loop, because the in-memory kernel image is corrupted. The setup loader itself decompressed the image from CAB/LZX file stored on a CD-ROM so it's pretty hard to find where's the error and I've had no success at debugging it yet. ;-(

Quoted 4 lines

(See an example of the image corruption below.)

I would appreciate any suggestions on how to debug it/where the problem can be.

A long shot: I recently sent a patch to this list that fixed installation of win98 from cdrom, the bug was that register DL was modified during bios calls. The bug only occured when booting from cdrom. So if you boot from cdrom and use an old bios version I encourage you to upgrade rombios.c to rev 1.128 and see if that helps.

/ magnus

#3 lore raw
Quoted 6 lines · Magnus Damm

A long shot: I recently sent a patch to this list that fixed installation of win98 from cdrom, the bug was that register DL was modified during bios calls. The bug only occured when booting from cdrom. So if you boot from cdrom and use an old bios version I encourage you to upgrade rombios.c to rev 1.128 and see if that helps.

I've applied your patch, rebuilt the Bochs BIOS and it still doesn't work. :-(

Anyway, thanks for suggestion,
Filip

#4 lore raw
In reply to Filip Navara
Quoted 3 lines

I've tried installing the WinXP 64-bit preview under QEMU/x64 on Win32. At first I had to add a little hack - hardcoded ACPI table
- to enable the setup loader to recognize the local APIC.

Is this change committed to CVS or if not may I ask to see it? Bochs has the same problem as my CVS qemu and (at least according to their mailing list) they are stumped about how to get around this issue.

If you were able to get past that hurdle, maybe both teams can learn something from this experience.

Thanks,
-- /v\atthew

#5 lore raw
Quoted 7 lines · Matthew Daniel
Quoted 5 lines

I've tried installing the WinXP 64-bit preview under QEMU/x64 on Win32. At first I had to add a little hack - hardcoded ACPI table
- to enable the setup loader to recognize the local APIC.

Is this change committed to CVS or if not may I ask to see it?

It's a hack and as such it can't really be commited to CVS. The code is attached.

Quoted 5 lines

Bochs has
the same problem as my CVS qemu and (at least according to their mailing list) they are stumped about how to get around this issue.

I've made a similar hack to Bochs while testing... I do not intend to share the source since it's even uglyier than the QEMU one, sorry. With the hack Win64 under Bochs get about to the same point as in QEMU. There seem to be some problems with segment limit checks in the x86-64 mode, but I haven't tried to investigate it further...

Regards,
Filip