Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2008-01

QEMU for 64-bit FPC testing?

10 messages · 7 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi

I don't own a 64bit pc. With the wonderful world of emulators and virtual pc products like VirtualBox, VMWare and Virtual PC 2007 I thought, why can't my 32bit Intel P4 emulate a 64bit CPU via software. If it works, that would be cool. :) If it works it might be slow, but I don't care, it's simply for testing purposes.

QEMU's wikipedia pages says that it can emulate the following CPU's (listed below). Does anybody know if I can use QEMU on my 32bit CPU to emulate the AMD64 so I can run 64 bit FPC? It's just a though, I don't know QEMU really, just that it gets used inside the VirtualBox product.

http://en.wikipedia.org/wiki/QEMU
Supports emulating IA-32 (x86) PCs, AMD64 PCs, MIPS R4000, Sun's SPARC sun4m, Sun's SPARC sun4u, ARM development boards (Integrator/CP and Versatile/PB), SH4 SHIX board, PowerPC (PReP and Power Macintosh), and ETRAX CRIS architectures.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

ik
to Graeme Geldenhuys

Hi,

Yes you can emulate all of the listed CPU's, it just have different executable names. qemu-system-x86_64
for what you require.

The only problem that I found, is that sometimes the hardware you have using qemu virtualization is not suited for some of the linux distro you wish to use.

Ido

Graeme Geldenhuys wrote 32 lines
Hi I don't own a 64bit pc. With the wonderful world of emulators and virtual pc products like VirtualBox, VMWare and Virtual PC 2007 I thought, why can't my 32bit Intel P4 emulate a 64bit CPU via software. If it works, that would be cool. :) If it works it might be slow, but I don't care, it's simply for testing purposes. QEMU's wikipedia pages says that it can emulate the following CPU's (listed below). Does anybody know if I can use QEMU on my 32bit CPU to emulate the AMD64 so I can run 64 bit FPC? It's just a though, I don't know QEMU really, just that it gets used inside the VirtualBox product. http://en.wikipedia.org/wiki/QEMU Supports emulating IA-32 (x86) PCs, AMD64 PCs, MIPS R4000, Sun's SPARC sun4m, Sun's SPARC sun4u, ARM development boards (Integrator/CP and Versatile/PB), SH4 SHIX board, PowerPC (PReP and Power Macintosh), and ETRAX CRIS architectures. Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Michael Schnell
to Graeme Geldenhuys: Hi I don't own a 64bit pc. With the wonderful world of emulators and virtual pc products…
With the wonderful world of emulators and virtual pc products like VirtualBox, VMWare and Virtual PC 2007 ...

VirtualBox, VMWare, XEN etc are no emulators but virtualization managers.

If they would emulate a CPU they would be by far too slow to be useful. They just force the guest processes (in fact the OSes) to call the virtualization code instead of accessing certain hardware resources (such as peripherals and memory management). But the 99,9% of the code of the OSes (and 100% of the code of the user processes) is executed just in the normal way.

-Michael

Reply by email

Vincent Snijders
to Michael Schnell
Michael Schnell wrote 11 lines
> With the wonderful world of emulators and > virtual pc products like VirtualBox, VMWare and Virtual PC 2007 ... VirtualBox, VMWare, XEN etc are no emulators but virtualization managers. If they would emulate a CPU they would be by far too slow to be useful. They just force the guest processes (in fact the OSes) to call the virtualization code instead of accessing certain hardware resources (such as peripherals and memory management). But the 99,9% of the code of the OSes (and 100% of the code of the user processes) is executed just in the normal way.

If that were the case, how can one run (virtualized) x86_64 (64bits) assembler on a i386 (32 bits) processor? I think qemu can is and therefore qemu *is* also an emulator.

Vincent

Reply by email

Michael Schnell
to Vincent Snijders
If that were the case, how can one run (virtualized) x86_64 (64bits) assembler on a i386 (32 bits) processor?

Running Compiler Software on processor A that creates object code for processor B but itself is compiled for processor A: "Cross-Compiling"

I think qemu can is and therefore qemu *is* also an emulator.

Right.

Reply by email

Michael Schnell
to Graeme Geldenhuys: Hi I don't own a 64bit pc. With the wonderful world of emulators and virtual pc products…
I don't know QEMU really, just that it gets used inside the VirtualBox product.

How did you get to know this ? I only can imagine that this is true for the initial execution of the client OS that is done in an emulated way to detect and replace critical instructions before they are executed.

-Michael

Show quoted text 18 lines
http://en.wikipedia.org/wiki/QEMU Supports emulating IA-32 (x86) PCs, AMD64 PCs, MIPS R4000, Sun's SPARC sun4m, Sun's SPARC sun4u, ARM development boards (Integrator/CP and Versatile/PB), SH4 SHIX board, PowerPC (PReP and Power Macintosh), and ETRAX CRIS architectures. Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel
Michael Schnell, Firmware-Entwicklung LUMINO Licht Elektronik GmbH, Germany, Europark Fichtenhain A8, D-47807 Krefeld Geschäftsführung: Dipl.-Ing. Karl Heinz Ronkholz, Dipl.-Betriebswirt Mario Fullert, Dipl.-Ing. Rolf Aengenendt www.lumino.de, fon: +49 (2151) 8196-172, fax: +49 (2151) 8196-272 Handelsregister HRB 1682 Amtsgericht Krefeld

Reply by email

Jonas Maebe
to Michael Schnell
Michael Schnell wrote 9 lines
> I > don't know QEMU really, just that it gets used inside the VirtualBox > product. > How did you get to know this ? I only can imagine that this is true for the initial execution of the client OS that is done in an emulated way to detect and replace critical instructions before they are executed.

Qemu can be run as an emulator, but also as a virtualisation environment. Google e.g. kqemu.

Jonas

Reply by email

Graeme Geldenhuys
to Michael Schnell: How did you get to know this ? I only can imagine that this is true for the initial…
Michael Schnell wrote 8 lines
> I > don't know QEMU really, just that it gets used inside the VirtualBox > product. > How did you get to know this ? I only can imagine that this is true for the initial execution of the client OS that is done in an emulated way to detect and replace critical instructions before they are executed.

As Jonas said. Plus they mentioned in on their web site (or wikipedia) that Qemu is used to emulate the network cards and sound cards etc...

Quote from wikipedia:
"In January 2007, VirtualBox was released. It uses some of QEMU's virtual hardware devices and has a built-in dynamic recompiler that is based on QEMU."

-- http://en.wikipedia.org/wiki/KQEMU#VirtualBox

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Marc Weustink
to Graeme Geldenhuys: Hi I don't own a 64bit pc. With the wonderful world of emulators and virtual pc products…
Graeme Geldenhuys wrote 7 lines
Hi I don't own a 64bit pc. With the wonderful world of emulators and virtual pc products like VirtualBox, VMWare and Virtual PC 2007 I thought, why can't my 32bit Intel P4 emulate a 64bit CPU via software. If it works, that would be cool. :) If it works it might be slow, but I don't care, it's simply for testing purposes.

Yes, before I had a XP64 machine I ran a XP64 in qemu on a 2.8GHz P4 XP32 machine. The emulated XP64 was dog slow (I used the buildin qemu-vnc as display). It takes minutes to open a dialog or so.

Marc

Reply by email

Mark Morgan Lloyd
to ik: Yes you can emulate all of the listed CPU's, it just have different executable names.…
ik wrote
The only problem that I found, is that sometimes the hardware you have using qemu virtualization is not suited for some of the linux distro you wish to use.

Qemu still requires gcc v3. Debian "Etch" released a version compiled with v4 which was badly broken, I've ended up running a dedicated machine with "Woody" and have compiled from scratch.

As a general point Qemu's virtualisation of PC serial ports doesn't handle the control lines (DTR etc.)- I found a patch which sorted it nicely but again it's a reason to compile from source.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email