From owner-svn-src-all@FreeBSD.ORG Thu Feb 23 22:00:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEDB010656F0; Thu, 23 Feb 2012 22:00:31 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD7E08FC08; Thu, 23 Feb 2012 22:00:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NM0Viq025223; Thu, 23 Feb 2012 22:00:31 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1NM0VdB025221; Thu, 23 Feb 2012 22:00:31 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201202232200.q1NM0VdB025221@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 23 Feb 2012 22:00:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232081 - stable/9/sys/amd64/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 22:00:32 -0000 Author: jkim Date: Thu Feb 23 22:00:31 2012 New Revision: 232081 URL: http://svn.freebsd.org/changeset/base/232081 Log: MFC: r231787 Make ACPI resume beeper less cryptic. Set PIC timer2 mode properly. Modified: stable/9/sys/amd64/acpica/acpi_wakecode.S Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/acpica/acpi_wakecode.S ============================================================================== --- stable/9/sys/amd64/acpica/acpi_wakecode.S Thu Feb 23 21:56:53 2012 (r232080) +++ stable/9/sys/amd64/acpica/acpi_wakecode.S Thu Feb 23 22:00:31 2012 (r232081) @@ -30,7 +30,9 @@ */ #include +#include #include +#include #include "assym.s" @@ -71,13 +73,21 @@ wakeup_start: testb $~0, resume_beep - wakeup_start jz 1f movb $0, resume_beep - wakeup_start - movb $0xc0, %al - outb %al, $0x42 - movb $0x04, %al - outb %al, $0x42 - inb $0x61, %al - orb $0x3, %al - outb %al, $0x61 + + /* Set PIC timer2 to beep. */ + movb $(TIMER_SEL2 | TIMER_SQWAVE | TIMER_16BIT), %al + outb %al, $TIMER_MODE + + /* Turn on speaker. */ + inb $IO_PPI, %al + orb $PIT_SPKR, %al + outb %al, $IO_PPI + + /* Set frequency. */ + movw $0x4c0, %ax + outb %al, $TIMER_CNTR2 + shrw $8, %ax + outb %al, $TIMER_CNTR2 1: /* Re-initialize video BIOS if the reset_video tunable is set. */