Skip to content

Commit

Permalink
drop __KERNEL_32__ and __KERNEL_64__
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Heider <[email protected]>
  • Loading branch information
axel-h committed Jan 24, 2022
1 parent de93a18 commit 2a24a10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@ if(KernelArchRiscV)
endif()
endif()
string(APPEND common_flags " ${build_arch}")
if(Kernel64)
string(APPEND common_flags " -D__KERNEL_64__")
else()
string(APPEND common_flags " -D__KERNEL_32__")
endif()

set(
BASE_ASM_FLAGS "${asm_common_flags} ${common_flags}"
CACHE INTERNAL "Default ASM flags for compilation \
Expand Down
8 changes: 5 additions & 3 deletions include/fastpath/fastpath.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,16 @@ static inline void thread_state_ptr_mset_blockingObject_tsType(thread_state_t *t
static inline void cap_reply_cap_ptr_new_np(cap_t *cap_ptr, word_t capReplyCanGrant,
word_t capReplyMaster, word_t capTCBPtr)
{
#ifdef __KERNEL_64__
#if CONFIG_WORD_SIZE == 64
cap_ptr->words[1] = (word_t)capTCBPtr;
cap_ptr->words[0] = (capReplyMaster) | (capReplyCanGrant << 1) |
((word_t)cap_reply_cap << 59);
#else
#elif CONFIG_WORD_SIZE == 32
cap_ptr->words[0] = TCB_REF(capTCBPtr) | (capReplyMaster << 4) |
(capReplyCanGrant << 5) | cap_reply_cap ;
#endif
#else
#error invalid CONFIG_WORD_SIZE
#endif /* CONFIG_WORD_SIZE */
}
#endif

Expand Down

0 comments on commit 2a24a10

Please sign in to comment.