On Sep 16, 2013, at 1:16 PM, Laszlo Ersek <ler...@redhat.com> wrote:

> On 09/16/13 21:50, Andrew Fish wrote:
> 
>> OVMF:
>> Limitations: Requires QEMU, serial port debugging (not well
>> documented), more complex setup.
> 
> I agree that the setup is complex.
> 
> Regarding serial port debugging... Could you suggest how / where to
> improve the documentation? "OvmfPkg/README" says
> 

Maybe a discussion in the OVMF FAQ would be useful. 
http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=OVMF_FAQ. 
Unfortunately I've not had the time to invest in trying to get OVFM working on 
a Mac, so I'm not really speaking with first hand knowledge about OVMF. 

I found the instructions on how to enable source level debugging to be an 
"exercise left to the reader", at best. 
http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=EDK2/Source_Level_Debug.
 It seems like source level debugging answer is build with symbols, and 
configure a virtual COM port. 

I can see from the OvmfPkg, 
https://svn.code.sf.net/p/edk2/code/trunk/edk2/OvmfPkg/OvmfPkgX64.dsc, that the 
SourceLevelDebugPkg is used, so there is a software debugger you can compile 
into the EFI images.... So then we start the search....
Can't find and info about SourceLevelDebugPkg on Tianocore, so I fallback to 
http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=EDKII_Packages 
(good tip in general if you can't find something).
This just points to subversion 
http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=SourceLevelDebugPkg
I can find a readme that points to 
https://svn.code.sf.net/p/edk2/code/trunk/edk2/SourceLevelDebugPkg/Readme.txt
The Readme.txt sends me to http://www.uefidk.com/develop
After clicking on 6 or 7 incorrect links I find 
http://www.uefidk.com/develop/intel-uefi-tools-and-utilities/intel-uefi-development-kit-debugger-tool
But at least that points back to: 
https://svn.code.sf.net/p/edk2/code/trunk/edk2/OvmfPkg/README, which does not 
talk about source level debugging :(.

I think it would also be useful for new-bees to give some advice on how to use 
the QEMU monitor (assume people do this) to help debug OVFM. Things like `nmi 
cpu` could be useful to break into some point where the debugger will not let 
you in. 

>  * Capturing OVMF debug messages on qemu:
>    - The default OVMF build writes debug messages to IO port 0x402.  The
>      following qemu command line options save them in the file called
>      debug.log: '-debugcon file:debug.log -global isa-debugcon.iobase=0x402'.
>    - It is possible to revert to the original behavior, when debug messages 
> were
>      written to the emulated serial port (potentially intermixing OVMF debug
>      output with UEFI serial console output).  For this the
>      '-D DEBUG_ON_SERIAL_PORT' option has to be passed to the build command 
> (see
>      the next section), and in order to capture the serial output qemu needs 
> to
>      be started with eg. '-serial file:serial.log'.
> 

I was thinking more about source level debugging. With an Application 
(EmulatorPkg) you can use Xcode, Visual Studio, Eclipse, or some other IDE and 
since you are a process you can almost always break in, you fault on errors, 
etc....

Thanks,

Andrew Fish

>> Benefits: Can boot any UEFI OS! Closer to real platforms. Cross
>> architecture, so you could boot an ARM VM on your X86 system.
> 
> I wish :)
> 

Sorry my comments were a little theoretical here, not a list of what is 
supported. 

> It's cross-platform as long as qemu-system-x86_64 / qemu-system-i386
> build & runs on your arch of choice, and TCG (tiny code generator)
> doesn't choke on the OVMF binary. (Which it seemed to do the last time I
> tried, alas.)
> 
> OVMF is currently tied to i440fx/PIIX3. I think you can boot an ARM
> guest in a qemu-system-arm binary that has been built for x86, but OVMF
> isn't available for that guest right now.
> 
> Thanks
> Laszlo


------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to