* Necessity of SMM/SMI use on ACPI x86 systems
@ 2011-04-03 11:40 limp
2011-04-03 15:34 ` Matthew Garrett
0 siblings, 1 reply; 4+ messages in thread
From: limp @ 2011-04-03 11:40 UTC (permalink / raw)
To: linux-acpi
Dear all,
I am doing some research regarding ACPI and SMM PM interfaces for the x86
architecture.
What I've found so far is that ACPI is the new trend for x86 PM and tends to
eliminate the use of SMM/SMI.
However, I am not quite sure if SMM/SMI mechanism can be completely
ignored/not used in current systems.
AFAIK, some ACPI AML BIOS code can trigger an SMI for handling specific
events.
Can anyone advise me if it's possible to write ACPI AML BIOS code that does
whatever it was intended to be executed in SMM? In general, is there any
*strong* argument saying that (at least) current systems cannot completely
eliminate the use of SMIs?
Thank you all in advance,
Best wishes.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Necessity of SMM/SMI use on ACPI x86 systems
2011-04-03 11:40 Necessity of SMM/SMI use on ACPI x86 systems limp
@ 2011-04-03 15:34 ` Matthew Garrett
2011-04-04 13:41 ` limp
0 siblings, 1 reply; 4+ messages in thread
From: Matthew Garrett @ 2011-04-03 15:34 UTC (permalink / raw)
To: limp; +Cc: linux-acpi
On Sun, Apr 03, 2011 at 12:40:47PM +0100, limp wrote:
> Can anyone advise me if it's possible to write ACPI AML BIOS code that does
> whatever it was intended to be executed in SMM? In general, is there any
> *strong* argument saying that (at least) current systems cannot completely
> eliminate the use of SMIs?
It's a turing-complete language with full access to the hardware, so
there's no reason why you can't entirely eliminate SMIs. The usual
reason not to would be to retain commonality of code for non-ACPI
environments like the setup screen.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Necessity of SMM/SMI use on ACPI x86 systems
2011-04-03 15:34 ` Matthew Garrett
@ 2011-04-04 13:41 ` limp
2011-04-04 13:53 ` Matthew Garrett
0 siblings, 1 reply; 4+ messages in thread
From: limp @ 2011-04-04 13:41 UTC (permalink / raw)
To: linux-acpi; +Cc: 'Matthew Garrett'
Thanks for the reply Matthew,
> It's a turing-complete language with full access to the hardware, so
> there's no reason why you can't entirely eliminate SMIs. The usual
> reason not to would be to retain commonality of code for non-ACPI
> environments like the setup screen.
So, there is no case that SMIs can be irreplaceable? For example, when you
go to S5 I know from coreboot developers that you need to disable bus
mastering on all devices or the machine will not power off. Since the OS
does not know this, and neither does acpi, the S5 sleep command will cause
an SMI that disables BM and then goes to S5.
Furthermore, is ACPI AML BIOS code interruptible or not?
That is, what happens if an interrupt occurs during ACPI code execution?
Will it be pended and get served after the completion of ACPI code
execution?
Furthermore, can a SMI interrupt ACPI code or not?
One last question is regarding the location in memory of ACPI tables. Are
they written to standard RAM or to a specially protected RAM similar to
SMRAM? How ACPI tables can prevent the OS from corrupting them?
Sorry for the large amount of questions raised ;)
Kind regards,
John K.
-----Original Message-----
From: Matthew Garrett [mailto:mjg59@srcf.ucam.org]
Sent: Sunday, April 03, 2011 4:35 PM
To: limp
Cc: linux-acpi@vger.kernel.org
Subject: Re: Necessity of SMM/SMI use on ACPI x86 systems
On Sun, Apr 03, 2011 at 12:40:47PM +0100, limp wrote:
> Can anyone advise me if it's possible to write ACPI AML BIOS code that
does
> whatever it was intended to be executed in SMM? In general, is there any
> *strong* argument saying that (at least) current systems cannot completely
> eliminate the use of SMIs?
It's a turing-complete language with full access to the hardware, so
there's no reason why you can't entirely eliminate SMIs. The usual
reason not to would be to retain commonality of code for non-ACPI
environments like the setup screen.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Necessity of SMM/SMI use on ACPI x86 systems
2011-04-04 13:41 ` limp
@ 2011-04-04 13:53 ` Matthew Garrett
0 siblings, 0 replies; 4+ messages in thread
From: Matthew Garrett @ 2011-04-04 13:53 UTC (permalink / raw)
To: limp; +Cc: linux-acpi
On Mon, Apr 04, 2011 at 02:41:45PM +0100, limp wrote:
> Thanks for the reply Matthew,
>
> > It's a turing-complete language with full access to the hardware, so
> > there's no reason why you can't entirely eliminate SMIs. The usual
> > reason not to would be to retain commonality of code for non-ACPI
> > environments like the setup screen.
>
> So, there is no case that SMIs can be irreplaceable? For example, when you
> go to S5 I know from coreboot developers that you need to disable bus
> mastering on all devices or the machine will not power off. Since the OS
> does not know this, and neither does acpi, the S5 sleep command will cause
> an SMI that disables BM and then goes to S5.
I don't think there's any reason you couldn't do that in the _GTS
method.
> Furthermore, is ACPI AML BIOS code interruptible or not?
> That is, what happens if an interrupt occurs during ACPI code execution?
> Will it be pended and get served after the completion of ACPI code
> execution?
Depends on whether we're interruptible or not at that point. Interrupts
will be disabled at certain points.
> Furthermore, can a SMI interrupt ACPI code or not?
It can.
> One last question is regarding the location in memory of ACPI tables. Are
> they written to standard RAM or to a specially protected RAM similar to
> SMRAM? How ACPI tables can prevent the OS from corrupting them?
RAM, but in an e820 region that indicates to the OS that it's not
available for normal use. There's no protection from the OS.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-04 13:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-03 11:40 Necessity of SMM/SMI use on ACPI x86 systems limp
2011-04-03 15:34 ` Matthew Garrett
2011-04-04 13:41 ` limp
2011-04-04 13:53 ` Matthew Garrett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).