From e4256d48fa159d2ddffac8f4686db530c24a35f6 Mon Sep 17 00:00:00 2001 From: Axel Heider Date: Sat, 13 Mar 2021 22:35:04 +0100 Subject: [PATCH] libsel4: unify seL4 type definitions Signed-off-by: Axel Heider --- libsel4/arch_include/riscv/sel4/arch/types.h | 5 ----- libsel4/include/sel4/simple_types.h | 2 ++ libsel4/include/sel4/types.h | 4 ++++ libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/types.h | 5 ----- libsel4/sel4_arch_include/aarch64/sel4/sel4_arch/types.h | 5 ----- libsel4/sel4_arch_include/ia32/sel4/sel4_arch/types.h | 6 ------ libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/types.h | 6 ------ 7 files changed, 6 insertions(+), 27 deletions(-) diff --git a/libsel4/arch_include/riscv/sel4/arch/types.h b/libsel4/arch_include/riscv/sel4/arch/types.h index d0945e416..8910ea049 100644 --- a/libsel4/arch_include/riscv/sel4/arch/types.h +++ b/libsel4/arch_include/riscv/sel4/arch/types.h @@ -12,16 +12,11 @@ #include #include -typedef seL4_Word seL4_CPtr; - typedef seL4_CPtr seL4_RISCV_Page; typedef seL4_CPtr seL4_RISCV_PageTable; typedef seL4_CPtr seL4_RISCV_ASIDControl; typedef seL4_CPtr seL4_RISCV_ASIDPool; -typedef seL4_Word seL4_NodeId; -typedef seL4_Word seL4_PAddr; -typedef seL4_Word seL4_Domain; #define seL4_EndpointBits 4 /* User context as used by seL4_TCB_ReadRegisters / seL4_TCB_WriteRegisters */ diff --git a/libsel4/include/sel4/simple_types.h b/libsel4/include/sel4/simple_types.h index 95ec196f4..1a8b5140c 100644 --- a/libsel4/include/sel4/simple_types.h +++ b/libsel4/include/sel4/simple_types.h @@ -119,6 +119,8 @@ typedef seL4_Uint64 seL4_Word; #error missing definition for SEL4_WORD type #endif +typedef seL4_Word seL4_CPtr; + /* sanity check that the seL4_Word matches the definitions of the constants */ #include diff --git a/libsel4/include/sel4/types.h b/libsel4/include/sel4/types.h index 459ab48a1..414ee589a 100644 --- a/libsel4/include/sel4/types.h +++ b/libsel4/include/sel4/types.h @@ -28,6 +28,10 @@ # define seL4_UntypedRetypeMaxObjects 256 #endif +typedef seL4_Word seL4_NodeId; +typedef seL4_Word seL4_PAddr; +typedef seL4_Word seL4_Domain; + typedef seL4_CPtr seL4_CNode; typedef seL4_CPtr seL4_IRQHandler; typedef seL4_CPtr seL4_IRQControl; diff --git a/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/types.h b/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/types.h index a2803149f..9ee393c4c 100644 --- a/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/types.h +++ b/libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/types.h @@ -8,11 +8,6 @@ #include -typedef seL4_Word seL4_CPtr; -typedef seL4_Word seL4_NodeId; -typedef seL4_Word seL4_PAddr; -typedef seL4_Word seL4_Domain; - typedef struct seL4_UserContext_ { /* frame registers */ seL4_Word pc, sp, cpsr, r0, r1, r8, r9, r10, r11, r12; diff --git a/libsel4/sel4_arch_include/aarch64/sel4/sel4_arch/types.h b/libsel4/sel4_arch_include/aarch64/sel4/sel4_arch/types.h index 083f7f04b..b17561c93 100644 --- a/libsel4/sel4_arch_include/aarch64/sel4/sel4_arch/types.h +++ b/libsel4/sel4_arch_include/aarch64/sel4/sel4_arch/types.h @@ -8,11 +8,6 @@ #include -typedef seL4_Word seL4_CPtr; -typedef seL4_Word seL4_NodeId; -typedef seL4_Word seL4_PAddr; -typedef seL4_Word seL4_Domain; - typedef seL4_CPtr seL4_ARM_PageUpperDirectory; typedef seL4_CPtr seL4_ARM_PageGlobalDirectory; /* whether the VSpace refers to a PageUpperDirectory or PageGlobalDirectory directly diff --git a/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/types.h b/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/types.h index 9db488b8f..9ced33637 100644 --- a/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/types.h +++ b/libsel4/sel4_arch_include/ia32/sel4/sel4_arch/types.h @@ -9,12 +9,6 @@ #include #include -typedef seL4_Word seL4_NodeId; -typedef seL4_Word seL4_PAddr; -typedef seL4_Word seL4_Domain; - -typedef seL4_Word seL4_CPtr; - /* User context as used by seL4_TCB_ReadRegisters / seL4_TCB_WriteRegisters */ typedef struct seL4_UserContext_ { /* frameRegisters */ diff --git a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/types.h b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/types.h index 117ea6591..10940d71f 100644 --- a/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/types.h +++ b/libsel4/sel4_arch_include/x86_64/sel4/sel4_arch/types.h @@ -9,12 +9,6 @@ #include #include -typedef seL4_Word seL4_NodeId; -typedef seL4_Word seL4_PAddr; -typedef seL4_Word seL4_Domain; - -typedef seL4_Word seL4_CPtr; - typedef seL4_CPtr seL4_X64_PML4; /* User context as used by seL4_TCB_ReadRegisters / seL4_TCB_WriteRegisters */