Using Ada's system programming annex for OSDev

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
Ethin
Member
Member
Posts: 625
Joined: Sun Jun 23, 2019 5:36 pm
Location: North Dakota, United States

Using Ada's system programming annex for OSDev

Post by Ethin »

I'm unsure if I should ask this here or at the ada subreddit, but I thought I'd ask here first. Since Ada provides annexes for systems programming and real-time systems, I was wondering how exactly I'd go about using them? For example, if I wanted to use protected procedure handlers, the Interrupts package, or aspects like Dispatching_Domain, would I need to implement my own BSP runtime? I know I'd probably have access to machine operations/intrinsics, but would I neeed to do something special to use these more advanced features on architectures like x86? If so, I'm not really sure where I'd even begin; I don't know for example how to do EDF scheduling or priority ceiling locking.
klange
Member
Member
Posts: 679
Joined: Wed Mar 30, 2011 12:31 am
Libera.chat IRC: klange
Discord: klange

Re: Using Ada's system programming annex for OSDev

Post by klange »

This is kinda like reading the latest C specs and thinking the language would give you thread support. In reality, this is functionality assumed for a hosted implementation of the language, living on an existing OS, and implemented by a library provided with the implementation, much like a libc.

The standard implementation of Ada is GNAT, which has been part of GCC for quite a while now. GNAT/GCC implements this sort of system-specific functionality either in libgnat or in libgnarl, which are each a hodgepodge of Ada and C with numerous backends for different target operating systems.
Ethin
Member
Member
Posts: 625
Joined: Sun Jun 23, 2019 5:36 pm
Location: North Dakota, United States

Re: Using Ada's system programming annex for OSDev

Post by Ethin »

klange wrote:This is kinda like reading the latest C specs and thinking the language would give you thread support. In reality, this is functionality assumed for a hosted implementation of the language, living on an existing OS, and implemented by a library provided with the implementation, much like a libc.

The standard implementation of Ada is GNAT, which has been part of GCC for quite a while now. GNAT/GCC implements this sort of system-specific functionality either in libgnat or in libgnarl, which are each a hodgepodge of Ada and C with numerous backends for different target operating systems.
Oh, okay. So I'd have to implement all the underlying support myself. Damn... I was hoping that that was just a runtime thing. Though I wouldn't mind doing it if I could get past this mental block that I seem to have run into...
Post Reply