On 12/02/13 22:42, Jordan Justen wrote: > On Mon, Dec 2, 2013 at 9:04 AM, Laszlo Ersek <ler...@redhat.com> wrote: >> Please refer to the last patch in the series to appreciate the >> complexity here. I'd like to ask interested people in the community to >> read through the commit messages (*) and point out if I'm missing >> something. >> >> (*) There isn't much code in the series, it's mostly duct tape. The >> difficulty is figuring out what depends on what and how. I'm not even >> trying to create an S3 Boot Script yet, just getting up the >> infrastructure. >> >> Currently I have two problems, a small one and a big one. >> >> The small one is that S3Resume2Pei depends on a PPI >> (EFI_PEI_SMM_COMMUNICATION_PPI) that doesn't exist in the edk2 tree. The >> implementation would be interesting, considering that during DXE the >> entire SMM core, 2-3 libraries, and a dedicated driver are necessary to >> implement it. > > SMM for OVMF would be interesting from a sample code perspective for > EDK II, but probably not bring any other benefits.
Fully agreed. > Has SMM in QEMU > ever been used? I can't remember if QEMU actually claims to support > SMM. Gerd has informed me that TCG supports SMM and KVM doesn't. But, in the series I'm faking SMRAM with an early allocation from the runtime pool (same as the original NvVars trick), which is good enough. Actual support for system management interrupts and the like doesn't seem necessary in practice. The main headache is the huge complexity of the modules, and the missing (or rather, not open sourced) communication module in PEI (which I did hack around, but it hurts). This stuff seems to work in OVMF (although I'm sure I'll run into more problems); right now I need to figure out when to issue the "dxe smm ready to boot" protocol/notification (I could use a few pointers from people who have implemented that...). Later I'll need to look into composing a Boot Script. I intend not to do anything at first, but, if OSPM doesn't wake up after jumping to its vector in FACS, I'll patch qemu to log all PCI and IO accesses "from below", and I'll try to see what I need to copy from that into a boot script. > Mike, > > Do you think it would be better for OVMF to add EMU SMM modules, or to > fix the core S3 modules to not require SMM? Yes, that's the crucial question. My approach was to use whatever's in-tree and provide shims for the missing protocols etc. FWIW I agree with Eugene too -- the ~40 hours I've spent on this since Friday evening tell me (maybe incorrectly) that "fixing" the S3 modules not to require SMM looks rather like "rearchitecting" them. Thanks, Laszlo ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel