<p>Felix Held has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/27705">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">northbridge/nehalem: add MCHBAR AND/OR/AND_OR macros<br><br>The newly added macros are used for cleaning up the RAM initializatiion code<br><br>Change-Id: I3d3782ee1fa524cf69b63ccc7eb73e9a2ace84ec<br>Signed-off-by: Felix Held <felix-coreboot@felixheld.de><br>---<br>M src/northbridge/intel/nehalem/nehalem.h<br>1 file changed, 8 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/27705/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/northbridge/intel/nehalem/nehalem.h b/src/northbridge/intel/nehalem/nehalem.h</span><br><span>index afb3c7d..bc49e96 100644</span><br><span>--- a/src/northbridge/intel/nehalem/nehalem.h</span><br><span>+++ b/src/northbridge/intel/nehalem/nehalem.h</span><br><span>@@ -175,7 +175,14 @@</span><br><span> #define MCHBAR8(x) (*((volatile u8 *)(DEFAULT_MCHBAR + (x))))</span><br><span> #define MCHBAR16(x) (*((volatile u16 *)(DEFAULT_MCHBAR + (x))))</span><br><span> #define MCHBAR32(x) (*((volatile u32 *)(DEFAULT_MCHBAR + (x))))</span><br><span style="color: hsl(0, 100%, 40%);">-#define MCHBAR32_OR(x, or) (MCHBAR32(x) = (MCHBAR32(x) | (or)))</span><br><span style="color: hsl(120, 100%, 40%);">+#define MCHBAR8_AND(x, and) (MCHBAR8(x) = MCHBAR8(x) & (and))</span><br><span style="color: hsl(120, 100%, 40%);">+#define MCHBAR8_OR(x, or) (MCHBAR8(x) = MCHBAR8(x) | (or))</span><br><span style="color: hsl(120, 100%, 40%);">+#define MCHBAR16_AND(x, and) (MCHBAR16(x) = MCHBAR16(x) & (and))</span><br><span style="color: hsl(120, 100%, 40%);">+#define MCHBAR16_OR(x, or) (MCHBAR16(x) = MCHBAR16(x) | (or))</span><br><span style="color: hsl(120, 100%, 40%);">+#define MCHBAR32_AND(x, and) (MCHBAR32(x) = MCHBAR32(x) & (and))</span><br><span style="color: hsl(120, 100%, 40%);">+#define MCHBAR32_OR(x, or) (MCHBAR32(x) = MCHBAR32(x) | (or))</span><br><span style="color: hsl(120, 100%, 40%);">+#define MCHBAR32_AND_OR(x, and, or) \</span><br><span style="color: hsl(120, 100%, 40%);">+  (MCHBAR32(x) = (MCHBAR32(x) & (and)) | (or))</span><br><span> </span><br><span> #define BIOS_RESET_CPL  0x5da8  /* 8bit */</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/27705">change 27705</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/27705"/><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: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I3d3782ee1fa524cf69b63ccc7eb73e9a2ace84ec </div>
<div style="display:none"> Gerrit-Change-Number: 27705 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Felix Held <felix-coreboot@felixheld.de> </div>