Internal documentation
Hi --
Is there any internal documentation for QEMU?
I'm adding support for a new processor. I'm currently adding semihosting support and a new command line option. I find that I'm reading a lot of uncommented code and trying to reverse engineer QEMU's design by reading how various targets are implemented.
Is there a better way?
Signature · 2 lines
Michael Eager [email protected] 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
Quoted 1 line · Michael Eager
Is there any internal documentation for QEMU?
Nothing up-to-date and complete.
Quoted 5 lines
I'm adding support for a new processor. I'm currently adding semihosting support and a new command line option. I find that I'm reading a lot of uncommented code and trying to reverse engineer QEMU's design by reading how various targets are implemented.
Try the #qemu IRC channel on irc.oftc.net for specific questions.
One nice thing is that, despite the lack of documentation or comments, the nature of QEMU is that there are often multiple examples (target CPUs, emulated devices, etc) similar to what you're trying to implement. Read them to see which core functions you'll need and how to call them.
Stefan
Quoted 5 lines · Stefan Hajnoczi
Quoted 1 line · Michael Eager
Is there any internal documentation for QEMU?
Nothing up-to-date and complete.
Quoted 7 lines
Quoted 5 lines
I'm adding support for a new processor. I'm currently adding semihosting support and a new command line option. I find that I'm reading a lot of uncommented code and trying to reverse engineer QEMU's design by reading how various targets are implemented.
Try the #qemu IRC channel on irc.oftc.net for specific questions.
Thanks. I'll try that.
Quoted 4 lines
One nice thing is that, despite the lack of documentation or comments, the nature of QEMU is that there are often multiple examples (target CPUs, emulated devices, etc) similar to what you're trying to implement. Read them to see which core functions you'll need and how to call them.
I've been doing that. A lot. That's the reverse engineering I mentioned. Any documentation about what the core functions do would be helpful.
My target is mostly working, but a lot of the development has been stepping through execution of other targets to figure out execution flow and why each implements similar features differently, then doing the same with my target, trying to understand the differences. It's much slower than reading a paragraph or two which says "to do this, call this, register that, use these options".
Signature · 2 lines
Michael Eager [email protected] 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
Quoted 1 line · Michael Eager
Any documentation about what the core functions do would be helpful.
There's unlikely to be any documentation about the internals unless the next person who writes a CPU target also wants to write some documentation as they go along...
-- PMM
Hi,
Am 11.12.2012 19:40, schrieb Michael Eager:
Quoted 9 lines
Is there any internal documentation for QEMU?
I'm adding support for a new processor. I'm currently adding semihosting support and a new command line option. I find that I'm reading a lot of uncommented code and trying to reverse engineer QEMU's design by reading how various targets are implemented.
Is there a better way?
Look at the latest added target-openrisc in qemu.git and/or at my target-rl78 at GitHub.com/afaerber/qemu-rl78/. That will also give you some ideas how to split your new target into reviewable patches.
Also look at the mailing list, you may find old/bad examples in our code base but patch review usually points out the right ways to do things nowadays. When in doubt, ask. :)
Regards,
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 11 lines · Andreas Färber
Hi,
Am 11.12.2012 19:40, schrieb Michael Eager:
Quoted 8 lines
Is there any internal documentation for QEMU?
I'm adding support for a new processor. I'm currently adding semihosting support and a new command line option. I find that I'm reading a lot of uncommented code and trying to reverse engineer QEMU's design by reading how various targets are implemented.
Quoted 5 lines
Quoted 1 line
Is there a better way?
Look at the latest added target-openrisc in qemu.git and/or at my target-rl78 at GitHub.com/afaerber/qemu-rl78/. That will also give you some ideas how to split your new target into reviewable patches.
Thanks. I've been using openrisc as well as others as examples.
It isn't clear whether the support will be submitted. The target is a proprietary processor. So I don't get the benefit of public review of the code.
Quoted 3 lines
Also look at the mailing list, you may find old/bad examples in our code base but patch review usually points out the right ways to do things nowadays. When in doubt, ask. :)
Thanks.
Signature · 2 lines
Michael Eager [email protected] 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077