Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Math fpu and i386 kernels



On Wed, Jan 21, 2009 at 09:44:24PM +0100, Manuel Bouyer wrote:

> probably not. Could you check if the attached patch makes a working
> kernel for you ?

The kernel config is broken becase npx is not optional - it is required.
The 'cpu' device is enough to cover it, as amd64 does.

Andrew

> Index: src/sys/arch/x86/x86/cpu.c
> ===================================================================
> RCS file: /cvsroot/src/sys/arch/x86/x86/cpu.c,v
> retrieving revision 1.61
> diff -u -p -u -r1.61 cpu.c
> --- src/sys/arch/x86/x86/cpu.c        23 Dec 2008 15:41:21 -0000      1.61
> +++ src/sys/arch/x86/x86/cpu.c        21 Jan 2009 20:43:38 -0000
> @@ -71,6 +71,10 @@ __KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.61
>  #include "lapic.h"
>  #include "ioapic.h"
>  
> +#ifdef __i386__
> +#include "npx.h"
> +#endif
> +
>  #include <sys/param.h>
>  #include <sys/proc.h>
>  #include <sys/user.h>
> @@ -720,7 +724,7 @@ cpu_hatch(void *v)
>       lapic_set_lvt();
>       lapic_initclocks();
>  
> -#ifdef i386
> +#if defined(__i386__) && NNPX > 0
>       npxinit(ci);
>  #else
>       fpuinit(ci);
> @@ -979,7 +983,7 @@ cpu_offline_md(void)
>       int s;
>  
>       s = splhigh();
> -#ifdef __i386__
> +#if defined(__i386__) && NNPX > 0
>       npxsave_cpu(true);
>  #else
>       fpusave_cpu(true);



Home | Main Index | Thread Index | Old Index