Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Apr 1997 12:54:09 -0600
From:      Steve Passe <smp@csn.net>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        peter@spinner.dialix.com, freebsd-smp@freebsd.org, nishio@caleche.kecl.ntt.co.jp
Subject:   Re: Tyan ATX1668 problem -- success 
Message-ID:  <199704251854.MAA08905@Ilsa.StevesCafe.com>
In-Reply-To: Your message of "Sat, 26 Apr 1997 04:35:09 %2B1000." <199704251835.EAA09113@godzilla.zeta.org.au> 

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

> >Now that it works I can remove the ipi_hits counter, am I correct in believing 
> >that the load of %ds with the kernel selector will still be necessary to 
> >address the apic[] for the EOI?
> 
> No, you can access everything using %ss in assembler - you pay for loading
> %ss for traps to inner privilege whether you want to or not.  However,
> prefixes may cost a cycle or two, so it is better to load %ds if you
> want to do more than a few memory accesses.

excuse my asm ignorance, what would this convert to with your suggested
technique?

_Xfastipi32:
	pushl	%eax
	movl	%cr3, %eax
	movl	%eax, %cr3
	pushl	%ds
	movl	$KDSEL,%eax
	movl	%ax,%ds
	movl	_apic_base, %eax
	movl	$0, APIC_EOI(%eax)
	popl	%ds
	popl	%eax
	iret

_apic_base is actually a set of memory-mapped registers in the local
APIC of the CPU, NOT general memory.

--
Steve Passe	| powered by
smp@csn.net	|            Symmetric MultiProcessor FreeBSD





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