summaryrefslogtreecommitdiff
path: root/src/soc/intel/xeon_sp
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-02-19 16:08:36 +0100
committerPatrick Georgi <pgeorgi@google.com>2021-03-03 09:07:59 +0000
commitd3a65deb255be26bdfbdae3b4b3625e4e3183a13 (patch)
tree1ed21c0c462fdd733ab6ffdcc52fedb086581dcb /src/soc/intel/xeon_sp
parentb0f52fb5bfa71d2ddf5741408cc14fcfdf8f5ffc (diff)
downloadcoreboot-d3a65deb255be26bdfbdae3b4b3625e4e3183a13.tar.xz
soc/intel: Guard macro parameters in pm.h
Guard against unintended operator precedence and associativity issues. Change-Id: I342682a57fde9942cdf7be10756ee21c10af802a Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50917 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/xeon_sp')
-rw-r--r--src/soc/intel/xeon_sp/include/soc/pm.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/soc/intel/xeon_sp/include/soc/pm.h b/src/soc/intel/xeon_sp/include/soc/pm.h
index b699e1c26c..2673320664 100644
--- a/src/soc/intel/xeon_sp/include/soc/pm.h
+++ b/src/soc/intel/xeon_sp/include/soc/pm.h
@@ -66,8 +66,8 @@
#define PM2_CNT 0x50
#define GPE0_REG_MAX 4
#define GPE0_REG_SIZE 32
-#define GPE0_STS(x) (0x80 + (x * 4))
-#define GPE0_EN(x) (0x90 + (x * 4))
+#define GPE0_STS(x) (0x80 + ((x) * 4))
+#define GPE0_EN(x) (0x90 + ((x) * 4))
#define GPE_STD 3 /* 0x8c/0x9c = Standard GPE */
#define GPE_STS_RSVD GPE_STD
#define GPIO_T2_STS (1 << 15)
@@ -76,7 +76,7 @@
#define PCI_EXP_STS (1 << 9)
#define SMB_WAK_STS (1 << 7)
#define TCOSCI_STS (1 << 6)
-#define GPE0_EN(x) (0x90 + (x * 4))
+#define GPE0_EN(x) (0x90 + ((x) * 4))
#define GPIO_T2_EN (1 << 15)
#define ESPI_EN (1 << 14)
#define PME_B0_EN (1 << 13)