Date: Thu, 1 Feb 2001 13:59:05 -0500 (EST) From: Andrew Gallatin <gallatin@cs.duke.edu> To: "Sam Leffler" <sam@errno.com> Cc: <freebsd-emulation@FreeBSD.ORG> Subject: Re: experiences running vmware w/freebsd 5.0-current as guest Message-ID: <14969.39659.18817.437539@grasshopper.cs.duke.edu> In-Reply-To: <06d701c08c72$49a9d080$24a6d4d1@melange> References: <14968.51758.59870.15884@grasshopper.cs.duke.edu> <06d701c08c72$49a9d080$24a6d4d1@melange>
next in thread | previous in thread | raw e-mail | index | archive | help
Sam Leffler writes:
<...>
> > a) VMware crashes when the pcn driver probes the AMD PCInet card.
> > This is indicated by a "NOT_IMPLEMENTED F(562):1654" message
> > shortly after FreeBSD probes the PCI bus, right after
> > message pci0: <display> at 15.0 (no driver attached).
> >
>
> This assertion is caused by the pcn driver doing 32-bit ins and outs to
> 16-bit registers (the upper 16 bits are reserved).
OK. Cool. So this should be fixable. I don't know anything about
the PCInet's registers, though. Perhaps we should get the driver's
author involved.
<...>
>
> It could be that the use of the cmpxchgl instruction is finding a slow path
> through the runtime; if you have the code fragment handy I can forward it to
> the appropriate VMware folks.
>
The I386_CPU path is the "fast path" under vmware, the #else clause is
the slow path under vmware:
#if defined(I386_CPU)
static __inline int
atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src)
{
int res = exp;
__asm __volatile(
" pushfl ; "
" cli ; "
" cmpl %1,%3 ; "
" jne 1f ; "
" movl %2,%3 ; "
"1: "
" sete %%al; "
" movzbl %%al,%0 ; "
" popfl ; "
"# atomic_cmpset_int"
: "=a" (res) /* 0 (result) */
: "0" (exp), /* 1 */
"r" (src), /* 2 */
"m" (*(dst)) /* 3 */
: "memory");
return (res);
}
#else /* defined(I386_CPU) */
static __inline int
atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src)
{
int res = exp;
__asm __volatile (
" " MPLOCKED " "
" cmpxchgl %2,%3 ; "
" setz %%al ; "
" movzbl %%al,%0 ; "
"1: "
"# atomic_cmpset_int"
: "=a" (res) /* 0 (result) */
: "0" (exp), /* 1 */
"r" (src), /* 2 */
"m" (*(dst)) /* 3 */
: "memory");
return (res);
}
#endif /* defined(I386_CPU) */
Thanks!
Drew
------------------------------------------------------------------------------
Andrew Gallatin, Sr Systems Programmer http://www.cs.duke.edu/~gallatin
Duke University Email: gallatin@cs.duke.edu
Department of Computer Science Phone: (919) 660-6590
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-emulation" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14969.39659.18817.437539>
