coreboot/src/include
Jacob Garber 0c4ed4bd7e arch, include, soc: Use common stdint.h
There are only minimal differences between the architecture specific
stdint.h implementations, so let's tidy them up and merge them together
into a single file. In particular,

- Use 'unsigned long' for uintptr_t. This was already the case for x86
  and riscv, while arm and mips used 'unsigned int', and arm64 and ppc64
  used 'unsigned long long'. This change allows using a single integer
  type for uintptr_t across all architectures, and brings it into
  consistency with the rest of the code base, which generally uses
  'unsigned long' for memory addresses anyway. This change required
  fixing several assumptions about integer types in the arm code.
- Use _Bool as the boolean type. This is a specialized boolean type that
  was introduced in C99, and is preferrable over hacking booleans
  using integers. romcc sadly does not support _Bool, so for that we
  stick with the old uint8_t.
- Drop the least and fast integer types. They aren't used
  anywhere in the code base and are an unnecessary maintenance burden.
  Using the standard fixed width types is essentially always better anyway.
- Drop the UINT64_C() macro. It also isn't used anywhere and doesn't
  provide anything that a (uint64_t) cast doesn't.
- Implement the rest of the MIN and MAX numerical limits.
- Use static assertions to check that the integer widths are correct.

Change-Id: I6b52f37793151041b7bdee9ec3708bfad69617b2
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34075
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-07-12 17:40:24 +00:00
..
boot
console console: Allow using vprintk() with disabled console 2019-06-11 17:29:02 +00:00
cpu cpu/x86: Declare smi_release_lock() static 2019-07-11 21:03:37 +00:00
device pci_ids: Drop a block of unused, redundant definitions 2019-07-12 08:58:28 +00:00
efi include/efi/efi_datatype: Convert EFI datatypes as per coreboot specification 2019-03-09 04:25:31 +00:00
pc80 coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
smp coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
superio superio: Add ASpeed AST2400 2019-05-24 07:22:23 +00:00
sys
adainit.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
assert.h src/include/assert.h: add noreturn attribute to dead_code() 2019-05-17 07:16:50 +00:00
b64_decode.h
base3.h
bcd.h
boardid.h
boot_device.h boot_device: Constify argument 2019-05-12 07:47:45 +00:00
bootblock_common.h
bootmem.h
bootmode.h vboot: deprecate physical dev switch 2019-03-27 06:13:27 +00:00
bootstate.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
cbfs.h
cbmem.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
cper.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
ctype.h add ctype.h header 2019-06-24 21:15:14 +00:00
delay.h
device_tree.h device_tree: Update comment style to C89 2019-06-21 09:23:19 +00:00
dimm_info_util.h
edid.h
elog.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
endian.h endian.h: Add be32dec/be32enc family of functions 2019-05-23 08:42:44 +00:00
fallback.h
fit.h fit: Add overlay support 2019-06-21 09:22:31 +00:00
fit_payload.h
fmap.h lib/fmap: Add area read/write functions 2019-04-23 10:22:54 +00:00
gic.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
gpio.h
halt.h
imd.h
inttypes.h
ip_checksum.h
kconfig.h kconfig: Drop IS_ENABLED() macro 2019-06-04 13:33:40 +00:00
lib.h Move calls to quick_ram_check() before CBMEM init 2019-03-27 08:26:16 +00:00
list.h
main_decl.h
memlayout.h Replace ENV_RAMSTAGE with ENV_PAYLOAD_LOADER 2019-06-24 04:33:06 +00:00
memory_info.h src/soc/intel/common/smbios: Add addtional infos to dimm_info 2019-06-06 11:32:52 +00:00
memrange.h
mrc_cache.h
nhlt.h
option.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
program_loading.h lib/romstage_stack.c: Remove file 2019-07-07 21:27:22 +00:00
random.h
reg_script.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
region_file.h
reset.h
rmodule.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
romstage_handoff.h
rtc.h
rules.h Replace ENV_RAMSTAGE with ENV_PAYLOAD_LOADER 2019-06-24 04:33:06 +00:00
sar.h
sdram_mode.h
smbios.h src/arch/x86: Add automatic type41 entry creation 2019-05-28 11:52:27 +00:00
smmstore.h
spd.h
spd_bin.h
spd_ddr2.h
spi-generic.h spi_flash: Add Dual SPI support 2019-06-10 18:02:33 +00:00
spi_bitbang.h
spi_flash.h spi_flash: Add Dual SPI support 2019-06-10 18:02:33 +00:00
stage_cache.h stage_cache: Make empty inline function if CONFIG_NO_STAGE_CACHE enable 2019-06-13 04:39:28 +00:00
stddef.h Replace ENV_RAMSTAGE with ENV_PAYLOAD_LOADER 2019-06-24 04:33:06 +00:00
stdint.h arch, include, soc: Use common stdint.h 2019-07-12 17:40:24 +00:00
stdlib.h
string.h add ctype.h header 2019-06-24 21:15:14 +00:00
swab.h
symbols.h Replace remaining IS_ENABLED(CONFIG_*) with CONFIG() 2019-04-08 18:50:10 +00:00
thread.h src: Fix remaining #include <timer.h> 2019-04-09 17:20:35 +00:00
timer.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
timestamp.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
trace.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
types.h src/{include,arch,cpu,lib}: Add missing 'include <types.h>' 2019-05-29 20:27:18 +00:00
uuid.h
vbe.h
version.h ACPI: Correct asl_compiler_revision value 2019-02-21 19:07:31 +00:00
watchdog.h coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
wrdd.h