From owner-freebsd-current@FreeBSD.ORG Wed Jul 22 17:16:43 2009 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 027A0106566B; Wed, 22 Jul 2009 17:16:43 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id A5EEA8FC08; Wed, 22 Jul 2009 17:16:42 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Subject:Message-ID:Reply-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender; b=mXoDGOH3/r8Qla1FGZ3cz4r2cXdRoz0SRSRhZOSHDgM+Q7OSUt4rD4qKbtDgf3xtnRGYwbcDkone4CEZL9Ov4W6xQpH365o07LsHLBXKU5/Mowe8WsYu2cOnh9tmea0juUOUJf9MMNXbt2bRif7P9N27ubhWClB++lzsLhl9Rk0=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1MTfQn-0008KZ-IG; Wed, 22 Jul 2009 21:16:41 +0400 Date: Wed, 22 Jul 2009 21:16:39 +0400 From: Eygene Ryabinkin To: Jung-uk Kim Message-ID: <39ZtfvLlZ2mcI6cuGV6y0ET3pbM@CWODRlDR5RMqbkBfR0/UzHcfNhE> References: <200907211439.05703.hselasky@c2i.net> <200907221342.21588.hselasky@c2i.net> <200907221215.41757.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200907221215.41757.jkim@FreeBSD.org> Sender: rea-fbsd@codelabs.ru Cc: freebsd-current@FreeBSD.org, Rui Paulo , Hans Petter Selasky Subject: Re: FreeBSD-8-BETA2 on MacBookPro5.5 (regression issue) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rea-fbsd@codelabs.ru List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jul 2009 17:16:43 -0000 Wed, Jul 22, 2009 at 12:15:39PM -0400, Jung-uk Kim wrote: > > The thing is that the IRQ for SCI at my MacBook is 9, so it may be > > really related to the keyboard issues. May be SCI interrupt is > > posted after ACPI is enabled and this confuses something. I'll try > > to look at how APIC stuff is routed, but not today. > > That's quite possible scenario. FYI, all new nVidia chipset Mac's > have almost identical ACPI tables. The SMM port is at 0x52e while old > Intel Macs were at 0xb2, AFAIK. When we do AcpiEnable(), ACPICA > checks if the SCI_EN bit is set. If not, it tries to enable it via > writing ACPI_ENABLE value to SMI_CMD port from FADT. In this case, > that effectively ends up doing: > > bus_space_write_1(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, 0x52e, 0xf0); > > According to HPS, this freezes the system as if it doesn't come back > from the SMI handler. That's true: I see this too. SMI_CMD is really 0x52e and prior to calling AcpiHwSetMode() ACPI mode is legacy. Jung-uk, what is the rationale for enabling the SCI mode and to install the interrupt handler only afterwards? Will it break something if the interrupt handler will be installed prior to going to the ACPI native mode switch? -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ #