Hi, Le Fri, 5 May 2006 10:02:44 +0530, "srinivas bakki" <srinivas.bakki@xxxxxxxxx> a écrit : > ### 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 ? As I said previously, I can't answer this question at the moment, as I'm not an ARM expert. If I'll find time, I'll try to look at it this week-end. > ### 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 > the same register always ? cause we expect the machine number in the > r0 unconditionally !!! my guess is that they should be picked from > the stack. Yes, we are guaranteed that the first argument of the function is in r0, because it's specified in C ARM calling conventions. Have a look at www.cs.cornell.edu/courses/cs414/2001fa/armcallconvention.pdf, section 4.4.2: « * The first 4 integer values are removed from the parameter list and assigned to integer registers a1-a4. Fewer than 4 integer parameter values there are assigned to a1-a3, a1-a2, or a1 only. * Remaining values are pushed onto the stack in reverse order. » (As you see in the array at section 4.1, a1, a2, a3, a4 are aliases for r0, r1, r2 and r3). Sincerly, Thomas -- Thomas Petazzoni - thomas.petazzoni@xxxxxxxx http://{thomas,sos,kos}.enix.org - http://www.toulibre.org http://www.{livret,agenda}dulibre.org -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/