Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1539544imc; Mon, 11 Mar 2019 16:40:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2y+WobJ+mKBBYt27Ck6t9b+EW6wpbw/74q7JD4NTmc1aLtXIWNLkwbCDRPG0GduIPqQPt X-Received: by 2002:a62:1c94:: with SMTP id c142mr36688735pfc.54.1552347635404; Mon, 11 Mar 2019 16:40:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552347635; cv=none; d=google.com; s=arc-20160816; b=x0gXlSReDTlLnjbV+kEDO71KX9XEc2wohk5G4iDIZ9Be0f+KI4jtIzf3wRwry3bdtg iLprz2X7YydQNzzw03A9KBqNcaMgJ/ko9+DSooX0z3mzm8V6H87pQ5YledeFAoQnSO09 bNANTiQocCOSD3FHcqDv+9gnLjiWeGY7rFZSx+LkVFddjSTOcZQNNDmoDzN93TbDoSIW hgcc0Ct6iNCG41R7T0NpsUNS4LZWyPoeGKmBAknYrlxlsjctxpkn7qVGMuUBJbsXnmYe BbNjJs4QGyIfy7udYpYl3k4DlznUftUb6GcYthHvF3rFUZCaa/pweBg8ZycGURY1zL1B cwSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TW04/fQHZTjaAhL2CaKBAxytZtoYVfe+d98Uqr/dbPo=; b=bbGcVS5Wb2aWtoExC2P3675yLxgn5a+114xILxhJUsve5f1idcEqzSg+HL7rMXnt0Y /zz9S/OFlIyLL5z0W4Np5CCfzbCnJe9cSqFGt4SyhaD/fhcXF2o19pKix6shYZTssQPC iy5QqbCZlmeNOXD1tINzGdp0dTpJCJHM6O+YjJ7VdsUTyTxbUjvln/lqTzenSf5hcJeA T3X4EX8veJ+UR1W5mWSGKyGDa73oBOmbPKcJivxN2mAlRNGluyTo9KbyNQFCSp5UWeK6 w6/L+/Fiubf09OgXlDkLRJlpxfrtnjbDatIZnwbJMc8Yxm8BeY/1wazkG7g7B9fSNg/p GzTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OqFwFM0i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cv2si6874072plb.192.2019.03.11.16.40.19; Mon, 11 Mar 2019 16:40:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OqFwFM0i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726191AbfCKXjg (ORCPT + 99 others); Mon, 11 Mar 2019 19:39:36 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:40834 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725850AbfCKXjf (ORCPT ); Mon, 11 Mar 2019 19:39:35 -0400 Received: by mail-wr1-f68.google.com with SMTP id t6so693985wrw.7 for ; Mon, 11 Mar 2019 16:39:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=TW04/fQHZTjaAhL2CaKBAxytZtoYVfe+d98Uqr/dbPo=; b=OqFwFM0icukXeytHyOvfHc4zC9M1Hr1tdsdOJm9u6YqQunsV8gV/MSNvFieKvU3SW1 PwT/fDZnG29sGDjPPbjjZ2/ZpSKayploQa8KRl9TnFqAUskZMGLKkpkCIMXG+nbmrHQf yyDyahGWSY+UqwCsnOX/d6zgpAjF2n6uX9Enbe/Eb5WtK9PRXCLvogmOjDvhTbUHdq8f Fm0+SCotL9c9RHc6WceZi3cGcsl4KQf/+BazrrNnOp98uCLjeLcBoUfZo6a/4ZyS6x3q zjcoW436ABRyhbyblPrhfNbpl/4O09LMhBcote/PTRSVuz21gnS6sVlhklhFpHUZD99F semQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=TW04/fQHZTjaAhL2CaKBAxytZtoYVfe+d98Uqr/dbPo=; b=XmJnzKsoKLr+PNFttFGfh542tGR4D+2UeDpt1ZQDflYoJJUimu9JenT/L0YrpSWZGF hF9DaTGQBZFVw5FqL/MS3VLLbmoes4/QLI8JeVd25gNtUsQthAXUiEbkMuXMHCsa1kdz PTsx/aiE0aa05U7TgIIWqG6I8iFoNu04abrjsiprUOKFsW01uG1+hnJkeV2sncowrGge 8JNzHpIUyax1XdIpubS/9Ws0uc0mzxhaCNxB/6d9mhyq4HoivQUYw1Y6AervrDXWR2hV BY626YSolYnBvU8tSkEK43qcxNe1Ewc3zg2JwXF44maazE+w5ldWme8xssSgCkHjeooq hy9g== X-Gm-Message-State: APjAAAVy5CvLyyTqW/2kyRW/ExoFK00aoOzxnWDVrTM7/U5hDYD/bPme zMVso1Ixz7kh+XgD9az4ezY= X-Received: by 2002:adf:fa51:: with SMTP id y17mr22864966wrr.233.1552347573874; Mon, 11 Mar 2019 16:39:33 -0700 (PDT) Received: from darwi-home-pc (ip-109-42-1-116.web.vodafone.de. [109.42.1.116]) by smtp.gmail.com with ESMTPSA id o30sm10407545wro.57.2019.03.11.16.39.31 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 11 Mar 2019 16:39:33 -0700 (PDT) Date: Tue, 12 Mar 2019 00:39:24 +0100 From: "Ahmed S. Darwish" To: Daniel Vetter Cc: Jani Nikula , David Airlie , Joonas Lahtinen , Rodrigo Vivi , Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , David Zhou , Ard Biesheuvel , Matt Fleming , Linus Torvalds , Greg Kroah-Hartman , John Ogness , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: DRM-based Oops viewer Message-ID: <20190311233924.GA4433@darwi-home-pc> References: <20190310013142.GA3376@darwi-home-pc> <87mum1lr3g.fsf@intel.com> <20190311134941.GH2665@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190311134941.GH2665@phenom.ffwll.local> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 11, 2019 at 02:49:41PM +0100, Daniel Vetter wrote: > On Mon, Mar 11, 2019 at 11:04:19AM +0200, Jani Nikula wrote: > > On Sun, 10 Mar 2019, "Ahmed S. Darwish" wrote: > > > Hello DRM/UEFI maintainers, > > > > > > Several years ago, I wrote a set of patches to dump the kernel > > > log to disk upon panic -- through BIOS INT 0x13 services. [1] > > > > > > The overwhelming response was that it's unsafe to do this in a > > > generic manner. Linus proposed a video-based viewer instead: [2] > > > > > > If you want to do the BIOS services thing, do it for video: copy the > > > oops to low RAM, return to real mode, re-run the graphics card POST > > > routines to initialize text-mode, and use the BIOS to print out the > > > oops. That is WAY less scary than writing to disk. > > > > > > Of course it's 2019 now though, and it's quite known that > > > Intel is officially obsoleting the PC/AT BIOS by 2020.. [3] > > > > > > Researching whether this can be done from UEFI, it was also clear > > > that UEFI "Runtime Services" do not provide any re-initialization > > > routines. [4] > > > > > > The maximum possible that UEFI can provide is a GOP-provided > > > framebuffer that's ready to use by the OS -- even after the UEFI > > > boot phase is marked as done through ExitBootServices(). [5] > > > > > > Of course, once native drivers like i915 or radeon take over, > > > such a framebuffer is toast... [6] > > > > > > Thus a possible remaining option, is to display the oops through > > > "minimal" DRM drivers provided for each HW variant... Since > > > these special drivers will run only and fully under a panic() > > > context though, several constraints exist: > > > > > > - The code should be fully synchronous (irqs are disabled) > > > - It should not allocate any dynamic memory > > > - It should make minimal assumptions about HW state > > > - It should not chain into any other kernel subsystem > > > - It has ample freedom to use delay-based loops and the > > > like, the kernel is already dead. > > > > > > How feasible is it to have such a special "DRM viewoops" > > > framework + its minimal drivers in the kernel? > > > > Please first better define what you want to achieve. > > > > Do you want to store the dmesg or oops (like your original series > > suggests) or do you want to display the oops? Do you want the facility > > to be functioning at all times, or only when specifically requested in > > advance by the user? If you want to display the oops, do you want it to > > also work when the display is disabled at the time of the oops? What if > > the display is at attached to a port on a dock? > > > > There's at least kdump, ramoops, and netconsole that can be used to > > achieve some of what you want. How do they fall short for you? > > Assuming the use-case is to get an oops to display on a kms driver, we do > have a fairly comprehensive plan of what that's should look like: > > https://dri.freedesktop.org/docs/drm/gpu/todo.html#make-panic-handling-work > > This takes into account all the failed previous attempts at trying to get > an oops to display. It's conceptually a match with your viewoops framework > I think. Thanks a lot Daniel for the reference! Yup, this is a conceptual match indeed! It's great to know that at the maintainer level there is some agreement on, awareness of, and plans for, the general topic... I'll jump to Noralf Tr?nnes's just-posted patches then and see how to move from there :) all the best, --darwi http://darwish.chasingpointers.com