coreboot-kgpe-d16/src/include/device
Hung-Te Lin 85ecdb1471 mmio: Fix failure in bit field macro when accessing >30 bits
For bit fields with 31 bits (e.g: DEFINE_BITFIELD(MYREG, 30, 0) ),
the calculation of mask value will go overflow:
 "error: integer overflow in expression '-2147483648 - 1' of
  type 'int' results in '2147483647'".

And for bit fields with 32 bits (e.g: DEFINE_BITFIELD(MYREG, 31, 0) ),
the error will be:
 "error: left shift count >= width of type [-Werror=shift-count-overflow]"

To fix these issues, the bit field macros should always use unsigned
integers, and use 64bit integer when creating mask value.

Change-Id: Ie3cddf9df60b83de4e21243bfde6b79729fb06ef
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40404
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2020-04-20 06:20:50 +00:00
..
dram src/include: Use SPDX for GPL-2.0-only files 2020-04-05 17:45:17 +00:00
azalia.h src/include: Use SPDX for GPL-2.0-only files 2020-04-05 17:45:17 +00:00
azalia_device.h src/include: Use SPDX for GPL-2.0-only files 2020-04-05 17:45:17 +00:00
cardbus.h src: Use of device_t is deprecated 2018-06-14 09:29:31 +00:00
device.h Replace DEVICE_NOOP with noop_(set|read)_resources 2020-04-10 11:50:22 +00:00
drm_dp_helper.h
hypertransport.h device/hypertransport: Drop unused code 2019-11-22 10:41:10 +00:00
hypertransport_def.h nb/amd/fam10: Drop support 2019-11-20 19:08:30 +00:00
i2c.h src/include: Use SPDX for GPL-2.0-only files 2020-04-05 17:45:17 +00:00
i2c_bus.h src/include: Use SPDX for GPL-2.0-only files 2020-04-05 17:45:17 +00:00
i2c_simple.h src/include: Use SPDX for GPL-2.0-only files 2020-04-05 17:45:17 +00:00
mmio.h mmio: Fix failure in bit field macro when accessing >30 bits 2020-04-20 06:20:50 +00:00
path.h src: Add missing include <stdint.h> 2018-11-01 11:25:07 +00:00
pci.h device/pci_early: Drop some __SIMPLE_DEVICE__ use 2019-09-30 20:06:06 +00:00
pci_def.h pciexp: Add support for allocating PCI express hotplug resources 2020-02-05 09:32:30 +00:00
pci_ehci.h src/include: Use SPDX for GPL-2.0-only files 2020-04-05 17:45:17 +00:00
pci_ids.h intel/common/block/lpc: Add new device IDs for Lewisburg PCH 2020-04-16 18:42:57 +00:00
pci_mmio_cfg.h src/include: Use SPDX for GPL-2.0-only files 2020-04-05 17:45:17 +00:00
pci_ops.h src/include: Use SPDX for GPL-2.0-only files 2020-04-05 17:45:17 +00:00
pci_rom.h Rework map_oprom_vendev to add revision check and mapping 2020-03-25 10:49:08 +00:00
pci_type.h src/include: Use SPDX for GPL-2.0-only files 2020-04-05 17:45:17 +00:00
pciexp.h pciexp: Add support for allocating PCI express hotplug resources 2020-02-05 09:32:30 +00:00
pcix.h src: Use of device_t is deprecated 2018-06-14 09:29:31 +00:00
pnp.h superio/common/conf_mode: Add op to write SSDT 2019-12-22 13:47:39 +00:00
pnp_def.h
pnp_ops.h src/include: Use SPDX for GPL-2.0-only files 2020-04-05 17:45:17 +00:00
pnp_type.h src/include: Use SPDX for GPL-2.0-only files 2020-04-05 17:45:17 +00:00
resource.h device: Constify dev argument to (probe|find)_resource() 2019-07-31 09:10:28 +00:00
smbus.h device/smbus: Drop unused smbus_set_link() 2020-01-04 22:08:38 +00:00
smbus_def.h
smbus_host.h src/include: Use SPDX for GPL-2.0-only files 2020-04-05 17:45:17 +00:00
spi.h src/include: Use SPDX for GPL-2.0-only files 2020-04-05 17:45:17 +00:00