Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6640003rdb; Fri, 15 Dec 2023 04:37:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IHr9biaKxCKAkqOA02RUcr/Y1P55gw9GEGYWzwXNvZYbBKZVfeX5ur+2JdYli3xUIV6GSta X-Received: by 2002:a05:651c:88b:b0:2cc:1cc0:9872 with SMTP id d11-20020a05651c088b00b002cc1cc09872mr6632947ljq.105.1702643872473; Fri, 15 Dec 2023 04:37:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702643872; cv=none; d=google.com; s=arc-20160816; b=HExsrZr9T0POxZ/Bcyh9LmEvxdtzpA+f4QamZK2QaqAhblWaW4sIPYys8ks/54lYZD f60jKrgkhvJ+k4umHm8FUK5lR6d2HIFuccOcCmcIePtxdtIBUpzeONR7NokPbWbYYJaB PPSaRdCRxlnU71dmCtby2TlnDH4WwCoIUIE3LObU50+AS+PXqfgFoSzEa232n9F9+A9h AQXJDpbPL28RfVscu5zyt5BAA+eRg/z0x8RxoMQG9DTZ5ECOsYYe1O3l1FXcyGASXaUA JXDqPvf/V7S8au4xTMlPfm/73l2owJ6BuS1Jx62h8lx0nBBHbaKfdDDOsRShEJ5NH7Hh 1ijg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=DyIY/skl5L74MJSv/9NoU/GlPAZnZXPoIEkSa4htCY4=; fh=5lyp4i0KWpy4n+Mp6RgzrV5e4S29koucuF0MvOYjysw=; b=LGZTUlOAr/xeEfTgZliQ+ifJwd69zldx+oI2llGtf5nNSpPHC+shiyMJWxjjN7Lzbi JUDHEFcOPJRa/MqnwTo0lr3dGPWWo0EmnJFUNCVTX1xZFle/eJHttYkkfVMnG3sITPxo Pdgn/OmwAGDGCccFWKUypC9NvtXNu6RMHUMhgwnCNlXK76i2gYr7jWWI4o3I329/Qr3o faY4lveov0aeYcDegafuRED1fR79KcJ6G7Q7wNry4i+9qjx0fZIBT5vO7ZOKlDw9uJls kCau+KI+RUZapfEwZVHVEM5AQAwKzWprepmSDBeS+0KYmHBuaPGban6N4hq1iBa9VRkz HMpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=O7K9SAhs; spf=pass (google.com: domain of linux-kernel+bounces-931-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-931-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id s1-20020a50ab01000000b00551e2c7190csi2905221edc.430.2023.12.15.04.37.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 04:37:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-931-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=O7K9SAhs; spf=pass (google.com: domain of linux-kernel+bounces-931-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-931-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 12CB71F23992 for ; Fri, 15 Dec 2023 12:37:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A86A72AF10; Fri, 15 Dec 2023 12:37:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="O7K9SAhs" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D57F2420B for ; Fri, 15 Dec 2023 12:37:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-40c236624edso6502645e9.1 for ; Fri, 15 Dec 2023 04:37:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702643859; x=1703248659; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=DyIY/skl5L74MJSv/9NoU/GlPAZnZXPoIEkSa4htCY4=; b=O7K9SAhsROdrwQaTqnjAtQrdp8glf8tAOfbZ9CC+yrczIPdGX3zc2bC16iucBFVjpX ybHLJr4TZu0OROlIXMnZFqrRrX0qNxrq/oycKJQsSLYyvDsWkFqS1bUZrYiiFzF5ztCa iKI/l8u+48zdnvYl97RmXteY7aH5pgWXY70HXzTTEAI/Yi5jR34vr7bkiIZ3iQRfyN9l PGfyYEXR42So57QHKm++JXAYJ97prWnq5Eqz1m5/zf2wW5alj7F4FWTShzOcCNYDOX8K JJBdaVy9DHB0hvVAXbFz+A5VQGZOE+jcpAO4TOYIGx62+jgxRpLfd3TYWiH4+9zpKEv4 ljBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702643859; x=1703248659; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DyIY/skl5L74MJSv/9NoU/GlPAZnZXPoIEkSa4htCY4=; b=oMuYFBfqCrlwdC7d5W5cxyKEPizHfNDm1QJPMOLdw3seGgfsxzAzSjLn1AKwxodlD/ NyFTU4PN+zGiIThUsUJCk0PoP5iNTSvmtvOAAgqsuhcn77rL988gSgtGaQBOOmWFUmJh oTYvds/q28w7WhCTkL/0jPqQbfBhCZZCPkFoNzJ4fNFc41GKfzKYBO4p/Wcx6oR/EJfA LoR62il0RXMZUmnxh56lt9iDvq9lZ+QKSVb1gW7csdOIBdrMT0crFps0leNjCH01ddSn Iyh15EXHUdNoQbGorsfXJHVeMd+xQkUdiUMG6GzjwYZNabMn2ehdsyZswKDDiWtszYzI u5rQ== X-Gm-Message-State: AOJu0YwodTA718796oZUvYxSAZZ9Aq0IgsZbvpB5SNnvRPOtwuIBNUqQ a+ZjG/N2/n188ngzgYg44E8= X-Received: by 2002:a05:600c:45c9:b0:40b:369b:2c53 with SMTP id s9-20020a05600c45c900b0040b369b2c53mr5583664wmo.22.1702643859316; Fri, 15 Dec 2023 04:37:39 -0800 (PST) Received: from [10.254.108.81] (munvpn.amd.com. [165.204.72.6]) by smtp.gmail.com with ESMTPSA id gw18-20020a05600c851200b004053e9276easm31092704wmb.32.2023.12.15.04.37.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Dec 2023 04:37:37 -0800 (PST) Message-ID: <8bce512e-abb6-495d-85a4-63648229859e@gmail.com> Date: Fri, 15 Dec 2023 13:37:35 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: amdgpu didn't start with pci=nocrs parameter, get error "Fatal error during GPU init" Content-Language: en-US To: Mikhail Gavrilov Cc: amd-gfx list , dri-devel , Linux List Kernel Mailing , "Deucher, Alexander" References: <43016018-4d0a-94dc-ce93-b4bff2dce71c@gmail.com> <90b1c9f8-1674-e9ec-e6d8-2fa1967439b3@gmail.com> <5cbba992-c4ce-01c1-2691-ed65ce66aad5@gmail.com> From: =?UTF-8?Q?Christian_K=C3=B6nig?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Am 15.12.23 um 12:45 schrieb Mikhail Gavrilov: > On Tue, Feb 28, 2023 at 5:43 PM Christian König > wrote: >> The point is it doesn't need to talk to the amdgpu hardware. What it >> does is that it talks to the good old VGA/VESA emulation and that just >> happens to be still enabled by the BIOS/GRUB. >> >> And that VGA/VESA emulation doesn't need any BAR or whatever to keep the >> hw running in the state where it was initialized before the kernel >> started. The kernel just grabs the addresses where it needs to write the >> display data and keeps going with that. >> >> But when a hw specific driver wants to load this is the first thing >> which gets disabled because we need to load new firmware. And with the >> BARs disabled this can't be re-enabled without rebooting the system. >> >>> My suggestion is that if >>> amdgpu fails to talk to the hardware, then let another suitable driver >>> do it. I attached a system log when I apply "pci=nocrs" with >>> "modprobe.blacklist=amdgpu" for showing that graphics work right in >>> this case. >>> To do this, does the Linux module loading mechanism need to be refined? >> That's actually working as expected. The real problem is that the BIOS >> on that system is so broken that we can't access the hw correctly. >> >> What we could to do is to check the BARs very early on and refuse to >> load when they are disable. The problem with this approach is that there >> are systems where it is normal that the BARs are disable until the >> driver loads and get enabled during the hardware initialization process. >> >> What you might want to look into is to find a quirk for the BIOS to >> properly enable the nvme controller. >> > That's interesting. I noticed that now amdgpu could work even with > parameter [pci=nocrs] on 6.7.0-0.rc4 and higher kernels. > It means BARs became available? > I attached here the kerner log and lspci. What's changed? I have no idea :) From the logs I can see that the AMDGPU now has the proper BARs assigned: [    5.722015] pci 0000:03:00.0: [1002:73df] type 00 class 0x038000 [    5.722051] pci 0000:03:00.0: reg 0x10: [mem 0xf800000000-0xfbffffffff 64bit pref] [    5.722081] pci 0000:03:00.0: reg 0x18: [mem 0xfc00000000-0xfc0fffffff 64bit pref] [    5.722112] pci 0000:03:00.0: reg 0x24: [mem 0xfca00000-0xfcafffff] [    5.722134] pci 0000:03:00.0: reg 0x30: [mem 0xfcb00000-0xfcb1ffff pref] [    5.722368] pci 0000:03:00.0: PME# supported from D1 D2 D3hot D3cold [    5.722484] pci 0000:03:00.0: 63.008 Gb/s available PCIe bandwidth, limited by 8.0 GT/s PCIe x8 link at 0000:00:01.1 (capable of 252.048 Gb/s with 16.0 GT/s PCIe x16 link) And with that the driver can work perfectly fine. Have you updated the BIOS or added/removed some other hardware? Maybe somebody added a quirk for your BIOS into the PCIe code or something like that. Regards, Christian.