SlideShare a Scribd company logo
1 of 20
Managing SMIs for optimal RTOS
performance with the Intel® Atom™
processor
Insyde Software

© 2013 Insyde Software

1
Insyde Software is a Proud Member of
the Intel® Intelligent Systems Alliance

© 2013 Insyde Software

2
Agenda
• Overview of SMIs
• SMIs and RTOS performance
• Managing SMIs
• Summary

© 2013 Insyde Software
Intel x86 processors and SMI
• What is an SMI?
• SMI is a special interrupt, known as a System Management Interrupt
• When an SMI happens the Intel x86 processor performs a complete
context switch to a new execution thread
• The new SMI execution thread contains code that performs special
functions at the highest privilege levels
• After completion of those special functions, the processor switches the
context back to the original code.
Application or OS

Context
Save

SMI

SMI Code

Application or OS

Context
Restore
© 2013 Insyde Software
Intel x86 processors and SMI
• What is the SMI environment?
• An SMI places the processor(s) into System Management Mode
(SMM)
• SMI has higher priority for the processor than any other
interrupt

• All processors and all cores are placed into SMM on any SMI
• The processor performs a full Context Save automatically
• The Resume instruction in SMM restores the saved Context
Context
Save

SMI Code

Context
Restore

© 2013 Insyde Software
Intel x86 processors and SMI
• What is the SMI environment? (continued)
• SMI code is only visible to a processor in the SMM state
• SMI code can modify System Management RAM (SMRAM)
• SMRAM is only visible to a processor in SMM state
• BIOS firmware traditionally has responsibility to initialize SMI
interrupt vectors to BIOS code, to initialize SMRAM, and to lock
SMI configuration registers
Context
Save

SMI Code

Context
Restore

© 2013 Insyde Software
Intel x86 processors and SMI
• How do SMIs happen? 3 common methods:
1. Write to the 0B2h I/O port (Software initiated SMI)
2. The hardware generates SMI on a certain state occurring such
as timer expiration, read or write of a pre-defined IO port
3. Processor receives interrupt on SMI# pin

Context
Save

SMI Code

Context
Restore

© 2013 Insyde Software
Intel x86 processors and SMI
• Why are SMIs used? Common examples:
• CPU over-temperature fail-safe shutdown (thermal SMI)
• Supplement ACPI functions that may need BIOS support
• Hardware based RAS functions
• Security functions that want exclusive control of system
• Emulation of a legacy device when USB is not supported by
RTOS
• Hot-plug events not handled by RTOS
Context
Save

SMI Code

Context
Restore

© 2013 Insyde Software
Intel x86 processors and SMI
• Intel® Atom™ handles SMIs very efficiently
• SMI code is fully cached
• SMI SMRR (SMI Range Registers) dedicated to the SMI cacheable region
• Context switching is very fast since processor data is saved to cached
SMRAM

• Intel Atom E6xxx series processors have full control of SMI behavior
• http://download.intel.com/embedded/processor/datasheet/324208.pdf
• Review sections on SMI/SCI generation

Context
Save

SMI Code

Context
Restore

© 2013 Insyde Software
Intel x86 processors and SMI
• Real Time OS (RTOS) requirements
• RTOS guarantees an application request will be serviced within a fixed timeframe
• Consistent, deterministic, and predictable response times, regardless of work
load, are required for many time-sensitive applications
• Competent RTOS schedulers are finely tuned and optimized for the hardware
• RTOS response times are a critical feature in selecting the right RTOS

• SMIs “steal” time from the RTOS
• Can be as long as 7 milliseconds (2 SMIs) per second
• RTOS may fail to service requests and be unable to “catch up” under heavy work
loads
Context
Context
SMI Code
Save
Restore
3.5 milliseconds (ms)
© 2013 Insyde Software
Intel x86 processors and SMI
• How do you manage SMI activity?
• Classify the SMIs to determine their purpose.
• SMIs can be broadly identified into 3 classes:
Critical, Instability, and Workarounds
3 Classes for SMI:

Critical

Instability

Workarounds

© 2013 Insyde Software
Intel x86 processors and SMI
• Class 0

Critical

• This class of SMI must occur to protect system hardware from
damage, or for unrecoverable catastrophic events. A
processor in an over-temperature condition will cause a Class
0 SMI.
• Usually one time event that has no effect on normal RTOS
performance.
• Recommendation: Ignore this class of SMIs since they will not
happen during normal operations
© 2013 Insyde Software
Intel x86 processors and SMI
• Class 1

Instability

• This class of SMIs manage events that could cause system instability if ignored.
Examples include writes to PCI Reset registers, DMA requests to compromising
addresses, security violations by defective applications and viruses.
• A competent RTOS should be able to control system events that could cause
instability or affect system integrity.
• Recommendation: Use a competent RTOS and disable this class of SMIs for
optimal performance

© 2013 Insyde Software
Intel x86 processors and SMI
• Class 2

Workarounds

• This class of SMIs provide support for deficient hardware or missing legacy
hardware. SMI will trap on IO to hardware and emulate desired values for OS
driver and applications. Examples include emulating PS2 keyboard when USB
keyboard is not supported by OS, or simulating correct hardware behavior when
hardware is out of spec.
• A competent RTOS should be able to directly manage hardware and support all
necessary workarounds.
• Recommendation: Use a competent RTOS and disable this class of SMIs under all
circumstances.

© 2013 Insyde Software
Intel x86 processors and SMI
• How can you disable the Class 1 and Class 2 SMIs?
• The SMI configuration registers will be locked before RTOS gains
control, so it’s too late to disable these SMIs in RTOS
•

Modify the startup firmware to disable these SMIs before
passing control to the RTOS, or

•

Request BIOS vendor to disable Class 1 and 2 SMIs
• A simple change in a build switch will turn them off

© 2013 Insyde Software
Intel x86 processors and SMI: Summary
• Managing SMIs for optimal RTOS performance:
• Actions:
• Use an Intel Atom processor for optimal SMI performance
• Select a competent RTOS that requires no or few SMIs
• Configure BIOS to disable Class 1 and Class 2 SMIs

• Enjoy the new level of predictable performance in your
RTOS and platform

© 2013 Insyde Software
Intel x86 processors and SMI: Summary
• Managing SMIs for optimal RTOS performance:
• Actions:
• Use an Intel Atom processor for optimal SMI performance
• Select a competent RTOS that requires no or few SMIs
• Configure BIOS to disable Class 1 and Class 2 SMIs

• Enjoy the new level of predictable performance in your
RTOS and platform

© 2013 Insyde Software
Questions?
• If you would like to learn more about working with Insyde
Software for your next project, contact:
• Ed Brohm, Director of Sales
ed.brohm@insydesw.com

• For questions regarding this presentation, contact:
• Trevor Western, VP of Engineering, Server & Embedded
trevor.western@insydesw.com

© 2013 Insyde Software
Thank You!

© 2013 Insyde Software

19
Insyde and Ready for the Next are registered trademarks of Insyde Software.
Intel and Intel Atom are trademarks or registered trademarks of
Intel Corporation in the United States and other countries.

© 2013 Insyde Software

More Related Content

Recently uploaded

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Recently uploaded (20)

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

BIOS Customizations for Optimized RTOS Performance

  • 1. Managing SMIs for optimal RTOS performance with the Intel® Atom™ processor Insyde Software © 2013 Insyde Software 1
  • 2. Insyde Software is a Proud Member of the Intel® Intelligent Systems Alliance © 2013 Insyde Software 2
  • 3. Agenda • Overview of SMIs • SMIs and RTOS performance • Managing SMIs • Summary © 2013 Insyde Software
  • 4. Intel x86 processors and SMI • What is an SMI? • SMI is a special interrupt, known as a System Management Interrupt • When an SMI happens the Intel x86 processor performs a complete context switch to a new execution thread • The new SMI execution thread contains code that performs special functions at the highest privilege levels • After completion of those special functions, the processor switches the context back to the original code. Application or OS Context Save SMI SMI Code Application or OS Context Restore © 2013 Insyde Software
  • 5. Intel x86 processors and SMI • What is the SMI environment? • An SMI places the processor(s) into System Management Mode (SMM) • SMI has higher priority for the processor than any other interrupt • All processors and all cores are placed into SMM on any SMI • The processor performs a full Context Save automatically • The Resume instruction in SMM restores the saved Context Context Save SMI Code Context Restore © 2013 Insyde Software
  • 6. Intel x86 processors and SMI • What is the SMI environment? (continued) • SMI code is only visible to a processor in the SMM state • SMI code can modify System Management RAM (SMRAM) • SMRAM is only visible to a processor in SMM state • BIOS firmware traditionally has responsibility to initialize SMI interrupt vectors to BIOS code, to initialize SMRAM, and to lock SMI configuration registers Context Save SMI Code Context Restore © 2013 Insyde Software
  • 7. Intel x86 processors and SMI • How do SMIs happen? 3 common methods: 1. Write to the 0B2h I/O port (Software initiated SMI) 2. The hardware generates SMI on a certain state occurring such as timer expiration, read or write of a pre-defined IO port 3. Processor receives interrupt on SMI# pin Context Save SMI Code Context Restore © 2013 Insyde Software
  • 8. Intel x86 processors and SMI • Why are SMIs used? Common examples: • CPU over-temperature fail-safe shutdown (thermal SMI) • Supplement ACPI functions that may need BIOS support • Hardware based RAS functions • Security functions that want exclusive control of system • Emulation of a legacy device when USB is not supported by RTOS • Hot-plug events not handled by RTOS Context Save SMI Code Context Restore © 2013 Insyde Software
  • 9. Intel x86 processors and SMI • Intel® Atom™ handles SMIs very efficiently • SMI code is fully cached • SMI SMRR (SMI Range Registers) dedicated to the SMI cacheable region • Context switching is very fast since processor data is saved to cached SMRAM • Intel Atom E6xxx series processors have full control of SMI behavior • http://download.intel.com/embedded/processor/datasheet/324208.pdf • Review sections on SMI/SCI generation Context Save SMI Code Context Restore © 2013 Insyde Software
  • 10. Intel x86 processors and SMI • Real Time OS (RTOS) requirements • RTOS guarantees an application request will be serviced within a fixed timeframe • Consistent, deterministic, and predictable response times, regardless of work load, are required for many time-sensitive applications • Competent RTOS schedulers are finely tuned and optimized for the hardware • RTOS response times are a critical feature in selecting the right RTOS • SMIs “steal” time from the RTOS • Can be as long as 7 milliseconds (2 SMIs) per second • RTOS may fail to service requests and be unable to “catch up” under heavy work loads Context Context SMI Code Save Restore 3.5 milliseconds (ms) © 2013 Insyde Software
  • 11. Intel x86 processors and SMI • How do you manage SMI activity? • Classify the SMIs to determine their purpose. • SMIs can be broadly identified into 3 classes: Critical, Instability, and Workarounds 3 Classes for SMI: Critical Instability Workarounds © 2013 Insyde Software
  • 12. Intel x86 processors and SMI • Class 0 Critical • This class of SMI must occur to protect system hardware from damage, or for unrecoverable catastrophic events. A processor in an over-temperature condition will cause a Class 0 SMI. • Usually one time event that has no effect on normal RTOS performance. • Recommendation: Ignore this class of SMIs since they will not happen during normal operations © 2013 Insyde Software
  • 13. Intel x86 processors and SMI • Class 1 Instability • This class of SMIs manage events that could cause system instability if ignored. Examples include writes to PCI Reset registers, DMA requests to compromising addresses, security violations by defective applications and viruses. • A competent RTOS should be able to control system events that could cause instability or affect system integrity. • Recommendation: Use a competent RTOS and disable this class of SMIs for optimal performance © 2013 Insyde Software
  • 14. Intel x86 processors and SMI • Class 2 Workarounds • This class of SMIs provide support for deficient hardware or missing legacy hardware. SMI will trap on IO to hardware and emulate desired values for OS driver and applications. Examples include emulating PS2 keyboard when USB keyboard is not supported by OS, or simulating correct hardware behavior when hardware is out of spec. • A competent RTOS should be able to directly manage hardware and support all necessary workarounds. • Recommendation: Use a competent RTOS and disable this class of SMIs under all circumstances. © 2013 Insyde Software
  • 15. Intel x86 processors and SMI • How can you disable the Class 1 and Class 2 SMIs? • The SMI configuration registers will be locked before RTOS gains control, so it’s too late to disable these SMIs in RTOS • Modify the startup firmware to disable these SMIs before passing control to the RTOS, or • Request BIOS vendor to disable Class 1 and 2 SMIs • A simple change in a build switch will turn them off © 2013 Insyde Software
  • 16. Intel x86 processors and SMI: Summary • Managing SMIs for optimal RTOS performance: • Actions: • Use an Intel Atom processor for optimal SMI performance • Select a competent RTOS that requires no or few SMIs • Configure BIOS to disable Class 1 and Class 2 SMIs • Enjoy the new level of predictable performance in your RTOS and platform © 2013 Insyde Software
  • 17. Intel x86 processors and SMI: Summary • Managing SMIs for optimal RTOS performance: • Actions: • Use an Intel Atom processor for optimal SMI performance • Select a competent RTOS that requires no or few SMIs • Configure BIOS to disable Class 1 and Class 2 SMIs • Enjoy the new level of predictable performance in your RTOS and platform © 2013 Insyde Software
  • 18. Questions? • If you would like to learn more about working with Insyde Software for your next project, contact: • Ed Brohm, Director of Sales ed.brohm@insydesw.com • For questions regarding this presentation, contact: • Trevor Western, VP of Engineering, Server & Embedded trevor.western@insydesw.com © 2013 Insyde Software
  • 19. Thank You! © 2013 Insyde Software 19
  • 20. Insyde and Ready for the Next are registered trademarks of Insyde Software. Intel and Intel Atom are trademarks or registered trademarks of Intel Corporation in the United States and other countries. © 2013 Insyde Software