summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRahul Pathak <rpathak@ventanamicro.com>2023-02-02 07:44:27 +0300
committerAnup Patel <anup@brainfault.org>2023-02-08 15:54:13 +0300
commitb224ddb41fe1f9cbdfb246ebf22036ae1fe3f40f (patch)
treec875280283578fcfab7922de495633075d066b89 /include
parent680bea02bf47e04594ed8810bfee7e9088cd1ca7 (diff)
downloadopensbi-b224ddb41fe1f9cbdfb246ebf22036ae1fe3f40f.tar.xz
include: types: Add typedefs for endianness
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 <rpathak@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'include')
-rw-r--r--include/sbi/sbi_types.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/sbi/sbi_types.h b/include/sbi/sbi_types.h
index 9c1fef3..def88bb 100644
--- a/include/sbi/sbi_types.h
+++ b/include/sbi/sbi_types.h
@@ -54,6 +54,13 @@ typedef unsigned long virtual_size_t;
typedef unsigned long physical_addr_t;
typedef unsigned long physical_size_t;
+typedef uint16_t le16_t;
+typedef uint16_t be16_t;
+typedef uint32_t le32_t;
+typedef uint32_t be32_t;
+typedef uint64_t le64_t;
+typedef uint64_t be64_t;
+
#define true 1
#define false 0