Using SMM for task switch
Using SMM for task switch
Hello, I was thinking if I can use SMM code for task switching. I want to ask. Is the SMM code from manufacturer or firmware vendor? Is there possibility to check if it knows about special contexts like FPU and SSE?
Re: Using SMM for task switch
Hi,
Cheers,
Brendan
You can't use SMM without replacing the motherboard's firmware.lopidas wrote:Hello, I was thinking if I can use SMM code for task switching.
I'd assume firmware vendor writes it (to suit chipset, etc) as part of some agreement/contract with the motherboard manufacturer.lopidas wrote:Is the SMM code from manufacturer or firmware vendor?
In theory, maybe (by reverse engineering the firmware's ROM). In practice it's a pointless waste of time, given that there's no sane way for an OS to use SMM and no sane reason for an OS to want to use SMM.lopidas wrote:Is there possibility to check if it knows about special contexts like FPU and SSE?
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
-
- Member
- Posts: 31
- Joined: Thu Mar 20, 2014 2:22 pm
- Location: London, UK
Re: Using SMM for task switch
Hi,
Is it even possible to enter SMM from software?
Anyway, upon entering SMM the CPU saves the complete state information (including control registers), but
the FPU state is not saved. It might be conceivable to think that any code executed in SMM doesn't need
to use the FPU, so these should stay untouched.
It is just an academic discussion anyway, SMM is used by the motherboard to emulate missing hardware (like a PS2
controller on a USB-only motherboard) and to manage critical events, like temperature control, fans speeds etc.
On some Intel boards there is a piece of code that runs in SMM mode to allow remote management (it's called
AMT afaik).
Just forget about SMM mode - You can't use it for anything, and just pretend it does not exist.
Cheers,
Theesem
Is it even possible to enter SMM from software?
Anyway, upon entering SMM the CPU saves the complete state information (including control registers), but
the FPU state is not saved. It might be conceivable to think that any code executed in SMM doesn't need
to use the FPU, so these should stay untouched.
It is just an academic discussion anyway, SMM is used by the motherboard to emulate missing hardware (like a PS2
controller on a USB-only motherboard) and to manage critical events, like temperature control, fans speeds etc.
On some Intel boards there is a piece of code that runs in SMM mode to allow remote management (it's called
AMT afaik).
Just forget about SMM mode - You can't use it for anything, and just pretend it does not exist.
Cheers,
Theesem
- Bender
- Member
- Posts: 449
- Joined: Wed Aug 21, 2013 3:53 am
- Libera.chat IRC: bender|
- Location: Asia, Singapore
Re: Using SMM for task switch
I think it MAY be possible, there are some vendor specific I/O ports you can write to whichIs it even possible to enter SMM from software?
can trigger an SMI, AFAIK it'll be useless.
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
(R3X Runtime VM)(CHIP8 Interpreter OS)