Detecting XO-1.5 in kernel boot

Mitch Bradley wmb at laptop.org
Tue Sep 21 13:19:24 EDT 2010



On 9/21/2010 7:24 AM, Andres Salomon wrote:
> On Tue, 21 Sep 2010 06:35:48 -1000
> Mitch Bradley<wmb at laptop.org>  wrote:
>
> ...
>> You could get all the information from the device tree, after having
>> first checked for the presence of the device tree by looking for the
>> relevant "files".  "/ofw/architecture", for example, contains
>> "OLPC\0".  The "/ofw" may turn into "/proc/something" or something
>> else once Andres finishes, so it's probably a good idea to bury that
>> prefix in a subroutine somewhere.
>>
>>> Thanks,
>>> Daniel
>
> Right, so there's shiny new code in arch/x86/kernel/olpc_ofw.c that
> checks for the OFW signature in the boot page signature, and
> sets up OFW for calling into.  This is done very early in boot
> (during setup_arch, so before any of the initcall stuff happens), and
> would make a much better detection scheme than the VSA2 check..
>
> if (!ofw_installed())
> 	return;

At this point it would be a good idea to look in /ofw/architecture for the "OLPC\0" string.  There are a couple of other 
systems that use OFW on x86 (embedded computers from an Italian company named DAVE).

> spin_lock_init(&ec_lock);
> /* don't bother with the rom signature check */
> olpc_platform_info.flags |= OLPC_F_PRESENT;
>
> platform_detect();
>
> ...
>
> if (!olpc_board_at_least(olpc_board(0xc3))&&  !cs5535_has_vsa2())
> 	x86_init.pci.arch_init = pci_olpc_init;
>
>
>
> Note that this scheme would make the OLPC stuff _very_ dependent upon a
> fully functional OFW, but I don't really see that as a problem.
>
> Oh, I wanted to chat with you and pgf about the 1.5 olpc_board() stuff
> with you at some point, but I'd like to get the dcon 1.0 stuff finished
> up first.
>



More information about the Devel mailing list