coreboot-kgpe-d16/src/arch
Paul Menzel 688350f33d 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>
2023-05-16 12:20:48 +00:00
..
arm tree: Drop repeated words 2023-02-07 04:37:31 +00:00
arm64 arch/arm64/include/armv8/arch/barrier.h: Add spaces around colons 2023-03-21 21:35:00 +00:00
ppc64 arch/ppc64/rom_media.c: move to mainboard/emulation/qemu-power* 2023-04-03 13:22:53 +00:00
riscv arch/riscv/trap_handler.c: Use new names for CSR 2023-04-21 20:12:42 +00:00
x86 x86: pci_io_cfg: Make constant unsigned to fix out of bounds shift 2023-05-16 12:20:48 +00:00