From owner-freebsd-hackers@freebsd.org Fri Nov 16 06:35:41 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACD081128BFD; Fri, 16 Nov 2018 06:35:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6A8A7351D; Fri, 16 Nov 2018 06:35:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id wAG6ZTqC075685 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 16 Nov 2018 08:35:32 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua wAG6ZTqC075685 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id wAG6ZTlt075678; Fri, 16 Nov 2018 08:35:29 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 16 Nov 2018 08:35:29 +0200 From: Konstantin Belousov To: Rajesh Kumar Cc: freebsd-amd64@freebsd.org, freebsd-acpi@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Enabling a ACPI eMMC device is causing kernel reboots with FreeBSD 11.2 Message-ID: <20181116063529.GP2378@kib.kiev.ua> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-Rspamd-Queue-Id: A6A8A7351D X-Spamd-Result: default: False [-5.17 / 40.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; IP_SCORE(-2.17)[ip: (-2.68), ipnet: 2001:470::/32(-4.53), asn: 6939(-3.57), country: US(-0.10)]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_TLS_LAST(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2018 06:35:41 -0000 On Fri, Nov 16, 2018 at 10:45:39AM +0530, Rajesh Kumar wrote: > Hi, > > I did some study on this. During acpi_attach, if MCFG table is present, > FreeBSD tries to use it (That is to map the PCI Base address to virtual > address space). Setting hw.pci.mcfg=0, disables that mapping and lets the > system use the type 1 config access (which is IO port based access). So, > this is what hw.pci.mcfg does. > > In our case, we are enabling a device on the ACPI bus and made sure no > other ACPI device collides with the address range for PCI (which mcfg > says). So, why enabling a device on ACPI, is causing the memory mapped PCI > access go bad to panic/reboot the kernel? I tried to collect more info > enabling INVARIANTS, but in that case kernel panics much before in the boot > process. So, how could I proceed in debugging this issue? Any suggestions? There is no ACPI bus, at best the device is enumerated using ACPI. > > > On Thu, Nov 8, 2018 at 4:14 PM Rajesh Kumar wrote: > > > Hi, > > > > I have amd64 board, which has a eMMC device on the ACPI bus. When I try > > booting FreeBSD 11.2 on this board, with eMMC device disabled in BIOS, it > > boots without any issues. But, when eMMC device is enabled in BIOS, > > FreeBSD 11.2 continuously reboots. What is the CPU in your motherboard ? If it is AMD, try HEAD or latest 12.0 BETA. > > > > When I have the following tunable set, FreeBSD 11.2 boots without any > > issues with eMMC enabled. > > hw.pci.mcfg=0 > > > > Observations : > > a) We have verified the ACPI device addresses (from DSDT table) doesn't > > conflict with the PCI address base (configured in MCFG table). > > b) The PCI address base from MCFG table is read correctly by kernel > > (Verbose boot prints that address). So, I don't think MCFG table pointer is > > corrupted and getting read properly. > > > > Questions : > > a) What does hw.pci.mcfg=0 actually do to get the reboot issue resolved? > > b) Why enabling a device on ACPI bus needs hw.pci.mcfg (PCI specific) to > > boot? > > > > Looks like the system reboots when the ACPI and PCI devices enumeration > > starts during the boot. So, seems ACPI (or) PCI devices aren't getting > > enough resources and so reboots. > > > > Thanks, > > Rajesh. > > > _______________________________________________ > freebsd-amd64@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-amd64 > To unsubscribe, send any mail to "freebsd-amd64-unsubscribe@freebsd.org"