hi,
i startet to began coding a simple osloader.
but without a concept at all. so i began to read and look for tutorials and documents. now i see that have to do a HAL first.
but i think a HAL with just in() out() disable_int() enable_int() is not really usable....
what would (or have) you put in your HAL,
or did you realise that with a complete different concept?
thanks
Uni_Sol
question about a HAL
If you want port your kernel to other platform , a HAL is necessary. For my design , I do not want my kernel porting from x86 to other platform so my HAL is simply implement pio / interrupt et.al. for convient usage. Whether to have a HAL or not depends on your purpose about portability , it's up to you
Just Lazy Writing Anything...
I'm currently writing a HAL like layer for my OS entirely in assembly as it doesn't have to be portable. However, it is a very thin layer. For example, I have put_char written in assembly, but put_string, put_int, and printf, are all in C. I'm thinking that if it's written in C, then it is completely portable. Moreover, writing it in assembly makes it faster than C.
C8H10N4O2 | #446691 | Trust the nodes.
Yea that's the same thing I did. In my design , I do not have an explicit HAL but a group of abstract of hardware functions such as "set interrupt entry", " Spin Lock" , "IO Port" et.alAlboin wrote:I'm currently writing a HAL like layer for my OS entirely in assembly as it doesn't have to be portable. However, it is a very thin layer. For example, I have put_char written in assembly, but put_string, put_int, and printf, are all in C. I'm thinking that if it's written in C, then it is completely portable. Moreover, writing it in assembly makes it faster than C.
I think it enough, and also do I think x86 is enough (with multi-cored ) . For other platform I prefer designing a new Operating System model to expose potention of the very architecture .
The same to x86-64 architecture , I do not believe it can be mainstream in future.
Just Lazy Writing Anything...