From: Rob Landley <rob@landley.net>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Config file support
Date: Mon, 23 Oct 2006 18:22:58 -0400 [thread overview]
Message-ID: <200610231822.59310.rob@landley.net> (raw)
In-Reply-To: <200610232129.53615.paul@codesourcery.com>
On Monday 23 October 2006 4:29 pm, Paul Brook wrote:
> On Monday 23 October 2006 21:01, Rob Landley wrote:
> > On Sunday 22 October 2006 2:27 pm, Paul Brook wrote:
> > > I've been considering a machine config file for a while, but haven't
come
> > > up with a coherent way of representing everything yet.
> >
> > Do you at least have a list of everything that needs to be represented?
(I
> > have a list but am fairly certain it's not complete.)
>
> Not really. I guess a generic key/value pair is sufficient for most things
> (base address, model number, etc).
The things are what I was asking about. Assuming that QEMU has support for
the appropriate processor type, support for the right bus controller(s), and
support for various devices that can attach to that bus, what other
information is needed to completely specify a machine? (You mention IRQ
lines and DMA channels...)
I'm still a little fuzzy about basic questions like "How much information is
in 'processor type'?" (Does that include cache size? Floating point
support? Has mmu flag? Are these separate processors with their own names,
or are they options to a base processor type?)
> The really OTT method is to embed a python interpreter or something and do
> the machine init that way. I'm not seriously suggesting that though.
Thank goodness. :)
I'm generally not worried about parsing data files being hard, I just don't
currently know what's involved in adding a new machine type to QEMU anyway.
don't know what all the data _is_ let alone what to do with it once it's read
in.
Fabrice did a good job explaining the CPU part in
http://www.usenix.org/events/usenix05/tech/freenix/full_papers/bellard/bellard_html/index.html
but that sort of glosses over the support chips, bus, devices, interrupts,
dma...
Last I checked, each processor was in its own directory (at the top level, not
under any kind of processors/ directory), the devices were under "hw", and
the motherboards gluing together a bunch of devices were _also_ under "hw".
Sorting through that, I read bits of files like "hw/pc.c" where it defines
QEMUMachine structures like "pc_machine" where the important thing seems to
be pc_init_pci which takes ten arguments and is a wrapper around pc_init1
(which takes eleven).
That calls lots of functions to init cpu emulators (_which_ cpu is being
initalized seems to be specified elsewhere, possibly by the makefile linking
in the right objects), map memory into the virtual MMU, initialize the bios,
possibly load a kernel, init the virtual PCI bus (and the PCI to ISA bridge),
whatever the heck the two calls to register_ioport_write() do (0x80 and
0xf0... Let's see, http://www.cs.cmu.edu/~ralf/interrupt-list/inter61d.zip
file PORT.A. PORT 0080 is "manufacturing diagnostics port", sometimes used
for a hex display, and I vaguely remember from way back some linux kernel
thread about this (it was being used as a delay, or...?) Bug can't seem to
google for it right now. 0xf0 is the math coprocessor.), init the virtual
graphics card, init the realtime clock, more I/O port stuff (0x92... PS/2
system control port a, controls the A20 line among other things), setup the
ioapic, and the ISA Programmable interrupt controller, the programmable
interval timer, pci speaker, do something else with the interrupts, init
serial and parallel ports, network cards, ide controllers, keyboard, dma,
sound card, floppy controller, cmos, usb, power management, a commented out
block of scsi devices, and the pci and acpi bioses.
Currently, this is all hard-wired together into a big blob. Step one of
untangling it would probably be moving the device files and the motherboard
files to separate directories...
Rob
--
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
next prev parent reply other threads:[~2006-10-23 22:23 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-20 17:55 [Qemu-devel] Config file support Chuck Brazie
2006-10-21 0:12 ` Johannes Schindelin
2006-10-21 10:00 ` Ricardo Almeida
2006-10-21 11:40 ` Stefan Weil
2006-10-22 9:51 ` Johannes Schindelin
2006-10-22 17:01 ` Flavio Visentin
2006-10-22 17:19 ` Martin Guy
2006-10-22 18:27 ` Paul Brook
2006-10-23 6:33 ` [Qemu-devel] " Antti P Miettinen
2006-10-23 20:01 ` [Qemu-devel] " Rob Landley
2006-10-23 20:29 ` Paul Brook
2006-10-23 22:22 ` Rob Landley [this message]
2006-10-23 23:33 ` Paul Brook
2006-10-24 9:04 ` Rob Landley
2006-10-24 10:47 ` Flavio Visentin
2006-10-24 12:05 ` Christian MICHON
2006-10-24 16:46 ` Blue Swirl
2006-10-24 20:38 ` Christian MICHON
2006-10-24 23:32 ` Rob Landley
2006-10-25 8:20 ` Johannes Schindelin
2006-10-24 0:11 ` andrzej zaborowski
2006-10-24 0:34 ` Paul Brook
2006-10-24 0:12 ` Re[2]: " Paul Sokolovsky
2006-10-24 0:36 ` Paul Brook
2006-10-24 1:38 ` Re[2]: " Paul Sokolovsky
2006-10-24 2:31 ` Paul Brook
2006-10-24 8:37 ` Christian MICHON
2006-10-24 23:28 ` Rob Landley
2006-10-25 0:18 ` Re[2]: " Paul Sokolovsky
2006-10-25 15:01 ` Paul Brook
2006-10-26 14:31 ` Rob Landley
2006-10-27 20:00 ` Re[2]: " Paul Sokolovsky
2006-10-27 19:33 ` Paul Sokolovsky
2006-10-28 0:08 ` Paul Brook
2006-10-28 1:46 ` Re[2]: " Paul Sokolovsky
2006-10-24 23:28 ` Rob Landley
2006-10-21 18:00 ` David Baird
-- strict thread matches above, loose matches on Subject: below --
2006-10-23 18:25 [Qemu-devel] config " Ben Taylor
2006-10-18 18:42 Chuck Brazie
2006-10-22 21:51 ` Rob Landley
2006-10-23 10:58 ` Christian MICHON
2006-10-23 11:48 ` Jan Marten Simons
2006-10-23 12:24 ` Paul Brook
2006-10-23 17:50 ` K. Richard Pixley
2006-10-23 20:39 ` Rob Landley
2006-10-23 20:58 ` Paul Brook
2006-10-23 21:01 ` K. Richard Pixley
2006-10-23 21:17 ` M. Warner Losh
2006-10-23 20:42 ` André Braga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200610231822.59310.rob@landley.net \
--to=rob@landley.net \
--cc=paul@codesourcery.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).