Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Operation  





2 Usage  





3 Entering SMM  





4 Problems  





5 See also  





6 References  





7 Further reading  














System Management Mode






Català
Čeština
Deutsch
Español


Русский
Українська

 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


System Management Mode (SMM, sometimes called ring −2 in reference to protection rings)[1][2] is an operating mode of x86 central processor units (CPUs) in which all normal execution, including the operating system, is suspended. An alternate software system which usually resides in the computer's firmware, or a hardware-assisted debugger, is then executed with high privileges.

It was first released with the Intel 386SL.[3][4] While initially special SL versions were required for SMM, Intel incorporated SMM in its mainline 486 and Pentium processors in 1993. AMD implemented Intel's SMM with the Am386 processors in 1991.[5] It is available in all later microprocessors in the x86 architecture.[citation needed]

InARM architecture the Exception Level 3 (EL3) mode is also referred as Secure Monitor Mode or System Management Mode.[6]

Operation[edit]

SMM is a special-purpose operating mode provided for handling system-wide functions like power management, system hardware control, or proprietary OEM designed code. It is intended for use only by system firmware (BIOSorUEFI), not by applications software or general-purpose systems software. The main benefit of SMM is that it offers a distinct and easily isolated processor environment that operates transparently to the operating system or executive and software applications.[citation needed]

In order to achieve transparency, SMM imposes certain rules. The SMM can only be entered through SMI (System Management Interrupt). The processor executes the SMM code in a separate address space (SMRAM) that has to be made inaccessible to other operating modes of the CPU by the firmware.[7]

System Management Mode can address up to 4 GB memory as huge real mode. In x86-64 processors, SMM can address >4 GB memory as real address mode.[8]

Usage[edit]

Initially, System Management Mode was used for implementing power management and hardware control features like Advanced Power Management (APM). However, BIOS manufacturers and OEMs have relied on SMM for newer functionality like Advanced Configuration and Power Interface (ACPI).[9][10]

Some uses of the System Management Mode are:

System Management Mode can also be abused to run high-privileged rootkits, as demonstrated at Black Hat 2008[14] and 2015.[15]

Entering SMM[edit]

SMM is entered via the SMI (system management interrupt), which is invoked by:

By entering SMM, the processor looks for the first instruction at the address SMBASE (SMBASE register content) + 8000h (by default 38000h), using registers CS = 3000h and EIP = 8000h. The CS register value (3000h) is due to the use of real-mode memory addresses by the processor when in SMM. In this case, the CS is internally appended with 0h on its rightmost end.

Problems[edit]

By design, the operating system cannot override or disable the SMI. Due to this fact, it is a target for malicious rootkits to reside in,[18][19] including NSA's "implants",[20] which have individual code names for specific hardware, like SOUFFLETROUGH for Juniper Networks firewalls,[21] SCHOOLMONTANA for J-series routers of the same company,[22] DEITYBOUNCE for DELL,[23]orIRONCHEF for HP Proliant servers.[24]

Improperly designed and insufficiently tested SMM BIOS code can make the wrong assumptions and not work properly when interrupting some other x86 operating modes like PAE or 64-bit long mode.[25] According to the documentation of the Linux kernel, around 2004, such buggy implementations of the USB legacy support feature were a common cause of crashes, for example, on motherboards based on the Intel E7505 chipset.[11]

Since the SMM code (SMI handler) is installed by the system firmware (BIOS), the OS and the SMM code may have expectations about hardware settings that are incompatible, such as different ideas of how the Advanced Programmable Interrupt Controller (APIC) should be set up.

Operations in SMM take CPU time away from the applications, operating-system kernel and hypervisor, with the effects magnified for multicore processors, since each SMI causes all cores to switch modes.[26] There is also some overhead involved with switching in and out of SMM, since the CPU state must be stored to memory (SMRAM) and any write-back caches must be flushed. This can destroy real-time behavior and cause clock ticks to get lost. The Windows and Linux kernels define an "SMI Timeout" setting – a period within which SMM handlers must return control to the operating system, or it will "hang" or "crash".

The SMM may disrupt the behavior of real-time applications with constrained timing requirements.

Alogic analyzer may be required to determine whether the CPU has entered SMM (checking state of SMIACT# pin of CPU).[16] Recovering the SMI handler code to analyze it for bugs, vulnerabilities and secrets requires a logic analyzer or disassembly of the system firmware.

See also[edit]

References[edit]

  1. ^ Domas, Christopher (2015-07-20). "The Memory Sinkhole" (PDF). Black Hat. Retrieved 2015-08-22.
  • ^ Tereshkin, Alexander; Wojtczuk, Rafal (2009-07-29). "Introducing Ring -3 Rootkits" (PDF). Invisible Things Lab, Black Hat USA. p. 4. Retrieved 2015-08-22.
  • ^ "SMIs Are EEEEVIL (Part 1)". msdn.com. Microsoft. 2020-07-17.
  • ^ Ellis, Simson C., "The 386 SL Microprocessor in Notebook PCs", Intel Corporation, Microcomputer Solutions, March/April 1991, page 20
  • ^ "AMD Am386SX/SXL/SXLV Datasheet" (PDF). AMD.
  • ^ https://documentation-service.arm.com/static/5ed11e40ca06a95ce53f905c?token= [bare URL PDF]
  • ^ "Intel 64 and IA-32 Architectures Developer's Manual: Vol. 3B" (PDF). Intel.
  • ^ Intel 64 and IA-32 Software Development Manual, Vol. 3, System Management Mode.
  • ^ "SMIs Are EEEEVIL (Part 2)". msdn.com. Microsoft.
  • ^ "System Management Mode - OSDev Wiki". wiki.osdev.org. Retrieved 2020-09-12.
  • ^ a b Vojtech Pavlik (January 2004). "Linux kernel documentation: USB Legacy support". kernel.org. Retrieved 2013-10-06.
  • ^ Google Tech Talks – Coreboot – 00:34:30.
  • ^ UEFI Platform Initialization Specification.
  • ^ Robert McMillan (2008-05-10). "Hackers find a new place to hide rootkits". InfoWorld.
  • ^ Rob Williams (2015-08-07). "Researchers Discover Rootkit Exploit In Intel Processors That Dates Back To 1997". HotHardware.com.
  • ^ a b Intel's System Management Mode by Robert R. Collins
  • ^ US 5963738, "Computer system for reading/writing system configuration using I/O instruction" .
  • ^ Shawn Embleton; Sherri Sparks; Cliff Zou (September 2008). "SMM Rootkits: A New Breed of OS Independent Malware" (PDF). ACM. Retrieved 2013-10-06.
  • ^ "Hackers Find a New Place to Hide Rootkits". PC World. 2008-05-09. Retrieved 2013-10-06.
  • ^ #1 Source for Leaks Around the World! (2013-12-30). "NSA's ANT Division Catalog of Exploits for Nearly Every Major Software/Hardware/Firmware | LeakSource". Leaksource.wordpress.com. Archived from the original on 2014-01-02. Retrieved 2014-01-13.{{cite web}}: CS1 maint: numeric names: authors list (link)
  • ^ "Schneier on Security: SOUFFLETROUGH: NSA Exploit of the Day". Schneier.com. 2013-12-30. Retrieved 2014-01-13.
  • ^ "Schneier on Security: SCHOOLMONTANA: NSA Exploit of the Day". Schneier.com. 2008-05-30. Retrieved 2014-01-16.
  • ^ "Schneier on Security". schneier.com.
  • ^ "Schneier on Security: IRONCHEF: NSA Exploit of the Day". Schneier.com. 2014-01-03. Retrieved 2014-01-13.
  • ^ http://images0.cnitblog.com/cnitblog_com/yuhensong/mode.JPG [bare URL image file]
  • ^ Brian Delgado and Karen L. Karavanic, "Performance Implications of System Management Mode", 2013 IEEE International Symposium on Workload Characterization, Sep. 22–24, Portland, OR USA.
  • Further reading[edit]


    Retrieved from "https://en.wikipedia.org/w/index.php?title=System_Management_Mode&oldid=1222000837"

    Categories: 
    Rootkits
    X86 operating modes
    BIOS
    ARM architecture
    Hidden categories: 
    All articles with bare URLs for citations
    Articles with bare URLs for citations from March 2022
    Articles with PDF format bare URLs for citations
    CS1 maint: numeric names: authors list
    Articles with image file bare URLs for citations
    Articles with short description
    Short description matches Wikidata
    Articles needing additional references from November 2010
    All articles needing additional references
    Use dmy dates from May 2019
    All articles with unsourced statements
    Articles with unsourced statements from December 2021
     



    This page was last edited on 3 May 2024, at 07:51 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki