Clear OS / HAL separation

2 messages, 2 authors, 2006-11-03 · open the first message on its own page

Clear OS / HAL separation

From: M Ptich <hidden>
Date: 2006-11-03 03:56:07

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 ?

Would highly appreciate any relevant pointers.

_________________________________________________________________
Stay in touch with old friends and meet new ones with Windows Live Spaces http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us

Re: Clear OS / HAL separation

From: Grant Likely <hidden>
Date: 2006-11-03 06:15:54

On 11/2/06, M Ptich [off-list ref] 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@secretlab.ca
(403) 399-0195
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help