[coreboot-gerrit] Change in coreboot[master]: northbridge/sandybridge: add MCHBAR32 AND/OR/AND_OR access macros
Felix Held (Code Review)
gerrit at coreboot.org
Sun Jul 29 21:50:59 CEST 2018
Felix Held has uploaded this change for review. ( https://review.coreboot.org/27723
Change subject: northbridge/sandybridge: add MCHBAR32 AND/OR/AND_OR access macros
......................................................................
northbridge/sandybridge: add MCHBAR32 AND/OR/AND_OR access macros
Change-Id: I5d91674ebd281a595e7c0462671f4715ca09cb5c
Signed-off-by: Felix Held <felix-coreboot at felixheld.de>
---
M src/northbridge/intel/sandybridge/sandybridge.h
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/27723/1
diff --git a/src/northbridge/intel/sandybridge/sandybridge.h b/src/northbridge/intel/sandybridge/sandybridge.h
index 3c082f1..faa9cd90 100644
--- a/src/northbridge/intel/sandybridge/sandybridge.h
+++ b/src/northbridge/intel/sandybridge/sandybridge.h
@@ -125,7 +125,10 @@
#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 MCHBAR32_OR(x, or) MCHBAR32(x) = (MCHBAR32(x) | (or))
+#define MCHBAR32_OR(x, or) (MCHBAR32(x) = (MCHBAR32(x) | (or)))
+#define MCHBAR32_AND(x, and) (MCHBAR32(x) = (MCHBAR32(x) & (and)))
+#define MCHBAR32_AND_OR(x, and, or) \
+ (MCHBAR32(x) = (MCHBAR32(x) & (and)) | (or))
#define SSKPD 0x5d14 /* 16bit (scratchpad) */
#define BIOS_RESET_CPL 0x5da8 /* 8bit */
--
To view, visit https://review.coreboot.org/27723
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: I5d91674ebd281a595e7c0462671f4715ca09cb5c
Gerrit-Change-Number: 27723
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/ceb0796d/attachment-0001.html>
More information about the coreboot-gerrit
mailing list