NetBSD-Bugs archive

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

Re: port-i386/48196



The following reply was made to PR port-i386/48196; it has been noted by GNATS.

From: Masanobu SAITOH <msaitoh%execsw.org@localhost>
To: Nathanial Sloss <nat%netbsd.org@localhost>, gnats-bugs%netbsd.org@localhost
Cc: msaitoh%execsw.org@localhost, port-i386-maintainer%netbsd.org@localhost,
 gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost, scole_mail%gmx.com@localhost
Subject: Re: port-i386/48196
Date: Thu, 17 Sep 2015 18:28:58 +0900

 Hi.
 
 On 2015/09/17 9:14, Nathanial Sloss wrote:
 > Hi,
 >
 > Please try the following patch:
 > Index: cpu.c
 > ===================================================================
 > RCS file: /cvsroot/src/sys/arch/x86/x86/cpu.c,v
 > retrieving revision 1.115
 > diff -u -r1.115 cpu.c
 > --- cpu.c	18 May 2015 13:09:55 -0000	1.115
 > +++ cpu.c	16 Sep 2015 23:57:35 -0000
 > @@ -137,6 +137,8 @@
 >   	bool sc_wasonline;
 >   };
 >
 > +#define EFLAGS_IF	__BIT(9)
 
   I think this flags is PSL_I in x86/include/psl.h
 
 
 
 
 > +
 >   #ifdef MULTIPROCESSOR
 >   int mp_cpu_start(struct cpu_info *, paddr_t);
 >   void mp_cpu_start_cleanup(struct cpu_info *);
 > @@ -1277,6 +1279,7 @@
 >   {
 >   #ifdef PAE
 >   	struct cpu_info *ci = curcpu();
 > +	ulong IntrOK;
 >   	pd_entry_t *l3_pd = ci->ci_pae_l3_pdir;
 >   	int i;
 >
 > @@ -1285,11 +1288,14 @@
 >   	 * while this doesn't block NMIs, it's probably ok as NMIs unlikely
 >   	 * reload cr3.
 >   	 */
 > +	IntrOK = x86_read_flags() & EFLAGS_IF;
 >   	x86_disable_intr();
 >   	for (i = 0 ; i < PDP_SIZE; i++) {
 >   		l3_pd[i] = pmap->pm_pdirpa[i] | PG_V;
 >   	}
 > -	x86_enable_intr();
 > +	
 > +	if (IntrOK)
 > +		x86_enable_intr();
 >   	tlbflush();
 >   #else /* PAE */
 >   	lcr3(pmap_pdirpa(pmap, 0));
 >
 >
 > If you are successful with pae please let me know.
 >
 > Best regards,
 >
 > Nat.
 >
 
 
 -- 
 -----------------------------------------------
                  SAITOH Masanobu (msaitoh%execsw.org@localhost
                                   msaitoh%netbsd.org@localhost)
 


Home | Main Index | Thread Index | Old Index