[coreboot-gerrit] Change in coreboot[master]: northbridge/x4x: add MCHBAR AND/OR/AND_OR access macros

Felix Held (Code Review) gerrit at coreboot.org
Sun Jul 29 18:53:48 CEST 2018


Felix Held has uploaded this change for review. ( https://review.coreboot.org/27716


Change subject: northbridge/x4x: add MCHBAR AND/OR/AND_OR access macros
......................................................................

northbridge/x4x: add MCHBAR AND/OR/AND_OR access macros

Change-Id: Ie95321f3eb6fb17b17eb25e8a54670654c373706
Signed-off-by: Felix Held <felix-coreboot at felixheld.de>
---
M src/northbridge/intel/x4x/x4x.h
1 file changed, 12 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/27716/1

diff --git a/src/northbridge/intel/x4x/x4x.h b/src/northbridge/intel/x4x/x4x.h
index 2e9c08d..9837063 100644
--- a/src/northbridge/intel/x4x/x4x.h
+++ b/src/northbridge/intel/x4x/x4x.h
@@ -85,6 +85,18 @@
 #define MCHBAR8(x) (*((volatile u8 *)(DEFAULT_MCHBAR + (x))))
 #define MCHBAR16(x) (*((volatile u16 *)(DEFAULT_MCHBAR + (x))))
 #define MCHBAR32(x) (*((volatile u32 *)(DEFAULT_MCHBAR + (x))))
+#define MCHBAR8_AND(x, and) (MCHBAR8(x) = MCHBAR8(x) & (and))
+#define MCHBAR8_OR(x, or) (MCHBAR8(x) = MCHBAR8(x) | (or))
+#define MCHBAR8_AND_OR(x, and, or) \
+	(MCHBAR8(x) = (MCHBAR8(x) & (and)) | (or))
+#define MCHBAR16_AND(x, and) (MCHBAR16(x) = MCHBAR16(x) & (and))
+#define MCHBAR16_OR(x, or) (MCHBAR16(x) = MCHBAR16(x) | (or))
+#define MCHBAR16_AND_OR(x, and, or) \
+	(MCHBAR16(x) = (MCHBAR16(x) & (and)) | (or))
+#define MCHBAR32_AND(x, and) (MCHBAR32(x) = MCHBAR32(x) & (and))
+#define MCHBAR32_OR(x, or) (MCHBAR32(x) = MCHBAR32(x) | (or))
+#define MCHBAR32_AND_OR(x, and, or) \
+	(MCHBAR32(x) = (MCHBAR32(x) & (and)) | (or))
 
 #define CHDECMISC	0x111
 #define STACKED_MEM	(1 << 1)

-- 
To view, visit https://review.coreboot.org/27716
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie95321f3eb6fb17b17eb25e8a54670654c373706
Gerrit-Change-Number: 27716
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Held <felix-coreboot at felixheld.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180729/f2258bc0/attachment.html>


More information about the coreboot-gerrit mailing list