From owner-freebsd-amd64@FreeBSD.ORG Thu Jan 20 03:14:42 2005 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C61A416A4CE for ; Thu, 20 Jan 2005 03:14:42 +0000 (GMT) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 119A343D2F for ; Thu, 20 Jan 2005 03:14:40 +0000 (GMT) (envelope-from jkim@niksun.com) Received: from [10.70.0.244] (daemon.mj.niksun.com [10.70.0.244]) by anuket.mj.niksun.com (8.13.1/8.12.11) with ESMTP id j0K3EdxT051139 for ; Wed, 19 Jan 2005 22:14:39 -0500 (EST) (envelope-from jkim@niksun.com) From: Jung-uk Kim Organization: Niksun, Inc. To: freebsd-amd64@freebsd.org Date: Wed, 19 Jan 2005 22:14:27 -0500 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_TIy7B7bJJiYMvtw" Message-Id: <200501192214.27401.jkim@niksun.com> X-Virus-Scanned: clamd / ClamAV version 0.75.1, clamav-milter version 0.75c on anuket.mj.niksun.com X-Virus-Status: Clean Subject: Compaq R3000z ACPI fix X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jan 2005 03:14:43 -0000 --Boundary-00=_TIy7B7bJJiYMvtw Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I finally found some time and made ACPI working on Compaq R3000z. You need to fix kernel and DSDT. The kernel hack is for FreeBSD/amd64. Similar hack should work with FreeBSD/i386 but I haven't tested. To enable the hack, you need to set 'hw.acpi.skip_timer_override=1' from loader or loader.conf. Yes, I stole the idea from Linux. ;-) http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/test/2.6.5/20040422223905-nforce2_timer.patch I only tested with the following options: options SMP device atpic The DSDT fix is against BIOS version F.33. To override DSDT, please read: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/acpi-debug.html Enjoy, Jung-uk Kim --Boundary-00=_TIy7B7bJJiYMvtw Content-Type: text/plain; charset="us-ascii"; name="madt.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="madt.diff" --- src/sys/amd64/acpica/madt.c.orig Thu Jun 10 17:30:08 2004 +++ src/sys/amd64/acpica/madt.c Wed Jan 19 21:49:50 2005 @@ -595,6 +595,14 @@ enum intr_trigger trig; enum intr_polarity pol; char buf[64]; + int skip_timer_override; + + if (getenv_int("hw.acpi.skip_timer_override", &skip_timer_override) && + intr->Source == 0 && intr->Interrupt == 2) { + if (bootverbose) + printf("MADT: skipping timer override.\n"); + return; + } if (bootverbose) printf("MADT: intr override: source %u, irq %u\n", --Boundary-00=_TIy7B7bJJiYMvtw Content-Type: text/plain; charset="us-ascii"; name="r3000z-asl.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="r3000z-asl.diff" --- r3000z.asl Wed Jan 19 21:53:10 2005 +++ r3000z-fixed.asl Wed Jan 19 21:19:20 2005 @@ -161,6 +161,7 @@ { Notify (\_SB.PWRB, 0x02) } + Return(Package(0x02){0x00, 0x00}) } Scope (\_PR) @@ -201,9 +202,10 @@ Scope (\_SB) { +/* Device (WMID) { - Name (_HID, "*pnp0c14") + Name (_HID, "PNP0C14") Name (_UID, 0x00) Name (_WDG, Buffer (0x14) { @@ -254,6 +256,7 @@ } } } +*/ Scope (\_SB) { @@ -1865,7 +1868,7 @@ } OperationRegion (ERAM, EmbeddedControl, 0x00, 0xFF) - Field (ERAM, AnyAcc, Lock, Preserve) + Field (ERAM, ByteAcc, Lock, Preserve) { Offset (0x60), SMPR, 8, @@ -2094,7 +2097,7 @@ } OperationRegion (ECRM, EmbeddedControl, 0x00, 0xFF) - Field (ECRM, AnyAcc, Lock, Preserve) + Field (ECRM, ByteAcc, Lock, Preserve) { Offset (0x94), ERIB, 16, @@ -2328,7 +2331,7 @@ IO (Decode16, 0x0010, 0x0010, 0x01, 0x10) IO (Decode16, 0x0022, 0x0022, 0x01, 0x1E) IO (Decode16, 0x0044, 0x0044, 0x01, 0x1C) - IO (Decode16, 0x0062, 0x0062, 0x01, 0x02) + /* IO (Decode16, 0x0062, 0x0062, 0x01, 0x02) */ IO (Decode16, 0x0065, 0x0065, 0x01, 0x0B) IO (Decode16, 0x0072, 0x0072, 0x01, 0x02) IO (Decode16, 0x0074, 0x0074, 0x01, 0x0C) @@ -3209,7 +3212,8 @@ IRQNoFlags () {3,4,5,11} DMA (Compatibility, BusMaster, Transfer16) {1,3,6} } - /*** Missing EndDependentFunctions descriptor */ }) + EndDependentFn() + }) Method (_SRS, 1, NotSerialized) { CreateByteField (Arg0, 0x02, IOLO) @@ -3633,6 +3637,7 @@ \_SB.PCI0.LPC0.PHSS (0x01) } } + Return (Package(0x02){0x00,0x00}) } Method (STBL, 1, NotSerialized) --Boundary-00=_TIy7B7bJJiYMvtw--