Date
1 - 4 of 4
What is the first place of code, we enter in EDK2 after an SMI?
Feng Libo <lbfeng@...>
There is a functionality in AMD hardware debug tools, HDT, with which you can set a breakpoint at the SMM entry point, the very first piece of code. I believe Intel's debug tools has the same functionality as well.
Best Regards Feng Libo |
|
Feng Libo <lbfeng@...>
Both AMD and Intel's Architectures Software Developer's Manual have the chapter to describe how to enter the SMM.
toggle quoted message
Show quoted text
Yes, SMM is transparent for OS, so OS developers hate it. OS developers create SCI as equivalent. From: "Guomin Jiang" <guomin.jiang@...> Date: 2020-08-05 17:53:24 To: "discuss@edk2.groups.io" <discuss@edk2.groups.io>,"mzktsn@..." <mzktsn@...> Subject: Re: [edk2-discuss] What is the first place of code, we enter in EDK2 after an SMI?>As I know, the SMM flow as below:
|
|
Guomin Jiang
As I know, the SMM flow as below:
toggle quoted message
Show quoted text
1. Hardware trigger SMM signal (by IO trap, USB, PowerButton, and so on, detail in PI Spec) 2. CPU Save context and jump to the _SmiEntryPoint(SmiEntry.nasm) 3. _SmiEntryPoint()[SmiEntry.nasm] -> SmiRendezvous()[MpService.c] ->BSPHandler()[MpService.c] ->gSmmCpuPrivate->SmmCoreEntry() == SmmEntryPoint()[PiSmmCore] --> Registered Dispatcher(IO, USB, PowerButton, etc) According to my knowledge, there are no pointer prior the SmiEntry.nasm. And it is different to hack the SMM because it is transparent for OS. -----Original Message----- |
|
mzktsn@...
Hello, i would like to write code, right after an SMI occurs.
I have searched the functions such as SmiRendezvous,SmiManage etc, and finally went to UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.nasm file. Is there any other file than this that the flow goes before reaching this file? I have also read the document about EDK2 Topology : SMM of 2016 which points that after a synchronous or asynchronous SMI the flow goeas to the SmiEntry.(n)asm file. Thanks. |
|