coreboot/src/include
Yu-Ping Wu 941db0e55c helpers: Add GENMASK macro
The GENMASK is defined in multiple files (with various names such as
MASKBIT), which sets certain consecutive bits to 1 and leaves the others
to 0. To avoid duplicate macros, add GENMASK macro to helpers.h.

GENMASK(high, low) sets bits from `high` to `low` (inclusive) to 1. For
example, GENMASK(39, 21) gives us the 64-bit vector 0x000000ffffe00000.

Remove duplicate macro definitions. Also utilize GENMASK for _BF_MASK in
mmio.h.

BUG=none
TEST=make tests/commonlib/bsd/helpers-test
TEST=emerge-cherry coreboot
BRANCH=none

Change-Id: If2e7c4827d8a7d27688534593b556a72f16f0c2b
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56543
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2021-08-02 15:01:54 +00:00
..
acpi arch/x86/acpi: Add code for KEY_MICMUTE and KEY_KBDILLUMTOGGLE 2021-07-31 09:15:23 +00:00
boot
console include/console: Fix FSP Notify phase postcodes discrepancy 2021-05-12 06:16:21 +00:00
cpu include/cpu: Remove one space from bitfield macro definition 2021-07-24 11:14:08 +00:00
device helpers: Add GENMASK macro 2021-08-02 15:01:54 +00:00
efi
pc80
smp
superio
sys
adainit.h
asan.h
assert.h arch/x86: Use ENV_X86_64 instead of _x86_64_ 2021-07-06 06:09:13 +00:00
b64_decode.h
base3.h
bcd.h
boardid.h
boot_device.h
bootblock_common.h decompressor: Add CBFS_VERIFICATION support 2021-04-06 07:49:15 +00:00
bootmem.h cbfs: Remove prog_locate() for payloads (SELF and FIT) 2021-03-17 00:13:53 +00:00
bootmode.h
bootsplash.h
bootstate.h lib/hardwaremain: Drop boot_state_current_{block,unblock}() 2021-07-18 15:16:26 +00:00
cbfs.h lib/cbfs,device/pci_rom: Move cbfs_boot_map_optionrom and modernize 2021-07-20 16:51:25 +00:00
cbfs_glue.h include/cbfsglue.h: Use BIOS_INFO for LOG macro 2021-04-06 06:53:17 +00:00
cbfs_private.h
cbmem.h cbmem: Introduce "early" init hooks for console 2021-05-27 23:30:42 +00:00
cper.h
crc_byte.h
ctype.h
delay.h
device_tree.h
dimm_info_util.h
edid.h
elog.h
endian.h
espi.h lib/espi_debug: Add espi_show_slave_peripheral_channel_configuration 2021-04-23 21:20:26 +00:00
fallback.h
fit.h
fmap.h
framebuffer_info.h
fw_config.h fw_config: Add helper function fw_config_probe_dev 2021-05-24 16:55:27 +00:00
gic.h
gpio.h
halt.h
imd.h
imd_private.h
input-event-codes.h
inttypes.h
ip_checksum.h
kconfig.h
lib.h lib/hexdump: remove hexdump32 and use hexdump instead 2021-05-27 15:41:15 +00:00
limits.h include/limits.h: Add file (read: borrow from Linux) 2021-06-10 06:57:54 +00:00
list.h
main_decl.h
memlayout.h
memory_info.h memory_info.h: Store SMBIOS error correction type 2021-03-01 08:22:10 +00:00
memrange.h
metadata_hash.h src: Drop "This file is part of the coreboot project" lines 2021-05-10 15:07:33 +00:00
mrc_cache.h
nhlt.h
option.h option: Turn CMOS option backend into choice 2021-05-28 11:37:16 +00:00
post.h
program_loading.h lib/prog_loaders: Add payload_preload 2021-07-19 02:42:43 +00:00
ramdetect.h
random.h
reg_script.h
region_file.h
reset.h
rmodule.h
romstage_handoff.h
rtc.h lib/rtc: Add sanity check for time and date 2021-05-30 20:24:13 +00:00
rules.h include/rules.h: Add ENV_TEST definition 2021-04-06 06:58:05 +00:00
sar.h sar: Fix semantics of get_wifi_sar_cbfs_filename() 2021-03-17 07:56:13 +00:00
sdram_mode.h
smbios.h SMBIOS: Drop now-unnecessary unions 2021-07-01 07:38:32 +00:00
smmstore.h
spd.h spd.h: Move DIMMx macros to i440bx/raminit.h 2021-04-11 21:05:00 +00:00
spd_bin.h spd_bin: Replace get_spd_cbfs_rdev() with spd_cbfs_map() 2021-03-17 08:10:35 +00:00
spd_cache.h
spi-generic.h
spi_bitbang.h
spi_flash.h drivers: spi_flash: Add Fast Read Dual I/O support 2021-07-15 14:05:34 +00:00
spi_sdcard.h
stage_cache.h
stdarg.h
stdbool.h
stddef.h stddef.h: Use compiler macros for built-in integer types 2021-06-10 05:36:30 +00:00
stdint.h
stdio.h
stdlib.h lib: Add obvious definition for calloc 2021-04-06 06:50:38 +00:00
string.h
swab.h
symbols.h lib/prog_loaders: Add payload_preload 2021-07-19 02:42:43 +00:00
thread.h arch/x86,lib/thread: Enable thread support in romstage 2021-07-26 07:30:48 +00:00
timer.h
timestamp.h
types.h
uuid.h
vbe.h
version.h
watchdog.h
wrdd.h