Attention is currently required from: Nico Huber, Angel Pons. HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45517 )
Change subject: nb/intel: Introduce MCHBAR accessor functions ......................................................................
Patch Set 41:
(1 comment)
File src/northbridge/intel/common/mchbar_ops.h:
https://review.coreboot.org/c/coreboot/+/45517/comment/da386cb9_d6c5df9f PS37, Line 27: (u8)
Jenkins needs that mask. […]
Well, ~(0x01) will give 0xfffffffe and this guy is not an u8.
so, this will give an overflow as below: -------- CC romstage/northbridge/intel/x4x/raminit.o CC romstage/northbridge/intel/x4x/raminit_ddr23.o In file included from src/northbridge/intel/x4x/raminit_ddr23.c:17: src/northbridge/intel/x4x/raminit_ddr23.c: In function 'program_timings': src/northbridge/intel/x4x/x4x.h:56:52: error: overflow in conversion from 'int' to 'u8' {aka 'unsigned char'} changes value from '(int)*(volatile u8 *)((unsigned int)((int)i * 1024) + 4275126888) & -256 | 74' to '74' [-Werror=overflow] 56 | #define MCHBAR8_AND_OR(x, and, or) (MCHBAR8(x) = (MCHBAR8(x) & (and)) | (or)) | ^ src/northbridge/intel/x4x/raminit_ddr23.c:626:17: note: in expansion of macro 'MCHBAR8_AND_OR' 626 | MCHBAR8_AND_OR(0x400*i + 0x268, ~0xff, 0x4a); | ^~~~~~~~~~~~~~ src/northbridge/intel/x4x/raminit_ddr23.c: In function 'prog_rcomp': src/northbridge/intel/x4x/x4x.h:57:52: error: overflow in conversion from 'int' to 'u16' {aka 'short unsigned int'} changes value from '(int)*(volatile u16 *)((unsigned int)((int)i * 1024) + 4275127072) & -65536 | 26214' to '26214' [-Werror=overflow] 57 | #define MCHBAR16_AND_OR(x, and, or) (MCHBAR16(x) = (MCHBAR16(x) & (and)) | (or)) | ^ src/northbridge/intel/x4x/raminit_ddr23.c:1097:33: note: in expansion of macro 'MCHBAR16_AND_OR' 1097 | MCHBAR16_AND_OR(0x400*i + 0x320, ~0xffff, | ^~~~~~~~~~~~~~~ src/northbridge/intel/x4x/x4x.h:57:52: error: overflow in conversion from 'int' to 'u16' {aka 'short unsigned int'} changes value from '(int)*(volatile u16 *)((unsigned int)((int)i * 1024) + 4275127160) & -65536 | 52428' to '52428' [-Werror=overflow] 57 | #define MCHBAR16_AND_OR(x, and, or) (MCHBAR16(x) = (MCHBAR16(x) & (and)) | (or)) | ^ src/northbridge/intel/x4x/raminit_ddr23.c:1131:33: note: in expansion of macro 'MCHBAR16_AND_OR' 1131 | MCHBAR16_AND_OR(0x378 + 0x400 * i, | ^~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make: *** [Makefile:365 : build/romstage/northbridge/intel/x4x/raminit_ddr23.o] Erreur 1