question about a HAL

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
bsunisol
Member
Member
Posts: 40
Joined: Fri Apr 06, 2007 3:00 pm
Location: Germany, Berlin and near Hamburg

question about a HAL

Post by bsunisol »

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
User avatar
mystran
Member
Member
Posts: 670
Joined: Thu Mar 08, 2007 11:08 am

Post by mystran »

Personally I'm so portable I don't have a HAL. ;)
The real problem with goto is not with the control transfer, but with environments. Properly tail-recursive closures get both right.
hendric
Member
Member
Posts: 38
Joined: Sat Oct 21, 2006 10:56 am
Location: China

Post by hendric »

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...
hendric
Member
Member
Posts: 38
Joined: Sat Oct 21, 2006 10:56 am
Location: China

Post by hendric »

And As my opinion , I do not think portability is necessary because I do not have to. I prefer deeply traiting features of a explicit platform such as x86. Like windows , to implement a top OS on a explicit platform is considered as a good idea, I think.
Just Lazy Writing Anything...
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

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. :wink:
C8H10N4O2 | #446691 | Trust the nodes.
hendric
Member
Member
Posts: 38
Joined: Sat Oct 21, 2006 10:56 am
Location: China

Post by hendric »

Alboin 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. :wink:
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.al
I think it enough, and also do I think x86 is enough (with multi-cored :twisted: ) . 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...
Post Reply