On 11/16/10 7:41 PM, Fengwei Zhang wrote:
I followed the smmhandler.S code in /src/cpu/x86/smm/ directory If I put my rsm instruction before ljmp instruction, I could invoke SMI successfully. /* Enable protected mode */ data32 ljmp $0x08, $1f
but if I put rsm instruction below that(even commented out the C procedure), my machine will freeze after the invoking.
The only difference between my code and ICH4 implementation is: I didn't copy the smm bin file(include smmhandler.S smihandler.c smm.ld), to location 0xa0000, I just copied the smmhandler.S file to location 0xa0000 and wrote a jmp statement at 0xa8000.
In order to make it simple, I commented out the C procedure, and only assembly in smmhandler.
That won't work. Just leave the sequence as it is, and adapt the southbridge/northbridge specific code to your chipset.
Pretty much like the attached patch, but it's not complete yet.