<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=3 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
coreboot-bounces@coreboot.org [mailto:coreboot-bounces@coreboot.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>fengwei zhang<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, November 10, 2010
11:30 AM<br>
<b><span style='font-weight:bold'>To:</span></b> coreboot@coreboot.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> [coreboot] Question about
smm handler bin</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Hi all,<br>
<br>
I am trying to impelement SMM support for K8/vt8237r, but I am strarking on
build smm handler bin. I understand I need to copy real smm handler to location
0xa0000. From the ICH4 example, there are two extern varaibles binary_smm_start
and binary_smm_end, I know it defines in
/build/cpu/x86/smm/smm_wrap.ramstage.o. but how does that work? <br>
<br>
Suppose I just want to put RSM instruction in the smmhandler, can I just write
instruction "0f aa"(bianry code of RSM) to location 0xa0000 and
0xa0001. I tried this, but my machine went freeze after I invoke SMI. <br>
<br>
I am thinking I may need to more instructons, because the SMM start with 16
bits real mode, it may not recongnize the instruction, right?<br>
But I am starking on how to build and copy SMM handler. <br>
<br>
I would really appreciate if some one could help me this out. <br>
<br>
Best,<br>
Fengwei<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>Hello Fengwei,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>I think the first instruction executed in
your case will be at address A8000. The AMD BKDG states:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color="#000081"
face="Times New Roman"><span style='font-size:11.0pt;color:#000081'>MSRC001_0111</span></font><font
size=2 color=black><span style='font-size:11.0pt;color:black'>[SMM_BASE] +
8000h: SMI handler entry point.</span></font><font size=2 color=black><span
style='font-size:10.0pt;color:black'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>As Rudolf said, you need to copy the code
into the SMM code space, not the legacy video frame buffer space that occupies
the same address range. The BKDG explains how to do this.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>Thanks,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>Scott<o:p></o:p></span></font></p>

</div>

</body>

</html>