Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Aug 1999 23:35:12 +0900
From:      Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
To:        plm@xs4all.nl
Cc:        iwasaki@jp.FreeBSD.org, freebsd-current@FreeBSD.ORG, imp@village.org
Subject:   Re: recent apm changes 
Message-ID:  <199908091431.XAA01774@tasogare.imasy.or.jp>
In-Reply-To: Your message of "Sun, 8 Aug 1999 21:52:32 %2B0200 (CEST)" <14253.57344.873947.122158@muon.xs4all.nl>
References:  <14253.57344.873947.122158@muon.xs4all.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
plm> In contract, if I suspend in Linux of Windows, the computer shuts up
plm> immediateley and is quiet. Only sometimes there is a (not too loud)
plm> little fan (I think it is the CPU fan) running for a few more minutes.

I've read Linux code (v2.2.9) closely, noticed they put cli 
before APM BIOS call and save & restore segment registers.
I suspect these two (or only cli?) affect the suspending state.
To clarify, could you try attached patches (for sys/i386/i386/bioscall.s) 
one by one?

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	bioscall-1
#	bioscall-2
#	bioscall-3
#
echo x - bioscall-1
sed 's/^X//' >bioscall-1 << 'END-of-bioscall-1'
X--- i386/i386/bioscall.s.org	Mon Aug  9 17:51:31 1999
X+++ i386/i386/bioscall.s	Mon Aug  9 17:53:07 1999
X@@ -64,9 +64,16 @@
X 	movl	12(%ebp),%edx
X 	movl	16(%ebp),%esi
X 	movl	20(%ebp),%edi
X+#if 1	/* cli hack */
X+	pushfl
X+	cli
X+#endif
X 	pushl	%ebp
X 	lcall	_bioscall_vector
X 	popl	%ebp
X+#if 1	/* cli hack */
X+	popfl
X+#endif
X 	movl	%eax,0(%ebp)
X 	movl	%ebx,4(%ebp)
X 	movl	%ecx,8(%ebp)
END-of-bioscall-1
echo x - bioscall-2
sed 's/^X//' >bioscall-2 << 'END-of-bioscall-2'
X--- i386/i386/bioscall.s.org	Mon Aug  9 17:51:31 1999
X+++ i386/i386/bioscall.s	Mon Aug  9 18:01:36 1999
X@@ -64,9 +64,17 @@
X 	movl	12(%ebp),%edx
X 	movl	16(%ebp),%esi
X 	movl	20(%ebp),%edi
X+#if 1	/* segment regs hack */
X+	pushl	%fs
X+	pushl	%gs
X+#endif
X 	pushl	%ebp
X 	lcall	_bioscall_vector
X 	popl	%ebp
X+#if 1	/* segment regs hack */
X+	popl	%gs
X+	popl	%fs
X+#endif
X 	movl	%eax,0(%ebp)
X 	movl	%ebx,4(%ebp)
X 	movl	%ecx,8(%ebp)
END-of-bioscall-2
echo x - bioscall-3
sed 's/^X//' >bioscall-3 << 'END-of-bioscall-3'
X--- i386/i386/bioscall.s.org	Mon Aug  9 17:51:31 1999
X+++ i386/i386/bioscall.s	Mon Aug  9 18:00:07 1999
X@@ -64,9 +64,20 @@
X 	movl	12(%ebp),%edx
X 	movl	16(%ebp),%esi
X 	movl	20(%ebp),%edi
X+#if 1	/* cli + segment regs hack */
X+	pushfl
X+	cli
X+	pushl	%fs
X+	pushl	%gs
X+#endif
X 	pushl	%ebp
X 	lcall	_bioscall_vector
X 	popl	%ebp
X+#if 1	/* cli + segment regs hack */
X+	popl	%gs
X+	popl	%fs
X+	popfl
X+#endif
X 	movl	%eax,0(%ebp)
X 	movl	%ebx,4(%ebp)
X 	movl	%ecx,8(%ebp)
END-of-bioscall-3
exit



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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