[coreboot] question about switching from real mode to protected mode in smm handler

Stefan Reinauer stefan.reinauer at coresystems.de
Wed Nov 17 05:36:02 CET 2010


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.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: amdk8_smm_latest.diff
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20101116/765baf29/attachment.ksh>


More information about the coreboot mailing list