Browse Prior Art Database

Method of limiting maximum SMI latency using NMI

IP.com Disclosure Number: IPCOM000189323D
Original Publication Date: 2009-Nov-05
Included in the Prior Art Database: 2009-Nov-05
Document File: 2 page(s) / 23K

Publishing Venue

IBM

Abstract

System Management Interrupt (SMI) can be used to monitor, manage and control systems independent of the operating system (OS). However, the time spent in the SMI handler is not visible to the OS. Also, SMI is a very high priority non-maskable interrupt. So, the OS looses timer tick interrupts, if the system is in the SMI handler for longer than the timer tick interval. This results in the time drift between the real time clock and the operating system time, as well as affecting the real time response to the operating system interrupts.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 53% of the total text.

Page 1 of 2

Method of limiting maximum SMI latency using NMI

Methods used currently rely on cooperation from the actions performed by the SMI handler, where each action is responsible for limiting the time spent in the SMI handler. If the action needs to poll for something for a long time, next SMI is scheduled after some time and current SMI exits, to let the operating system code run. However, this method doesn't ensure the maximum SMI latency required for the real time applications or prevent operating system time drift.

A better method (as shown in the figure) is to use a Non Maskable Interrupt (NMI) inside the System Management Interrupt (SMI) handler to limit the time spent in the SMI handler. SMI handler creates its own interrupt table before arming a single-shot timer to cause an NMI after some time, but before the maximum SMI latency limit. Upon NMI from the timer, SMI handler saves its current state, schedules the next SMI after some timer and exits the current SMI. Upon the next SMI, after arming the single-shot NMI timer, the SMI handler restores the previous state and resumes, if left behind by the previous SMI. If SMI handler has finished its job, timer NMI is cancelled before exiting the SMI.

NMI is chosen instead of other operating system interrupts, to prevent collision with other hardware generated interrupt sources, because they NMI can be unmasked, while leaving all other operating system interrupts masked. NMI handler in the SMI co...