Search This Blog

Wednesday, February 23, 2011

How to call interrupt vector by SMM thunk?

...
if (InSmm) {
  Status = SmmRt->LocateProtocol (
                                  &gModulesSmmThunkProtocolGuid,
                                  NULL,
                                  &smmthunk
                                  );

  //
  // Before we execute smmthunk, we should clean the regs. In order to aviod strange issue.
  //
  EfiZeroMem (&Regs, sizeof (Regs)); 

  Status = smmthunk->SctIsr86 (
                                      smmthunk,
                                      0x10,           // Interrupt vector
                                      &Regs);
} else {
  ...
}
...

No comments:

Post a Comment