Re: [edk2] Comparison between SMM code and Efi Shell

Subject: Re: [edk2] Comparison between SMM code and Efi Shell

From: Lethom Legrand <cendrais@gmail.com>

To: edk2-devel <edk2-devel@lists.sourceforge.net>

Date: 2014-04-02 19:44:55

Thanks Andrew!

Another question: do you think it will be painful to add to OVMF an SMM support?
As far as I know, QEMU supports SMM, so it may be possible... The question is: what is the cost?

Thomas


2014-04-02 10:25 GMT+02:00 Andrew Fish <afish@apple.com>:

On Apr 1, 2014, at 11:47 PM, Lethom Legrand <cendrais@gmail.com> wrote:

> Hello everyone,
>
> I have to work on the SMM code of UEFI, in order to add some properties. However, I do not have any hardware platform for an easy debug of my modifications. At least, not for now.
>
> I am wondering if it could be a good idea to modify the Efi Shell first, for some test, because it is much more easier to debug. As I understood it, the SMM Drivers in UEFI are executed in a flat-protected mode, and it is the same when UEFI boot on Efi Shell and the UEFI Applications it loads and executes. Of course, there are differences (one is access to the SMRAM) but as I said it's just to start.
>
> So, my question is: am I right? SMM code context and Efi Shell context are similar?
>

In general it is all C code and things are similar. The issue you have is the Shell runs at boot services time. So your code as access to lots of things that are not safe to use at SMM time. Also the entry point is quite different for an SMM module. But as long as you don’t use gBS and only use library classes that have an instance that works in SMM you could make some progress.

Thanks,

Andrew Fish

> Thomas
> ------------------------------------------------------------------------------
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel


------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel