Shawn C has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/49076 )
Change subject: arch/x86/include/arch/pci_io_cfg.h: Fix UndefinedBehavior sanitizer complain ......................................................................
arch/x86/include/arch/pci_io_cfg.h: Fix UndefinedBehavior sanitizer complain
GCC build option "-fsanitize=shift" will complain: "runtime error: left shift of 1 by 31 places cannot be represented in type 'int'"
Signed-off-by: Shawn C citypw@hardenedlinux.org Change-Id: I6eeee1e92b616f68aa60eb74771912dd00ff7712 --- M src/arch/x86/include/arch/pci_io_cfg.h 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/49076/1
diff --git a/src/arch/x86/include/arch/pci_io_cfg.h b/src/arch/x86/include/arch/pci_io_cfg.h index 61dd106..5e9761e 100644 --- a/src/arch/x86/include/arch/pci_io_cfg.h +++ b/src/arch/x86/include/arch/pci_io_cfg.h @@ -10,7 +10,7 @@ static __always_inline uint32_t pci_io_encode_addr(pci_devfn_t dev, uint16_t reg) { - uint32_t addr = 1 << 31; + uint32_t addr = 1UL << 31;
addr |= dev >> 4; addr |= reg & 0xfc;