From owner-svn-src-all@freebsd.org Thu Apr 14 16:53:57 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAA7EADABC1 for ; Thu, 14 Apr 2016 16:53:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ig0-x22c.google.com (mail-ig0-x22c.google.com [IPv6:2607:f8b0:4001:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 829CA1135 for ; Thu, 14 Apr 2016 16:53:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ig0-x22c.google.com with SMTP id ui10so96886194igc.1 for ; Thu, 14 Apr 2016 09:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=8nqsWtIqLHdUsNR9V+suw+JqNx+hIoTWBXKYwTIb7iw=; b=ZQYPHAgO+SFu7WpjPURz0UzJs8N9PWKR7FU53DmHaYt5cWXNIhmd6mAgvTifeAMSnm e4pNWqL1exxlRpCPDCFCCaXTvOoT1MkdsSAZjIz+GGoVs5ETawUpoc1clvEnTPQh0Q2h C0gbrllsiXMJ4P7d0MBqPohPONbrBCJvMGv/pWCKJLqpXFFmZF6xmjdvp7uJl8FGUbfi Jz/JmH/BXZG7SkX324SZSuhO5WtD1PA6dRUs+3DFd9896SQpr68B7yT2pWnPn8rCusDl Z8mYoNzA7G8GlM0lKZA/zj99ZUG3dmBPB3d5jo1QPv7flh7uXqVmflJylL8lqySMqqbL mXjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=8nqsWtIqLHdUsNR9V+suw+JqNx+hIoTWBXKYwTIb7iw=; b=lpyQE+dITCkrZTtunIICm4puAMY0RshGGdRarANfoLWO6PaV8UixTk5gHtBSLVo86q Qf3Jui+CQA5vgCw2m1oezZO/PSwJlxR8vK2JF3iAx3jwzOGxQCfdwMdoe/faw7PDPzax erqTgyq2zc3Xk8EmiMEDbsPmFYVgibJSJIKq9XmZmJmPtIRyhDzJBMdAOfDyz7pT1h8M GTrvlpwPJidemg4WPr0mSVFnsA844dicELEcnPX1e4UFIKhJNtkRMiXxQTtfaBBBJO0a x13bGPlXlarG/zzdxzJvirGcF6iu1Lqxy+Chxl/2Lqfg6yxYXK83yIczy4jDDWxcGqOi fj3g== X-Gm-Message-State: AD7BkJIuXpiREzS2cpO8iL8VMp3kj9lm4iJdXSsK+A17QEMBI4DdmE5sK8sMAgmIABX5WRfeHqIvwRu1d/CZOg== MIME-Version: 1.0 X-Received: by 10.50.50.176 with SMTP id d16mr37897888igo.57.1460652836693; Thu, 14 Apr 2016 09:53:56 -0700 (PDT) Sender: wlosh@bsdimp.com Received: by 10.36.194.3 with HTTP; Thu, 14 Apr 2016 09:53:56 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: <41810993.gdbbayOUgu@ralph.baldwin.cx> References: <201604140459.u3E4xpYv038183@repo.freebsd.org> <41810993.gdbbayOUgu@ralph.baldwin.cx> Date: Thu, 14 Apr 2016 10:53:56 -0600 X-Google-Sender-Auth: 58qb-b9s3ZlftJ1YOuIh5WfKKok Message-ID: Subject: Re: svn commit: r297954 - in head/sys: boot/efi/loader/arch/amd64 boot/i386/libi386 x86/acpica From: Warner Losh To: John Baldwin Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 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, 14 Apr 2016 16:53:57 -0000 On Thu, Apr 14, 2016 at 10:40 AM, John Baldwin wrote: > On Thursday, April 14, 2016 04:59:51 AM Warner Losh wrote: > > Author: imp > > Date: Thu Apr 14 04:59:51 2016 > > New Revision: 297954 > > URL: https://svnweb.freebsd.org/changeset/base/297954 > > > > Log: > > Deprecate using hints.acpi.0.rsdp to communicate the RSDP to the > > system. This uses the hints mechnanism. This mostly works today > > because when there's no static hints (the default), this value can be > > fetched from the hint. When there is a static hints file, the hint > > passed from the boot loader to the kernel is ignored, but for the BIOS > > case we're able to find it anyway. However, with UEFI, the fallback > > doesn't work, so we get a panic instead. > > > > Switch to acpi.rsdp and use TUNABLE_ULONG_FETCH instead. Continue to > > generate the old values to allow for transitions. In addition, fall > > back to the old method if the new method isn't present. > > > > Add comments about all this. > > I still think this is a bit of a band-aid. At least acpidump in userland > also > uses the hints I believe. I still think a better long term approach is to > fix static hints + loader one way or another. > Sure, but this data never should have been passed as a hint. > One approach would be to teach the hint code to "merge" dynamic and static > hints by looking in the dynamic hints first. However, while that is fairly > trivial for resource_*_value() that request values by name, it would be a > PITA > to handle the part of the hints API that iterates to find all the possible > device names (though this could perhaps iterate over dynamic then static). > Yes, we could do that, or we could not abuse 'hints' mechanism and instead realize it can and will be overridden and use a different method to pass this critical data. I like module data better than the environment, but was short on time. That's where this should be passed in, and a sysctl to export it to userland should be done instead of acpidump reading hints. I freely admit that my kenv hack just made things better without fully fixing the problem. The second approach would be to desupport using static hints for kernels > booted via the loader and relegate it to something that only systems using > uboot or the like use. Anything in static hints can be moved into either > /boot/device.hints, /boot/loader.conf{,.local} or into a /boot/foo.hints > that is added to the list of loader conf files in > /boot/loader.conf{,.local}. > I would add a big, fat WARNING message (like we have for WITNESS) that > prints > out during kernel boot if we detect static hints being used when a kernel > environment is present. > Seems like an over-reaction to using the wrong mechanism > I probably lean towards the second. We never shipped a release that used > static hints for a kernel on platforms where /boot/loader is supported > (GENERIC on i386 only used static hints for about a month after the hints > code was added pre-5.0 before the hints moved out to /boot/device.hints > instead). Moving your static hints out into a loader config file means > that > you also have more flexibility to during recovery situations as you could, > at least in theory, adjust the values pre-boot from the loader. I see no reason to desupport anything. Warner