Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46336 )
Change subject: soc/intel/broadwell: Guard MCHBAR macro parameters ......................................................................
soc/intel/broadwell: Guard MCHBAR macro parameters
Add brackets around the parameters to avoid operation order problems.
Tested with BUILD_TIMELESS=1, Purism Librem 13 v1 remains identical.
Change-Id: I6efbe70d2bb3ad776a2566365afa66afab51584e Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/soc/intel/broadwell/include/soc/systemagent.h 1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/36/46336/1
diff --git a/src/soc/intel/broadwell/include/soc/systemagent.h b/src/soc/intel/broadwell/include/soc/systemagent.h index 52d386b..6f475a5 100644 --- a/src/soc/intel/broadwell/include/soc/systemagent.h +++ b/src/soc/intel/broadwell/include/soc/systemagent.h @@ -80,9 +80,9 @@
/* MCHBAR */
-#define MCHBAR8(x) *((volatile u8 *)(MCH_BASE_ADDRESS + x)) -#define MCHBAR16(x) *((volatile u16 *)(MCH_BASE_ADDRESS + x)) -#define MCHBAR32(x) *((volatile u32 *)(MCH_BASE_ADDRESS + x)) +#define MCHBAR8(x) *((volatile u8 *)(MCH_BASE_ADDRESS + (x))) +#define MCHBAR16(x) *((volatile u16 *)(MCH_BASE_ADDRESS + (x))) +#define MCHBAR32(x) *((volatile u32 *)(MCH_BASE_ADDRESS + (x)))
#define MCHBAR_PEI_VERSION 0x5034
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46336 )
Change subject: soc/intel/broadwell: Guard MCHBAR macro parameters ......................................................................
Patch Set 1:
(3 comments)
https://review.coreboot.org/c/coreboot/+/46336/1/src/soc/intel/broadwell/inc... File src/soc/intel/broadwell/include/soc/systemagent.h:
https://review.coreboot.org/c/coreboot/+/46336/1/src/soc/intel/broadwell/inc... PS1, Line 83: #define MCHBAR8(x) *((volatile u8 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46336/1/src/soc/intel/broadwell/inc... PS1, Line 84: #define MCHBAR16(x) *((volatile u16 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46336/1/src/soc/intel/broadwell/inc... PS1, Line 85: #define MCHBAR32(x) *((volatile u32 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46336 )
Change subject: soc/intel/broadwell: Guard MCHBAR macro parameters ......................................................................
Patch Set 2:
(3 comments)
https://review.coreboot.org/c/coreboot/+/46336/2/src/soc/intel/broadwell/inc... File src/soc/intel/broadwell/include/soc/systemagent.h:
https://review.coreboot.org/c/coreboot/+/46336/2/src/soc/intel/broadwell/inc... PS2, Line 83: #define MCHBAR8(x) *((volatile u8 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46336/2/src/soc/intel/broadwell/inc... PS2, Line 84: #define MCHBAR16(x) *((volatile u16 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46336/2/src/soc/intel/broadwell/inc... PS2, Line 85: #define MCHBAR32(x) *((volatile u32 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46336 )
Change subject: soc/intel/broadwell: Guard MCHBAR macro parameters ......................................................................
Patch Set 3:
(3 comments)
https://review.coreboot.org/c/coreboot/+/46336/3/src/soc/intel/broadwell/inc... File src/soc/intel/broadwell/include/soc/systemagent.h:
https://review.coreboot.org/c/coreboot/+/46336/3/src/soc/intel/broadwell/inc... PS3, Line 83: #define MCHBAR8(x) *((volatile u8 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46336/3/src/soc/intel/broadwell/inc... PS3, Line 84: #define MCHBAR16(x) *((volatile u16 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46336/3/src/soc/intel/broadwell/inc... PS3, Line 85: #define MCHBAR32(x) *((volatile u32 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46336 )
Change subject: soc/intel/broadwell: Guard MCHBAR macro parameters ......................................................................
Patch Set 3: Code-Review+2
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46336 )
Change subject: soc/intel/broadwell: Guard MCHBAR macro parameters ......................................................................
Patch Set 4:
(3 comments)
https://review.coreboot.org/c/coreboot/+/46336/4/src/soc/intel/broadwell/inc... File src/soc/intel/broadwell/include/soc/systemagent.h:
https://review.coreboot.org/c/coreboot/+/46336/4/src/soc/intel/broadwell/inc... PS4, Line 83: #define MCHBAR8(x) *((volatile u8 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46336/4/src/soc/intel/broadwell/inc... PS4, Line 84: #define MCHBAR16(x) *((volatile u16 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46336/4/src/soc/intel/broadwell/inc... PS4, Line 85: #define MCHBAR32(x) *((volatile u32 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46336 )
Change subject: soc/intel/broadwell: Guard MCHBAR macro parameters ......................................................................
Patch Set 5:
(3 comments)
https://review.coreboot.org/c/coreboot/+/46336/5/src/soc/intel/broadwell/inc... File src/soc/intel/broadwell/include/soc/systemagent.h:
https://review.coreboot.org/c/coreboot/+/46336/5/src/soc/intel/broadwell/inc... PS5, Line 83: #define MCHBAR8(x) *((volatile u8 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46336/5/src/soc/intel/broadwell/inc... PS5, Line 84: #define MCHBAR16(x) *((volatile u16 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46336/5/src/soc/intel/broadwell/inc... PS5, Line 85: #define MCHBAR32(x) *((volatile u32 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46336 )
Change subject: soc/intel/broadwell: Guard MCHBAR macro parameters ......................................................................
Patch Set 5:
(3 comments)
https://review.coreboot.org/c/coreboot/+/46336/5/src/soc/intel/broadwell/inc... File src/soc/intel/broadwell/include/soc/systemagent.h:
https://review.coreboot.org/c/coreboot/+/46336/5/src/soc/intel/broadwell/inc... PS5, Line 83: #define MCHBAR8(x) *((volatile u8 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46336/5/src/soc/intel/broadwell/inc... PS5, Line 84: #define MCHBAR16(x) *((volatile u16 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46336/5/src/soc/intel/broadwell/inc... PS5, Line 85: #define MCHBAR32(x) *((volatile u32 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46336 )
Change subject: soc/intel/broadwell: Guard MCHBAR macro parameters ......................................................................
Patch Set 8:
(3 comments)
https://review.coreboot.org/c/coreboot/+/46336/8/src/soc/intel/broadwell/inc... File src/soc/intel/broadwell/include/soc/systemagent.h:
https://review.coreboot.org/c/coreboot/+/46336/8/src/soc/intel/broadwell/inc... PS8, Line 83: #define MCHBAR8(x) *((volatile u8 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46336/8/src/soc/intel/broadwell/inc... PS8, Line 84: #define MCHBAR16(x) *((volatile u16 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
https://review.coreboot.org/c/coreboot/+/46336/8/src/soc/intel/broadwell/inc... PS8, Line 85: #define MCHBAR32(x) *((volatile u32 *)(MCH_BASE_ADDRESS + (x))) Macros with complex values should be enclosed in parentheses
Angel Pons has submitted this change. ( https://review.coreboot.org/c/coreboot/+/46336 )
Change subject: soc/intel/broadwell: Guard MCHBAR macro parameters ......................................................................
soc/intel/broadwell: Guard MCHBAR macro parameters
Add brackets around the parameters to avoid operation order problems.
Tested with BUILD_TIMELESS=1, Purism Librem 13 v1 remains identical.
Change-Id: I6efbe70d2bb3ad776a2566365afa66afab51584e Signed-off-by: Angel Pons th3fanbus@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/46336 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Nico Huber nico.h@gmx.de --- M src/soc/intel/broadwell/include/soc/systemagent.h 1 file changed, 3 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
diff --git a/src/soc/intel/broadwell/include/soc/systemagent.h b/src/soc/intel/broadwell/include/soc/systemagent.h index c2c5cc8..f81d5a0 100644 --- a/src/soc/intel/broadwell/include/soc/systemagent.h +++ b/src/soc/intel/broadwell/include/soc/systemagent.h @@ -80,9 +80,9 @@
/* MCHBAR */
-#define MCHBAR8(x) *((volatile u8 *)(MCH_BASE_ADDRESS + x)) -#define MCHBAR16(x) *((volatile u16 *)(MCH_BASE_ADDRESS + x)) -#define MCHBAR32(x) *((volatile u32 *)(MCH_BASE_ADDRESS + x)) +#define MCHBAR8(x) *((volatile u8 *)(MCH_BASE_ADDRESS + (x))) +#define MCHBAR16(x) *((volatile u16 *)(MCH_BASE_ADDRESS + (x))) +#define MCHBAR32(x) *((volatile u32 *)(MCH_BASE_ADDRESS + (x)))
#define MCHBAR_PEI_VERSION 0x5034 #define BIOS_RESET_CPL 0x5da8