<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">I'm a little confused why we need a trampoline and relocation code<br>just to boot an ARM64 kernel. ARM64 kernels always want to be<br>loaded at the start of physical memory (+0x80000). ARM64 boards in<br>coreboot can statically position their ramstage wherever they want<br>in memlayout. Why not just make sure that the ramstage is always<br>far enough away from the start of physical memory to avoid the<br>possibility of an overlap and be done with it? I mean, all relevant<br>systems have more than enough DRAM available.</p><p style="white-space: pre-wrap; word-wrap: break-word;">This just seems to add loads of complication to the process with no<br>clear gain.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">The trampoline:<br>Coreboot passes a pointer to the coreboot tables in x0, but we have to pass a pointer to the devicetree in x0. My first idea was to include the devicetree in the payload and load it to a known address right before the kernel. But we need to be able to modify it, like it's done with ACPI tables. The trampoline's purpose is to find the devicetree in coreboot tables and pass the address to the kernel in x0.</p><p style="white-space: pre-wrap; word-wrap: break-word;">The load address:<br>I can place the kernel anywhere in DRAM, the start of DRAM is prefered. Using static address has the following disadvantages:<br>I need to know start of DRAM, but that's only set in memlayout.ld. Extracting it seems a bit tricky.<br>I would need to modify all memlayout.ld to have enough free space for the kernel image.<br>I need to add a sanity check, that the start of dram is usable. That could be done with a new REGION called payload for example.</p><p style="white-space: pre-wrap; word-wrap: break-word;">With the dynamic loader I don't have to care about all that, it just places the kernel and executes it.</p><p><a href="https://review.coreboot.org/23869">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://review.coreboot.org/23869">change 23869</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/23869"/><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-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I9a8183a87de4dc3a4c4f038fe5b4912ada5d75f9 </div>
<div style="display:none"> Gerrit-Change-Number: 23869 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Patrick Rudolph <patrick.rudolph@9elements.com> </div>
<div style="display:none"> Gerrit-Reviewer: Julius Werner <jwerner@chromium.org> </div>
<div style="display:none"> Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org> </div>
<div style="display:none"> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 27 Feb 2018 08:26:51 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-HasLabels: No </div>