From owner-freebsd-ia32@FreeBSD.ORG Thu Nov 16 15:53:49 2006 Return-Path: X-Original-To: freebsd-ia32@freebsd.org Delivered-To: freebsd-ia32@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8FC1B16A40F for ; Thu, 16 Nov 2006 15:53:49 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1BE7443D49 for ; Thu, 16 Nov 2006 15:53:46 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so557348wxc for ; Thu, 16 Nov 2006 07:53:46 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=mOz5IwqMKeD96eTQi6//nK43yVwLJwYlUgXw9hfJrQxb4K0Zi3X7rSVXq3n7EEL0N5qQZuBN2JB/26py6OCTc+3EkqBLIk2QsK5c2XJqxGL5SsdEEmJle5DV8oIZc4TdzWpV0zt980RQ2sucVdCjxSGjAtrhnM6AUG1hjJ5fFOY= Received: by 10.70.44.4 with SMTP id r4mr1001139wxr.1163692426475; Thu, 16 Nov 2006 07:53:46 -0800 (PST) Received: by 10.70.12.2 with HTTP; Thu, 16 Nov 2006 07:53:46 -0800 (PST) Message-ID: <3bbf2fe10611160753q3303d81bw515bffe9af4ee0c9@mail.gmail.com> Date: Thu, 16 Nov 2006 16:53:46 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "ranjith kumar" In-Reply-To: <20061116112749.58242.qmail@web58409.mail.re3.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061116112749.58242.qmail@web58409.mail.re3.yahoo.com> X-Google-Sender-Auth: 7e7eacf26a8ce475 Cc: freebsd-ia32@freebsd.org Subject: Re: disabling interrupts X-BeenThere: freebsd-ia32@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD on the IA-32 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 15:53:49 -0000 2006/11/16, ranjith kumar : > Hi, > > How to disable interrupts on Pentium 4(or any > i386) machine? > > I tried to include "cli" instruction in kernel module. > But got runtime errors. > > Thanks in advance. Why you want this? Anyway, you can't disable interrupts for long periods of time, since interrupts are required for a lot of vital works (i.e. pagefaults). In this optic, even the "syscall handler" (exception handler of the int 0x80) is implemented through a trap gate more than an interrupt gate. And keep in mind that a lot of kernel routines working on IF, preserve the caller's eflags state (so disabling them would have no results in some cases). Attilio -- Peace can only be achieved by understanding - A. Einstein