From: kernelnewbies-bounce@xxxxxxxxxxxx [mailto:kernelnewbies-bounce@xxxxxxxxxxxx] On Behalf Of srinivas bakki
>
### here we take the address of the arch.info structure. Then load ( ldmia )the contents
at r3 (i.e arch_info structure) into r4,r5,r6 (3 words long) .
> ###
now since this address pointing to the machine info.is already virtual why do we need to convert it
to physical ?
Probably because as
'__lookup_arch_type' can also be invoked when MMU is not yet turned
on.
> ### also when the assembly code is called
from the C code in setup.c is it always defined by the compiler that the
arguments would go in > same register always ? cause we expect the machine number in
the r0 unconditionally !!! my guess is that they should be picked from the
stack.
lookup_machine_type
is called from setup.c with one argument (architecture id), and hence it goes in
to r0 register. lookup_machine_type calls __lookup_machine_type which expects
the architecture id in r1 and hence in lookup_machine_type, content of r0 is
copied to r1 before invoking
__lookup_machine_type.