Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 May 2004 23:52:28 +0200
From:      Eirik Oeverby <ltning@anduin.net>
To:        Andrew Gallatin <gallatin@cs.duke.edu>
Cc:        current@freebsd.org
Subject:   Re: enabling second cpu
Message-ID:  <4099621C.2090107@anduin.net>
In-Reply-To: <16536.59752.749995.185110@grasshopper.cs.duke.edu>
References:  <16536.59752.749995.185110@grasshopper.cs.duke.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

Thanks for trying, but this doesn't seem to be enough. The CPU is still 
flagged as unusable and SMP is not enabled sysctl kern.smp.active=0. 
kern.smp.cpus=1.

I somehow guess this might have been the wrong/not the only place to do 
such a 'hack'? Been looking around a bit myself, but have given up at 
this point - I'm no C coder, really, and definitely no kernel hacker..


/Eirik

Andrew Gallatin wrote:
> Just a guess, but maybe WinXP is ignoring the flags in the mptable
> which mark the CPU as not usable.
> 
> Try something like the appended patch and see if it helps.
> (make sure you have a backup kernel just in case it blows up).
> 
> Drew
> 
> Index: i386/i386/mptable.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/i386/i386/mptable.c,v
> retrieving revision 1.229
> diff -u -r1.229 mptable.c
> --- i386/i386/mptable.c	10 Dec 2003 19:29:39 -0000	1.229
> +++ i386/i386/mptable.c	5 May 2004 13:13:41 -0000
> @@ -414,7 +414,7 @@
>  	switch (*entry) {
>  	case MPCT_ENTRY_PROCESSOR:
>  		proc = (proc_entry_ptr)entry;
> -		if (proc->cpu_flags & PROCENTRY_FLAG_EN) {
> +		if (1 /*proc->cpu_flags & PROCENTRY_FLAG_EN*/) {
>  			lapic_create(proc->apic_id, proc->cpu_flags &
>  			    PROCENTRY_FLAG_BP);
>  			cpu_mask = (u_int *)arg;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4099621C.2090107>