[movitz-cvs] CVS update: movitz/losp/muerte/segments.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Fri Jun 10 22:43:54 UTC 2005


Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory common-lisp.net:/tmp/cvs-serv11308

Modified Files:
	segments.lisp 
Log Message:
Fixed a nasty bug in (setf global-segment-descriptor-table) that would
install the wrong (about half-size) limit, causing weird crashes.

Date: Sat Jun 11 00:43:53 2005
Author: ffjeld

Index: movitz/losp/muerte/segments.lisp
diff -u movitz/losp/muerte/segments.lisp:1.15 movitz/losp/muerte/segments.lisp:1.16
--- movitz/losp/muerte/segments.lisp:1.15	Fri Jun 10 23:15:18 2005
+++ movitz/losp/muerte/segments.lisp	Sat Jun 11 00:43:52 2005
@@ -10,7 +10,7 @@
 ;;;; Author:        Frode Vatvedt Fjeld <frodef at acm.org>
 ;;;; Created at:    Thu May  8 14:25:06 2003
 ;;;;                
-;;;; $Id: segments.lisp,v 1.15 2005/06/10 21:15:18 ffjeld Exp $
+;;;; $Id: segments.lisp,v 1.16 2005/06/10 22:43:52 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -176,9 +176,9 @@
 
 (defun (setf global-segment-descriptor-table) (table)
   "Install <table> as the GDT.
-NB! you need ensure that the table object isn't garbage-collected."
+NB! you need to ensure that the table object isn't garbage-collected."
   (check-type table (vector (unsigned-byte 32)))
-  (let ((limit (1- (* 2 (length table))))
+  (let ((limit (1- (* 4 (length table))))
 	(base (+ 2 (+ (object-location table)
 		      (location-physical-offset)))))
     (%lgdt base limit)




More information about the Movitz-cvs mailing list