<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Patch Set 2:</p><p style="white-space: pre-wrap; word-wrap: break-word;">>> Everything below the currently defined defaults is wrong.<br>> <br>> why are they wrong? I tested it with values below and it behaves<br>> like it should.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Tested on what board and tested how? With/without MRC cache might make<br>a difference for instance, plus there are about half a dozen of software<br>reset methods, which one was used?</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I only tested the behavior on qemu and especially on my own maschine.<br>(boot, reboot, resume to disk, S3 resume)</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;"><br>Take modern Intel systems for instance. It's possible to reset the<br>CPU only, causing an INIT, the cores reset the x86 register state,<br>BSP restarts at the reset vector. Let's call it Reset#1. This is not<br>enough to rerun coreboot, though. Hence you'll usually find a 0x6 -><br>0xcf9 reset (aka. system reset, still a warm reset) early in the<br>romstage: Reset#2. If no mrc.cache is present (bug or not) the raminit<br>will refuse to retrain on warm resets: 0xe -> 0xcf9 (full reset, goes<br>into S5 and back into S0 after a few seconds, hence a cold reset).<br>That'd be Reset#3.</p><p style="white-space: pre-wrap; word-wrap: break-word;">So if MAX_REBOOT_CNT is < 3 and you hit the path described above, it<br>will run into fallback for no reason.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Now i understand dimension of the problem. Thanks for the detailed explanation :)</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;"><br>While that's the only path that comes to mind atm, there may be more<br>like that. If you can prove that a board doesn't have any valid path<br>with 3 resets, you can set MAX_REBOOT_CNT lower, and I won't call it<br>wrong ;)</p><p style="white-space: pre-wrap; word-wrap: break-word;">><br>>> In other words, this option was hidden on purpose. You can add another<br>>> option for instance and take the minimum of both or something like<br>>> that. But you mustn't lower it.<br>> <br>> An other option would be to adapt the range in the Kconfig or fix<br>> the issue which cause this wrong behavior.</p><p style="white-space: pre-wrap; word-wrap: break-word;">What wrong behaviour?</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I meant the reset sequel, which causes a fallback even if nothing failed, but now i understand that it isn't possible.</p><p style="white-space: pre-wrap; word-wrap: break-word;"><br>I will update the entry to warn about any value below.<br></p><p><a href="https://review.coreboot.org/c/coreboot/+/29979">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://review.coreboot.org/c/coreboot/+/29979">change 29979</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/+/29979"/><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: Ice26e2ef349f1172b564edc14f1012c33546a93c </div>
<div style="display:none"> Gerrit-Change-Number: 29979 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Marcello Sylvester Bauer <sylvblck@sylv.io> </div>
<div style="display:none"> Gerrit-Reviewer: Marcello Sylvester Bauer <sylvblck@sylv.io> </div>
<div style="display:none"> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> </div>
<div style="display:none"> Gerrit-CC: Nico Huber <nico.h@gmx.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 03 Dec 2018 08:34:32 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>