Message board for the users of flat assembler.
> OS Construction > SMRAM SMM Driver
Overclick 31 Aug 2023, 07:33
I need to save few bytes by custom SMM Driver. I know almost nothing about it.
If I try to call to get IP for own data section the mobo going to brick. Seems like the stack is non setup yet. I tried to setup it temporary on Save State but Windows freezing on load
use16 org 0 start: DefineStack: mov ebx,[cs:0xFF84] mov eax,[cs:0xFF84+4] mov [cs:0xFF84],ss mov [cs:0xFF84+4],esp mov cx,cs mov ss,cx mov edx,[cs:0xFF7C] mov ecx,[cs:0xFF7C+4] mov esp,0xFF84 ; call getIP ; jmp RestoreStack ; DataOffset dw 0x07EB ; dw 0 ; dw 0 ; dw 0 ; getIP: ; ret RestoreStack: mov ss,[cs:0xFF84] mov esp,[cs:0xFF84+4] mov [cs:0xFF84+4],eax mov [cs:0xFF84],ebx mov ebx,[cs:0xFF7C+4] ;DataOffset mov [cs:0xFF7C+4],ecx mov [cs:0xFF7C],edx
Where can I use some few bytes in SMRAM (or anywhere else)?
Or maybe some example how to setup SMM Driver via DXE. It will be fine too as I'll be happy to configure SMM at DXE stage.
|31 Aug 2023, 07:33||
< Last Thread | Next Thread >
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.