From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 27 10:17:05 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DF4A106566B for ; Fri, 27 Mar 2009 10:17:05 +0000 (UTC) (envelope-from won.derick@yahoo.com) Received: from n17.bullet.mail.mud.yahoo.com (n17.bullet.mail.mud.yahoo.com [68.142.206.144]) by mx1.freebsd.org (Postfix) with SMTP id 5AFF68FC19 for ; Fri, 27 Mar 2009 10:17:05 +0000 (UTC) (envelope-from won.derick@yahoo.com) Received: from [68.142.194.244] by n17.bullet.mail.mud.yahoo.com with NNFMP; 27 Mar 2009 10:03:16 -0000 Received: from [68.142.201.242] by t2.bullet.mud.yahoo.com with NNFMP; 27 Mar 2009 10:03:16 -0000 Received: from [127.0.0.1] by omp403.mail.mud.yahoo.com with NNFMP; 27 Mar 2009 10:03:16 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 687847.51162.bm@omp403.mail.mud.yahoo.com Received: (qmail 12195 invoked by uid 60001); 27 Mar 2009 10:03:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1238148196; bh=YTl6zFjDgms4QxSGdLHwKbWgZt0DnFaoOCzTixwTDng=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=NBzmHYNzT5xc1UsrLGX6u3yP8FXeABt6gXIdxaVlYDUbUqevvlyGWnjwmwTRdLJXAmRr1b336WzVyv/+W4b8v8zT0z9aEcMSHCj7qAGPpwOkQsP8ON21uyrJjIMyuIbrDnmmsckbeaJHZVu+6RpnZfK1WqwEQgPoSZrlqp769c4= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=YCym9Pq6Xh9/m/feNQ5pmyfnVfj50VKbiBQl2oriQ46blQ372XiYuTEvxXxGcmNGGMscLEa5Be1LcDUGe6VFuheyBnNIditlhdvvnorWZ2QmXdj7KvJkAkwX+MRwpctHTEcnQJFBCH7RPFqOo96wZ6it+QOe3CkIlsUxK8kqvAg=; Message-ID: <17314.10813.qm@web45811.mail.sp1.yahoo.com> X-YMail-OSG: cc1piUQVM1m9ce.PwXQX_odWIjd2c6jNq1DvmmG3.5KZun6hjaF2wy6EsMlqcTxyFsSwKCPKHAQMiReJzAYqsoFG6Ob9GFRvAZxONcu_xLtSxzO2buylf03J72qFAluqzQfj7I6qkDRlOGWhz9Ry7IVS8wx02nLpR5L8FD.1.i7obhe49dykC67etkC6ZxSDefSABK9L3kxzBLUQAQ-- Received: from [58.71.34.137] by web45811.mail.sp1.yahoo.com via HTTP; Fri, 27 Mar 2009 03:03:14 PDT X-Mailer: YahooMailClassic/5.1.20 YahooMailWebService/0.7.289.1 Date: Fri, 27 Mar 2009 03:03:14 -0700 (PDT) From: Won De Erick To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Switching to SMM with FreeBSD 6.2 onwards X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2009 10:17:05 -0000 Hi All, I'm not quite familiar with FreeBSD, but I want to do the following in 6.2/7.1. /* Raise IOPL to 3 to open all I/O ports */ /* something like 'i386_iopl(3)' */ ... /* Open SMRAM access */ outl(unsigned int port, unsigned long int data); Also, I appreciate comments on the following wrapper: static inline outl(unsigned int port, unsigned long int data) { asm("outl %0, %1" : : "a" (data), "dN" (port)); } My goal is to switch the processor to SMM by triggering SMI from userland. Thanks in advance, Won