From: Tomas Hruby Date: Wed, 25 Jan 2012 19:02:13 +0000 (+0000) Subject: SMP - no_apic=0 and acpi=1 set when CONFIG_SMP=y X-Git-Tag: v3.2.0~106 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=c468f4efa5a9414c23949372158e711bd7b82a29;p=minix.git SMP - no_apic=0 and acpi=1 set when CONFIG_SMP=y - this is a temporary change which makes images compiled for SMP boot in SMP mode by default. - this change is needed until we can configure the multiboot images from the boot loader again. --- diff --git a/kernel/arch/i386/arch_system.c b/kernel/arch/i386/arch_system.c index 3001df551..b4f33ab21 100644 --- a/kernel/arch/i386/arch_system.c +++ b/kernel/arch/i386/arch_system.c @@ -650,9 +650,31 @@ u32_t params_size, params_offset, mon_ds; PUBLIC int arch_get_params(char *params, int maxsize) { - phys_copy(seg2phys(mon_ds) + params_offset, vir2phys(params), - MIN(maxsize, params_size)); + int size = 0; + +#ifdef CONFIG_SMP + /* + * FIXME + * This is a TEMPORARY change until we can pass boot + * command line to multiboot kernels from the boot + * monitor + * + * '\0' separated list of command line options + */ + char cmdline[] = "no_apic=0\0acpi=1"; + + if (maxsize < sizeof(cmdline) - 1) + panic("cmdline (%d) exceeds maxsize (%d)", + sizeof(cmdline), maxsize); + memcpy(params, cmdline, sizeof(cmdline)); + size = sizeof(cmdline); + params[size+1] = '\0'; +#endif + + phys_copy(seg2phys(mon_ds) + params_offset, vir2phys(params + size), + MIN(maxsize - size, params_size)); params[maxsize-1] = '\0'; + return OK; }