Clear OS / HAL separation
Grant Likely
grant.likely at secretlab.ca
Fri Nov 3 17:15:53 EST 2006
On 11/2/06, M Ptich <ptich at hotmail.com> wrote:
> I am porting 2.6 kernel from Freescale onto our PPC platform. This is my
> first experience with Linux, and I was unpleasantly surprised how poorly OS
> and platform code are separated. So I have a question: is there a project
> underway, somewhere, that is trying to separate OS and HAL (or Board Support
> Package) for the next Linux kernel ?
Can you elaborate on what you mean? From my perspective there is
quite well defined separation between the kernel proper, the device
drivers, and the board setup code.
However, there is no stable kernel API for you to program against, and
this is by design. For details, read the following file in the kernel
source tree: Documentation/stable_api_nonsense.txt
Now, all that being said, there is separation between bootloader and
kernel responsibilities that is currently evolving. Linux 32 bit PPC
support is slowly being migrated from the arch/ppc directory into
arch/powerpc where it is merging with 64 bit ppc support. The
arch/powerpc tree also uses a device tree (binary data structure) to
pass board configuration information from the bootloader to the
kernel. The bootloader is responsible for initializing the board (ie.
SDRAM and certain devices). Since the device tree informs the kernel
what devices are present, most of the kernel code can be generic and
the kernel will only setup device drivers for devices that are
actually present.
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195
More information about the Linuxppc-dev
mailing list