summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1997-04-14 18:12:05 +0000
committerphk <phk@FreeBSD.org>1997-04-14 18:12:05 +0000
commit20360337484d2e46b3d0c355a615cd27d3b0a5a4 (patch)
tree7a9743004d7f3c1cdefd7c05e1f1445080800998 /sys
parent9333dd8df4da81366188eb771ced1705c551f14d (diff)
downloadFreeBSD-src-20360337484d2e46b3d0c355a615cd27d3b0a5a4.zip
FreeBSD-src-20360337484d2e46b3d0c355a615cd27d3b0a5a4.tar.gz
Forget all about APM. Instead of "hlt" call through a vector which
APM can then fiddle with. Default for the vector is to "htl; ret"
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/cpu_switch.S17
-rw-r--r--sys/amd64/amd64/swtch.s17
-rw-r--r--sys/i386/i386/swtch.s17
3 files changed, 27 insertions, 24 deletions
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S
index 6c040fe..30a5e48 100644
--- a/sys/amd64/amd64/cpu_switch.S
+++ b/sys/amd64/amd64/cpu_switch.S
@@ -33,10 +33,9 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: swtch.s,v 1.43 1997/02/22 09:32:51 peter Exp $
+ * $Id: swtch.s,v 1.44 1997/04/07 07:15:54 peter Exp $
*/
-#include "apm.h"
#include "npx.h"
#include "opt_user_ldt.h"
@@ -273,14 +272,16 @@ idle_loop:
testl %eax, %eax
jnz idle_loop
sti
-#if NAPM > 0 && defined(APM_IDLE_CPU)
- call _apm_cpu_idle
- call _apm_cpu_busy
-#else
- hlt /* wait for interrupt */
-#endif
+ call *_hlt_vector /* wait for interrupt */
jmp idle_loop
+defaulthlt:
+ hlt
+ ret
+
+ .globl _hlt_vector
+_hlt_vector: .long defaulthlt
+
CROSSJUMPTARGET(_idle)
/*
diff --git a/sys/amd64/amd64/swtch.s b/sys/amd64/amd64/swtch.s
index 6c040fe..30a5e48 100644
--- a/sys/amd64/amd64/swtch.s
+++ b/sys/amd64/amd64/swtch.s
@@ -33,10 +33,9 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: swtch.s,v 1.43 1997/02/22 09:32:51 peter Exp $
+ * $Id: swtch.s,v 1.44 1997/04/07 07:15:54 peter Exp $
*/
-#include "apm.h"
#include "npx.h"
#include "opt_user_ldt.h"
@@ -273,14 +272,16 @@ idle_loop:
testl %eax, %eax
jnz idle_loop
sti
-#if NAPM > 0 && defined(APM_IDLE_CPU)
- call _apm_cpu_idle
- call _apm_cpu_busy
-#else
- hlt /* wait for interrupt */
-#endif
+ call *_hlt_vector /* wait for interrupt */
jmp idle_loop
+defaulthlt:
+ hlt
+ ret
+
+ .globl _hlt_vector
+_hlt_vector: .long defaulthlt
+
CROSSJUMPTARGET(_idle)
/*
diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s
index 6c040fe..30a5e48 100644
--- a/sys/i386/i386/swtch.s
+++ b/sys/i386/i386/swtch.s
@@ -33,10 +33,9 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: swtch.s,v 1.43 1997/02/22 09:32:51 peter Exp $
+ * $Id: swtch.s,v 1.44 1997/04/07 07:15:54 peter Exp $
*/
-#include "apm.h"
#include "npx.h"
#include "opt_user_ldt.h"
@@ -273,14 +272,16 @@ idle_loop:
testl %eax, %eax
jnz idle_loop
sti
-#if NAPM > 0 && defined(APM_IDLE_CPU)
- call _apm_cpu_idle
- call _apm_cpu_busy
-#else
- hlt /* wait for interrupt */
-#endif
+ call *_hlt_vector /* wait for interrupt */
jmp idle_loop
+defaulthlt:
+ hlt
+ ret
+
+ .globl _hlt_vector
+_hlt_vector: .long defaulthlt
+
CROSSJUMPTARGET(_idle)
/*
OpenPOWER on IntegriCloud