On 05/04/15 23:13, Jordan Justen wrote: > On 2015-05-04 11:03:08, Laszlo Ersek wrote: >> On 05/04/15 17:55, Paolo Bonzini wrote: >>> On 04/05/2015 15:58, Laszlo Ersek wrote: >>>> So here's the *specific* issues I'm facing (and need help with): >>>> >>>> * Problem #1 for task (4): >>>> >>>> Because Quark is 32-bit only, the (mostly assembly) code under >>>> "OvmfPkg/QuarkPort/PiSmmCpuDxeSmm/Ia32" that (partly) constitutes the >>>> SMM entry vector does not *build* for X64 guests. >>>> >>>> I don't know what it would take to make that code build & work for X64 >>>> guests: >>>> - just replace some registers and instructions, and maybe recalculate >>>> some offsets? >>>> - or else, is X64 architecturally different in this regard, and a >>>> rewrite from scratch is needed? >>>> >>>> (But, again, this code should have always lived in edk2, under >>>> UefiCpuPkg...) >>> >>> The SMM entry vector will start in a 16-bit real mode code segment, >>> albeit with 4GB segment limits. So there must be yet another 32-bit >>> protected mode switching sequence somewhere. So my guess is: >>> >>> 1) you can add a 32->64-bit mode world switch there. I know your love >>> for this kind of code, I guess you can bribe someone to take care of >>> this part. :) >>> >>> 2) build the SMM code in 32-bit mode, similar to OVMFIA32X64. >>> >>> >>> My gut feeling is that (2) is simpler if one knows the edk2 build tools, >>> which I don't so I may be saying nonsense. >> >> (2) looked like a great idea to me, but after all I doubt it would work. >> Massaging the DSC files would maybe possible (similarly to the Ia32X64 >> build, as you say -- just build the SMM core and the SMM drivers in the >> Components.IA32 part, and add one such part to the X64 DSC file). > > OvmfPkgX64.dsc only supports X64 modules. It is a good example of how > a platform can basically always run in X64 mode. (aside from > quick/small mode transitions, of course.) > > I also feel strongly that the IA32, IA32+X64 and X64 versions of OVMF > should attempt to be feature equivalent.
I agree. In upstream we should certainly keep them in sync. > As far as I know, SMM arch always matches the DXE arch. My impression too. BTW, after sleeping on it, I think I might postpone the X64 SMM entry point, and continue with investigating / importing the CpuMpDxe driver, and with writing the SMM FVB driver. This seems to be a faster way to enable *some* kind of testable stack. (I think I can find an Ia32 UEFI guest OS -- see eg. <https://www.happyassassin.net/category/fedlet/>.) Thanks! Laszlo ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel