Paul Menzel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/51287 )
Change subject: nb/amd/agesa/family14: Use ULL constant for shift ......................................................................
nb/amd/agesa/family14: Use ULL constant for shift
Fam14h - domain_set_resources amsr - incoming dev = 0x67edd5a0 shift out of bounds src/northbridge/amd/agesa/family14/northbridge.c:314:41 ubsan: unrecoverable error.
Found-by: UBSAN Change-Id: Ie9a2397f8b0c93550f63d6708e1ed96ca4a990d8 Signed-off-by: Paul Menzel pmenzel@molgen.mpg.de --- M src/northbridge/amd/agesa/family14/northbridge.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/87/51287/1
diff --git a/src/northbridge/amd/agesa/family14/northbridge.c b/src/northbridge/amd/agesa/family14/northbridge.c index 020c9c6..6eaba2d 100644 --- a/src/northbridge/amd/agesa/family14/northbridge.c +++ b/src/northbridge/amd/agesa/family14/northbridge.c @@ -311,7 +311,7 @@ if (d.mask & 1) { hole = pci_read_config32(__f1_dev[0], 0xf0); if (hole & 1) { // we find the hole - mem_hole.hole_startk = (hole & (0xff << 24)) >> 10; + mem_hole.hole_startk = (hole & (0xffULL << 24)) >> 10; mem_hole.node_id = 0; // record the node No with hole } }