I am busy with a hobby OS and I am planning on making the project open-source and eventually have support for multiple platforms. With this in mind I have taken the approach of putting all hardware specific code in a separate Hardware Abstraction Layer (HAL) library so that the kernel does not need to know how the specific hardware handles things such as memory and interrupts. The kernel will just call the HAL function asking for some memory or to hook an interrupt by calling
My question is, I would like to know if there are any universal means of describing what functions the library has to expose if a developer wants to port the HAL to another platform. Seeing the Kernel knows the name of the function because it's in the kernel's header files the library just needs to have a function with that specific name in it. As the kernel I don't care how your function works as long as its there and I can call it.
Edit My kernel and library is written in C so the library will be a normal statically linked libray
At the moment I have a Word Document that has a diagram showing the different functions but this is going to become a mess soon.
Any advice would be greatly appreciated.