From dd373fca85c65acfe90db752d7e6d17c3836033d Mon Sep 17 00:00:00 2001 From: Quantum Date: Sun, 23 Jan 2022 22:52:02 -0500 Subject: [PATCH] OpenSBI: FunctionId in legacy extension, see previous commit --- kernel/drivers/opensbi/extensions/legacy.cpp | 24 ++++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/kernel/drivers/opensbi/extensions/legacy.cpp b/kernel/drivers/opensbi/extensions/legacy.cpp index 728418a..c77c82b 100644 --- a/kernel/drivers/opensbi/extensions/legacy.cpp +++ b/kernel/drivers/opensbi/extensions/legacy.cpp @@ -15,18 +15,22 @@ namespace opensbi::legacy { REMOTE_SFENCE_VMA_ASID, SHUTDOWN }; + + enum class Functionid { + UNUSED + }; } SbiRet set_timer(std::uint64_t stime_value) { #if __riscv_xlen == 64 return ecall( static_cast(ExtensionId::SET_TIMER), - 0, + static_cast(Functionid::UNUSED), stime_value); #else return ecall( static_cast(ExtensionId::SET_TIMER), - 0, + static_cast(Functionid::UNUSED), static_cast(stime_value), static_cast(stime_value >> 32)); #endif @@ -35,33 +39,33 @@ namespace opensbi::legacy { SbiRet console_putchar(int ch) { return ecall( static_cast(ExtensionId::CONSOLE_PUTCHAR), - 0, + static_cast(Functionid::UNUSED), ch); } SbiRet console_getchar() { return ecall( static_cast(ExtensionId::CONSOLE_GETCHAR), - 0); + static_cast(Functionid::UNUSED)); } SbiRet clear_ipmi() { return ecall( static_cast(ExtensionId::CLEAR_IPI), - 0); + static_cast(Functionid::UNUSED)); } SbiRet send_ipmi(hart_mask_t hart_mask) { return ecall( static_cast(ExtensionId::SEND_IPI), - 0, + static_cast(Functionid::UNUSED), reinterpret_cast(hart_mask)); } SbiRet remote_fence_i(hart_mask_t hart_mask) { return ecall( static_cast(ExtensionId::REMOTE_FENCE_I), - 0, + static_cast(Functionid::UNUSED), reinterpret_cast(hart_mask)); } @@ -71,7 +75,7 @@ namespace opensbi::legacy { sbiword_t size) { return ecall( static_cast(ExtensionId::REMOTE_SFENCE_VMA), - 0, + static_cast(Functionid::UNUSED), reinterpret_cast(hart_mask), start, size); @@ -84,7 +88,7 @@ namespace opensbi::legacy { sbiword_t asid) { return ecall( static_cast(ExtensionId::REMOTE_SFENCE_VMA_ASID), - 0, + static_cast(Functionid::UNUSED), reinterpret_cast(hart_mask), start, size, @@ -94,7 +98,7 @@ namespace opensbi::legacy { void shutdown() { ecall( static_cast(ExtensionId::SHUTDOWN), - 0); + static_cast(Functionid::UNUSED)); // This should never be reached, explode if it is __builtin_trap();