On 17 February 2016 at 08:19, Giacomo Tesio <giacomo@tesio.it> wrote:
Out of curiosity, why the startboot function in port/initcode.c is `void startboot(char *argv0, char **argv)` given the argv0 is ignored?

I see that this simplify various main() in init9.s but I wonder why not simply use `void startboot(char **argv)`

There's possibly some historic reason for having argv0 instead of argc (ie, possibly a time when argv0 was used),
but it also makes things a little easier on platforms (all but 386) where the first parameter is passed in a register.
Since the setup code is machine dependent, it could get that right by setting r0, r3 or bp in the saved Ureg,
but it probably isn't worthwhile changing all that now.