summaryrefslogtreecommitdiff
path: root/include/sbi/sbi_types.h
AgeCommit message (Collapse)Author
2025-12-15include: sbi: Make "s8" actually signed.Benedikt Freisen
Since plain "char" is implicitly unsigned on RISC-V, "s8" should be an alias for "signed char". Signed-off-by: Benedikt Freisen <[email protected]> Reviewed-by: Radim Krčmář <[email protected]> Reviewed-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
2025-04-15lib: sbi: Simplify structure member offset checkingXiang W
Add a macro assert_member_offset() to perform structure member offset checking. Signed-off-by: Xiang W <[email protected]> Reviewed-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
2024-12-21include: sbi: Fix compiling with C23 enabled compilersMichael Neuling
C23 pre-defines bool so we need to gate our defines. Signed-off-by: Michael Neuling <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2024-09-27include: sbi: Don't unconditionally define '__always_inline'Elyes Haouas
Update __always_inline macro define to fix opensbi upstream build for coreboot. Refer, https://qa.coreboot.org/job/coreboot-gerrit/257449/testReport/junit/(root)/clang/EMULATION_QEMU_RISCV_RV64_/ Closes: https://github.com/riscv-software-src/opensbi/issues/366 Signed-off-by: Elyes Haouas <[email protected]> Signed-off-by: Anup Patel <[email protected]>
2023-02-08include: types: Add typedefs for endiannessRahul Pathak
If any variable/memory-location follows certain endianness then its important to annotate it properly so that proper conversion can be done before read/write from that variable/memory. Also, use these new typedefs in libfdt_env.h for deriving its own custom fdtX_t types Signed-off-by: Rahul Pathak <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2023-01-22include: types: add always inline compiler attributeYu Chien Peter Lin
Provide __always_inline to sbi_types header. Signed-off-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2023-01-06treewide: Replace TRUE/FALSE with true/falseBin Meng
C language standard uses true/false for the boolean type. Let's switch to that for better language compatibility. Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Anup Patel <[email protected]> Reviewed-by: Samuel Holland <[email protected]> Tested-by: Samuel Holland <[email protected]>
2021-07-17include: types: Use __builtin_offsetof when supportedAlex Richardson
Clang provides a __builtin_offsetof which can be detected using __has_builtin(). Signed-off-by: Alex Richardson <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2021-04-09include: types: Add __aligned(x) to define the minimum alignementChristoph Muellner
The __aligned(x) macro is a common wrapper around compiler's aligned attribute, which allow to define the minimum alignement of a data type. Let's add this macro. Signed-off-by: Christoph Muellner <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2020-05-01include: Add array_size() macroAnup Patel
Getting array size of a dynmaic array can be very handy hence this patch. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Alistair Francis <[email protected]>
2020-03-13sbi: Add definitions for true/falseBin Meng
We currently have TRUE/FALSE, but it could be convenient to have true/false as well. Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2020-03-10lib: sbi: Fix coding style issuesBin Meng
This fixes various coding style issues found in the SBI codes. No functional changes. Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2020-01-22include: Add generic and simple list handling APIsAnup Patel
This patch adds generic and simple list handling APIs adapted from Xvisor sources. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Atish Patra <[email protected]>
2020-01-09include: Add OPENSBI_EXTERNAL_SBI_TYPES in sbi_types.hAbner Chang
Add OPENSBI_EXTERNAL_SBI_TYPES macro to allow external definitions of data types and common macros. Also move some common definitions from sbi_bits.h to sbi_types.h. Signed-off-by: Abner Chang <[email protected]> Cc: Leif Lindholm <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2019-04-24all: Annotate some tables to have clang-format leave them aloneOlof Johansson
One of the shortcomings of clang-format is that it doesn't allow for aligned define tables, which is used for a number of constants. Add annotation to disable the automatic formatting where needed. Signed-off-by: Olof Johansson <[email protected]>
2019-02-20include: Add PRILX define to help print unsigned longAnup Patel
The unsigned long is always machine word size. This means it is 4 bytes on 32bit system and 8 bytes on 64bit system. This patch adds PRILX define for sbi_printf() which will help us print unsigned long without worrying whether it is 32bit or 64bit system. Signed-off-by: Anup Patel <[email protected]>
2019-01-24all: Update copyright header in all filesAnup patel
This patch updates copyright header in all files as follows: 1. Makes "SPDX-License-Identifier: BSD-2-Clause" as first line 2. Change copyright year to 2019 for Western Digital Signed-off-by: Anup Patel <[email protected]>
2019-01-18platform: Add libfdt support.Atish Patra
Some of the platform (i.e. SiFive FU540) requires Device Tree modification before it is passed to higher stages. Add libfdt support now to help this process. Libfdt should only be included per platform basis. Signed-off-by: Atish Patra <[email protected]>
2019-01-16include: Add __packed define for packed structuresAnup Patel
This patch adds __packed define for specifying packed attribute of structures. Signed-off-by: Anup Patel <[email protected]>
2019-01-16include: Add __noreturn define for noreturn function attributeAnup Patel
There are quite a few noreturn functions in OpenSBI hence we add commong __noreturn define for noreturn functin attribute. Signed-off-by: Anup Patel <[email protected]>
2018-12-11Initial commit.Anup Patel
Signed-off-by: Anup Patel <[email protected]>