Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Dec 1999 23:19:49 -0500
From:      "Vladimir N. Silyaev" <vsilyaev@mindspring.com>
To:        hackers@freebsd.org
Subject:   FreeBSD-i386 and GS selector register
Message-ID:  <19991207231949.B6719@jupiter.delta.ny.us>

next in thread | raw e-mail | index | archive | help
Hi

I have the next question.
The FreeBSD on i386 don't use GS register, even kernel DDB don't show
it. And at the time when kernel loaded and operational GS didn't 
initialized yet and have some garbage value (something like 0x1f, i.e.
pointed to the LDT). But because no one don't touch that all working fine.

Question.
The some driver had code like this:
	push	%gs <--- OK 0x1f  saved on the stack
	...  
	call    do_big_deal
	...
	pop	%gs <--- Restore 0x1f and have a fault, probably Double Fault

I can't change that code. When I found this problem, I did simple hack,
before call that code I'm clear GS. But I want to know may be exist
a better solution?

-- 
Vladimir Silyaev


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




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