Thread (1 message) 1 message, 1 author, 2006-11-03

Re: Clear OS / HAL separation

From: Grant Likely <hidden>
Date: 2006-11-03 17:47:27

On 11/3/06, M Ptich [off-list ref] wrote:
Hi Grant,

Thanks a lot for your kind reply. What I meant is inordinate amount of
sometimes ifdefs, sometimes call redirection (like ppc_md), pretty messy.
But it is mostly in already machine-dependent code, so does not count as bad
separation, you're right.

But I am wondering about your remark that "there is separation between
bootloader and
kernel responsibilities". I think that on PPC Kernel depends very little on
the bootloader - bootloader just needs to set up 5 input parameters (one of
them is a pointer to initialized bd_t), and have initial Kernel TLB with
IPROT=1. That's it, all the devices (including internal CPU stuff) are
initialized in the Kernel. Am I correct ?
If you're looking in arch/ppc, you are 100% correct.  If you are
looking in arch/powerpc, which is where new development is occuring, a
device tree is used to pass information about available devices to the
kernel.  Also, your boot loader *should* (but you don't need to do it
this way) setup your SOC configuration (gpio, etc).  By doing it this
way, the device tree can encapsulate most of the differences between
different boards using the same processor (or SOC).  Board specific
code is kept to a minimum; or in some cases is non-existent.
Everything you need can be covered by device drivers and processor
specific code.

However, unless you've got real openfirmware, it is still just a
handoff from the bootloader to the kernel.  Once the kernel is booted,
it won't make any calls back to the bootloader.

Cheers,
g.

BTW, please make sure you include the mailing list when replying

-- 
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