From b224ddb41fe1f9cbdfb246ebf22036ae1fe3f40f Mon Sep 17 00:00:00 2001 From: Rahul Pathak Date: Thu, 2 Feb 2023 10:14:27 +0530 Subject: 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 Reviewed-by: Anup Patel --- include/sbi/sbi_types.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/sbi/sbi_types.h b/include/sbi/sbi_types.h index 9c1fef3b..def88bba 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 -- cgit v1.3.1