Re: How to generate a #SMI?




Lighter wrote:
How to generate a #SMI?

As we know, beginning with 80386, IA-32 processors provide three modes
of operation: 1, Real-address mode; 2, Protected mode; 3, System
management mode (SMM for short). According to the manuals of Intel,
there is only one way to enter SMM, which is through #SMI. But, I
wonder how the current process generates a SMI, because #SMI is an
external interrupt, and it cannot be generated by the instruction int
n.

To my thinking, the current process can use I/O instructions to do
this. Say, the system provides a special I/O port; This port is an
interface of an actual device. Upon the device detectes signal at the
given port, it generates a #SMI.

Am I right?

Many thanks in advance to those who can explain this for me.

Yes you are right, however the device does not generate the SMI.
Their are two different implementations of using I/O ports. One for
emulating devices and one for a BIOS API. They are done slightly
differently. You set up different chipset registers depending on which
one you want.

For instance for USB emulation you have to trap access to port
60h/64h. This is a register in the chipset you set up to generate a
SMI when a access to port 60h/64h occurs. You can even set it up so it
only occurs on read or writes ( but not both) for the I/O port.

The second is a different chipset register you setup to make the
system generate a SMI when a write to that port occurs. It's similar
to a software interrupt. Dell BIOSes have quite a few things they can
do. As an example, we have programs that run under Windows that use
the SMI API to get hardware information ( fan speed, cpu temperature,
etc).


Mark Larson

.



Relevant Pages

  • Re: How to generate a #SMI?
    ... areas that are otherwise protected and the System BIOS would ... to generate an SMI. ... the system provides a special I/O port; ... SMI on any system that supports ACPI. ...
    (comp.lang.asm.x86)
  • Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override.
    ... That may be an SMI, or perhaps any other kind of interrupt or exception. ... It appears to be the standard POST diagnostic port. ... So the ACPI BIOS thinks it has something to do with debugging. ... There's a little strangeness here, however, because the value sent to the port occasionally has something to do with arguments to the ACPI operations relating to sleep and wakeup ... ...
    (Linux-Kernel)
  • Re: [PATCH] [RESEND] Add Dell laptop backlight brightness display
    ... To do the proper SMI call requires parsing SMBIOS structure 0xDA, ... and getting the SMI index and io port and ...
    (Linux-Kernel)
  • Re: How to generate a #SMI?
    ... management mode (SMM for short). ... there is only one way to enter SMM, which is through #SMI. ... the system provides a special I/O port; ... If there's some process for which the hardware needs a few CPU cycles, no matter in what mode the CPU is running now, then it generates an SMI and the SMI handler does the necessary processing. ...
    (comp.lang.asm.x86)
  • How to generate a #SMI?
    ... How to generate a #SMI? ... management mode (SMM for short). ... the system provides a special I/O port; ...
    (microsoft.public.development.device.drivers)