Commit graph

6 commits

Author SHA1 Message Date
b26479e625
Remove extra comma 2022-01-24 21:12:13 -05:00
dbfd13630d
OpenSBI: Added timer extension
NOTE: I didn't switch to the new functions in the kernel because for
some reason we get a page fault when trying to fetch the first
instruction of set_timer(addi sp, sp, -48). I doubt this is related to
the set_timer funcion itself and is instead some kind of paging or
linking problem because it works fine with paging disabled and really
just doesnt make sense.
2022-01-23 23:56:46 -05:00
dd373fca85
OpenSBI: FunctionId in legacy extension, see previous commit 2022-01-23 22:52:02 -05:00
b08ac4817c
OpenSBI: Added base extension
General notes:

For now im just going to leave all the responses as SbiRet but once I
decide how I want to handle returning errors I would like to return more
useful values.

In the cpp file I define a enum class "ExtensionId" with only one
member. For now the thought is that its descriptive and is consistent
with how the legacy extension is written. I'll also do the same thing
with FunctionId in the legacy extension after this commit for
consistency.
2022-01-23 22:40:21 -05:00
c24628ab2a
Formatting
It would be nice if I would stay consistent with namespace formatting

Maybe I should use a real linter or something...
2022-01-23 20:27:14 -05:00
464a61102e
OpenSBI memes
Added legacy extension

Fixed typing memes by just define a sbiword_t typedef

Renamed sbiret_t to SbiRet, I think i'll only use _t for typedefs

Added ecall() variant that takes no additional arguments

Moved opensbi includes to includes/opensbi/...

kernel.cpp uses the legacy extensions instead of raw ecalls

All legacy extension calls are marked as deprecated
2022-01-23 20:15:53 -05:00