[Folio 100 Android Development] tweyer:
Some comments on the Folio

First of all - of course - thanks to dexter' work, I have a Folio which not only starts coming close to what I wanted when I bought the thing, but it also started my interest in poking around myself a bit.

Besides trying this and that, I started to look a bit closer at the kernel. Are you guys sure about the fact, that the Folio has only one of the cores enabled? I see the following in the kernel messages (dmesg):

[....]

<6>[ 6.559704] Calibrating delay loop... 1998.84 BogoMIPS (lpj=9994240)

<4>[ 6.829708] Mount-cache hash table entries: 512

<6>[ 6.830083] Initializing cgroup subsys cpuacct

<6>[ 6.830103] Initializing cgroup subsys devices

<6>[ 6.830113] Initializing cgroup subsys freezer

<6>[ 6.830136] CPU: Testing write buffer coherency: ok

<6>[ 6.830309] Calibrating local timer... 1.19MHz.

<4>[ 6.939763] CPU1: Booted secondary processor

<6>[ 7.209553] Brought up 2 CPUs

<6>[ 7.209566] SMP: Total of 2 processors activated (3991.14 BogoMIPS).

<7>[ 7.209587] CPU0 attaching sched-domain:

<7>[ 7.209597] domain 0: span 0-1 level CPU

<7>[ 7.209606] groups: 0 1

<7>[ 7.209624] CPU1 attaching sched-domain:

<7>[ 7.209632] domain 0: span 0-1 level CPU

<7>[ 7.209640] groups: 1 0

[....]

At least at this point in early boot, the Folio's kernel brings up two CPUs.

I can only assume, that the numbers in the second field (e.g.: 7.209632) are timestamps (in seconds since boot or something).

Later on, while working on the device with adb, I see the following:

[....]

<7>[ 36.575729] CPU0 attaching NULL sched-domain.

<7>[ 36.575781] CPU1 attaching NULL sched-domain.

<7>[ 36.719589] CPU0 attaching NULL sched-domain.

<5>[ 36.725585] CPU1: clean shutdown

<1>[ 36.745542] iwioctl: cmd=0x8b0c not allowed in this mode

<1>[ 36.780580] iwioctl: cmd=0x8b0c not allowed in this mode

<1>[ 36.911359] iwioctl: cmd=0x8b0c not allowed in this mode

<1>[ 36.920375] iwioctl: cmd=0x8b0c not allowed in this mode

<1>[ 38.116256] iwioctl: cmd=0x8b0c not allowed in this mode

<1>[ 38.121953] iwioctl: cmd=0x8b0c not allowed in this mode

<4>[ 38.354763] CPU1: Booted secondary processor

<7>[ 38.354822] CPU0 attaching NULL sched-domain.

<7>[ 38.439531] CPU0 attaching sched-domain:

<7>[ 38.439543] domain 0: span 0-1 level CPU

<7>[ 38.439552] groups: 0 1

<7>[ 38.439567] CPU1 attaching sched-domain:

<7>[ 38.439574] domain 0: span 0-1 level CPU

<7>[ 38.439582] groups: 1 0

[....]

It appears to me, as if the device only *enables* the second core on demand. I remember reading something like that in Nvidia's Tegra-Dev Docs, however, I could not image anybody doing something like this. I haven't looked at the code in detail, but I would assume using something like the CPU hotplug-framework in the kernel is quite costly and time-consuming to be used frequently.

I haven't looked in detail through all the android bootup-scripts (I have yet to find out, how they are all linked together, which get called at all and in what sequence they are called), but I did not see code deliberately disabling the secondary core, once the kernel is up completely (e.g.: echo 0 >> /sys/devices/system/cpu/cpu1/online).

I wonder, if the quest for the second core is chasing white rabbits :)

Regards,

tweyer

P.S.: ah, btw, I'm willing to test, if there is need for testers.