<p>Patrick Rudolph has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/c/coreboot/+/30115">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">util/cbfstool/cbfs-mkstage: Support x86_64<br><br>Add support for relocations on x86_64.<br>Required for 64bit romstage.<br><br>Change-Id: I1ff223d3476776297b501813a953356dd6fa9d67<br>Signed-off-by: Patrick Rudolph <siro@das-labor.org><br>---<br>M util/cbfstool/cbfs-mkstage.c<br>1 file changed, 7 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/15/30115/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/util/cbfstool/cbfs-mkstage.c b/util/cbfstool/cbfs-mkstage.c</span><br><span>index 85c3e4f..6071437 100644</span><br><span>--- a/util/cbfstool/cbfs-mkstage.c</span><br><span>+++ b/util/cbfstool/cbfs-mkstage.c</span><br><span>@@ -362,7 +362,9 @@</span><br><span>  /* If there is any relocation to the ignored section that isn't</span><br><span>   * absolute fail as current assumptions are that all relocations</span><br><span>      * are absolute. */</span><br><span style="color: hsl(0, 100%, 40%);">-     if (reloc_type != R_386_32) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if ((reloc_type != R_386_32) &&</span><br><span style="color: hsl(120, 100%, 40%);">+           (reloc_type != R_AMD64_64) &&</span><br><span style="color: hsl(120, 100%, 40%);">+         (reloc_type != R_AMD64_32)) {</span><br><span>            ERROR("Invalid reloc to ignored section: %x\n", reloc_type);</span><br><span>               return -1;</span><br><span>   }</span><br><span>@@ -392,9 +394,10 @@</span><br><span>     if (rmodule_init(rmodctx, input))</span><br><span>            return -1;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-  /* Only support x86 XIP currently. */</span><br><span style="color: hsl(0, 100%, 40%);">-   if (rmodctx->pelf.ehdr.e_machine != EM_386) {</span><br><span style="color: hsl(0, 100%, 40%);">-                ERROR("Only support XIP stages for x86\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Only support x86 / x86_64 XIP currently. */</span><br><span style="color: hsl(120, 100%, 40%);">+        if ((rmodctx->pelf.ehdr.e_machine != EM_386) &&</span><br><span style="color: hsl(120, 100%, 40%);">+        (rmodctx->pelf.ehdr.e_machine != EM_X86_64)) {</span><br><span style="color: hsl(120, 100%, 40%);">+         ERROR("Only support XIP stages for x86/x86_64\n");</span><br><span>                 goto out;</span><br><span>    }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/c/coreboot/+/30115">change 30115</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/c/coreboot/+/30115"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I1ff223d3476776297b501813a953356dd6fa9d67 </div>
<div style="display:none"> Gerrit-Change-Number: 30115 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Patrick Rudolph <siro@das-labor.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>