Update of /project/movitz/cvsroot/movitz/losp/x86-pc In directory common-lisp.net:/tmp/cvs-serv8009
Modified Files: interrupt.lisp Log Message: Added functions cli and sti, and minor edits.
Date: Tue Apr 6 06:37:52 2004 Author: ffjeld
Index: movitz/losp/x86-pc/interrupt.lisp diff -u movitz/losp/x86-pc/interrupt.lisp:1.6 movitz/losp/x86-pc/interrupt.lisp:1.7 --- movitz/losp/x86-pc/interrupt.lisp:1.6 Sun Mar 28 08:35:45 2004 +++ movitz/losp/x86-pc/interrupt.lisp Tue Apr 6 06:37:52 2004 @@ -10,7 +10,7 @@ ;;;; Author: Frode Vatvedt Fjeld frodef@acm.org ;;;; Created at: Fri May 4 18:08:50 2001 ;;;; -;;;; $Id: interrupt.lisp,v 1.6 2004/03/28 13:35:45 ffjeld Exp $ +;;;; $Id: interrupt.lisp,v 1.7 2004/04/06 10:37:52 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------
@@ -53,7 +53,7 @@ (setf (memref frame (* 4 (int-frame-index reg)) 0 type) x))
(define-primitive-function muerte::default-interrupt-trampoline () - "Default interrupt handler." + "Default first-stage interrupt handler." #.(cl:list* 'with-inline-assembly '(:returns :nothing) (cl:loop :for i :from 0 :to movitz::+idt-size+ :append (cl:if (cl:member i '(8 10 11 12 13 14 17)) @@ -80,7 +80,7 @@ ;; 8: ebp ;; 4: esi ;; 0: edi - + (:pushl (:esp 48)) ; EFLAGS (:pushl :cs) ; push CS (:call (:pc+ 0)) ; push EIP. @@ -241,6 +241,8 @@ ;; (print-dynamic-context); what's this? (throw :debugger nil)) (112 + (setf (%run-time-context-slot 'nursery-space) + (memref (%run-time-context-slot 'nursery-space) -6 3 :lisp)) (error "Out of memory. Please take out the garbage.")) (t (funcall (if (< 16 number 50) #'warn #'error) "Exception occurred: ~D, EIP: ~@Z, EAX: ~@Z, ECX: ~@Z, ESI: ~@Z" @@ -267,6 +269,13 @@ (setf (pic8259-irq-mask) #xfffe) (with-inline-assembly (:returns :nothing) (:sti)))
+(defun cli () + (with-inline-assembly (:returns :nothing) + (:cli))) + +(defun sti () + (with-inline-assembly (:returns :nothing) + (:sti)))
(defun interrupt-handler (n) (let ((vector (load-global-constant interrupt-handlers)))