Date: Mon, 5 Nov 2007 13:29:51 GMT From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 128680 for review Message-ID: <200711051329.lA5DTp3A085179@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=128680 Change 128680 by gonzo@gonzo_jeeves on 2007/11/05 13:29:17 o Make new interface for platform_start. Now this function accepts for arguments of __register_t which correspond to a0..a3 registers respectively. It's up to platform_start implementation to use them in a machine-dependent fashion. o MALTA board obtaines memory size from a3 register Affected files ... .. //depot/projects/mips2/src/sys/mips/include/hwfunc.h#2 edit .. //depot/projects/mips2/src/sys/mips/mips32/adm5120/adm5120_machdep.c#2 edit .. //depot/projects/mips2/src/sys/mips/mips32/idt/idt_machdep.c#5 edit .. //depot/projects/mips2/src/sys/mips/mips32/malta/malta_machdep.c#4 edit .. //depot/projects/mips2/src/sys/mips/mips32/sentry5/s5_machdep.c#3 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/include/hwfunc.h#2 (text+ko) ==== @@ -37,6 +37,6 @@ void platform_halt(void); void platform_intr(struct trapframe *); void platform_reset(void); -void platform_start(int, char *[]); +void platform_start(__register_t, __register_t, __register_t, __register_t); #endif /* !_MACHINE_HWFUNC_H_ */ ==== //depot/projects/mips2/src/sys/mips/mips32/adm5120/adm5120_machdep.c#2 (text+ko) ==== @@ -146,7 +146,8 @@ } void -platform_start(int argc, char **argv) +platform_start(__register_t a0 __unused, __register_t a1 __unused, + __register_t a2 __unused, __register_t a3 __unused) { vm_offset_t kernend; uint64_t platform_counter_freq = 175 * 1000 * 1000; ==== //depot/projects/mips2/src/sys/mips/mips32/idt/idt_machdep.c#5 (text+ko) ==== @@ -109,7 +109,8 @@ } void -platform_start(int argc, char **argv) +platform_start(__register_t a0 __unused, __register_t a1 __unused, + __register_t a2 __unused, __register_t a3 __unused) { uint64_t platform_counter_freq; vm_offset_t kernend; ==== //depot/projects/mips2/src/sys/mips/mips32/malta/malta_machdep.c#4 (text+ko) ==== @@ -159,16 +159,11 @@ } #endif -void +static void mips_init(void) { int i; - printf("entry: mips_init()\n"); - - bootverbose = 1; - realmem = btoc(64 << 20); - for (i = 0; i < 10; i++) { phys_avail[i] = 0; } @@ -238,18 +233,41 @@ } void -platform_start(int argc, char **argv) +platform_start(__register_t a0, __register_t a1, __register_t a2, + __register_t a3) { vm_offset_t kernend; uint64_t platform_counter_freq; + int argc = a0; + char **argv = (char **)a1; + char **envp = (char **)a2; + unsigned int memsize = a3; + int i; /* clear the BSS and SBSS segments */ kernend = round_page((vm_offset_t)&end); memset(&edata, 0, kernend - (vm_offset_t)(&edata)); cninit(); + printf("entry: platform_start()\n"); + bootverbose = 1; + if (bootverbose) { + printf("cmd line: "); + for (i = 0; i < argc; i++) + printf("%s ", argv[i]); + printf("\n"); + + printf("envp:\n"); + for (i = 0; envp[i]; i += 2) + printf("\t%s = %s\n", envp[i], envp[i+1]); + + printf("memsize = %08x\n", memsize); + } + + realmem = btoc(memsize); mips_init(); + do { #if defined(TICK_USE_YAMON_FREQ) /* ==== //depot/projects/mips2/src/sys/mips/mips32/sentry5/s5_machdep.c#3 (text+ko) ==== @@ -187,7 +187,8 @@ } void -platform_start(int argc, char **argv) +platform_start(__register_t a0 __unused, __register_t a1 __unused, + __register_t a2 __unused, __register_t a3 __unused) { vm_offset_t kernend; uint64_t platform_counter_freq;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711051329.lA5DTp3A085179>