summaryrefslogtreecommitdiff
path: root/src/acpi/acpigen.c
diff options
context:
space:
mode:
authorPaul Menzel <pmenzel@molgen.mpg.de>2021-03-05 15:21:51 +0100
committerLean Sheng Tan <sheng.tan@9elements.com>2023-05-16 12:20:48 +0000
commit688350f33d49b1021d9762c82e4df26359e8e5c9 (patch)
tree9fe6314749b2ed03e26179934bf0ec520870bacb /src/acpi/acpigen.c
parent8febc91b3041a1d027bf0d36d30ccb119496524f (diff)
x86: pci_io_cfg: Make constant unsigned to fix out of bounds shift
Fix the error below when running a coreboot image built with `CONFIG_UBSAN=y`. PCI: pci_scan_bus for bus 00 shift out of bounds src/arch/x86/include/arch/pci_io_cfg.h:13:20 ubsan: unrecoverable error. GCC with `-fsanitize=shift` also flags this: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' So, make the constant unsigned. TEST=emulation/qemu-i440fx with `CONFIG_UBSAN=y` stops later with [ERROR] unaligned access src/lib/rmodule.c:152:27 [EMERG] ubsan: unrecoverable error. Change-Id: Ib05d225ab9f22078d765009b4ee6ef0c63231eed Found-by: UBSAN Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/51292 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/acpi/acpigen.c')
0 files changed, 0 insertions, 0 deletions